@venizia/ignis-helpers 0.0.1-1 → 0.0.1-2
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/common/constants/app.d.ts +21 -0
- package/dist/common/constants/app.d.ts.map +1 -0
- package/dist/common/constants/app.js +36 -0
- package/dist/common/constants/app.js.map +1 -0
- package/dist/common/constants/http.d.ts +56 -0
- package/dist/common/constants/http.d.ts.map +1 -0
- package/dist/common/constants/http.js +60 -0
- package/dist/common/constants/http.js.map +1 -0
- package/dist/common/constants/index.d.ts +4 -0
- package/dist/common/constants/index.d.ts.map +1 -0
- package/dist/common/constants/index.js +20 -0
- package/dist/common/constants/index.js.map +1 -0
- package/dist/common/constants/mime.d.ts +9 -0
- package/dist/common/constants/mime.d.ts.map +1 -0
- package/dist/common/constants/mime.js +11 -0
- package/dist/common/constants/mime.js.map +1 -0
- package/dist/common/index.d.ts +3 -0
- package/dist/common/index.d.ts.map +1 -0
- package/dist/common/index.js +19 -0
- package/dist/common/index.js.map +1 -0
- package/dist/common/types.d.ts +81 -0
- package/dist/common/types.d.ts.map +1 -0
- package/dist/common/types.js +12 -0
- package/dist/common/types.js.map +1 -0
- package/dist/helpers/base.d.ts +13 -0
- package/dist/helpers/base.d.ts.map +1 -0
- package/dist/helpers/base.js +19 -0
- package/dist/helpers/base.js.map +1 -0
- package/dist/helpers/cron/cron.helper.d.ts +31 -0
- package/dist/helpers/cron/cron.helper.d.ts.map +1 -0
- package/dist/helpers/cron/cron.helper.js +70 -0
- package/dist/helpers/cron/cron.helper.js.map +1 -0
- package/dist/helpers/cron/index.d.ts +2 -0
- package/dist/helpers/cron/index.d.ts.map +1 -0
- package/dist/helpers/cron/index.js +18 -0
- package/dist/helpers/cron/index.js.map +1 -0
- package/dist/helpers/crypto/algorithms/aes.algorithm.d.ts +21 -0
- package/dist/helpers/crypto/algorithms/aes.algorithm.d.ts.map +1 -0
- package/dist/helpers/crypto/algorithms/aes.algorithm.js +103 -0
- package/dist/helpers/crypto/algorithms/aes.algorithm.js.map +1 -0
- package/dist/helpers/crypto/algorithms/base.algorithm.d.ts +23 -0
- package/dist/helpers/crypto/algorithms/base.algorithm.d.ts.map +1 -0
- package/dist/helpers/crypto/algorithms/base.algorithm.js +41 -0
- package/dist/helpers/crypto/algorithms/base.algorithm.js.map +1 -0
- package/dist/helpers/crypto/algorithms/index.d.ts +4 -0
- package/dist/helpers/crypto/algorithms/index.d.ts.map +1 -0
- package/dist/helpers/crypto/algorithms/index.js +20 -0
- package/dist/helpers/crypto/algorithms/index.js.map +1 -0
- package/dist/helpers/crypto/algorithms/rsa.algorithm.d.ts +27 -0
- package/dist/helpers/crypto/algorithms/rsa.algorithm.d.ts.map +1 -0
- package/dist/helpers/crypto/algorithms/rsa.algorithm.js +63 -0
- package/dist/helpers/crypto/algorithms/rsa.algorithm.js.map +1 -0
- package/dist/helpers/crypto/common/constants.d.ts +3 -0
- package/dist/helpers/crypto/common/constants.d.ts.map +1 -0
- package/dist/helpers/crypto/common/constants.js +6 -0
- package/dist/helpers/crypto/common/constants.js.map +1 -0
- package/dist/helpers/crypto/common/index.d.ts +3 -0
- package/dist/helpers/crypto/common/index.d.ts.map +1 -0
- package/dist/helpers/crypto/common/index.js +19 -0
- package/dist/helpers/crypto/common/index.js.map +1 -0
- package/dist/helpers/crypto/common/types.d.ts +6 -0
- package/dist/helpers/crypto/common/types.d.ts.map +1 -0
- package/dist/helpers/crypto/common/types.js +3 -0
- package/dist/helpers/crypto/common/types.js.map +1 -0
- package/dist/helpers/crypto/index.d.ts +3 -0
- package/dist/helpers/crypto/index.d.ts.map +1 -0
- package/dist/helpers/crypto/index.js +19 -0
- package/dist/helpers/crypto/index.js.map +1 -0
- package/dist/helpers/env/app-env.d.ts +29 -0
- package/dist/helpers/env/app-env.d.ts.map +1 -0
- package/dist/helpers/env/app-env.js +58 -0
- package/dist/helpers/env/app-env.js.map +1 -0
- package/dist/helpers/env/index.d.ts +3 -0
- package/dist/helpers/env/index.d.ts.map +1 -0
- package/dist/helpers/env/index.js +19 -0
- package/dist/helpers/env/index.js.map +1 -0
- package/dist/helpers/env/types.d.ts +5 -0
- package/dist/helpers/env/types.d.ts.map +1 -0
- package/dist/helpers/env/types.js +3 -0
- package/dist/helpers/env/types.js.map +1 -0
- package/dist/helpers/error/app-error.d.ts +9 -0
- package/dist/helpers/error/app-error.d.ts.map +1 -0
- package/dist/helpers/error/app-error.js +20 -0
- package/dist/helpers/error/app-error.js.map +1 -0
- package/dist/helpers/error/index.d.ts +3 -0
- package/dist/helpers/error/index.d.ts.map +1 -0
- package/dist/helpers/error/index.js +19 -0
- package/dist/helpers/error/index.js.map +1 -0
- package/dist/helpers/error/types.d.ts +9 -0
- package/dist/helpers/error/types.d.ts.map +1 -0
- package/dist/helpers/error/types.js +22 -0
- package/dist/helpers/error/types.js.map +1 -0
- package/dist/helpers/index.d.ts +15 -0
- package/dist/helpers/index.d.ts.map +1 -0
- package/dist/helpers/index.js +31 -0
- package/dist/helpers/index.js.map +1 -0
- package/dist/helpers/inversion/common/index.d.ts +3 -0
- package/dist/helpers/inversion/common/index.d.ts.map +1 -0
- package/dist/helpers/inversion/common/index.js +19 -0
- package/dist/helpers/inversion/common/index.js.map +1 -0
- package/dist/helpers/inversion/common/keys.d.ts +12 -0
- package/dist/helpers/inversion/common/keys.d.ts.map +1 -0
- package/dist/helpers/inversion/common/keys.js +16 -0
- package/dist/helpers/inversion/common/keys.js.map +1 -0
- package/dist/helpers/inversion/common/types.d.ts +28 -0
- package/dist/helpers/inversion/common/types.d.ts.map +1 -0
- package/dist/helpers/inversion/common/types.js +12 -0
- package/dist/helpers/inversion/common/types.js.map +1 -0
- package/dist/helpers/inversion/container.d.ts +10 -0
- package/dist/helpers/inversion/container.d.ts.map +1 -0
- package/dist/helpers/inversion/container.js +18 -0
- package/dist/helpers/inversion/container.js.map +1 -0
- package/dist/helpers/inversion/index.d.ts +5 -0
- package/dist/helpers/inversion/index.d.ts.map +1 -0
- package/dist/helpers/inversion/index.js +26 -0
- package/dist/helpers/inversion/index.js.map +1 -0
- package/dist/helpers/inversion/registry.d.ts +73 -0
- package/dist/helpers/inversion/registry.d.ts.map +1 -0
- package/dist/helpers/inversion/registry.js +107 -0
- package/dist/helpers/inversion/registry.js.map +1 -0
- package/dist/helpers/logger/application-logger.d.ts +22 -0
- package/dist/helpers/logger/application-logger.d.ts.map +1 -0
- package/dist/helpers/logger/application-logger.js +87 -0
- package/dist/helpers/logger/application-logger.js.map +1 -0
- package/dist/helpers/logger/default-logger.d.ts +34 -0
- package/dist/helpers/logger/default-logger.d.ts.map +1 -0
- package/dist/helpers/logger/default-logger.js +118 -0
- package/dist/helpers/logger/default-logger.js.map +1 -0
- package/dist/helpers/logger/factory.d.ts +5 -0
- package/dist/helpers/logger/factory.d.ts.map +1 -0
- package/dist/helpers/logger/factory.js +13 -0
- package/dist/helpers/logger/factory.js.map +1 -0
- package/dist/helpers/logger/index.d.ts +6 -0
- package/dist/helpers/logger/index.d.ts.map +1 -0
- package/dist/helpers/logger/index.js +22 -0
- package/dist/helpers/logger/index.js.map +1 -0
- package/dist/helpers/logger/transports/dgram.transport.d.ts +29 -0
- package/dist/helpers/logger/transports/dgram.transport.d.ts.map +1 -0
- package/dist/helpers/logger/transports/dgram.transport.js +69 -0
- package/dist/helpers/logger/transports/dgram.transport.js.map +1 -0
- package/dist/helpers/logger/transports/index.d.ts +2 -0
- package/dist/helpers/logger/transports/index.d.ts.map +1 -0
- package/dist/helpers/logger/transports/index.js +18 -0
- package/dist/helpers/logger/transports/index.js.map +1 -0
- package/dist/helpers/logger/types.d.ts +16 -0
- package/dist/helpers/logger/types.d.ts.map +1 -0
- package/dist/helpers/logger/types.js +30 -0
- package/dist/helpers/logger/types.js.map +1 -0
- package/dist/helpers/network/http-request/base-network-request.helper.d.ts +42 -0
- package/dist/helpers/network/http-request/base-network-request.helper.d.ts.map +1 -0
- package/dist/helpers/network/http-request/base-network-request.helper.js +98 -0
- package/dist/helpers/network/http-request/base-network-request.helper.js.map +1 -0
- package/dist/helpers/network/http-request/fetcher/axios-fetcher.d.ts +19 -0
- package/dist/helpers/network/http-request/fetcher/axios-fetcher.d.ts.map +1 -0
- package/dist/helpers/network/http-request/fetcher/axios-fetcher.js +44 -0
- package/dist/helpers/network/http-request/fetcher/axios-fetcher.js.map +1 -0
- package/dist/helpers/network/http-request/fetcher/base-fetcher.d.ts +35 -0
- package/dist/helpers/network/http-request/fetcher/base-fetcher.d.ts.map +1 -0
- package/dist/helpers/network/http-request/fetcher/base-fetcher.js +54 -0
- package/dist/helpers/network/http-request/fetcher/base-fetcher.js.map +1 -0
- package/dist/helpers/network/http-request/fetcher/index.d.ts +4 -0
- package/dist/helpers/network/http-request/fetcher/index.d.ts.map +1 -0
- package/dist/helpers/network/http-request/fetcher/index.js +20 -0
- package/dist/helpers/network/http-request/fetcher/index.js.map +1 -0
- package/dist/helpers/network/http-request/fetcher/node-fetcher.d.ts +15 -0
- package/dist/helpers/network/http-request/fetcher/node-fetcher.d.ts.map +1 -0
- package/dist/helpers/network/http-request/fetcher/node-fetcher.js +57 -0
- package/dist/helpers/network/http-request/fetcher/node-fetcher.js.map +1 -0
- package/dist/helpers/network/http-request/index.d.ts +3 -0
- package/dist/helpers/network/http-request/index.d.ts.map +1 -0
- package/dist/helpers/network/http-request/index.js +19 -0
- package/dist/helpers/network/http-request/index.js.map +1 -0
- package/dist/helpers/network/http-request/types.d.ts +5 -0
- package/dist/helpers/network/http-request/types.d.ts.map +1 -0
- package/dist/helpers/network/http-request/types.js +3 -0
- package/dist/helpers/network/http-request/types.js.map +1 -0
- package/dist/helpers/network/index.d.ts +4 -0
- package/dist/helpers/network/index.d.ts.map +1 -0
- package/dist/helpers/network/index.js +20 -0
- package/dist/helpers/network/index.js.map +1 -0
- package/dist/helpers/network/tcp-socket/base-tcp-client.helper.d.ts +66 -0
- package/dist/helpers/network/tcp-socket/base-tcp-client.helper.d.ts.map +1 -0
- package/dist/helpers/network/tcp-socket/base-tcp-client.helper.js +134 -0
- package/dist/helpers/network/tcp-socket/base-tcp-client.helper.js.map +1 -0
- package/dist/helpers/network/tcp-socket/base-tcp-server.helper.d.ts +108 -0
- package/dist/helpers/network/tcp-socket/base-tcp-server.helper.d.ts.map +1 -0
- package/dist/helpers/network/tcp-socket/base-tcp-server.helper.js +149 -0
- package/dist/helpers/network/tcp-socket/base-tcp-server.helper.js.map +1 -0
- package/dist/helpers/network/tcp-socket/index.d.ts +7 -0
- package/dist/helpers/network/tcp-socket/index.d.ts.map +1 -0
- package/dist/helpers/network/tcp-socket/index.js +23 -0
- package/dist/helpers/network/tcp-socket/index.js.map +1 -0
- package/dist/helpers/network/tcp-socket/network-tcp-client.helper.d.ts +7 -0
- package/dist/helpers/network/tcp-socket/network-tcp-client.helper.d.ts.map +1 -0
- package/dist/helpers/network/tcp-socket/network-tcp-client.helper.js +20 -0
- package/dist/helpers/network/tcp-socket/network-tcp-client.helper.js.map +1 -0
- package/dist/helpers/network/tcp-socket/network-tcp-server.helper.d.ts +7 -0
- package/dist/helpers/network/tcp-socket/network-tcp-server.helper.d.ts.map +1 -0
- package/dist/helpers/network/tcp-socket/network-tcp-server.helper.js +19 -0
- package/dist/helpers/network/tcp-socket/network-tcp-server.helper.js.map +1 -0
- package/dist/helpers/network/tcp-socket/network-tls-tcp-client.helper.d.ts +7 -0
- package/dist/helpers/network/tcp-socket/network-tls-tcp-client.helper.d.ts.map +1 -0
- package/dist/helpers/network/tcp-socket/network-tls-tcp-client.helper.js +20 -0
- package/dist/helpers/network/tcp-socket/network-tls-tcp-client.helper.js.map +1 -0
- package/dist/helpers/network/tcp-socket/network-tls-tcp-server.helper.d.ts +7 -0
- package/dist/helpers/network/tcp-socket/network-tls-tcp-server.helper.d.ts.map +1 -0
- package/dist/helpers/network/tcp-socket/network-tls-tcp-server.helper.js +19 -0
- package/dist/helpers/network/tcp-socket/network-tls-tcp-server.helper.js.map +1 -0
- package/dist/helpers/network/udp-socket/index.d.ts +2 -0
- package/dist/helpers/network/udp-socket/index.d.ts.map +1 -0
- package/dist/helpers/network/udp-socket/index.js +18 -0
- package/dist/helpers/network/udp-socket/index.js.map +1 -0
- package/dist/helpers/network/udp-socket/network-udp-client.helper.d.ts +76 -0
- package/dist/helpers/network/udp-socket/network-udp-client.helper.d.ts.map +1 -0
- package/dist/helpers/network/udp-socket/network-udp-client.helper.js +102 -0
- package/dist/helpers/network/udp-socket/network-udp-client.helper.js.map +1 -0
- package/dist/helpers/queue/bullmq/helper.d.ts +34 -0
- package/dist/helpers/queue/bullmq/helper.d.ts.map +1 -0
- package/dist/helpers/queue/bullmq/helper.js +92 -0
- package/dist/helpers/queue/bullmq/helper.js.map +1 -0
- package/dist/helpers/queue/bullmq/index.d.ts +2 -0
- package/dist/helpers/queue/bullmq/index.d.ts.map +1 -0
- package/dist/helpers/queue/bullmq/index.js +18 -0
- package/dist/helpers/queue/bullmq/index.js.map +1 -0
- package/dist/helpers/queue/common/index.d.ts +2 -0
- package/dist/helpers/queue/common/index.d.ts.map +1 -0
- package/dist/helpers/queue/common/index.js +18 -0
- package/dist/helpers/queue/common/index.js.map +1 -0
- package/dist/helpers/queue/common/types.d.ts +2 -0
- package/dist/helpers/queue/common/types.d.ts.map +1 -0
- package/dist/helpers/queue/common/types.js +3 -0
- package/dist/helpers/queue/common/types.js.map +1 -0
- package/dist/helpers/queue/index.d.ts +5 -0
- package/dist/helpers/queue/index.d.ts.map +1 -0
- package/dist/helpers/queue/index.js +21 -0
- package/dist/helpers/queue/index.js.map +1 -0
- package/dist/helpers/queue/internal/helper.d.ts +69 -0
- package/dist/helpers/queue/internal/helper.d.ts.map +1 -0
- package/dist/helpers/queue/internal/helper.js +231 -0
- package/dist/helpers/queue/internal/helper.js.map +1 -0
- package/dist/helpers/queue/internal/index.d.ts +2 -0
- package/dist/helpers/queue/internal/index.d.ts.map +1 -0
- package/dist/helpers/queue/internal/index.js +18 -0
- package/dist/helpers/queue/internal/index.js.map +1 -0
- package/dist/helpers/queue/mqtt/helper.d.ts +35 -0
- package/dist/helpers/queue/mqtt/helper.d.ts.map +1 -0
- package/dist/helpers/queue/mqtt/helper.js +91 -0
- package/dist/helpers/queue/mqtt/helper.js.map +1 -0
- package/dist/helpers/queue/mqtt/index.d.ts +2 -0
- package/dist/helpers/queue/mqtt/index.d.ts.map +1 -0
- package/dist/helpers/queue/mqtt/index.js +18 -0
- package/dist/helpers/queue/mqtt/index.js.map +1 -0
- package/dist/helpers/redis/cluster.helper.d.ts +8 -0
- package/dist/helpers/redis/cluster.helper.d.ts.map +1 -0
- package/dist/helpers/redis/cluster.helper.js +27 -0
- package/dist/helpers/redis/cluster.helper.js.map +1 -0
- package/dist/helpers/redis/default.helper.d.ts +135 -0
- package/dist/helpers/redis/default.helper.d.ts.map +1 -0
- package/dist/helpers/redis/default.helper.js +307 -0
- package/dist/helpers/redis/default.helper.js.map +1 -0
- package/dist/helpers/redis/index.d.ts +5 -0
- package/dist/helpers/redis/index.d.ts.map +1 -0
- package/dist/helpers/redis/index.js +21 -0
- package/dist/helpers/redis/index.js.map +1 -0
- package/dist/helpers/redis/single.helper.d.ts +8 -0
- package/dist/helpers/redis/single.helper.d.ts.map +1 -0
- package/dist/helpers/redis/single.helper.js +43 -0
- package/dist/helpers/redis/single.helper.js.map +1 -0
- package/dist/helpers/redis/types.d.ts +43 -0
- package/dist/helpers/redis/types.d.ts.map +1 -0
- package/dist/helpers/redis/types.js +3 -0
- package/dist/helpers/redis/types.js.map +1 -0
- package/dist/helpers/socket-io/client/helper.d.ts +26 -0
- package/dist/helpers/socket-io/client/helper.d.ts.map +1 -0
- package/dist/helpers/socket-io/client/helper.js +93 -0
- package/dist/helpers/socket-io/client/helper.js.map +1 -0
- package/dist/helpers/socket-io/client/index.d.ts +2 -0
- package/dist/helpers/socket-io/client/index.d.ts.map +1 -0
- package/dist/helpers/socket-io/client/index.js +18 -0
- package/dist/helpers/socket-io/client/index.js.map +1 -0
- package/dist/helpers/socket-io/common/constants.d.ts +13 -0
- package/dist/helpers/socket-io/common/constants.d.ts.map +1 -0
- package/dist/helpers/socket-io/common/constants.js +17 -0
- package/dist/helpers/socket-io/common/constants.js.map +1 -0
- package/dist/helpers/socket-io/common/index.d.ts +3 -0
- package/dist/helpers/socket-io/common/index.d.ts.map +1 -0
- package/dist/helpers/socket-io/common/index.js +19 -0
- package/dist/helpers/socket-io/common/index.js.map +1 -0
- package/dist/helpers/socket-io/common/types.d.ts +41 -0
- package/dist/helpers/socket-io/common/types.d.ts.map +1 -0
- package/dist/helpers/socket-io/common/types.js +3 -0
- package/dist/helpers/socket-io/common/types.js.map +1 -0
- package/dist/helpers/socket-io/index.d.ts +4 -0
- package/dist/helpers/socket-io/index.d.ts.map +1 -0
- package/dist/helpers/socket-io/index.js +20 -0
- package/dist/helpers/socket-io/index.js.map +1 -0
- package/dist/helpers/socket-io/server/helper.d.ts +60 -0
- package/dist/helpers/socket-io/server/helper.d.ts.map +1 -0
- package/dist/helpers/socket-io/server/helper.js +327 -0
- package/dist/helpers/socket-io/server/helper.js.map +1 -0
- package/dist/helpers/socket-io/server/index.d.ts +2 -0
- package/dist/helpers/socket-io/server/index.d.ts.map +1 -0
- package/dist/helpers/socket-io/server/index.js +18 -0
- package/dist/helpers/socket-io/server/index.js.map +1 -0
- package/dist/helpers/storage/in-memory/helper.d.ts +16 -0
- package/dist/helpers/storage/in-memory/helper.d.ts.map +1 -0
- package/dist/helpers/storage/in-memory/helper.js +35 -0
- package/dist/helpers/storage/in-memory/helper.js.map +1 -0
- package/dist/helpers/storage/in-memory/index.d.ts +2 -0
- package/dist/helpers/storage/in-memory/index.d.ts.map +1 -0
- package/dist/helpers/storage/in-memory/index.js +18 -0
- package/dist/helpers/storage/in-memory/index.js.map +1 -0
- package/dist/helpers/storage/index.d.ts +3 -0
- package/dist/helpers/storage/index.d.ts.map +1 -0
- package/dist/helpers/storage/index.js +19 -0
- package/dist/helpers/storage/index.js.map +1 -0
- package/dist/helpers/storage/minio/helper.d.ts +67 -0
- package/dist/helpers/storage/minio/helper.d.ts.map +1 -0
- package/dist/helpers/storage/minio/helper.js +154 -0
- package/dist/helpers/storage/minio/helper.js.map +1 -0
- package/dist/helpers/storage/minio/index.d.ts +2 -0
- package/dist/helpers/storage/minio/index.d.ts.map +1 -0
- package/dist/helpers/storage/minio/index.js +18 -0
- package/dist/helpers/storage/minio/index.js.map +1 -0
- package/dist/helpers/testing/base-test-plan.d.ts +29 -0
- package/dist/helpers/testing/base-test-plan.d.ts.map +1 -0
- package/dist/helpers/testing/base-test-plan.js +69 -0
- package/dist/helpers/testing/base-test-plan.js.map +1 -0
- package/dist/helpers/testing/common/constants.d.ts +7 -0
- package/dist/helpers/testing/common/constants.d.ts.map +1 -0
- package/dist/helpers/testing/common/constants.js +10 -0
- package/dist/helpers/testing/common/constants.js.map +1 -0
- package/dist/helpers/testing/common/index.d.ts +3 -0
- package/dist/helpers/testing/common/index.d.ts.map +1 -0
- package/dist/helpers/testing/common/index.js +19 -0
- package/dist/helpers/testing/common/index.js.map +1 -0
- package/dist/helpers/testing/common/types.d.ts +54 -0
- package/dist/helpers/testing/common/types.d.ts.map +1 -0
- package/dist/helpers/testing/common/types.js +3 -0
- package/dist/helpers/testing/common/types.js.map +1 -0
- package/dist/helpers/testing/describe.d.ts +16 -0
- package/dist/helpers/testing/describe.d.ts.map +1 -0
- package/dist/helpers/testing/describe.js +47 -0
- package/dist/helpers/testing/describe.js.map +1 -0
- package/dist/helpers/testing/index.d.ts +7 -0
- package/dist/helpers/testing/index.d.ts.map +1 -0
- package/dist/helpers/testing/index.js +23 -0
- package/dist/helpers/testing/index.js.map +1 -0
- package/dist/helpers/testing/test-case.d.ts +21 -0
- package/dist/helpers/testing/test-case.d.ts.map +1 -0
- package/dist/helpers/testing/test-case.js +42 -0
- package/dist/helpers/testing/test-case.js.map +1 -0
- package/dist/helpers/testing/test-handler.d.ts +27 -0
- package/dist/helpers/testing/test-handler.d.ts.map +1 -0
- package/dist/helpers/testing/test-handler.js +54 -0
- package/dist/helpers/testing/test-handler.js.map +1 -0
- package/dist/helpers/testing/test-plan.d.ts +6 -0
- package/dist/helpers/testing/test-plan.d.ts.map +1 -0
- package/dist/helpers/testing/test-plan.js +11 -0
- package/dist/helpers/testing/test-plan.js.map +1 -0
- package/dist/helpers/worker-thread/base.d.ts +73 -0
- package/dist/helpers/worker-thread/base.d.ts.map +1 -0
- package/dist/helpers/worker-thread/base.js +130 -0
- package/dist/helpers/worker-thread/base.js.map +1 -0
- package/dist/helpers/worker-thread/index.d.ts +5 -0
- package/dist/helpers/worker-thread/index.d.ts.map +1 -0
- package/dist/helpers/worker-thread/index.js +21 -0
- package/dist/helpers/worker-thread/index.js.map +1 -0
- package/dist/helpers/worker-thread/types.d.ts +51 -0
- package/dist/helpers/worker-thread/types.d.ts.map +1 -0
- package/dist/helpers/worker-thread/types.js +3 -0
- package/dist/helpers/worker-thread/types.js.map +1 -0
- package/dist/helpers/worker-thread/worker-bus.d.ts +63 -0
- package/dist/helpers/worker-thread/worker-bus.d.ts.map +1 -0
- package/dist/helpers/worker-thread/worker-bus.js +67 -0
- package/dist/helpers/worker-thread/worker-bus.js.map +1 -0
- package/dist/helpers/worker-thread/worker-pool.d.ts +27 -0
- package/dist/helpers/worker-thread/worker-pool.d.ts.map +1 -0
- package/dist/helpers/worker-thread/worker-pool.js +66 -0
- package/dist/helpers/worker-thread/worker-pool.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/utilities/crypto.utility.d.ts +7 -0
- package/dist/utilities/crypto.utility.d.ts.map +1 -0
- package/dist/utilities/crypto.utility.js +26 -0
- package/dist/utilities/crypto.utility.js.map +1 -0
- package/dist/utilities/date.utility.d.ts +18 -0
- package/dist/utilities/date.utility.d.ts.map +1 -0
- package/dist/utilities/date.utility.js +59 -0
- package/dist/utilities/date.utility.js.map +1 -0
- package/dist/utilities/index.d.ts +8 -0
- package/dist/utilities/index.d.ts.map +1 -0
- package/dist/utilities/index.js +24 -0
- package/dist/utilities/index.js.map +1 -0
- package/dist/utilities/module.utility.d.ts +5 -0
- package/dist/utilities/module.utility.d.ts.map +1 -0
- package/dist/utilities/module.utility.js +21 -0
- package/dist/utilities/module.utility.js.map +1 -0
- package/dist/utilities/parse.utility.d.ts +34 -0
- package/dist/utilities/parse.utility.d.ts.map +1 -0
- package/dist/utilities/parse.utility.js +216 -0
- package/dist/utilities/parse.utility.js.map +1 -0
- package/dist/utilities/performance.utility.d.ts +15 -0
- package/dist/utilities/performance.utility.d.ts.map +1 -0
- package/dist/utilities/performance.utility.js +39 -0
- package/dist/utilities/performance.utility.js.map +1 -0
- package/dist/utilities/promise.utility.d.ts +40 -0
- package/dist/utilities/promise.utility.d.ts.map +1 -0
- package/dist/utilities/promise.utility.js +73 -0
- package/dist/utilities/promise.utility.js.map +1 -0
- package/dist/utilities/request.utility.d.ts +32 -0
- package/dist/utilities/request.utility.d.ts.map +1 -0
- package/dist/utilities/request.utility.js +60 -0
- package/dist/utilities/request.utility.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { TConstValue } from "../types";
|
|
2
|
+
export declare class Defaults {
|
|
3
|
+
static readonly APPLICATION_NAME: string;
|
|
4
|
+
static readonly QUERY_LIMIT = 50;
|
|
5
|
+
static readonly QUERY_OFFSET = 0;
|
|
6
|
+
}
|
|
7
|
+
export declare class RuntimeModules {
|
|
8
|
+
static readonly NODE = "node";
|
|
9
|
+
static readonly BUN = "bun";
|
|
10
|
+
}
|
|
11
|
+
export type TRuntimeModule = TConstValue<typeof RuntimeModules>;
|
|
12
|
+
export declare class DataTypes {
|
|
13
|
+
static readonly NUMBER = "NUMBER";
|
|
14
|
+
static readonly TEXT = "TEXT";
|
|
15
|
+
static readonly BYTE = "BYTE";
|
|
16
|
+
static readonly JSON = "JSON";
|
|
17
|
+
static readonly BOOLEAN = "BOOLEAN";
|
|
18
|
+
static readonly SCHEME_SET: Set<string>;
|
|
19
|
+
static isValid(orgType: string): boolean;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=app.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/common/constants/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGvC,qBAAa,QAAQ;IACnB,MAAM,CAAC,QAAQ,CAAC,gBAAgB,SAAiD;IAEjF,MAAM,CAAC,QAAQ,CAAC,WAAW,MAAM;IACjC,MAAM,CAAC,QAAQ,CAAC,YAAY,KAAK;CAClC;AAGD,qBAAa,cAAc;IACzB,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU;IAC9B,MAAM,CAAC,QAAQ,CAAC,GAAG,SAAS;CAC7B;AACD,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC,OAAO,cAAc,CAAC,CAAC;AAGhE,qBAAa,SAAS;IACpB,MAAM,CAAC,QAAQ,CAAC,MAAM,YAAY;IAClC,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU;IAC9B,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU;IAC9B,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU;IAC9B,MAAM,CAAC,QAAQ,CAAC,OAAO,aAAa;IAEpC,MAAM,CAAC,QAAQ,CAAC,UAAU,cAMvB;IAEH,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;CAGzC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataTypes = exports.RuntimeModules = exports.Defaults = void 0;
|
|
4
|
+
// ------------------------------------------------------------------------------
|
|
5
|
+
class Defaults {
|
|
6
|
+
static { this.APPLICATION_NAME = process.env.APP_ENV_APPLICATION_NAME ?? "APP"; }
|
|
7
|
+
static { this.QUERY_LIMIT = 50; }
|
|
8
|
+
static { this.QUERY_OFFSET = 0; }
|
|
9
|
+
}
|
|
10
|
+
exports.Defaults = Defaults;
|
|
11
|
+
// ------------------------------------------------------------------------------
|
|
12
|
+
class RuntimeModules {
|
|
13
|
+
static { this.NODE = "node"; }
|
|
14
|
+
static { this.BUN = "bun"; }
|
|
15
|
+
}
|
|
16
|
+
exports.RuntimeModules = RuntimeModules;
|
|
17
|
+
// ------------------------------------------------------------------------------
|
|
18
|
+
class DataTypes {
|
|
19
|
+
static { this.NUMBER = "NUMBER"; }
|
|
20
|
+
static { this.TEXT = "TEXT"; }
|
|
21
|
+
static { this.BYTE = "BYTE"; }
|
|
22
|
+
static { this.JSON = "JSON"; }
|
|
23
|
+
static { this.BOOLEAN = "BOOLEAN"; }
|
|
24
|
+
static { this.SCHEME_SET = new Set([
|
|
25
|
+
this.NUMBER,
|
|
26
|
+
this.TEXT,
|
|
27
|
+
this.BYTE,
|
|
28
|
+
this.JSON,
|
|
29
|
+
this.BOOLEAN,
|
|
30
|
+
]); }
|
|
31
|
+
static isValid(orgType) {
|
|
32
|
+
return this.SCHEME_SET.has(orgType);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.DataTypes = DataTypes;
|
|
36
|
+
//# sourceMappingURL=app.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../../src/common/constants/app.ts"],"names":[],"mappings":";;;AAEA,iFAAiF;AACjF,MAAa,QAAQ;aACH,qBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAwB,IAAI,KAAK,CAAC;aAEjE,gBAAW,GAAG,EAAE,CAAC;aACjB,iBAAY,GAAG,CAAC,CAAC;;AAJnC,4BAKC;AAED,iFAAiF;AACjF,MAAa,cAAc;aACT,SAAI,GAAG,MAAM,CAAC;aACd,QAAG,GAAG,KAAK,CAAC;;AAF9B,wCAGC;AAGD,iFAAiF;AACjF,MAAa,SAAS;aACJ,WAAM,GAAG,QAAQ,CAAC;aAClB,SAAI,GAAG,MAAM,CAAC;aACd,SAAI,GAAG,MAAM,CAAC;aACd,SAAI,GAAG,MAAM,CAAC;aACd,YAAO,GAAG,SAAS,CAAC;aAEpB,eAAU,GAAG,IAAI,GAAG,CAAC;QACnC,IAAI,CAAC,MAAM;QACX,IAAI,CAAC,IAAI;QACT,IAAI,CAAC,IAAI;QACT,IAAI,CAAC,IAAI;QACT,IAAI,CAAC,OAAO;KACb,CAAC,CAAC;IAEH,MAAM,CAAC,OAAO,CAAC,OAAe;QAC5B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;;AAjBH,8BAkBC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ValueOf } from "../types";
|
|
2
|
+
export declare class HTTP {
|
|
3
|
+
static readonly Headers: {
|
|
4
|
+
readonly AUTHORIZATION: "authorization";
|
|
5
|
+
readonly REQUEST_TRACING_ID: "x-request-id";
|
|
6
|
+
};
|
|
7
|
+
static readonly HeaderValues: {
|
|
8
|
+
readonly APPLICATION_JSON: "application/json";
|
|
9
|
+
readonly APPLICATION_FORM_URLENCODED: "application/x-www-form-urlencoded";
|
|
10
|
+
readonly TEXT_PLAIN: "text/plain";
|
|
11
|
+
readonly MULTIPART_FORM_DATA: "multipart/form-data";
|
|
12
|
+
};
|
|
13
|
+
static readonly Methods: {
|
|
14
|
+
readonly GET: "get";
|
|
15
|
+
readonly POST: "post";
|
|
16
|
+
readonly PUT: "put";
|
|
17
|
+
readonly PATCH: "patch";
|
|
18
|
+
readonly DELETE: "delete";
|
|
19
|
+
readonly HEAD: "head";
|
|
20
|
+
readonly OPTIONS: "options";
|
|
21
|
+
};
|
|
22
|
+
static readonly ResultCodes: {
|
|
23
|
+
readonly RS_FAIL: 0;
|
|
24
|
+
readonly RS_SUCCESS: 1;
|
|
25
|
+
readonly RS_UNKNOWN_ERROR: -199;
|
|
26
|
+
readonly RS_2: {
|
|
27
|
+
readonly Ok: 200;
|
|
28
|
+
readonly Created: 201;
|
|
29
|
+
readonly Accepted: 202;
|
|
30
|
+
readonly NonAuthoritativeInformation: 203;
|
|
31
|
+
readonly NoContent: 204;
|
|
32
|
+
readonly ResetContent: 205;
|
|
33
|
+
readonly PartialContent: 206;
|
|
34
|
+
};
|
|
35
|
+
readonly RS_4: {
|
|
36
|
+
readonly BadRequest: 400;
|
|
37
|
+
readonly Unauthorized: 401;
|
|
38
|
+
readonly PaymentRequired: 402;
|
|
39
|
+
readonly Forbidden: 403;
|
|
40
|
+
readonly NotFound: 404;
|
|
41
|
+
readonly MethodNotAllowed: 405;
|
|
42
|
+
readonly RequestTimeout: 408;
|
|
43
|
+
readonly ContentTooLarge: 413;
|
|
44
|
+
readonly URITooLong: 414;
|
|
45
|
+
readonly UnsupportedMediaType: 415;
|
|
46
|
+
readonly UnprocessableEntity: 422;
|
|
47
|
+
};
|
|
48
|
+
readonly RS_5: {
|
|
49
|
+
readonly InternalServerError: 500;
|
|
50
|
+
readonly NotImplemented: 501;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export type THttpMethod = ValueOf<typeof HTTP.Methods>;
|
|
55
|
+
export type THttpResultCode = ValueOf<typeof HTTP.ResultCodes>;
|
|
56
|
+
//# sourceMappingURL=http.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/common/constants/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,qBAAa,IAAI;IACf,MAAM,CAAC,QAAQ,CAAC,OAAO;;;MAGZ;IAEX,MAAM,CAAC,QAAQ,CAAC,YAAY;;;;;MAKjB;IAEX,MAAM,CAAC,QAAQ,CAAC,OAAO;;;;;;;;MAQZ;IAEX,MAAM,CAAC,QAAQ,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAoChB;CACZ;AAED,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;AACvD,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HTTP = void 0;
|
|
4
|
+
class HTTP {
|
|
5
|
+
static { this.Headers = {
|
|
6
|
+
AUTHORIZATION: "authorization",
|
|
7
|
+
REQUEST_TRACING_ID: "x-request-id",
|
|
8
|
+
}; }
|
|
9
|
+
static { this.HeaderValues = {
|
|
10
|
+
APPLICATION_JSON: "application/json",
|
|
11
|
+
APPLICATION_FORM_URLENCODED: "application/x-www-form-urlencoded",
|
|
12
|
+
TEXT_PLAIN: "text/plain",
|
|
13
|
+
MULTIPART_FORM_DATA: "multipart/form-data",
|
|
14
|
+
}; }
|
|
15
|
+
static { this.Methods = {
|
|
16
|
+
GET: "get",
|
|
17
|
+
POST: "post",
|
|
18
|
+
PUT: "put",
|
|
19
|
+
PATCH: "patch",
|
|
20
|
+
DELETE: "delete",
|
|
21
|
+
HEAD: "head",
|
|
22
|
+
OPTIONS: "options",
|
|
23
|
+
}; }
|
|
24
|
+
static { this.ResultCodes = {
|
|
25
|
+
RS_FAIL: 0,
|
|
26
|
+
RS_SUCCESS: 1,
|
|
27
|
+
RS_UNKNOWN_ERROR: -199,
|
|
28
|
+
// 2xx successful – the request was successfully received, understood, and accepted
|
|
29
|
+
RS_2: {
|
|
30
|
+
Ok: 200,
|
|
31
|
+
Created: 201,
|
|
32
|
+
Accepted: 202,
|
|
33
|
+
NonAuthoritativeInformation: 203,
|
|
34
|
+
NoContent: 204,
|
|
35
|
+
ResetContent: 205,
|
|
36
|
+
PartialContent: 206,
|
|
37
|
+
},
|
|
38
|
+
// 4xx client error – the request contains bad syntax or cannot be fulfilled
|
|
39
|
+
RS_4: {
|
|
40
|
+
BadRequest: 400,
|
|
41
|
+
Unauthorized: 401,
|
|
42
|
+
PaymentRequired: 402,
|
|
43
|
+
Forbidden: 403,
|
|
44
|
+
NotFound: 404,
|
|
45
|
+
MethodNotAllowed: 405,
|
|
46
|
+
RequestTimeout: 408,
|
|
47
|
+
ContentTooLarge: 413,
|
|
48
|
+
URITooLong: 414,
|
|
49
|
+
UnsupportedMediaType: 415,
|
|
50
|
+
UnprocessableEntity: 422,
|
|
51
|
+
},
|
|
52
|
+
// 5xx server error – the server failed to fulfil an apparently valid request
|
|
53
|
+
RS_5: {
|
|
54
|
+
InternalServerError: 500,
|
|
55
|
+
NotImplemented: 501,
|
|
56
|
+
},
|
|
57
|
+
}; }
|
|
58
|
+
}
|
|
59
|
+
exports.HTTP = HTTP;
|
|
60
|
+
//# sourceMappingURL=http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../../src/common/constants/http.ts"],"names":[],"mappings":";;;AAEA,MAAa,IAAI;aACC,YAAO,GAAG;QACxB,aAAa,EAAE,eAAe;QAC9B,kBAAkB,EAAE,cAAc;KAC1B,CAAC;aAEK,iBAAY,GAAG;QAC7B,gBAAgB,EAAE,kBAAkB;QACpC,2BAA2B,EAAE,mCAAmC;QAChE,UAAU,EAAE,YAAY;QACxB,mBAAmB,EAAE,qBAAqB;KAClC,CAAC;aAEK,YAAO,GAAG;QACxB,GAAG,EAAE,KAAK;QACV,IAAI,EAAE,MAAM;QACZ,GAAG,EAAE,KAAK;QACV,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,QAAQ;QAChB,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,SAAS;KACV,CAAC;aAEK,gBAAW,GAAG;QAC5B,OAAO,EAAE,CAAC;QACV,UAAU,EAAE,CAAC;QACb,gBAAgB,EAAE,CAAC,GAAG;QAEtB,mFAAmF;QACnF,IAAI,EAAE;YACJ,EAAE,EAAE,GAAG;YACP,OAAO,EAAE,GAAG;YACZ,QAAQ,EAAE,GAAG;YACb,2BAA2B,EAAE,GAAG;YAChC,SAAS,EAAE,GAAG;YACd,YAAY,EAAE,GAAG;YACjB,cAAc,EAAE,GAAG;SACpB;QAED,4EAA4E;QAC5E,IAAI,EAAE;YACJ,UAAU,EAAE,GAAG;YACf,YAAY,EAAE,GAAG;YACjB,eAAe,EAAE,GAAG;YACpB,SAAS,EAAE,GAAG;YACd,QAAQ,EAAE,GAAG;YACb,gBAAgB,EAAE,GAAG;YACrB,cAAc,EAAE,GAAG;YACnB,eAAe,EAAE,GAAG;YACpB,UAAU,EAAE,GAAG;YACf,oBAAoB,EAAE,GAAG;YACzB,mBAAmB,EAAE,GAAG;SACzB;QAED,6EAA6E;QAC7E,IAAI,EAAE;YACJ,mBAAmB,EAAE,GAAG;YACxB,cAAc,EAAE,GAAG;SACpB;KACO,CAAC;;AA3Db,oBA4DC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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("./app"), exports);
|
|
18
|
+
__exportStar(require("./http"), exports);
|
|
19
|
+
__exportStar(require("./mime"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/constants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,yCAAuB;AACvB,yCAAuB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TConstValue } from "../types";
|
|
2
|
+
export declare class MimeTypes {
|
|
3
|
+
static readonly UNKNOWN = "unknown";
|
|
4
|
+
static readonly IMAGE = "image";
|
|
5
|
+
static readonly VIDEO = "video";
|
|
6
|
+
static readonly TEXT = "text";
|
|
7
|
+
}
|
|
8
|
+
export type TMimeTypes = TConstValue<typeof MimeTypes>;
|
|
9
|
+
//# sourceMappingURL=mime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mime.d.ts","sourceRoot":"","sources":["../../../src/common/constants/mime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,qBAAa,SAAS;IACpB,MAAM,CAAC,QAAQ,CAAC,OAAO,aAAa;IACpC,MAAM,CAAC,QAAQ,CAAC,KAAK,WAAW;IAChC,MAAM,CAAC,QAAQ,CAAC,KAAK,WAAW;IAChC,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU;CAC/B;AACD,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC,OAAO,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MimeTypes = void 0;
|
|
4
|
+
class MimeTypes {
|
|
5
|
+
static { this.UNKNOWN = "unknown"; }
|
|
6
|
+
static { this.IMAGE = "image"; }
|
|
7
|
+
static { this.VIDEO = "video"; }
|
|
8
|
+
static { this.TEXT = "text"; }
|
|
9
|
+
}
|
|
10
|
+
exports.MimeTypes = MimeTypes;
|
|
11
|
+
//# sourceMappingURL=mime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mime.js","sourceRoot":"","sources":["../../../src/common/constants/mime.ts"],"names":[],"mappings":";;;AAEA,MAAa,SAAS;aACJ,YAAO,GAAG,SAAS,CAAC;aACpB,UAAK,GAAG,OAAO,CAAC;aAChB,UAAK,GAAG,OAAO,CAAC;aAChB,SAAI,GAAG,MAAM,CAAC;;AAJhC,8BAKC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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("./constants"), exports);
|
|
18
|
+
__exportStar(require("./types"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,0CAAwB"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Container } from "../helpers/inversion";
|
|
2
|
+
export type TNullable<T> = T | undefined | null;
|
|
3
|
+
export type AnyType = any;
|
|
4
|
+
export type AnyObject = Record<string | symbol | number, any>;
|
|
5
|
+
export type TOptions<T extends object = {}> = T;
|
|
6
|
+
export type ValueOrPromise<T> = T | Promise<T>;
|
|
7
|
+
export type ValueOf<T> = T[keyof T];
|
|
8
|
+
export type ValueOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
9
|
+
export type ValueOptionalExcept<T, K extends keyof T> = Pick<T, K> & Partial<Omit<T, K>>;
|
|
10
|
+
export type TConstructor<T> = new (...args: any[]) => T;
|
|
11
|
+
export type TAbstractConstructor<T> = abstract new (...args: any[]) => T;
|
|
12
|
+
export type TClass<T> = TConstructor<T> & {
|
|
13
|
+
[property: string]: any;
|
|
14
|
+
};
|
|
15
|
+
export type TAbstractClass<T> = TAbstractConstructor<T> & {
|
|
16
|
+
[property: string]: any;
|
|
17
|
+
};
|
|
18
|
+
export type TMixinTarget<T> = TConstructor<{
|
|
19
|
+
[P in keyof T]: T[P];
|
|
20
|
+
}>;
|
|
21
|
+
export type TAbstractMixinTarget<T> = TAbstractConstructor<{
|
|
22
|
+
[P in keyof T]: T[P];
|
|
23
|
+
}>;
|
|
24
|
+
export type TStringConstValue<T extends TClass<any>> = Extract<ValueOf<T>, string>;
|
|
25
|
+
export type TNumberConstValue<T extends TClass<any>> = Extract<ValueOf<T>, number>;
|
|
26
|
+
export type TConstValue<T extends TClass<any>> = Extract<ValueOf<T>, string | number>;
|
|
27
|
+
export type TPrettify<T> = {
|
|
28
|
+
[K in keyof T]: T[K];
|
|
29
|
+
} & {};
|
|
30
|
+
export type TResolver<T> = (...args: any[]) => T;
|
|
31
|
+
export type TFieldMappingDataType = "string" | "number" | "strings" | "numbers" | "boolean";
|
|
32
|
+
export interface IFieldMapping {
|
|
33
|
+
name: string;
|
|
34
|
+
type: TFieldMappingDataType;
|
|
35
|
+
default?: string | number | Array<string> | Array<number> | boolean;
|
|
36
|
+
}
|
|
37
|
+
export type TFieldMappingNames<T extends Array<IFieldMapping>> = Extract<T[number], {
|
|
38
|
+
type: Exclude<T[number]["type"], undefined>;
|
|
39
|
+
}>["name"];
|
|
40
|
+
export type TObjectFromFieldMappings<T extends readonly {
|
|
41
|
+
name: string;
|
|
42
|
+
type: string;
|
|
43
|
+
[extra: string | symbol]: any;
|
|
44
|
+
}[]> = {
|
|
45
|
+
[K in T[number]["name"]]: T extends {
|
|
46
|
+
name: K;
|
|
47
|
+
type: "string";
|
|
48
|
+
[extra: string | symbol]: any;
|
|
49
|
+
} ? string : T extends {
|
|
50
|
+
name: K;
|
|
51
|
+
type: "number";
|
|
52
|
+
[extra: string | symbol]: any;
|
|
53
|
+
} ? number : T extends {
|
|
54
|
+
name: K;
|
|
55
|
+
type: "boolean";
|
|
56
|
+
[extra: string | symbol]: any;
|
|
57
|
+
} ? boolean : T extends {
|
|
58
|
+
name: K;
|
|
59
|
+
type: "strings";
|
|
60
|
+
[extra: string | symbol]: any;
|
|
61
|
+
} ? string[] : T extends {
|
|
62
|
+
name: K;
|
|
63
|
+
type: "numbers";
|
|
64
|
+
[extra: string | symbol]: any;
|
|
65
|
+
} ? number[] : never;
|
|
66
|
+
};
|
|
67
|
+
export type TPermissionEffect = "allow" | "deny";
|
|
68
|
+
export type TInjectionGetter = <T>(opts: {
|
|
69
|
+
key: string | symbol;
|
|
70
|
+
}) => T;
|
|
71
|
+
export interface IConfigurable<Options extends object = any, Result = any> {
|
|
72
|
+
configure(opts?: Options): ValueOrPromise<Result>;
|
|
73
|
+
}
|
|
74
|
+
export interface IProvider<T> {
|
|
75
|
+
value(container: Container): T;
|
|
76
|
+
}
|
|
77
|
+
export declare const isClass: <T>(target: any) => target is TClass<T>;
|
|
78
|
+
export declare const isClassProvider: <T>(target: any) => target is TClass<IProvider<T>>;
|
|
79
|
+
export type TAuthStrategy = "jwt" | "basic";
|
|
80
|
+
export type { FC, PropsWithChildren, Child } from "hono/jsx";
|
|
81
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/common/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGhD,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC;AAEhD,MAAM,MAAM,OAAO,GAAG,GAAG,CAAC;AAC1B,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,CAAC,CAAC;AAE9D,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,MAAM,GAAG,EAAE,IAAI,CAAC,CAAC;AAEhD,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAC/C,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAEpC,MAAM,MAAM,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AACnF,MAAM,MAAM,mBAAmB,CAAC,CAAC,EAA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,MAAM,eAAe,GAAI,CAAC,EAAE,QAAQ,GAAG,KAAG,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAI7E,CAAC;AAGF,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,OAAO,CAAC;AAK5C,YAAY,EAAE,EAAE,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isClassProvider = exports.isClass = void 0;
|
|
4
|
+
const isClass = (target) => {
|
|
5
|
+
return typeof target === "function" && target.prototype !== undefined;
|
|
6
|
+
};
|
|
7
|
+
exports.isClass = isClass;
|
|
8
|
+
const isClassProvider = (target) => {
|
|
9
|
+
return (typeof target === "function" && target.prototype && typeof target.prototype.value === "function");
|
|
10
|
+
};
|
|
11
|
+
exports.isClassProvider = isClassProvider;
|
|
12
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/common/types.ts"],"names":[],"mappings":";;;AA2FO,MAAM,OAAO,GAAG,CAAI,MAAW,EAAuB,EAAE;IAC7D,OAAO,OAAO,MAAM,KAAK,UAAU,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS,CAAC;AACxE,CAAC,CAAC;AAFW,QAAA,OAAO,WAElB;AAEK,MAAM,eAAe,GAAG,CAAI,MAAW,EAAkC,EAAE;IAChF,OAAO,CACL,OAAO,MAAM,KAAK,UAAU,IAAI,MAAM,CAAC,SAAS,IAAI,OAAO,MAAM,CAAC,SAAS,CAAC,KAAK,KAAK,UAAU,CACjG,CAAC;AACJ,CAAC,CAAC;AAJW,QAAA,eAAe,mBAI1B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ApplicationLogger } from "../helpers/logger";
|
|
2
|
+
export declare class BaseHelper {
|
|
3
|
+
scope: string;
|
|
4
|
+
identifier: string;
|
|
5
|
+
logger: ApplicationLogger;
|
|
6
|
+
constructor(opts: {
|
|
7
|
+
scope: string;
|
|
8
|
+
identifier?: string;
|
|
9
|
+
});
|
|
10
|
+
getIdentifier(): string;
|
|
11
|
+
getLogger(): ApplicationLogger;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/helpers/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,kBAAkB,CAAC;AAEpE,qBAAa,UAAU;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,iBAAiB,CAAC;gBAEd,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE;IASxD,aAAa;IAIb,SAAS;CAGV"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseHelper = void 0;
|
|
4
|
+
const logger_1 = require("../helpers/logger");
|
|
5
|
+
class BaseHelper {
|
|
6
|
+
constructor(opts) {
|
|
7
|
+
this.logger = logger_1.LoggerFactory.getLogger([opts.scope, opts.identifier ?? ""].filter(el => el && el.length > 0));
|
|
8
|
+
this.scope = opts.scope ?? "";
|
|
9
|
+
this.identifier = opts.identifier ?? "";
|
|
10
|
+
}
|
|
11
|
+
getIdentifier() {
|
|
12
|
+
return this.identifier;
|
|
13
|
+
}
|
|
14
|
+
getLogger() {
|
|
15
|
+
return this.logger;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.BaseHelper = BaseHelper;
|
|
19
|
+
//# sourceMappingURL=base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/helpers/base.ts"],"names":[],"mappings":";;;AAAA,6CAAoE;AAEpE,MAAa,UAAU;IAKrB,YAAY,IAA4C;QACtD,IAAI,CAAC,MAAM,GAAG,sBAAa,CAAC,SAAS,CACnC,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CACtE,CAAC;QAEF,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;QAC9B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI,EAAE,CAAC;IAC1C,CAAC;IAED,aAAa;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;CACF;AArBD,gCAqBC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BaseHelper } from "../../helpers/base";
|
|
2
|
+
import { CronJob, CronOnCompleteCommand } from "cron";
|
|
3
|
+
export interface ICronHelperOptions {
|
|
4
|
+
cronTime: string;
|
|
5
|
+
onTick: () => void | Promise<void>;
|
|
6
|
+
onCompleted?: CronOnCompleteCommand | null;
|
|
7
|
+
autoStart?: boolean;
|
|
8
|
+
tz?: string;
|
|
9
|
+
errorHandler?: (error: unknown) => void | null;
|
|
10
|
+
}
|
|
11
|
+
export declare class CronHelper extends BaseHelper {
|
|
12
|
+
private cronTime;
|
|
13
|
+
private onTick;
|
|
14
|
+
private onCompleted?;
|
|
15
|
+
private autoStart;
|
|
16
|
+
private tz?;
|
|
17
|
+
private errorHandler?;
|
|
18
|
+
instance: CronJob;
|
|
19
|
+
constructor(opts: ICronHelperOptions);
|
|
20
|
+
static newInstance(opts: ICronHelperOptions): CronHelper;
|
|
21
|
+
configure(): void;
|
|
22
|
+
start(): void;
|
|
23
|
+
modifyCronTime(opts: {
|
|
24
|
+
cronTime: string;
|
|
25
|
+
shouldFireOnTick?: boolean;
|
|
26
|
+
}): void;
|
|
27
|
+
duplicate(opts: {
|
|
28
|
+
cronTime: string;
|
|
29
|
+
}): CronHelper;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=cron.helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cron.helper.d.ts","sourceRoot":"","sources":["../../../src/helpers/cron/cron.helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,qBAAqB,EAAY,MAAM,MAAM,CAAC;AAIhE,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,WAAW,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAC3C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GAAG,IAAI,CAAC;CAChD;AAGD,qBAAa,UAAW,SAAQ,UAAU;IACxC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,MAAM,CAA6B;IAC3C,OAAO,CAAC,WAAW,CAAC,CAA+B;IACnD,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,EAAE,CAAC,CAAS;IACpB,OAAO,CAAC,YAAY,CAAC,CAAkC;IAEhD,QAAQ,EAAE,OAAO,CAAC;gBAEb,IAAI,EAAE,kBAAkB;IAcpC,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,kBAAkB;IAI3C,SAAS;IAiBT,KAAK;IASL,cAAc,CAAC,IAAI,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAAE;IAUrE,SAAS,CAAC,IAAI,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE;CAcrC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CronHelper = void 0;
|
|
7
|
+
const base_1 = require("../../helpers/base");
|
|
8
|
+
const cron_1 = require("cron");
|
|
9
|
+
const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
|
|
10
|
+
const error_1 = require("../error");
|
|
11
|
+
// --------------------------------------------------------
|
|
12
|
+
class CronHelper extends base_1.BaseHelper {
|
|
13
|
+
constructor(opts) {
|
|
14
|
+
super({ scope: CronHelper.name, identifier: opts.cronTime ?? CronHelper.name });
|
|
15
|
+
const { cronTime, onTick, onCompleted, autoStart = false, tz, errorHandler } = opts;
|
|
16
|
+
this.cronTime = cronTime;
|
|
17
|
+
this.onTick = onTick;
|
|
18
|
+
this.onCompleted = onCompleted;
|
|
19
|
+
this.autoStart = autoStart ?? false;
|
|
20
|
+
this.tz = tz;
|
|
21
|
+
this.errorHandler = errorHandler;
|
|
22
|
+
this.configure();
|
|
23
|
+
}
|
|
24
|
+
static newInstance(opts) {
|
|
25
|
+
return new CronHelper(opts);
|
|
26
|
+
}
|
|
27
|
+
configure() {
|
|
28
|
+
if (!this.cronTime || (0, isEmpty_1.default)(this.cronTime)) {
|
|
29
|
+
throw error_1.ApplicationError.getError({
|
|
30
|
+
message: "[CronHelper][configure] Invalid cronTime to configure application cron!",
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
this.instance = cron_1.CronJob.from({
|
|
34
|
+
cronTime: this.cronTime,
|
|
35
|
+
onTick: this.onTick,
|
|
36
|
+
onComplete: this.onCompleted,
|
|
37
|
+
start: this.autoStart,
|
|
38
|
+
errorHandler: this.errorHandler,
|
|
39
|
+
timeZone: this.tz,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
start() {
|
|
43
|
+
if (!this.instance) {
|
|
44
|
+
this.logger.error("[CronHelper][start] Invalid cron instance to start cronjob!");
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
this.instance.start();
|
|
48
|
+
}
|
|
49
|
+
modifyCronTime(opts) {
|
|
50
|
+
const { cronTime, shouldFireOnTick = false } = opts;
|
|
51
|
+
this.instance.setTime(new cron_1.CronTime(cronTime));
|
|
52
|
+
if (shouldFireOnTick) {
|
|
53
|
+
this.instance.fireOnTick();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
duplicate(opts) {
|
|
57
|
+
const { cronTime } = opts;
|
|
58
|
+
const options = {
|
|
59
|
+
cronTime: cronTime,
|
|
60
|
+
onTick: this.onTick,
|
|
61
|
+
onCompleted: this.onCompleted,
|
|
62
|
+
autoStart: this.autoStart,
|
|
63
|
+
tz: this.tz,
|
|
64
|
+
errorHandler: this.errorHandler,
|
|
65
|
+
};
|
|
66
|
+
return CronHelper.newInstance(options);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.CronHelper = CronHelper;
|
|
70
|
+
//# sourceMappingURL=cron.helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cron.helper.js","sourceRoot":"","sources":["../../../src/helpers/cron/cron.helper.ts"],"names":[],"mappings":";;;;;;AAAA,yCAA4C;AAC5C,+BAAgE;AAChE,6DAAqC;AACrC,oCAA4C;AAW5C,2DAA2D;AAC3D,MAAa,UAAW,SAAQ,iBAAU;IAUxC,YAAY,IAAwB;QAClC,KAAK,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,QAAQ,IAAI,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC;QAEhF,MAA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;IACxB,CAAC;IAED,cAAc,CAAC,IAAsD;QACnE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC;QAEpD,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,eAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;QAE9C,IAAI,gBAAgB,EAAE,CAAC;YACrB,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;QAC7B,CAAC;IACH,CAAC;IAED,SAAS,CAAC,IAA0B;QAClC,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;QAE1B,MAAM,OAAO,GAAuB;YAClC,QAAQ,EAAE,QAAQ;YAClB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,CAAC;QAEF,OAAO,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;CACF;AA9ED,gCA8EC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helpers/cron/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./cron.helper"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/helpers/cron/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import C from "node:crypto";
|
|
2
|
+
import { BaseCryptoAlgorithm } from "./base.algorithm";
|
|
3
|
+
interface IO {
|
|
4
|
+
iv?: Buffer;
|
|
5
|
+
inputEncoding?: C.Encoding;
|
|
6
|
+
outputEncoding?: C.Encoding;
|
|
7
|
+
doThrow?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export type AESAlgorithmType = "aes-256-cbc" | "aes-256-gcm";
|
|
10
|
+
export declare class AES extends BaseCryptoAlgorithm<AESAlgorithmType, IO> {
|
|
11
|
+
constructor(opts: {
|
|
12
|
+
algorithm: AESAlgorithmType;
|
|
13
|
+
});
|
|
14
|
+
static withAlgorithm(algorithm: AESAlgorithmType): AES;
|
|
15
|
+
encrypt(message: string, secret: string, opts?: IO): string;
|
|
16
|
+
encryptFile(absolutePath: string, secret: string): string;
|
|
17
|
+
decrypt(message: string, secret: string, opts?: IO): string;
|
|
18
|
+
decryptFile(absolutePath: string, secret: string): string;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=aes.algorithm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aes.algorithm.d.ts","sourceRoot":"","sources":["../../../../src/helpers/crypto/algorithms/aes.algorithm.ts"],"names":[],"mappings":"AACA,OAAO,CAAC,MAAM,aAAa,CAAC;AAE5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAIvD,UAAU,EAAE;IACV,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,aAAa,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC;IAC3B,cAAc,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG,aAAa,CAAC;AAE7D,qBAAa,GAAI,SAAQ,mBAAmB,CAAC,gBAAgB,EAAE,EAAE,CAAC;gBACpD,IAAI,EAAE;QAAE,SAAS,EAAE,gBAAgB,CAAA;KAAE;IAIjD,MAAM,CAAC,aAAa,CAAC,SAAS,EAAE,gBAAgB;IAIhD,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE;IA0ClD,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAWzD,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE;IA4ClD,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAUjD"}
|