@venizia/ignis-helpers 0.2.0-9 → 0.2.0
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/LICENSE.md +0 -1
- package/README.md +73 -151
- package/dist/cjs/common/constants/mime.d.ts +67 -0
- package/dist/cjs/common/constants/mime.d.ts.map +1 -1
- package/dist/cjs/common/constants/mime.js +138 -1
- package/dist/cjs/common/constants/mime.js.map +1 -1
- package/dist/cjs/common/redact.d.ts.map +1 -1
- package/dist/cjs/common/redact.js +46 -5
- package/dist/cjs/common/redact.js.map +1 -1
- package/dist/cjs/common/resolvers.d.ts +5 -8
- package/dist/cjs/common/resolvers.d.ts.map +1 -1
- package/dist/cjs/common/resolvers.js +13 -26
- package/dist/cjs/common/resolvers.js.map +1 -1
- package/dist/cjs/common/types/resolver.d.ts +1 -4
- package/dist/cjs/common/types/resolver.d.ts.map +1 -1
- package/dist/cjs/core.d.ts +18 -8
- package/dist/cjs/core.d.ts.map +1 -1
- package/dist/cjs/core.js +26 -10
- package/dist/cjs/core.js.map +1 -1
- package/dist/cjs/modules/base.d.ts +4 -1
- package/dist/cjs/modules/base.d.ts.map +1 -1
- package/dist/cjs/modules/base.js +15 -4
- package/dist/cjs/modules/base.js.map +1 -1
- package/dist/cjs/modules/cron/helper.d.ts.map +1 -1
- package/dist/cjs/modules/cron/helper.js +2 -5
- package/dist/cjs/modules/cron/helper.js.map +1 -1
- package/dist/cjs/modules/crypto/algorithms/aes-legacy.algorithm.js +3 -3
- package/dist/cjs/modules/crypto/algorithms/aes-legacy.algorithm.js.map +1 -1
- package/dist/cjs/modules/crypto/algorithms/aes.algorithm.js +5 -5
- package/dist/cjs/modules/crypto/algorithms/aes.algorithm.js.map +1 -1
- package/dist/cjs/modules/crypto/algorithms/hash.algorithm.d.ts +1 -4
- package/dist/cjs/modules/crypto/algorithms/hash.algorithm.d.ts.map +1 -1
- package/dist/cjs/modules/crypto/algorithms/hash.algorithm.js +1 -4
- package/dist/cjs/modules/crypto/algorithms/hash.algorithm.js.map +1 -1
- package/dist/cjs/modules/env/app-env.d.ts +11 -0
- package/dist/cjs/modules/env/app-env.d.ts.map +1 -1
- package/dist/cjs/modules/env/app-env.js +32 -6
- package/dist/cjs/modules/env/app-env.js.map +1 -1
- package/dist/cjs/modules/index.d.ts +1 -1
- package/dist/cjs/modules/index.d.ts.map +1 -1
- package/dist/cjs/modules/index.js +1 -1
- package/dist/cjs/modules/index.js.map +1 -1
- package/dist/cjs/modules/logger/base/base.d.ts.map +1 -1
- package/dist/cjs/modules/logger/base/base.js +3 -0
- package/dist/cjs/modules/logger/base/base.js.map +1 -1
- package/dist/cjs/modules/logger/factory.d.ts.map +1 -1
- package/dist/cjs/modules/logger/factory.js +2 -1
- package/dist/cjs/modules/logger/factory.js.map +1 -1
- package/dist/cjs/modules/logger/formatting/error-prettier.d.ts +6 -0
- package/dist/cjs/modules/logger/formatting/error-prettier.d.ts.map +1 -1
- package/dist/cjs/modules/logger/formatting/error-prettier.js +35 -1
- package/dist/cjs/modules/logger/formatting/error-prettier.js.map +1 -1
- package/dist/cjs/modules/logger/hf/logger.d.ts.map +1 -1
- package/dist/cjs/modules/logger/hf/logger.js +3 -0
- package/dist/cjs/modules/logger/hf/logger.js.map +1 -1
- package/dist/cjs/modules/logger/pino/destination.d.ts.map +1 -1
- package/dist/cjs/modules/logger/pino/destination.js +2 -1
- package/dist/cjs/modules/logger/pino/destination.js.map +1 -1
- package/dist/cjs/modules/logger/resolver.d.ts +1 -1
- package/dist/cjs/modules/logger/resolver.d.ts.map +1 -1
- package/dist/cjs/modules/logger/resolver.js +8 -1
- package/dist/cjs/modules/logger/resolver.js.map +1 -1
- package/dist/cjs/modules/logger/slot.d.ts +23 -0
- package/dist/cjs/modules/logger/slot.d.ts.map +1 -0
- package/dist/cjs/modules/logger/slot.js +124 -0
- package/dist/cjs/modules/logger/slot.js.map +1 -0
- package/dist/cjs/modules/logger/winston/common/constants.d.ts.map +1 -1
- package/dist/cjs/modules/logger/winston/common/constants.js +6 -5
- package/dist/cjs/modules/logger/winston/common/constants.js.map +1 -1
- package/dist/cjs/modules/network/http-request/base-network-request.helper.d.ts.map +1 -1
- package/dist/cjs/modules/network/http-request/base-network-request.helper.js +4 -6
- package/dist/cjs/modules/network/http-request/base-network-request.helper.js.map +1 -1
- package/dist/cjs/modules/network/http-request/fetcher/node-fetcher.d.ts.map +1 -1
- package/dist/cjs/modules/network/http-request/fetcher/node-fetcher.js +3 -3
- package/dist/cjs/modules/network/http-request/fetcher/node-fetcher.js.map +1 -1
- package/dist/cjs/modules/network/index.d.ts +1 -0
- package/dist/cjs/modules/network/index.d.ts.map +1 -1
- package/dist/cjs/modules/network/index.js +1 -0
- package/dist/cjs/modules/network/index.js.map +1 -1
- package/dist/cjs/modules/network/tcp-socket/base-tcp-client.helper.d.ts.map +1 -1
- package/dist/cjs/modules/network/tcp-socket/base-tcp-client.helper.js +2 -5
- package/dist/cjs/modules/network/tcp-socket/base-tcp-client.helper.js.map +1 -1
- package/dist/cjs/modules/network/tcp-socket/base-tcp-server.helper.d.ts +2 -3
- package/dist/cjs/modules/network/tcp-socket/base-tcp-server.helper.d.ts.map +1 -1
- package/dist/cjs/modules/network/tcp-socket/base-tcp-server.helper.js +5 -5
- package/dist/cjs/modules/network/tcp-socket/base-tcp-server.helper.js.map +1 -1
- package/dist/cjs/modules/network/utilities/index.d.ts +3 -0
- package/dist/cjs/modules/network/utilities/index.d.ts.map +1 -0
- package/dist/cjs/modules/network/utilities/index.js +19 -0
- package/dist/cjs/modules/network/utilities/index.js.map +1 -0
- package/dist/cjs/modules/network/utilities/query-string.d.ts +26 -0
- package/dist/cjs/modules/network/utilities/query-string.d.ts.map +1 -0
- package/dist/cjs/modules/network/utilities/query-string.js +49 -0
- package/dist/cjs/modules/network/utilities/query-string.js.map +1 -0
- package/dist/cjs/modules/network/utilities/url-safety/common/constants.d.ts +18 -0
- package/dist/cjs/modules/network/utilities/url-safety/common/constants.d.ts.map +1 -0
- package/dist/cjs/modules/network/utilities/url-safety/common/constants.js +23 -0
- package/dist/cjs/modules/network/utilities/url-safety/common/constants.js.map +1 -0
- package/dist/cjs/modules/network/utilities/url-safety/common/errors.d.ts +31 -0
- package/dist/cjs/modules/network/utilities/url-safety/common/errors.d.ts.map +1 -0
- package/dist/cjs/modules/network/utilities/url-safety/common/errors.js +30 -0
- package/dist/cjs/modules/network/utilities/url-safety/common/errors.js.map +1 -0
- package/dist/cjs/modules/network/utilities/url-safety/common/index.d.ts +4 -0
- package/dist/cjs/modules/network/utilities/url-safety/common/index.d.ts.map +1 -0
- package/dist/cjs/modules/network/utilities/url-safety/common/index.js +20 -0
- package/dist/cjs/modules/network/utilities/url-safety/common/index.js.map +1 -0
- package/dist/cjs/modules/network/utilities/url-safety/common/types.d.ts +24 -0
- package/dist/cjs/modules/network/utilities/url-safety/common/types.d.ts.map +1 -0
- package/dist/cjs/modules/network/utilities/url-safety/common/types.js +3 -0
- package/dist/cjs/modules/network/utilities/url-safety/common/types.js.map +1 -0
- package/dist/cjs/modules/network/utilities/url-safety/index.d.ts +4 -0
- package/dist/cjs/modules/network/utilities/url-safety/index.d.ts.map +1 -0
- package/dist/cjs/modules/network/utilities/url-safety/index.js +20 -0
- package/dist/cjs/modules/network/utilities/url-safety/index.js.map +1 -0
- package/dist/cjs/modules/network/utilities/url-safety/ingest.d.ts +52 -0
- package/dist/cjs/modules/network/utilities/url-safety/ingest.d.ts.map +1 -0
- package/dist/cjs/modules/network/utilities/url-safety/ingest.js +167 -0
- package/dist/cjs/modules/network/utilities/url-safety/ingest.js.map +1 -0
- package/dist/cjs/modules/network/utilities/url-safety/policy.d.ts +29 -0
- package/dist/cjs/modules/network/utilities/url-safety/policy.d.ts.map +1 -0
- package/dist/cjs/modules/network/utilities/url-safety/policy.js +114 -0
- package/dist/cjs/modules/network/utilities/url-safety/policy.js.map +1 -0
- package/dist/cjs/modules/queue/bullmq/helper.d.ts +25 -4
- package/dist/cjs/modules/queue/bullmq/helper.d.ts.map +1 -1
- package/dist/cjs/modules/queue/bullmq/helper.js +45 -14
- package/dist/cjs/modules/queue/bullmq/helper.js.map +1 -1
- package/dist/cjs/modules/queue/internal/sequential/helper.d.ts.map +1 -1
- package/dist/cjs/modules/queue/internal/sequential/helper.js +2 -5
- package/dist/cjs/modules/queue/internal/sequential/helper.js.map +1 -1
- package/dist/cjs/modules/queue/kafka/base.d.ts +8 -4
- package/dist/cjs/modules/queue/kafka/base.d.ts.map +1 -1
- package/dist/cjs/modules/queue/kafka/base.js +5 -1
- package/dist/cjs/modules/queue/kafka/base.js.map +1 -1
- package/dist/cjs/modules/queue/kafka/bundler/platformatic-require.plugin.d.ts +1 -1
- package/dist/cjs/modules/queue/kafka/bundler/platformatic-require.plugin.d.ts.map +1 -1
- package/dist/cjs/modules/queue/kafka/bundler/platformatic-require.plugin.js +1 -1
- package/dist/cjs/modules/queue/kafka/bundler/platformatic-require.plugin.js.map +1 -1
- package/dist/cjs/modules/queue/kafka/common/types/callbacks.d.ts +10 -0
- package/dist/cjs/modules/queue/kafka/common/types/callbacks.d.ts.map +1 -1
- package/dist/cjs/modules/queue/kafka/common/types/consumer.d.ts +5 -1
- package/dist/cjs/modules/queue/kafka/common/types/consumer.d.ts.map +1 -1
- package/dist/cjs/modules/queue/kafka/consumer.d.ts +64 -28
- package/dist/cjs/modules/queue/kafka/consumer.d.ts.map +1 -1
- package/dist/cjs/modules/queue/kafka/consumer.js +58 -24
- package/dist/cjs/modules/queue/kafka/consumer.js.map +1 -1
- package/dist/cjs/modules/queue/mqtt/helper.d.ts.map +1 -1
- package/dist/cjs/modules/queue/mqtt/helper.js +6 -5
- package/dist/cjs/modules/queue/mqtt/helper.js.map +1 -1
- package/dist/cjs/modules/redis/base/abstract.helper.d.ts.map +1 -1
- package/dist/cjs/modules/redis/base/abstract.helper.js +10 -5
- package/dist/cjs/modules/redis/base/abstract.helper.js.map +1 -1
- package/dist/cjs/modules/redis/cluster/cluster.helper.d.ts +3 -2
- package/dist/cjs/modules/redis/cluster/cluster.helper.d.ts.map +1 -1
- package/dist/cjs/modules/redis/cluster/cluster.helper.js +18 -4
- package/dist/cjs/modules/redis/cluster/cluster.helper.js.map +1 -1
- package/dist/cjs/modules/redis/common/constants.d.ts +4 -0
- package/dist/cjs/modules/redis/common/constants.d.ts.map +1 -1
- package/dist/cjs/modules/redis/common/constants.js +6 -1
- package/dist/cjs/modules/redis/common/constants.js.map +1 -1
- package/dist/cjs/modules/redis/common/types.d.ts +13 -3
- package/dist/cjs/modules/redis/common/types.d.ts.map +1 -1
- package/dist/cjs/modules/redis/sentinel/sentinel.helper.d.ts +1 -1
- package/dist/cjs/modules/redis/sentinel/sentinel.helper.d.ts.map +1 -1
- package/dist/cjs/modules/redis/sentinel/sentinel.helper.js +3 -2
- package/dist/cjs/modules/redis/sentinel/sentinel.helper.js.map +1 -1
- package/dist/cjs/modules/redis/single/single.helper.d.ts +1 -1
- package/dist/cjs/modules/redis/single/single.helper.d.ts.map +1 -1
- package/dist/cjs/modules/redis/single/single.helper.js +4 -5
- package/dist/cjs/modules/redis/single/single.helper.js.map +1 -1
- package/dist/cjs/modules/secrets/base/abstract.helper.d.ts.map +1 -1
- package/dist/cjs/modules/secrets/base/abstract.helper.js +2 -1
- package/dist/cjs/modules/secrets/base/abstract.helper.js.map +1 -1
- package/dist/cjs/modules/secrets/hashicorp/hashicorp.helper.d.ts.map +1 -1
- package/dist/cjs/modules/secrets/hashicorp/hashicorp.helper.js +2 -1
- package/dist/cjs/modules/secrets/hashicorp/hashicorp.helper.js.map +1 -1
- package/dist/cjs/modules/secrets/system-envs/system-envs.helper.d.ts.map +1 -1
- package/dist/cjs/modules/secrets/system-envs/system-envs.helper.js +2 -1
- package/dist/cjs/modules/secrets/system-envs/system-envs.helper.js.map +1 -1
- package/dist/cjs/modules/socket/socket-io/client/helper.d.ts +2 -1
- package/dist/cjs/modules/socket/socket-io/client/helper.d.ts.map +1 -1
- package/dist/cjs/modules/socket/socket-io/client/helper.js +10 -4
- package/dist/cjs/modules/socket/socket-io/client/helper.js.map +1 -1
- package/dist/cjs/modules/socket/socket-io/common/types/client.d.ts +2 -0
- package/dist/cjs/modules/socket/socket-io/common/types/client.d.ts.map +1 -1
- package/dist/cjs/modules/socket/socket-io/server/helper.d.ts +1 -0
- package/dist/cjs/modules/socket/socket-io/server/helper.d.ts.map +1 -1
- package/dist/cjs/modules/socket/socket-io/server/helper.js +17 -30
- package/dist/cjs/modules/socket/socket-io/server/helper.js.map +1 -1
- package/dist/cjs/modules/socket/websocket/server/helper.d.ts.map +1 -1
- package/dist/cjs/modules/socket/websocket/server/helper.js +2 -1
- package/dist/cjs/modules/socket/websocket/server/helper.js.map +1 -1
- package/dist/cjs/modules/storage/base.d.ts +98 -49
- package/dist/cjs/modules/storage/base.d.ts.map +1 -1
- package/dist/cjs/modules/storage/base.js +201 -93
- package/dist/cjs/modules/storage/base.js.map +1 -1
- package/dist/cjs/modules/storage/bun-s3/helper.d.ts +74 -29
- package/dist/cjs/modules/storage/bun-s3/helper.d.ts.map +1 -1
- package/dist/cjs/modules/storage/bun-s3/helper.js +321 -55
- package/dist/cjs/modules/storage/bun-s3/helper.js.map +1 -1
- package/dist/cjs/modules/storage/bun-s3/utility.d.ts +59 -0
- package/dist/cjs/modules/storage/bun-s3/utility.d.ts.map +1 -1
- package/dist/cjs/modules/storage/bun-s3/utility.js +218 -28
- package/dist/cjs/modules/storage/bun-s3/utility.js.map +1 -1
- package/dist/cjs/modules/storage/common/constants.d.ts +27 -0
- package/dist/cjs/modules/storage/common/constants.d.ts.map +1 -0
- package/dist/cjs/modules/storage/common/constants.js +35 -0
- package/dist/cjs/modules/storage/common/constants.js.map +1 -0
- package/dist/cjs/modules/storage/common/errors.d.ts +22 -0
- package/dist/cjs/modules/storage/common/errors.d.ts.map +1 -0
- package/dist/cjs/modules/storage/common/errors.js +25 -0
- package/dist/cjs/modules/storage/common/errors.js.map +1 -0
- package/dist/cjs/modules/storage/common/index.d.ts +3 -0
- package/dist/cjs/modules/storage/common/index.d.ts.map +1 -1
- package/dist/cjs/modules/storage/common/index.js +3 -0
- package/dist/cjs/modules/storage/common/index.js.map +1 -1
- package/dist/cjs/modules/storage/common/types.d.ts +118 -38
- package/dist/cjs/modules/storage/common/types.d.ts.map +1 -1
- package/dist/cjs/modules/storage/common/utility.d.ts +7 -0
- package/dist/cjs/modules/storage/common/utility.d.ts.map +1 -0
- package/dist/cjs/modules/storage/common/utility.js +27 -0
- package/dist/cjs/modules/storage/common/utility.js.map +1 -0
- package/dist/cjs/modules/storage/disk/helper.d.ts +26 -28
- package/dist/cjs/modules/storage/disk/helper.d.ts.map +1 -1
- package/dist/cjs/modules/storage/disk/helper.js +125 -86
- package/dist/cjs/modules/storage/disk/helper.js.map +1 -1
- package/dist/cjs/modules/storage/in-memory/helper.d.ts +10 -5
- package/dist/cjs/modules/storage/in-memory/helper.d.ts.map +1 -1
- package/dist/cjs/modules/storage/in-memory/helper.js +17 -10
- package/dist/cjs/modules/storage/in-memory/helper.js.map +1 -1
- package/dist/cjs/modules/storage/minio/helper.d.ts +22 -28
- package/dist/cjs/modules/storage/minio/helper.d.ts.map +1 -1
- package/dist/cjs/modules/storage/minio/helper.js +87 -33
- package/dist/cjs/modules/storage/minio/helper.js.map +1 -1
- package/dist/cjs/modules/temporal/adapters/dayjs.d.ts +21 -0
- package/dist/cjs/modules/temporal/adapters/dayjs.d.ts.map +1 -0
- package/dist/cjs/modules/temporal/adapters/dayjs.js +48 -0
- package/dist/cjs/modules/temporal/adapters/dayjs.js.map +1 -0
- package/dist/cjs/modules/temporal/adapters/guards.d.ts +4 -0
- package/dist/cjs/modules/temporal/adapters/guards.d.ts.map +1 -0
- package/dist/cjs/modules/temporal/adapters/guards.js +14 -0
- package/dist/cjs/modules/temporal/adapters/guards.js.map +1 -0
- package/dist/cjs/modules/temporal/adapters/index.d.ts +4 -0
- package/dist/cjs/modules/temporal/adapters/index.d.ts.map +1 -0
- package/dist/cjs/modules/temporal/adapters/index.js +20 -0
- package/dist/cjs/modules/temporal/adapters/index.js.map +1 -0
- package/dist/cjs/modules/temporal/adapters/luxon.d.ts +13 -0
- package/dist/cjs/modules/temporal/adapters/luxon.d.ts.map +1 -0
- package/dist/cjs/modules/temporal/adapters/luxon.js +26 -0
- package/dist/cjs/modules/temporal/adapters/luxon.js.map +1 -0
- package/dist/cjs/modules/temporal/adapters/native.d.ts +16 -0
- package/dist/cjs/modules/temporal/adapters/native.d.ts.map +1 -0
- package/dist/cjs/modules/temporal/adapters/native.js +38 -0
- package/dist/cjs/modules/temporal/adapters/native.js.map +1 -0
- package/dist/cjs/modules/temporal/calendar.d.ts +52 -0
- package/dist/cjs/modules/temporal/calendar.d.ts.map +1 -0
- package/dist/cjs/modules/temporal/calendar.js +151 -0
- package/dist/cjs/modules/temporal/calendar.js.map +1 -0
- package/dist/cjs/modules/temporal/common/constants.d.ts +20 -0
- package/dist/cjs/modules/temporal/common/constants.d.ts.map +1 -0
- package/dist/cjs/modules/temporal/common/constants.js +33 -0
- package/dist/cjs/modules/temporal/common/constants.js.map +1 -0
- package/dist/cjs/modules/temporal/common/index.d.ts +3 -0
- package/dist/cjs/modules/temporal/common/index.d.ts.map +1 -0
- package/dist/cjs/modules/temporal/common/index.js +19 -0
- package/dist/cjs/modules/temporal/common/index.js.map +1 -0
- package/dist/cjs/modules/temporal/common/types.d.ts +69 -0
- package/dist/cjs/modules/temporal/common/types.d.ts.map +1 -0
- package/dist/cjs/modules/temporal/common/types.js +3 -0
- package/dist/cjs/modules/temporal/common/types.js.map +1 -0
- package/dist/cjs/modules/temporal/helper.d.ts +120 -0
- package/dist/cjs/modules/temporal/helper.d.ts.map +1 -0
- package/dist/cjs/modules/temporal/helper.js +326 -0
- package/dist/cjs/modules/temporal/helper.js.map +1 -0
- package/dist/cjs/modules/temporal/index.d.ts +4 -0
- package/dist/cjs/modules/temporal/index.d.ts.map +1 -0
- package/dist/cjs/modules/temporal/index.js +20 -0
- package/dist/cjs/modules/temporal/index.js.map +1 -0
- package/dist/cjs/modules/temporal/pattern.d.ts +24 -0
- package/dist/cjs/modules/temporal/pattern.d.ts.map +1 -0
- package/dist/cjs/modules/temporal/pattern.js +133 -0
- package/dist/cjs/modules/temporal/pattern.js.map +1 -0
- package/dist/cjs/modules/temporal/tokens.d.ts +65 -0
- package/dist/cjs/modules/temporal/tokens.d.ts.map +1 -0
- package/dist/cjs/modules/temporal/tokens.js +113 -0
- package/dist/cjs/modules/temporal/tokens.js.map +1 -0
- package/dist/cjs/modules/uid/index.d.ts +1 -0
- package/dist/cjs/modules/uid/index.d.ts.map +1 -1
- package/dist/cjs/modules/uid/index.js +1 -0
- package/dist/cjs/modules/uid/index.js.map +1 -1
- package/dist/cjs/modules/uid/request-id.d.ts +5 -12
- package/dist/cjs/modules/uid/request-id.d.ts.map +1 -1
- package/dist/cjs/modules/uid/request-id.js +7 -44
- package/dist/cjs/modules/uid/request-id.js.map +1 -1
- package/dist/cjs/modules/uid/uuid/common/constants.d.ts +32 -0
- package/dist/cjs/modules/uid/uuid/common/constants.d.ts.map +1 -0
- package/dist/cjs/modules/uid/uuid/common/constants.js +36 -0
- package/dist/cjs/modules/uid/uuid/common/constants.js.map +1 -0
- package/dist/cjs/modules/uid/uuid/common/index.d.ts +3 -0
- package/dist/cjs/modules/uid/uuid/common/index.d.ts.map +1 -0
- package/dist/cjs/modules/uid/uuid/common/index.js +24 -0
- package/dist/cjs/modules/uid/uuid/common/index.js.map +1 -0
- package/dist/cjs/modules/uid/uuid/common/types.d.ts +6 -0
- package/dist/cjs/modules/uid/uuid/common/types.d.ts.map +1 -0
- package/dist/cjs/modules/uid/uuid/common/types.js +3 -0
- package/dist/cjs/modules/uid/uuid/common/types.js.map +1 -0
- package/dist/cjs/modules/uid/uuid/helper.d.ts +37 -0
- package/dist/cjs/modules/uid/uuid/helper.d.ts.map +1 -0
- package/dist/cjs/modules/uid/uuid/helper.js +49 -0
- package/dist/cjs/modules/uid/uuid/helper.js.map +1 -0
- package/dist/cjs/modules/uid/uuid/index.d.ts +6 -0
- package/dist/cjs/modules/uid/uuid/index.d.ts.map +1 -0
- package/dist/cjs/modules/uid/uuid/index.js +22 -0
- package/dist/cjs/modules/uid/uuid/index.js.map +1 -0
- package/dist/cjs/modules/uid/uuid/sha1.d.ts +19 -0
- package/dist/cjs/modules/uid/uuid/sha1.d.ts.map +1 -0
- package/dist/cjs/modules/uid/uuid/sha1.js +105 -0
- package/dist/cjs/modules/uid/uuid/sha1.js.map +1 -0
- package/dist/cjs/modules/uid/uuid/v4.d.ts +9 -0
- package/dist/cjs/modules/uid/uuid/v4.d.ts.map +1 -0
- package/dist/cjs/modules/uid/uuid/v4.js +54 -0
- package/dist/cjs/modules/uid/uuid/v4.js.map +1 -0
- package/dist/cjs/modules/uid/uuid/v5.d.ts +15 -0
- package/dist/cjs/modules/uid/uuid/v5.d.ts.map +1 -0
- package/dist/cjs/modules/uid/uuid/v5.js +90 -0
- package/dist/cjs/modules/uid/uuid/v5.js.map +1 -0
- package/dist/cjs/modules/uid/uuid/v7.d.ts +11 -0
- package/dist/cjs/modules/uid/uuid/v7.d.ts.map +1 -0
- package/dist/cjs/modules/uid/uuid/v7.js +95 -0
- package/dist/cjs/modules/uid/uuid/v7.js.map +1 -0
- package/dist/cjs/temporal.d.ts +2 -0
- package/dist/cjs/temporal.d.ts.map +1 -0
- package/dist/cjs/temporal.js +19 -0
- package/dist/cjs/temporal.js.map +1 -0
- package/dist/cjs/utilities/build-info.utility.d.ts +33 -0
- package/dist/cjs/utilities/build-info.utility.d.ts.map +1 -0
- package/dist/cjs/utilities/build-info.utility.js +28 -0
- package/dist/cjs/utilities/build-info.utility.js.map +1 -0
- package/dist/cjs/utilities/hr-time.utility.d.ts +6 -0
- package/dist/cjs/utilities/hr-time.utility.d.ts.map +1 -0
- package/dist/cjs/utilities/hr-time.utility.js +14 -0
- package/dist/cjs/utilities/hr-time.utility.js.map +1 -0
- package/dist/cjs/utilities/index.d.ts +3 -1
- package/dist/cjs/utilities/index.d.ts.map +1 -1
- package/dist/cjs/utilities/index.js +3 -1
- package/dist/cjs/utilities/index.js.map +1 -1
- package/dist/cjs/utilities/module.utility.d.ts +8 -2
- package/dist/cjs/utilities/module.utility.d.ts.map +1 -1
- package/dist/cjs/utilities/module.utility.js +25 -6
- package/dist/cjs/utilities/module.utility.js.map +1 -1
- package/dist/cjs/utilities/parse.utility.d.ts +29 -0
- package/dist/cjs/utilities/parse.utility.d.ts.map +1 -1
- package/dist/cjs/utilities/parse.utility.js +58 -10
- package/dist/cjs/utilities/parse.utility.js.map +1 -1
- package/dist/cjs/utilities/project-root.utility.d.ts +17 -0
- package/dist/cjs/utilities/project-root.utility.d.ts.map +1 -0
- package/dist/cjs/utilities/project-root.utility.js +23 -0
- package/dist/cjs/utilities/project-root.utility.js.map +1 -0
- package/dist/cjs/utilities/request.utility.d.ts +22 -1
- package/dist/cjs/utilities/request.utility.d.ts.map +1 -1
- package/dist/cjs/utilities/request.utility.js +44 -3
- package/dist/cjs/utilities/request.utility.js.map +1 -1
- package/dist/cjs/utilities/sleep.utility.d.ts +0 -1
- package/dist/cjs/utilities/sleep.utility.d.ts.map +1 -1
- package/dist/cjs/utilities/sleep.utility.js +0 -1
- package/dist/cjs/utilities/sleep.utility.js.map +1 -1
- package/dist/cjs/uuid.d.ts +2 -0
- package/dist/cjs/uuid.d.ts.map +1 -0
- package/dist/cjs/uuid.js +19 -0
- package/dist/cjs/uuid.js.map +1 -0
- package/dist/esm/common/constants/mime.d.ts +67 -0
- package/dist/esm/common/constants/mime.d.ts.map +1 -1
- package/dist/esm/common/constants/mime.js +134 -0
- package/dist/esm/common/constants/mime.js.map +1 -1
- package/dist/esm/common/redact.d.ts.map +1 -1
- package/dist/esm/common/redact.js +46 -5
- package/dist/esm/common/redact.js.map +1 -1
- package/dist/esm/common/resolvers.d.ts +5 -8
- package/dist/esm/common/resolvers.d.ts.map +1 -1
- package/dist/esm/common/resolvers.js +8 -25
- package/dist/esm/common/resolvers.js.map +1 -1
- package/dist/esm/common/types/resolver.d.ts +1 -4
- package/dist/esm/common/types/resolver.d.ts.map +1 -1
- package/dist/esm/core.d.ts +18 -8
- package/dist/esm/core.d.ts.map +1 -1
- package/dist/esm/core.js +19 -6
- package/dist/esm/core.js.map +1 -1
- package/dist/esm/modules/base.d.ts +4 -1
- package/dist/esm/modules/base.d.ts.map +1 -1
- package/dist/esm/modules/base.js +15 -4
- package/dist/esm/modules/base.js.map +1 -1
- package/dist/esm/modules/cron/helper.d.ts.map +1 -1
- package/dist/esm/modules/cron/helper.js +2 -2
- package/dist/esm/modules/cron/helper.js.map +1 -1
- package/dist/esm/modules/crypto/algorithms/aes-legacy.algorithm.js +3 -3
- package/dist/esm/modules/crypto/algorithms/aes-legacy.algorithm.js.map +1 -1
- package/dist/esm/modules/crypto/algorithms/aes.algorithm.js +5 -5
- package/dist/esm/modules/crypto/algorithms/aes.algorithm.js.map +1 -1
- package/dist/esm/modules/crypto/algorithms/hash.algorithm.d.ts +1 -4
- package/dist/esm/modules/crypto/algorithms/hash.algorithm.d.ts.map +1 -1
- package/dist/esm/modules/crypto/algorithms/hash.algorithm.js +1 -4
- package/dist/esm/modules/crypto/algorithms/hash.algorithm.js.map +1 -1
- package/dist/esm/modules/env/app-env.d.ts +11 -0
- package/dist/esm/modules/env/app-env.d.ts.map +1 -1
- package/dist/esm/modules/env/app-env.js +32 -6
- package/dist/esm/modules/env/app-env.js.map +1 -1
- package/dist/esm/modules/index.d.ts +1 -1
- package/dist/esm/modules/index.d.ts.map +1 -1
- package/dist/esm/modules/index.js +1 -1
- package/dist/esm/modules/index.js.map +1 -1
- package/dist/esm/modules/logger/base/base.d.ts.map +1 -1
- package/dist/esm/modules/logger/base/base.js +3 -0
- package/dist/esm/modules/logger/base/base.js.map +1 -1
- package/dist/esm/modules/logger/factory.d.ts.map +1 -1
- package/dist/esm/modules/logger/factory.js +2 -1
- package/dist/esm/modules/logger/factory.js.map +1 -1
- package/dist/esm/modules/logger/formatting/error-prettier.d.ts +6 -0
- package/dist/esm/modules/logger/formatting/error-prettier.d.ts.map +1 -1
- package/dist/esm/modules/logger/formatting/error-prettier.js +35 -1
- package/dist/esm/modules/logger/formatting/error-prettier.js.map +1 -1
- package/dist/esm/modules/logger/hf/logger.d.ts.map +1 -1
- package/dist/esm/modules/logger/hf/logger.js +4 -1
- package/dist/esm/modules/logger/hf/logger.js.map +1 -1
- package/dist/esm/modules/logger/pino/destination.d.ts.map +1 -1
- package/dist/esm/modules/logger/pino/destination.js +2 -1
- package/dist/esm/modules/logger/pino/destination.js.map +1 -1
- package/dist/esm/modules/logger/resolver.d.ts +1 -1
- package/dist/esm/modules/logger/resolver.d.ts.map +1 -1
- package/dist/esm/modules/logger/resolver.js +8 -1
- package/dist/esm/modules/logger/resolver.js.map +1 -1
- package/dist/esm/modules/logger/slot.d.ts +23 -0
- package/dist/esm/modules/logger/slot.d.ts.map +1 -0
- package/dist/esm/modules/logger/slot.js +119 -0
- package/dist/esm/modules/logger/slot.js.map +1 -0
- package/dist/esm/modules/logger/winston/common/constants.d.ts.map +1 -1
- package/dist/esm/modules/logger/winston/common/constants.js +6 -5
- package/dist/esm/modules/logger/winston/common/constants.js.map +1 -1
- package/dist/esm/modules/network/http-request/base-network-request.helper.d.ts.map +1 -1
- package/dist/esm/modules/network/http-request/base-network-request.helper.js +4 -3
- package/dist/esm/modules/network/http-request/base-network-request.helper.js.map +1 -1
- package/dist/esm/modules/network/http-request/fetcher/node-fetcher.d.ts.map +1 -1
- package/dist/esm/modules/network/http-request/fetcher/node-fetcher.js +3 -3
- package/dist/esm/modules/network/http-request/fetcher/node-fetcher.js.map +1 -1
- package/dist/esm/modules/network/index.d.ts +1 -0
- package/dist/esm/modules/network/index.d.ts.map +1 -1
- package/dist/esm/modules/network/index.js +1 -0
- package/dist/esm/modules/network/index.js.map +1 -1
- package/dist/esm/modules/network/tcp-socket/base-tcp-client.helper.d.ts.map +1 -1
- package/dist/esm/modules/network/tcp-socket/base-tcp-client.helper.js +2 -2
- package/dist/esm/modules/network/tcp-socket/base-tcp-client.helper.js.map +1 -1
- package/dist/esm/modules/network/tcp-socket/base-tcp-server.helper.d.ts +2 -3
- package/dist/esm/modules/network/tcp-socket/base-tcp-server.helper.d.ts.map +1 -1
- package/dist/esm/modules/network/tcp-socket/base-tcp-server.helper.js +5 -5
- package/dist/esm/modules/network/tcp-socket/base-tcp-server.helper.js.map +1 -1
- package/dist/esm/modules/network/utilities/index.d.ts +3 -0
- package/dist/esm/modules/network/utilities/index.d.ts.map +1 -0
- package/dist/esm/modules/network/utilities/index.js +3 -0
- package/dist/esm/modules/network/utilities/index.js.map +1 -0
- package/dist/esm/modules/network/utilities/query-string.d.ts +26 -0
- package/dist/esm/modules/network/utilities/query-string.d.ts.map +1 -0
- package/dist/esm/modules/network/utilities/query-string.js +44 -0
- package/dist/esm/modules/network/utilities/query-string.js.map +1 -0
- package/dist/esm/modules/network/utilities/url-safety/common/constants.d.ts +18 -0
- package/dist/esm/modules/network/utilities/url-safety/common/constants.d.ts.map +1 -0
- package/dist/esm/modules/network/utilities/url-safety/common/constants.js +18 -0
- package/dist/esm/modules/network/utilities/url-safety/common/constants.js.map +1 -0
- package/dist/esm/modules/network/utilities/url-safety/common/errors.d.ts +31 -0
- package/dist/esm/modules/network/utilities/url-safety/common/errors.d.ts.map +1 -0
- package/dist/esm/modules/network/utilities/url-safety/common/errors.js +26 -0
- package/dist/esm/modules/network/utilities/url-safety/common/errors.js.map +1 -0
- package/dist/esm/modules/network/utilities/url-safety/common/index.d.ts +4 -0
- package/dist/esm/modules/network/utilities/url-safety/common/index.d.ts.map +1 -0
- package/dist/esm/modules/network/utilities/url-safety/common/index.js +4 -0
- package/dist/esm/modules/network/utilities/url-safety/common/index.js.map +1 -0
- package/dist/esm/modules/network/utilities/url-safety/common/types.d.ts +24 -0
- package/dist/esm/modules/network/utilities/url-safety/common/types.d.ts.map +1 -0
- package/dist/esm/modules/network/utilities/url-safety/common/types.js +2 -0
- package/dist/esm/modules/network/utilities/url-safety/common/types.js.map +1 -0
- package/dist/esm/modules/network/utilities/url-safety/index.d.ts +4 -0
- package/dist/esm/modules/network/utilities/url-safety/index.d.ts.map +1 -0
- package/dist/esm/modules/network/utilities/url-safety/index.js +4 -0
- package/dist/esm/modules/network/utilities/url-safety/index.js.map +1 -0
- package/dist/esm/modules/network/utilities/url-safety/ingest.d.ts +52 -0
- package/dist/esm/modules/network/utilities/url-safety/ingest.d.ts.map +1 -0
- package/dist/esm/modules/network/utilities/url-safety/ingest.js +163 -0
- package/dist/esm/modules/network/utilities/url-safety/ingest.js.map +1 -0
- package/dist/esm/modules/network/utilities/url-safety/policy.d.ts +29 -0
- package/dist/esm/modules/network/utilities/url-safety/policy.d.ts.map +1 -0
- package/dist/esm/modules/network/utilities/url-safety/policy.js +109 -0
- package/dist/esm/modules/network/utilities/url-safety/policy.js.map +1 -0
- package/dist/esm/modules/queue/bullmq/helper.d.ts +25 -4
- package/dist/esm/modules/queue/bullmq/helper.d.ts.map +1 -1
- package/dist/esm/modules/queue/bullmq/helper.js +45 -14
- package/dist/esm/modules/queue/bullmq/helper.js.map +1 -1
- package/dist/esm/modules/queue/internal/sequential/helper.d.ts.map +1 -1
- package/dist/esm/modules/queue/internal/sequential/helper.js +2 -2
- package/dist/esm/modules/queue/internal/sequential/helper.js.map +1 -1
- package/dist/esm/modules/queue/kafka/base.d.ts +8 -4
- package/dist/esm/modules/queue/kafka/base.d.ts.map +1 -1
- package/dist/esm/modules/queue/kafka/base.js +5 -1
- package/dist/esm/modules/queue/kafka/base.js.map +1 -1
- package/dist/esm/modules/queue/kafka/bundler/platformatic-require.plugin.d.ts +1 -1
- package/dist/esm/modules/queue/kafka/bundler/platformatic-require.plugin.d.ts.map +1 -1
- package/dist/esm/modules/queue/kafka/bundler/platformatic-require.plugin.js +1 -1
- package/dist/esm/modules/queue/kafka/bundler/platformatic-require.plugin.js.map +1 -1
- package/dist/esm/modules/queue/kafka/common/types/callbacks.d.ts +10 -0
- package/dist/esm/modules/queue/kafka/common/types/callbacks.d.ts.map +1 -1
- package/dist/esm/modules/queue/kafka/common/types/consumer.d.ts +5 -1
- package/dist/esm/modules/queue/kafka/common/types/consumer.d.ts.map +1 -1
- package/dist/esm/modules/queue/kafka/consumer.d.ts +64 -28
- package/dist/esm/modules/queue/kafka/consumer.d.ts.map +1 -1
- package/dist/esm/modules/queue/kafka/consumer.js +57 -23
- package/dist/esm/modules/queue/kafka/consumer.js.map +1 -1
- package/dist/esm/modules/queue/mqtt/helper.d.ts.map +1 -1
- package/dist/esm/modules/queue/mqtt/helper.js +6 -5
- package/dist/esm/modules/queue/mqtt/helper.js.map +1 -1
- package/dist/esm/modules/redis/base/abstract.helper.d.ts.map +1 -1
- package/dist/esm/modules/redis/base/abstract.helper.js +11 -6
- package/dist/esm/modules/redis/base/abstract.helper.js.map +1 -1
- package/dist/esm/modules/redis/cluster/cluster.helper.d.ts +3 -2
- package/dist/esm/modules/redis/cluster/cluster.helper.d.ts.map +1 -1
- package/dist/esm/modules/redis/cluster/cluster.helper.js +18 -4
- package/dist/esm/modules/redis/cluster/cluster.helper.js.map +1 -1
- package/dist/esm/modules/redis/common/constants.d.ts +4 -0
- package/dist/esm/modules/redis/common/constants.d.ts.map +1 -1
- package/dist/esm/modules/redis/common/constants.js +4 -0
- package/dist/esm/modules/redis/common/constants.js.map +1 -1
- package/dist/esm/modules/redis/common/types.d.ts +13 -3
- package/dist/esm/modules/redis/common/types.d.ts.map +1 -1
- package/dist/esm/modules/redis/sentinel/sentinel.helper.d.ts +1 -1
- package/dist/esm/modules/redis/sentinel/sentinel.helper.d.ts.map +1 -1
- package/dist/esm/modules/redis/sentinel/sentinel.helper.js +3 -2
- package/dist/esm/modules/redis/sentinel/sentinel.helper.js.map +1 -1
- package/dist/esm/modules/redis/single/single.helper.d.ts +1 -1
- package/dist/esm/modules/redis/single/single.helper.d.ts.map +1 -1
- package/dist/esm/modules/redis/single/single.helper.js +4 -2
- package/dist/esm/modules/redis/single/single.helper.js.map +1 -1
- package/dist/esm/modules/secrets/base/abstract.helper.d.ts.map +1 -1
- package/dist/esm/modules/secrets/base/abstract.helper.js +2 -1
- package/dist/esm/modules/secrets/base/abstract.helper.js.map +1 -1
- package/dist/esm/modules/secrets/hashicorp/hashicorp.helper.d.ts.map +1 -1
- package/dist/esm/modules/secrets/hashicorp/hashicorp.helper.js +2 -1
- package/dist/esm/modules/secrets/hashicorp/hashicorp.helper.js.map +1 -1
- package/dist/esm/modules/secrets/system-envs/system-envs.helper.d.ts.map +1 -1
- package/dist/esm/modules/secrets/system-envs/system-envs.helper.js +2 -1
- package/dist/esm/modules/secrets/system-envs/system-envs.helper.js.map +1 -1
- package/dist/esm/modules/socket/socket-io/client/helper.d.ts +2 -1
- package/dist/esm/modules/socket/socket-io/client/helper.d.ts.map +1 -1
- package/dist/esm/modules/socket/socket-io/client/helper.js +9 -3
- package/dist/esm/modules/socket/socket-io/client/helper.js.map +1 -1
- package/dist/esm/modules/socket/socket-io/common/types/client.d.ts +2 -0
- package/dist/esm/modules/socket/socket-io/common/types/client.d.ts.map +1 -1
- package/dist/esm/modules/socket/socket-io/server/helper.d.ts +1 -0
- package/dist/esm/modules/socket/socket-io/server/helper.d.ts.map +1 -1
- package/dist/esm/modules/socket/socket-io/server/helper.js +17 -27
- package/dist/esm/modules/socket/socket-io/server/helper.js.map +1 -1
- package/dist/esm/modules/socket/websocket/server/helper.d.ts.map +1 -1
- package/dist/esm/modules/socket/websocket/server/helper.js +2 -1
- package/dist/esm/modules/socket/websocket/server/helper.js.map +1 -1
- package/dist/esm/modules/storage/base.d.ts +98 -49
- package/dist/esm/modules/storage/base.d.ts.map +1 -1
- package/dist/esm/modules/storage/base.js +202 -91
- package/dist/esm/modules/storage/base.js.map +1 -1
- package/dist/esm/modules/storage/bun-s3/helper.d.ts +74 -29
- package/dist/esm/modules/storage/bun-s3/helper.d.ts.map +1 -1
- package/dist/esm/modules/storage/bun-s3/helper.js +322 -56
- package/dist/esm/modules/storage/bun-s3/helper.js.map +1 -1
- package/dist/esm/modules/storage/bun-s3/utility.d.ts +59 -0
- package/dist/esm/modules/storage/bun-s3/utility.d.ts.map +1 -1
- package/dist/esm/modules/storage/bun-s3/utility.js +212 -28
- package/dist/esm/modules/storage/bun-s3/utility.js.map +1 -1
- package/dist/esm/modules/storage/common/constants.d.ts +27 -0
- package/dist/esm/modules/storage/common/constants.d.ts.map +1 -0
- package/dist/esm/modules/storage/common/constants.js +28 -0
- package/dist/esm/modules/storage/common/constants.js.map +1 -0
- package/dist/esm/modules/storage/common/errors.d.ts +22 -0
- package/dist/esm/modules/storage/common/errors.d.ts.map +1 -0
- package/dist/esm/modules/storage/common/errors.js +21 -0
- package/dist/esm/modules/storage/common/errors.js.map +1 -0
- package/dist/esm/modules/storage/common/index.d.ts +3 -0
- package/dist/esm/modules/storage/common/index.d.ts.map +1 -1
- package/dist/esm/modules/storage/common/index.js +3 -0
- package/dist/esm/modules/storage/common/index.js.map +1 -1
- package/dist/esm/modules/storage/common/types.d.ts +118 -38
- package/dist/esm/modules/storage/common/types.d.ts.map +1 -1
- package/dist/esm/modules/storage/common/utility.d.ts +7 -0
- package/dist/esm/modules/storage/common/utility.d.ts.map +1 -0
- package/dist/esm/modules/storage/common/utility.js +23 -0
- package/dist/esm/modules/storage/common/utility.js.map +1 -0
- package/dist/esm/modules/storage/disk/helper.d.ts +26 -28
- package/dist/esm/modules/storage/disk/helper.d.ts.map +1 -1
- package/dist/esm/modules/storage/disk/helper.js +125 -86
- package/dist/esm/modules/storage/disk/helper.js.map +1 -1
- package/dist/esm/modules/storage/in-memory/helper.d.ts +10 -5
- package/dist/esm/modules/storage/in-memory/helper.d.ts.map +1 -1
- package/dist/esm/modules/storage/in-memory/helper.js +17 -10
- package/dist/esm/modules/storage/in-memory/helper.js.map +1 -1
- package/dist/esm/modules/storage/minio/helper.d.ts +22 -28
- package/dist/esm/modules/storage/minio/helper.d.ts.map +1 -1
- package/dist/esm/modules/storage/minio/helper.js +87 -33
- package/dist/esm/modules/storage/minio/helper.js.map +1 -1
- package/dist/esm/modules/temporal/adapters/dayjs.d.ts +21 -0
- package/dist/esm/modules/temporal/adapters/dayjs.d.ts.map +1 -0
- package/dist/esm/modules/temporal/adapters/dayjs.js +44 -0
- package/dist/esm/modules/temporal/adapters/dayjs.js.map +1 -0
- package/dist/esm/modules/temporal/adapters/guards.d.ts +4 -0
- package/dist/esm/modules/temporal/adapters/guards.d.ts.map +1 -0
- package/dist/esm/modules/temporal/adapters/guards.js +10 -0
- package/dist/esm/modules/temporal/adapters/guards.js.map +1 -0
- package/dist/esm/modules/temporal/adapters/index.d.ts +4 -0
- package/dist/esm/modules/temporal/adapters/index.d.ts.map +1 -0
- package/dist/esm/modules/temporal/adapters/index.js +4 -0
- package/dist/esm/modules/temporal/adapters/index.js.map +1 -0
- package/dist/esm/modules/temporal/adapters/luxon.d.ts +13 -0
- package/dist/esm/modules/temporal/adapters/luxon.d.ts.map +1 -0
- package/dist/esm/modules/temporal/adapters/luxon.js +22 -0
- package/dist/esm/modules/temporal/adapters/luxon.js.map +1 -0
- package/dist/esm/modules/temporal/adapters/native.d.ts +16 -0
- package/dist/esm/modules/temporal/adapters/native.d.ts.map +1 -0
- package/dist/esm/modules/temporal/adapters/native.js +34 -0
- package/dist/esm/modules/temporal/adapters/native.js.map +1 -0
- package/dist/esm/modules/temporal/calendar.d.ts +52 -0
- package/dist/esm/modules/temporal/calendar.d.ts.map +1 -0
- package/dist/esm/modules/temporal/calendar.js +138 -0
- package/dist/esm/modules/temporal/calendar.js.map +1 -0
- package/dist/esm/modules/temporal/common/constants.d.ts +20 -0
- package/dist/esm/modules/temporal/common/constants.d.ts.map +1 -0
- package/dist/esm/modules/temporal/common/constants.js +29 -0
- package/dist/esm/modules/temporal/common/constants.js.map +1 -0
- package/dist/esm/modules/temporal/common/index.d.ts +3 -0
- package/dist/esm/modules/temporal/common/index.d.ts.map +1 -0
- package/dist/esm/modules/temporal/common/index.js +3 -0
- package/dist/esm/modules/temporal/common/index.js.map +1 -0
- package/dist/esm/modules/temporal/common/types.d.ts +69 -0
- package/dist/esm/modules/temporal/common/types.d.ts.map +1 -0
- package/dist/esm/modules/temporal/common/types.js +2 -0
- package/dist/esm/modules/temporal/common/types.js.map +1 -0
- package/dist/esm/modules/temporal/helper.d.ts +120 -0
- package/dist/esm/modules/temporal/helper.d.ts.map +1 -0
- package/dist/esm/modules/temporal/helper.js +322 -0
- package/dist/esm/modules/temporal/helper.js.map +1 -0
- package/dist/esm/modules/temporal/index.d.ts +4 -0
- package/dist/esm/modules/temporal/index.d.ts.map +1 -0
- package/dist/esm/modules/temporal/index.js +4 -0
- package/dist/esm/modules/temporal/index.js.map +1 -0
- package/dist/esm/modules/temporal/pattern.d.ts +24 -0
- package/dist/esm/modules/temporal/pattern.d.ts.map +1 -0
- package/dist/esm/modules/temporal/pattern.js +129 -0
- package/dist/esm/modules/temporal/pattern.js.map +1 -0
- package/dist/esm/modules/temporal/tokens.d.ts +65 -0
- package/dist/esm/modules/temporal/tokens.d.ts.map +1 -0
- package/dist/esm/modules/temporal/tokens.js +102 -0
- package/dist/esm/modules/temporal/tokens.js.map +1 -0
- package/dist/esm/modules/uid/index.d.ts +1 -0
- package/dist/esm/modules/uid/index.d.ts.map +1 -1
- package/dist/esm/modules/uid/index.js +1 -0
- package/dist/esm/modules/uid/index.js.map +1 -1
- package/dist/esm/modules/uid/request-id.d.ts +5 -12
- package/dist/esm/modules/uid/request-id.d.ts.map +1 -1
- package/dist/esm/modules/uid/request-id.js +7 -44
- package/dist/esm/modules/uid/request-id.js.map +1 -1
- package/dist/esm/modules/uid/uuid/common/constants.d.ts +32 -0
- package/dist/esm/modules/uid/uuid/common/constants.d.ts.map +1 -0
- package/dist/esm/modules/uid/uuid/common/constants.js +32 -0
- package/dist/esm/modules/uid/uuid/common/constants.js.map +1 -0
- package/dist/esm/modules/uid/uuid/common/index.d.ts +3 -0
- package/dist/esm/modules/uid/uuid/common/index.d.ts.map +1 -0
- package/dist/esm/modules/uid/uuid/common/index.js +5 -0
- package/dist/esm/modules/uid/uuid/common/index.js.map +1 -0
- package/dist/esm/modules/uid/uuid/common/types.d.ts +6 -0
- package/dist/esm/modules/uid/uuid/common/types.d.ts.map +1 -0
- package/dist/esm/modules/uid/uuid/common/types.js +2 -0
- package/dist/esm/modules/uid/uuid/common/types.js.map +1 -0
- package/dist/esm/modules/uid/uuid/helper.d.ts +37 -0
- package/dist/esm/modules/uid/uuid/helper.d.ts.map +1 -0
- package/dist/esm/modules/uid/uuid/helper.js +45 -0
- package/dist/esm/modules/uid/uuid/helper.js.map +1 -0
- package/dist/esm/modules/uid/uuid/index.d.ts +6 -0
- package/dist/esm/modules/uid/uuid/index.d.ts.map +1 -0
- package/dist/esm/modules/uid/uuid/index.js +6 -0
- package/dist/esm/modules/uid/uuid/index.js.map +1 -0
- package/dist/esm/modules/uid/uuid/sha1.d.ts +19 -0
- package/dist/esm/modules/uid/uuid/sha1.d.ts.map +1 -0
- package/dist/esm/modules/uid/uuid/sha1.js +101 -0
- package/dist/esm/modules/uid/uuid/sha1.js.map +1 -0
- package/dist/esm/modules/uid/uuid/v4.d.ts +9 -0
- package/dist/esm/modules/uid/uuid/v4.d.ts.map +1 -0
- package/dist/esm/modules/uid/uuid/v4.js +50 -0
- package/dist/esm/modules/uid/uuid/v4.js.map +1 -0
- package/dist/esm/modules/uid/uuid/v5.d.ts +15 -0
- package/dist/esm/modules/uid/uuid/v5.d.ts.map +1 -0
- package/dist/esm/modules/uid/uuid/v5.js +86 -0
- package/dist/esm/modules/uid/uuid/v5.js.map +1 -0
- package/dist/esm/modules/uid/uuid/v7.d.ts +11 -0
- package/dist/esm/modules/uid/uuid/v7.d.ts.map +1 -0
- package/dist/esm/modules/uid/uuid/v7.js +90 -0
- package/dist/esm/modules/uid/uuid/v7.js.map +1 -0
- package/dist/esm/package.json +6 -0
- package/dist/esm/temporal.d.ts +2 -0
- package/dist/esm/temporal.d.ts.map +1 -0
- package/dist/esm/temporal.js +3 -0
- package/dist/esm/temporal.js.map +1 -0
- package/dist/esm/utilities/build-info.utility.d.ts +33 -0
- package/dist/esm/utilities/build-info.utility.d.ts.map +1 -0
- package/dist/esm/utilities/build-info.utility.js +24 -0
- package/dist/esm/utilities/build-info.utility.js.map +1 -0
- package/dist/esm/utilities/hr-time.utility.d.ts +6 -0
- package/dist/esm/utilities/hr-time.utility.d.ts.map +1 -0
- package/dist/esm/utilities/hr-time.utility.js +10 -0
- package/dist/esm/utilities/hr-time.utility.js.map +1 -0
- package/dist/esm/utilities/index.d.ts +3 -1
- package/dist/esm/utilities/index.d.ts.map +1 -1
- package/dist/esm/utilities/index.js +3 -1
- package/dist/esm/utilities/index.js.map +1 -1
- package/dist/esm/utilities/module.utility.d.ts +8 -2
- package/dist/esm/utilities/module.utility.d.ts.map +1 -1
- package/dist/esm/utilities/module.utility.js +25 -6
- package/dist/esm/utilities/module.utility.js.map +1 -1
- package/dist/esm/utilities/parse.utility.d.ts +29 -0
- package/dist/esm/utilities/parse.utility.d.ts.map +1 -1
- package/dist/esm/utilities/parse.utility.js +56 -6
- package/dist/esm/utilities/parse.utility.js.map +1 -1
- package/dist/esm/utilities/project-root.utility.d.ts +17 -0
- package/dist/esm/utilities/project-root.utility.d.ts.map +1 -0
- package/dist/esm/utilities/project-root.utility.js +19 -0
- package/dist/esm/utilities/project-root.utility.js.map +1 -0
- package/dist/esm/utilities/request.utility.d.ts +22 -1
- package/dist/esm/utilities/request.utility.d.ts.map +1 -1
- package/dist/esm/utilities/request.utility.js +42 -2
- package/dist/esm/utilities/request.utility.js.map +1 -1
- package/dist/esm/utilities/sleep.utility.d.ts +0 -1
- package/dist/esm/utilities/sleep.utility.d.ts.map +1 -1
- package/dist/esm/utilities/sleep.utility.js +0 -1
- package/dist/esm/utilities/sleep.utility.js.map +1 -1
- package/dist/esm/uuid.d.ts +2 -0
- package/dist/esm/uuid.d.ts.map +1 -0
- package/dist/esm/uuid.js +3 -0
- package/dist/esm/uuid.js.map +1 -0
- package/package.json +35 -19
- package/dist/cjs/modules/error/schemas.d.ts +0 -16
- package/dist/cjs/modules/error/schemas.d.ts.map +0 -1
- package/dist/cjs/modules/error/schemas.js +0 -36
- package/dist/cjs/modules/error/schemas.js.map +0 -1
- package/dist/cjs/utilities/date.utility.d.ts +0 -19
- package/dist/cjs/utilities/date.utility.d.ts.map +0 -1
- package/dist/cjs/utilities/date.utility.js +0 -57
- package/dist/cjs/utilities/date.utility.js.map +0 -1
- package/dist/esm/modules/error/schemas.d.ts +0 -16
- package/dist/esm/modules/error/schemas.d.ts.map +0 -1
- package/dist/esm/modules/error/schemas.js +0 -33
- package/dist/esm/modules/error/schemas.js.map +0 -1
- package/dist/esm/utilities/date.utility.d.ts +0 -19
- package/dist/esm/utilities/date.utility.d.ts.map +0 -1
- package/dist/esm/utilities/date.utility.js +0 -46
- package/dist/esm/utilities/date.utility.js.map +0 -1
|
@@ -8,21 +8,39 @@ const node_module_1 = require("node:module");
|
|
|
8
8
|
const node_path_1 = __importDefault(require("node:path"));
|
|
9
9
|
const logger_1 = require("../modules/logger");
|
|
10
10
|
const error_1 = require("../modules/error");
|
|
11
|
+
const project_root_utility_1 = require("./project-root.utility");
|
|
11
12
|
const logger = logger_1.LoggerFactory.getLogger(['ModuleUtility']);
|
|
12
13
|
/** Loads an optional peer without letting `Bun.build` see it: every specifier stays a parameter, so there is no literal (nor a `minify.syntax`-folded const) for the bundler to resolve. */
|
|
13
14
|
class ModuleUtility {
|
|
14
|
-
/** Peers handed over by the application, keyed by specifier. Checked before any filesystem lookup. */
|
|
15
|
-
static { this.registered =
|
|
16
|
-
|
|
15
|
+
/** Peers handed over by the application, keyed by specifier. Checked before any filesystem lookup. The map lives in a globalThis slot because a process (or a compiled bundle) can carry two copies of this module, and a peer registered through one copy must be found by the other. */
|
|
16
|
+
static { this.registered = ModuleUtility.sharedRegistry(); }
|
|
17
|
+
static sharedRegistry() {
|
|
18
|
+
const slot = Symbol.for('ignis:module-registry');
|
|
19
|
+
const shared = Reflect.get(globalThis, slot);
|
|
20
|
+
if (shared) {
|
|
21
|
+
return shared;
|
|
22
|
+
}
|
|
23
|
+
const created = new Map();
|
|
24
|
+
Reflect.set(globalThis, slot, created);
|
|
25
|
+
return created;
|
|
26
|
+
}
|
|
27
|
+
/** Called by the application once it knows its root (`configs.projectRoot` or the cwd); every peer lookup below follows it. Delegates to `ProjectRootRegistry`, which a browser Worker host reaches too through `/core` - the two must share ONE slot. */
|
|
28
|
+
static setProjectRoot(opts) {
|
|
29
|
+
project_root_utility_1.ProjectRootRegistry.set(opts);
|
|
30
|
+
}
|
|
31
|
+
static getProjectRoot() {
|
|
32
|
+
return project_root_utility_1.ProjectRootRegistry.getShared() ?? process.cwd();
|
|
33
|
+
}
|
|
34
|
+
/** Resolves peers against the APP's node_modules (under the project root), not this package's own `dist/` location. */
|
|
17
35
|
static appRequire() {
|
|
18
|
-
return (0, node_module_1.createRequire)(node_path_1.default.join(
|
|
36
|
+
return (0, node_module_1.createRequire)(node_path_1.default.join(this.getProjectRoot(), 'node_modules'));
|
|
19
37
|
}
|
|
20
38
|
static fail(opts) {
|
|
21
39
|
const { method, module, error, scope } = opts;
|
|
22
40
|
const reason = error instanceof Error ? error.message : String(error);
|
|
23
41
|
logger.for(method).error("Failed to load '%s' | Error: %s", module, reason);
|
|
24
42
|
return (0, error_1.getError)({
|
|
25
|
-
message: `[ModuleUtility.${method}] ${module} is required${scope ? ` for ${scope}` : ''}. Please install '${module}' | Error: ${reason}`,
|
|
43
|
+
message: `[ModuleUtility.${method}] ${module} is required, resolved from ${this.getProjectRoot()}${scope ? ` for ${scope}` : ''}. Please install '${module}' | Error: ${reason}`,
|
|
26
44
|
});
|
|
27
45
|
}
|
|
28
46
|
/**
|
|
@@ -36,7 +54,8 @@ class ModuleUtility {
|
|
|
36
54
|
* module after the first.
|
|
37
55
|
*/
|
|
38
56
|
static register(opts) {
|
|
39
|
-
|
|
57
|
+
const modulesEntries = Object.entries(opts.modules);
|
|
58
|
+
for (const [module, value] of modulesEntries) {
|
|
40
59
|
this.registered.set(module, value);
|
|
41
60
|
}
|
|
42
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.utility.js","sourceRoot":"","sources":["../../../src/utilities/module.utility.ts"],"names":[],"mappings":";;;;;;AAAA,6CAA4C;AAC5C,0DAA6B;AAE7B,6CAAiD;AACjD,2CAA2C;
|
|
1
|
+
{"version":3,"file":"module.utility.js","sourceRoot":"","sources":["../../../src/utilities/module.utility.ts"],"names":[],"mappings":";;;;;;AAAA,6CAA4C;AAC5C,0DAA6B;AAE7B,6CAAiD;AACjD,2CAA2C;AAC3C,iEAA6D;AAE7D,MAAM,MAAM,GAAG,sBAAa,CAAC,SAAS,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC;AAE1D,4LAA4L;AAC5L,MAAa,aAAa;IACxB,0RAA0R;aAClQ,eAAU,GAAyB,aAAa,CAAC,cAAc,EAAE,CAAC;IAElF,MAAM,CAAC,cAAc;QAC3B,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;QACjD,MAAM,MAAM,GAAqC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QAC/E,IAAI,MAAM,EAAE,CAAC;YACX,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,MAAM,OAAO,GAAG,IAAI,GAAG,EAAmB,CAAC;QAC3C,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAEvC,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,0PAA0P;IAC1P,MAAM,CAAC,cAAc,CAAC,IAA6B;QACjD,0CAAmB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED,MAAM,CAAC,cAAc;QACnB,OAAO,0CAAmB,CAAC,SAAS,EAAE,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAC1D,CAAC;IAED,uHAAuH;IAC/G,MAAM,CAAC,U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AAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;YACvE,CAAC;QACH,CAAC;IACH,CAAC;;AAtHH,sCAuHC"}
|
|
@@ -3,6 +3,21 @@ export declare const toCamel: (s: string) => string;
|
|
|
3
3
|
export declare const keysToCamel: (object: object) => any;
|
|
4
4
|
export declare const isInt: (n: any) => boolean;
|
|
5
5
|
export declare const isFloat: (input: any) => boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Parses an integer, TOTAL by design: it always answers a number, and answers `0` for anything it
|
|
8
|
+
* cannot parse - `undefined`, `''`, `'abc'`.
|
|
9
|
+
*
|
|
10
|
+
* That makes `int(value) ?? fallback` dead code, because the left side is never nullish. The
|
|
11
|
+
* fallback belongs INSIDE the call, and for an environment read it belongs in the read itself:
|
|
12
|
+
*
|
|
13
|
+
* ```ts
|
|
14
|
+
* int(applicationEnvironment.get(KEY, { defaultValue: '6379' })) // correct
|
|
15
|
+
* int(applicationEnvironment.get(KEY)) ?? 6379 // always 0 when KEY is unset
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* The second form is silent: a missing port reads `0` and a missing retry budget reads `0`, which
|
|
19
|
+
* through `AbstractRedisHelper.buildRetryStrategy` means "give up after the first failure".
|
|
20
|
+
*/
|
|
6
21
|
export declare const int: (input: any) => number;
|
|
7
22
|
export declare const float: (input: any, digit?: number) => number;
|
|
8
23
|
export declare const toBoolean: (input: any) => boolean;
|
|
@@ -10,6 +25,20 @@ export declare const toBoolean: (input: any) => boolean;
|
|
|
10
25
|
export declare const parseArrayToMapWithKey: <T extends Record<K, PropertyKey>, K extends keyof T>(arr: T[], keyMap: K) => Map<T[K], T>;
|
|
11
26
|
/** Splits a delimited string into trimmed, non-empty entries - the transform for list-shaped env values (e.g. `applicationEnvironment.get(KEY, { transform: toDelimitedArray })`). */
|
|
12
27
|
export declare const toDelimitedArray: (input: unknown, separator?: string) => string[];
|
|
28
|
+
/**
|
|
29
|
+
* A trimmed value, or `undefined` when the input is absent or carries nothing but whitespace.
|
|
30
|
+
*
|
|
31
|
+
* Written for environment reads. `KEY=` in a deployment file is a pipeline that forgot to export the
|
|
32
|
+
* value, but `process.env.KEY` answers `''` for it, and `''` walks straight past `??`:
|
|
33
|
+
*
|
|
34
|
+
* ```ts
|
|
35
|
+
* process.env.APP_ENV_LOGGER_FORMAT ?? 'text' // '' when the line is blank
|
|
36
|
+
* blankToUndefined(process.env.APP_ENV_LOGGER_FORMAT) ?? 'text' // 'text'
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* Reach for this rather than `||`, which reads `'0'` as blank as well.
|
|
40
|
+
*/
|
|
41
|
+
export declare const blankToUndefined: (input: string | undefined) => string | undefined;
|
|
13
42
|
/** Trims a possibly-undefined env value to a clean string ('' when absent). */
|
|
14
43
|
export declare const toTrimmed: (input: unknown) => string;
|
|
15
44
|
//# sourceMappingURL=parse.utility.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.utility.d.ts","sourceRoot":"","sources":["../../../src/utilities/parse.utility.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parse.utility.d.ts","sourceRoot":"","sources":["../../../src/utilities/parse.utility.ts"],"names":[],"mappings":"AAyBA,eAAO,MAAM,MAAM,cAA0D,CAAC;AAE9E,eAAO,MAAM,OAAO,GAAI,GAAG,MAAM,WAIhC,CAAC;AAqBF,eAAO,MAAM,WAAW,GAAI,QAAQ,MAAM,QASzC,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,GAAG,GAAG,YAM3B,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,OAAO,GAAG,YAMjC,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,GAAG,GAAI,OAAO,GAAG,WAY7B,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,OAAO,GAAG,EAAE,cAAS,WAY1C,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,OAAO,GAAG,KAAG,OAUtC,CAAC;AAEF,yFAAyF;AACzF,eAAO,MAAM,sBAAsB,GAAI,CAAC,SAAS,MAAM,CAAC,CAAC,EAAE,WAAW,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,EACxF,KAAK,CAAC,EAAE,EACR,QAAQ,CAAC,KACR,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAiBb,CAAC;AAEF,sLAAsL;AACtL,eAAO,MAAM,gBAAgB,GAAI,OAAO,OAAO,EAAE,kBAAe,KAAG,MAAM,EASxE,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO,MAAM,GAAG,SAAS,KAAG,MAAM,GAAG,SAGrE,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,SAAS,GAAI,OAAO,OAAO,KAAG,MAM1C,CAAC"}
|
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.toTrimmed = exports.toDelimitedArray = exports.parseArrayToMapWithKey = exports.toBoolean = exports.float = exports.int = exports.isFloat = exports.isInt = exports.keysToCamel = exports.toCamel = exports.getUID = void 0;
|
|
3
|
+
exports.toTrimmed = exports.blankToUndefined = exports.toDelimitedArray = exports.parseArrayToMapWithKey = exports.toBoolean = exports.float = exports.int = exports.isFloat = exports.isInt = exports.keysToCamel = exports.toCamel = exports.getUID = void 0;
|
|
7
4
|
const error_1 = require("../modules/error");
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Rounds at a decimal precision, shifting the exponent rather than multiplying: `1.005` at 2 is
|
|
7
|
+
* `1.01` here, where `Math.round(1.005 * 100) / 100` gives `1`.
|
|
8
|
+
*
|
|
9
|
+
* Hand-written to keep lodash out of a browser bundle. One deliberate difference from `lodash/round`:
|
|
10
|
+
* a result of negative zero is normalised to `0`. They compare equal, stringify the same and
|
|
11
|
+
* serialise the same, so nothing downstream can tell - checked across 114 value/precision pairs, and
|
|
12
|
+
* the sign of zero was the only disagreement.
|
|
13
|
+
*/
|
|
14
|
+
const round = (opts) => {
|
|
15
|
+
const { value, precision = 0 } = opts;
|
|
16
|
+
if (!Number.isFinite(value) || precision === 0) {
|
|
17
|
+
return Math.round(value) + 0;
|
|
18
|
+
}
|
|
19
|
+
const [mantissa, exponent] = `${value}e`.split('e');
|
|
20
|
+
const shifted = Math.round(Number(`${mantissa}e${Number(exponent) + precision}`));
|
|
21
|
+
const [shiftedMantissa, shiftedExponent] = `${shifted}e`.split('e');
|
|
22
|
+
return Number(`${shiftedMantissa}e${Number(shiftedExponent) - precision}`) + 0;
|
|
23
|
+
};
|
|
10
24
|
const getUID = () => Math.random().toString(36).slice(2).toUpperCase();
|
|
11
25
|
exports.getUID = getUID;
|
|
12
26
|
const toCamel = (s) => {
|
|
@@ -24,8 +38,9 @@ const camelizeValue = (value) => {
|
|
|
24
38
|
return value;
|
|
25
39
|
}
|
|
26
40
|
const camelized = {};
|
|
27
|
-
|
|
28
|
-
|
|
41
|
+
const valueKeys = Object.keys(value);
|
|
42
|
+
for (const key of valueKeys) {
|
|
43
|
+
camelized[(0, exports.toCamel)(key)] = camelizeValue(value[key]);
|
|
29
44
|
}
|
|
30
45
|
return camelized;
|
|
31
46
|
};
|
|
@@ -33,7 +48,7 @@ const keysToCamel = (object) => {
|
|
|
33
48
|
const n = {};
|
|
34
49
|
const keys = Object.keys(object);
|
|
35
50
|
for (const key of keys) {
|
|
36
|
-
n[(0, exports.toCamel)(key)] = camelizeValue(
|
|
51
|
+
n[(0, exports.toCamel)(key)] = camelizeValue(object[key]);
|
|
37
52
|
}
|
|
38
53
|
return n;
|
|
39
54
|
};
|
|
@@ -52,6 +67,21 @@ const isFloat = (input) => {
|
|
|
52
67
|
return Number(input) === input || Number(input) % 1 !== 0;
|
|
53
68
|
};
|
|
54
69
|
exports.isFloat = isFloat;
|
|
70
|
+
/**
|
|
71
|
+
* Parses an integer, TOTAL by design: it always answers a number, and answers `0` for anything it
|
|
72
|
+
* cannot parse - `undefined`, `''`, `'abc'`.
|
|
73
|
+
*
|
|
74
|
+
* That makes `int(value) ?? fallback` dead code, because the left side is never nullish. The
|
|
75
|
+
* fallback belongs INSIDE the call, and for an environment read it belongs in the read itself:
|
|
76
|
+
*
|
|
77
|
+
* ```ts
|
|
78
|
+
* int(applicationEnvironment.get(KEY, { defaultValue: '6379' })) // correct
|
|
79
|
+
* int(applicationEnvironment.get(KEY)) ?? 6379 // always 0 when KEY is unset
|
|
80
|
+
* ```
|
|
81
|
+
*
|
|
82
|
+
* The second form is silent: a missing port reads `0` and a missing retry budget reads `0`, which
|
|
83
|
+
* through `AbstractRedisHelper.buildRetryStrategy` means "give up after the first failure".
|
|
84
|
+
*/
|
|
55
85
|
const int = (input) => {
|
|
56
86
|
if (!input) {
|
|
57
87
|
return 0;
|
|
@@ -72,7 +102,7 @@ const float = (input, digit = 2) => {
|
|
|
72
102
|
if (isNaN(normalized)) {
|
|
73
103
|
return 0;
|
|
74
104
|
}
|
|
75
|
-
const parsed = (
|
|
105
|
+
const parsed = round({ value: Number.parseFloat(normalized), precision: digit });
|
|
76
106
|
return Number.isNaN(parsed) ? 0 : parsed;
|
|
77
107
|
};
|
|
78
108
|
exports.float = float;
|
|
@@ -114,6 +144,24 @@ const toDelimitedArray = (input, separator = ',') => {
|
|
|
114
144
|
.filter(entry => entry.length > 0);
|
|
115
145
|
};
|
|
116
146
|
exports.toDelimitedArray = toDelimitedArray;
|
|
147
|
+
/**
|
|
148
|
+
* A trimmed value, or `undefined` when the input is absent or carries nothing but whitespace.
|
|
149
|
+
*
|
|
150
|
+
* Written for environment reads. `KEY=` in a deployment file is a pipeline that forgot to export the
|
|
151
|
+
* value, but `process.env.KEY` answers `''` for it, and `''` walks straight past `??`:
|
|
152
|
+
*
|
|
153
|
+
* ```ts
|
|
154
|
+
* process.env.APP_ENV_LOGGER_FORMAT ?? 'text' // '' when the line is blank
|
|
155
|
+
* blankToUndefined(process.env.APP_ENV_LOGGER_FORMAT) ?? 'text' // 'text'
|
|
156
|
+
* ```
|
|
157
|
+
*
|
|
158
|
+
* Reach for this rather than `||`, which reads `'0'` as blank as well.
|
|
159
|
+
*/
|
|
160
|
+
const blankToUndefined = (input) => {
|
|
161
|
+
const trimmed = input?.trim();
|
|
162
|
+
return trimmed === undefined || trimmed.length === 0 ? undefined : trimmed;
|
|
163
|
+
};
|
|
164
|
+
exports.blankToUndefined = blankToUndefined;
|
|
117
165
|
/** Trims a possibly-undefined env value to a clean string ('' when absent). */
|
|
118
166
|
const toTrimmed = (input) => {
|
|
119
167
|
if (input == null) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.utility.js","sourceRoot":"","sources":["../../../src/utilities/parse.utility.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parse.utility.js","sourceRoot":"","sources":["../../../src/utilities/parse.utility.ts"],"names":[],"mappings":";;;AAAA,2CAA2C;AAE3C;;;;;;;;GAQG;AACH,MAAM,KAAK,GAAG,CAAC,IAA2C,EAAU,EAAE;IACpE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC;IAEtC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,SAAS,KAAK,CAAC,EAAE,CAAC;QAC/C,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;IAED,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,GAAG,KAAK,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACpD,MAAM,OAAO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AAC,CAAC;AACvC,CAAC,CAAC;AATW,QAAA,gBAAgB,oBAS3B;AAEF;;;;;;;;;;;;GAYG;AACI,MAAM,gBAAgB,GAAG,CAAC,KAAyB,EAAsB,EAAE;IAChF,MAAM,OAAO,GAAG,KAAK,EAAE,IAAI,EAAE,CAAC;IAC9B,OAAO,OAAO,KAAK,SAAS,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC;AAC7E,CAAC,CAAC;AAHW,QAAA,gBAAgB,oBAG3B;AAEF,+EAA+E;AACxE,MAAM,SAAS,GAAG,CAAC,KAAc,EAAU,EAAE;IAClD,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;QAClB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;AAC9B,CAAC,CAAC;AANW,QAAA,SAAS,aAMpB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `globalThis` slot an application's project root lives in, shared across every copy of this
|
|
3
|
+
* package - a process (or a compiled bundle) can carry two, and a root set through one copy must be
|
|
4
|
+
* found by the other. No Node import here on purpose: `ModuleUtility` delegates to this file, and so
|
|
5
|
+
* does a browser Worker host through the `/core` sub-path - either would bundle a module-level Node
|
|
6
|
+
* specifier straight into a host that cannot resolve it.
|
|
7
|
+
*/
|
|
8
|
+
export declare class ProjectRootRegistry {
|
|
9
|
+
private static readonly SLOT;
|
|
10
|
+
/** Called by an application once it knows its root; every peer lookup that follows resolves against it. */
|
|
11
|
+
static set(opts: {
|
|
12
|
+
projectRoot: string;
|
|
13
|
+
}): void;
|
|
14
|
+
/** The shared root, or `undefined` until an application sets it - never a `process.cwd()` fallback here, so a host with no `process` never needs one. */
|
|
15
|
+
static getShared(): string | undefined;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=project-root.utility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-root.utility.d.ts","sourceRoot":"","sources":["../../../src/utilities/project-root.utility.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAoC;IAEhE,2GAA2G;IAC3G,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAI/C,yJAAyJ;IACzJ,MAAM,CAAC,SAAS,IAAI,MAAM,GAAG,SAAS;CAGvC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProjectRootRegistry = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* The `globalThis` slot an application's project root lives in, shared across every copy of this
|
|
6
|
+
* package - a process (or a compiled bundle) can carry two, and a root set through one copy must be
|
|
7
|
+
* found by the other. No Node import here on purpose: `ModuleUtility` delegates to this file, and so
|
|
8
|
+
* does a browser Worker host through the `/core` sub-path - either would bundle a module-level Node
|
|
9
|
+
* specifier straight into a host that cannot resolve it.
|
|
10
|
+
*/
|
|
11
|
+
class ProjectRootRegistry {
|
|
12
|
+
static { this.SLOT = Symbol.for('ignis:project-root'); }
|
|
13
|
+
/** Called by an application once it knows its root; every peer lookup that follows resolves against it. */
|
|
14
|
+
static set(opts) {
|
|
15
|
+
Reflect.set(globalThis, this.SLOT, opts.projectRoot);
|
|
16
|
+
}
|
|
17
|
+
/** The shared root, or `undefined` until an application sets it - never a `process.cwd()` fallback here, so a host with no `process` never needs one. */
|
|
18
|
+
static getShared() {
|
|
19
|
+
return Reflect.get(globalThis, this.SLOT);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.ProjectRootRegistry = ProjectRootRegistry;
|
|
23
|
+
//# sourceMappingURL=project-root.utility.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-root.utility.js","sourceRoot":"","sources":["../../../src/utilities/project-root.utility.ts"],"names":[],"mappings":";;;AAAA;;;;;;GAMG;AACH,MAAa,mBAAmB;aACN,SAAI,GAAG,MAAM,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAEhE,2GAA2G;IAC3G,MAAM,CAAC,GAAG,CAAC,IAA6B;QACtC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IACvD,CAAC;IAED,yJAAyJ;IACzJ,MAAM,CAAC,SAAS;QACd,OAAO,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;;AAXH,kDAYC"}
|
|
@@ -23,11 +23,16 @@ interface IParsedFile {
|
|
|
23
23
|
filename?: string;
|
|
24
24
|
path?: string;
|
|
25
25
|
}
|
|
26
|
+
/** Files and the text fields posted beside them - dropping the second silently loses what the client sent. */
|
|
27
|
+
export interface IParsedMultipartBody {
|
|
28
|
+
files: IParsedFile[];
|
|
29
|
+
fields: Record<string, string>;
|
|
30
|
+
}
|
|
26
31
|
export declare const parseMultipartBody: <C extends {
|
|
27
32
|
req: any;
|
|
28
33
|
} = {
|
|
29
34
|
req: any;
|
|
30
|
-
}>(opts: IParseMultipartOptions<C>) => Promise<
|
|
35
|
+
}>(opts: IParseMultipartOptions<C>) => Promise<IParsedMultipartBody>;
|
|
31
36
|
/** Sanitizes a filename by removing path components and dangerous characters. */
|
|
32
37
|
export declare const sanitizeFilename: (filename: string) => string;
|
|
33
38
|
export declare const encodeRFC5987: (filename: string) => string;
|
|
@@ -35,5 +40,21 @@ export declare const createContentDispositionHeader: (opts: {
|
|
|
35
40
|
filename: string;
|
|
36
41
|
type: "attachment" | "inline";
|
|
37
42
|
}) => string;
|
|
43
|
+
/**
|
|
44
|
+
* Reads a filename out of a `Content-Disposition` value.
|
|
45
|
+
*
|
|
46
|
+
* Three forms, in the order the RFC gives them precedence: `filename*=UTF-8''...` (percent-encoded,
|
|
47
|
+
* and the one hand-rolled parsers miss), a quoted `filename="..."`, and a bare `filename=...`.
|
|
48
|
+
* Splitting on `filename=` alone returns the percent-encoded bytes for any non-ASCII name, which in
|
|
49
|
+
* a product with non-English filenames is most of them.
|
|
50
|
+
*
|
|
51
|
+
* The pair of {@link createContentDispositionHeader}: one writes the header, this one reads it.
|
|
52
|
+
*/
|
|
53
|
+
export declare const parseContentDisposition: (opts: {
|
|
54
|
+
header: string | null | undefined;
|
|
55
|
+
}) => {
|
|
56
|
+
type?: string;
|
|
57
|
+
filename?: string;
|
|
58
|
+
};
|
|
38
59
|
export {};
|
|
39
60
|
//# sourceMappingURL=request.utility.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.utility.d.ts","sourceRoot":"","sources":["../../../src/utilities/request.utility.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG,CAAC;CAC/B;AAED,UAAU,sBAAsB,CAAC,CAAC,SAAS;IAAE,GAAG,EAAE,GAAG,CAAA;CAAE,GAAG;IAAE,GAAG,EAAE,GAAG,CAAA;CAAE;IACpE,OAAO,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,CAAC,CAAC;CACZ;AAED,UAAU,WAAW;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB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IAAE,GAAG,EAAE,GAAG,CAAA;CAAE,GAAG;IAAE,GAAG,EAAE,GAAG,CAAA;CAAE,EAC5E,MAAM,sBAAsB,CAAC,CAAC,CAAC,KAC9B,OAAO,CAAC,oBAAoB,CA6D9B,CAAC;AAEF,iFAAiF;AACjF,eAAO,MAAM,gBAAgB,GAAI,UAAU,MAAM,KAAG,MAUnD,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,UAAU,MAAM,KAAG,MAIhD,CAAC;AAEF,eAAO,MAAM,8BAA8B,GAAI,MAAM;IACnD,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,YAAY,GAAG,QAAQ,CAAC;CAC/B,KAAG,MAOH,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,GAAI,MAAM;IAC5C,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACnC,KAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CA8BrC,CAAC"}
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.createContentDispositionHeader = exports.encodeRFC5987 = exports.sanitizeFilename = exports.parseMultipartBody = void 0;
|
|
6
|
+
exports.parseContentDisposition = exports.createContentDispositionHeader = exports.encodeRFC5987 = exports.sanitizeFilename = exports.parseMultipartBody = void 0;
|
|
7
7
|
const error_1 = require("../modules/error");
|
|
8
8
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
9
9
|
const node_path_1 = __importDefault(require("node:path"));
|
|
@@ -14,8 +14,12 @@ const parseMultipartBody = async (opts) => {
|
|
|
14
14
|
}
|
|
15
15
|
const formData = await context.req.formData();
|
|
16
16
|
const files = [];
|
|
17
|
-
|
|
17
|
+
const fields = {};
|
|
18
|
+
const entries = formData.entries();
|
|
19
|
+
for (const [fieldname, value] of entries) {
|
|
18
20
|
if (typeof value === 'string') {
|
|
21
|
+
// Last one wins, like a repeated query parameter.
|
|
22
|
+
fields[fieldname] = value;
|
|
19
23
|
continue;
|
|
20
24
|
}
|
|
21
25
|
const file = value;
|
|
@@ -53,7 +57,7 @@ const parseMultipartBody = async (opts) => {
|
|
|
53
57
|
}
|
|
54
58
|
files.push(parsedFile);
|
|
55
59
|
}
|
|
56
|
-
return files;
|
|
60
|
+
return { files, fields };
|
|
57
61
|
};
|
|
58
62
|
exports.parseMultipartBody = parseMultipartBody;
|
|
59
63
|
/** Sanitizes a filename by removing path components and dangerous characters. */
|
|
@@ -83,4 +87,41 @@ const createContentDispositionHeader = (opts) => {
|
|
|
83
87
|
return `${type}; filename="${sanitized}"; filename*=UTF-8''${encoded}`;
|
|
84
88
|
};
|
|
85
89
|
exports.createContentDispositionHeader = createContentDispositionHeader;
|
|
90
|
+
/**
|
|
91
|
+
* Reads a filename out of a `Content-Disposition` value.
|
|
92
|
+
*
|
|
93
|
+
* Three forms, in the order the RFC gives them precedence: `filename*=UTF-8''...` (percent-encoded,
|
|
94
|
+
* and the one hand-rolled parsers miss), a quoted `filename="..."`, and a bare `filename=...`.
|
|
95
|
+
* Splitting on `filename=` alone returns the percent-encoded bytes for any non-ASCII name, which in
|
|
96
|
+
* a product with non-English filenames is most of them.
|
|
97
|
+
*
|
|
98
|
+
* The pair of {@link createContentDispositionHeader}: one writes the header, this one reads it.
|
|
99
|
+
*/
|
|
100
|
+
const parseContentDisposition = (opts) => {
|
|
101
|
+
const { header } = opts;
|
|
102
|
+
if (!header) {
|
|
103
|
+
return {};
|
|
104
|
+
}
|
|
105
|
+
const type = header.split(';')[0]?.trim() || undefined;
|
|
106
|
+
// `filename*` wins when both are present - it is the one that can carry a non-ASCII name.
|
|
107
|
+
const extended = header.match(/filename\*\s*=\s*([^;]+)/i);
|
|
108
|
+
if (extended) {
|
|
109
|
+
const value = extended[1].trim();
|
|
110
|
+
// `UTF-8''name` or `UTF-8'lang'name`; anything before the last quote is charset and language.
|
|
111
|
+
const encoded = value.slice(value.lastIndexOf("'") + 1);
|
|
112
|
+
try {
|
|
113
|
+
return { type, filename: decodeURIComponent(encoded) };
|
|
114
|
+
}
|
|
115
|
+
catch {
|
|
116
|
+
// A malformed sequence is not worth failing a download over - fall through to `filename`.
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
const quoted = header.match(/filename\s*=\s*"([^"]*)"/i);
|
|
120
|
+
if (quoted) {
|
|
121
|
+
return { type, filename: quoted[1] };
|
|
122
|
+
}
|
|
123
|
+
const bare = header.match(/filename\s*=\s*([^;]+)/i);
|
|
124
|
+
return { type, filename: bare ? bare[1].trim() : undefined };
|
|
125
|
+
};
|
|
126
|
+
exports.parseContentDisposition = parseContentDisposition;
|
|
86
127
|
//# sourceMappingURL=request.utility.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.utility.js","sourceRoot":"","sources":["../../../src/utilities/request.utility.ts"],"names":[],"mappings":";;;;;;AAAA,2CAA2C;AAC3C,sDAAyB;AACzB,0DAA6B;
|
|
1
|
+
{"version":3,"file":"request.utility.js","sourceRoot":"","sources":["../../../src/utilities/request.utility.ts"],"names":[],"mappings":";;;;;;AAAA,2CAA2C;AAC3C,sDAAyB;AACzB,0DAA6B;AAgCtB,MAAM,kBAAkB,GAAG,KAAK,EACrC,IAA+B,EACA,EAAE;IACjC,MAAM,EAAE,OAAO,GAAG,QAAQ,EAAE,SAAS,GAAG,WAAW,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAEtE,IAAI,OAAO,KAAK,MAAM,IAAI,CAAC,iBAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QACpD,iBAAE,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC/C,CAAC;IAED,MAAM,QAAQ,GAA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,CAAC,CAAC,IAAI,EAAE,CAAC;QACjC,8FAA8F;QAC9F,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QAExD,IAAI,CAAC;YACH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAAC;QACzD,CAAC;QAAC,MAAM,CAAC;YACP,0FAA0F;QAC5F,CAAC;IACH,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;IACzD,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACvC,CAAC;IAED,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACrD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;AAC/D,CAAC,CAAC;AAhCW,QAAA,uBAAuB,2BAgClC"}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
/** Split out of `date.utility.ts` - that module reads `process.env` at load time (dayjs timezone default), which would drag a node global into any bundle that only wants this one timer primitive. */
|
|
2
1
|
export declare const sleep: (ms: number) => Promise<unknown>;
|
|
3
2
|
//# sourceMappingURL=sleep.utility.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sleep.utility.d.ts","sourceRoot":"","sources":["../../../src/utilities/sleep.utility.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"sleep.utility.d.ts","sourceRoot":"","sources":["../../../src/utilities/sleep.utility.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAI,IAAI,MAAM,qBAE/B,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.sleep = void 0;
|
|
4
|
-
/** Split out of `date.utility.ts` - that module reads `process.env` at load time (dayjs timezone default), which would drag a node global into any bundle that only wants this one timer primitive. */
|
|
5
4
|
const sleep = (ms) => {
|
|
6
5
|
return new Promise(resolve => setTimeout(resolve, ms));
|
|
7
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sleep.utility.js","sourceRoot":"","sources":["../../../src/utilities/sleep.utility.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"sleep.utility.js","sourceRoot":"","sources":["../../../src/utilities/sleep.utility.ts"],"names":[],"mappings":";;;AAAO,MAAM,KAAK,GAAG,CAAC,EAAU,EAAE,EAAE;IAClC,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AACzD,CAAC,CAAC;AAFW,QAAA,KAAK,SAEhB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uuid.d.ts","sourceRoot":"","sources":["../../src/uuid.ts"],"names":[],"mappings":"AACA,cAAc,oBAAoB,CAAC"}
|
package/dist/cjs/uuid.js
ADDED
|
@@ -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
|
+
// The UUID primitives alone, for a browser bundle that wants an id and nothing else.
|
|
18
|
+
__exportStar(require("./modules/uid/uuid"), exports);
|
|
19
|
+
//# sourceMappingURL=uuid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uuid.js","sourceRoot":"","sources":["../../src/uuid.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qFAAqF;AACrF,qDAAmC"}
|
|
@@ -4,6 +4,73 @@ export declare class MimeTypes {
|
|
|
4
4
|
static readonly IMAGE = "image";
|
|
5
5
|
static readonly VIDEO = "video";
|
|
6
6
|
static readonly TEXT = "text";
|
|
7
|
+
static readonly SCHEME_SET: Set<string>;
|
|
8
|
+
static isValid(value: string): boolean;
|
|
7
9
|
}
|
|
8
10
|
export type TMimeTypes = TConstValue<typeof MimeTypes>;
|
|
11
|
+
/** The leading dot is part of the value: `path.extname` returns one. */
|
|
12
|
+
export declare class FileExtensions {
|
|
13
|
+
static readonly PNG = ".png";
|
|
14
|
+
static readonly JPG = ".jpg";
|
|
15
|
+
static readonly JPEG = ".jpeg";
|
|
16
|
+
static readonly GIF = ".gif";
|
|
17
|
+
static readonly WEBP = ".webp";
|
|
18
|
+
static readonly SVG = ".svg";
|
|
19
|
+
static readonly PDF = ".pdf";
|
|
20
|
+
static readonly JSON = ".json";
|
|
21
|
+
static readonly TXT = ".txt";
|
|
22
|
+
static readonly HTML = ".html";
|
|
23
|
+
static readonly CSS = ".css";
|
|
24
|
+
static readonly JS = ".js";
|
|
25
|
+
static readonly MP4 = ".mp4";
|
|
26
|
+
static readonly WEBM = ".webm";
|
|
27
|
+
static readonly MP3 = ".mp3";
|
|
28
|
+
static readonly WAV = ".wav";
|
|
29
|
+
static readonly ZIP = ".zip";
|
|
30
|
+
static readonly CSV = ".csv";
|
|
31
|
+
static readonly XML = ".xml";
|
|
32
|
+
static readonly SCHEME_SET: Set<string>;
|
|
33
|
+
static isValid(value: string): boolean;
|
|
34
|
+
}
|
|
35
|
+
export type TFileExtension = TConstValue<typeof FileExtensions>;
|
|
36
|
+
/** Full content types, as they go on the wire. `MimeTypes` holds only the top-level part. */
|
|
37
|
+
export declare class ContentTypes {
|
|
38
|
+
static readonly OCTET_STREAM = "application/octet-stream";
|
|
39
|
+
static readonly PNG = "image/png";
|
|
40
|
+
static readonly JPEG = "image/jpeg";
|
|
41
|
+
static readonly GIF = "image/gif";
|
|
42
|
+
static readonly WEBP = "image/webp";
|
|
43
|
+
static readonly SVG = "image/svg+xml";
|
|
44
|
+
static readonly PDF = "application/pdf";
|
|
45
|
+
static readonly JSON = "application/json";
|
|
46
|
+
static readonly PLAIN_TEXT = "text/plain";
|
|
47
|
+
static readonly HTML = "text/html";
|
|
48
|
+
static readonly CSS = "text/css";
|
|
49
|
+
static readonly JAVASCRIPT = "text/javascript";
|
|
50
|
+
static readonly MP4 = "video/mp4";
|
|
51
|
+
static readonly WEBM = "video/webm";
|
|
52
|
+
static readonly MPEG_AUDIO = "audio/mpeg";
|
|
53
|
+
static readonly WAV = "audio/wav";
|
|
54
|
+
static readonly ZIP = "application/zip";
|
|
55
|
+
static readonly CSV = "text/csv";
|
|
56
|
+
static readonly XML = "application/xml";
|
|
57
|
+
static readonly SCHEME_SET: Set<string>;
|
|
58
|
+
static isValid(value: string): boolean;
|
|
59
|
+
}
|
|
60
|
+
export type TContentType = TConstValue<typeof ContentTypes>;
|
|
61
|
+
/** The extension table and the lookup that reads it, together - the `DurationMultipliers` shape. */
|
|
62
|
+
export declare class ContentTypeTable {
|
|
63
|
+
/** `satisfies` makes the table total; the declared `string` key keeps a lookup cast-free. */
|
|
64
|
+
static readonly BY_EXTENSION: Readonly<Partial<Record<string, TContentType>>>;
|
|
65
|
+
/**
|
|
66
|
+
* The content type an object name implies. `node:path` is deliberately not used: this file is
|
|
67
|
+
* reachable from the browser-pure `./common` subpath, and an extension is the tail after the last
|
|
68
|
+
* dot either way.
|
|
69
|
+
*/
|
|
70
|
+
static resolve(opts: {
|
|
71
|
+
filename: string;
|
|
72
|
+
}): TContentType;
|
|
73
|
+
}
|
|
74
|
+
/** Published before the table moved onto the class; kept as the one-line delegate it now is. */
|
|
75
|
+
export declare const CONTENT_TYPE_BY_EXTENSION: Readonly<Partial<Record<string, TContentType>>>;
|
|
9
76
|
//# sourceMappingURL=mime.d.ts.map
|
|
@@ -1 +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;
|
|
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;IAE9B,MAAM,CAAC,QAAQ,CAAC,UAAU,cAAsE;IAEhG,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;CAGvC;AACD,MAA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