@c15t/backend 1.0.5 → 1.2.0-canary.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/.turbo/turbo-build.log +33 -39
- package/.turbo/turbo-fmt.log +3 -3
- package/.turbo/turbo-test.log +531 -0
- package/coverage/coverage-final.json +84 -0
- package/coverage/coverage-summary.json +85 -0
- package/coverage/html/backend/index.html +116 -0
- package/coverage/html/backend/rslib.config.ts.html +415 -0
- package/coverage/html/backend/src/contracts/consent/index.html +161 -0
- package/coverage/html/backend/src/contracts/consent/index.ts.html +112 -0
- package/coverage/html/backend/src/contracts/consent/post.contract.ts.html +559 -0
- package/coverage/html/backend/src/contracts/consent/show-banner.contract.ts.html +220 -0
- package/coverage/html/backend/src/contracts/consent/verify.contract.ts.html +463 -0
- package/coverage/html/backend/src/contracts/index.html +116 -0
- package/coverage/html/backend/src/contracts/index.ts.html +139 -0
- package/coverage/html/backend/src/contracts/meta/index.html +131 -0
- package/coverage/html/backend/src/contracts/meta/index.ts.html +100 -0
- package/coverage/html/backend/src/contracts/meta/status.contract.ts.html +196 -0
- package/coverage/html/backend/src/contracts/shared/index.html +116 -0
- package/coverage/html/backend/src/contracts/shared/jurisdiction.schema.ts.html +175 -0
- package/coverage/html/backend/src/core.ts.html +1624 -0
- package/coverage/html/backend/src/handlers/consent/index.html +161 -0
- package/coverage/html/backend/src/handlers/consent/index.ts.html +112 -0
- package/coverage/html/backend/src/handlers/consent/post.handler.ts.html +889 -0
- package/coverage/html/backend/src/handlers/consent/show-banner.handler.ts.html +535 -0
- package/coverage/html/backend/src/handlers/consent/verify.handler.ts.html +1000 -0
- package/coverage/html/backend/src/handlers/meta/index.html +131 -0
- package/coverage/html/backend/src/handlers/meta/index.ts.html +100 -0
- package/coverage/html/backend/src/handlers/meta/status.handler.ts.html +226 -0
- package/coverage/html/backend/src/index.html +161 -0
- package/coverage/html/backend/src/init.ts.html +1018 -0
- package/coverage/html/backend/src/pkgs/api-router/hooks/index.html +116 -0
- package/coverage/html/backend/src/pkgs/api-router/hooks/processor.ts.html +544 -0
- package/coverage/html/backend/src/pkgs/api-router/index.html +116 -0
- package/coverage/html/backend/src/pkgs/api-router/telemetry.ts.html +334 -0
- package/coverage/html/backend/src/pkgs/api-router/utils/cors.ts.html +304 -0
- package/coverage/html/backend/src/pkgs/api-router/utils/index.html +131 -0
- package/coverage/html/backend/src/pkgs/api-router/utils/ip.ts.html +361 -0
- package/coverage/html/backend/src/pkgs/data-model/fields/field-factory.ts.html +709 -0
- package/coverage/html/backend/src/pkgs/data-model/fields/id-generator.ts.html +256 -0
- package/coverage/html/backend/src/pkgs/data-model/fields/index.html +161 -0
- package/coverage/html/backend/src/pkgs/data-model/fields/superjson-utils.ts.html +136 -0
- package/coverage/html/backend/src/pkgs/data-model/fields/zod-fields.ts.html +496 -0
- package/coverage/html/backend/src/pkgs/data-model/hooks/create-hooks.ts.html +349 -0
- package/coverage/html/backend/src/pkgs/data-model/hooks/index.html +176 -0
- package/coverage/html/backend/src/pkgs/data-model/hooks/update-hooks.ts.html +358 -0
- package/coverage/html/backend/src/pkgs/data-model/hooks/update-many-hooks.ts.html +613 -0
- package/coverage/html/backend/src/pkgs/data-model/hooks/utils.ts.html +538 -0
- package/coverage/html/backend/src/pkgs/data-model/hooks/with-hooks-factory.ts.html +289 -0
- package/coverage/html/backend/src/pkgs/db-adapters/adapter-factory.ts.html +289 -0
- package/coverage/html/backend/src/pkgs/db-adapters/adapters/drizzle-adapter/drizzle-adapter.ts.html +2203 -0
- package/coverage/html/backend/src/pkgs/db-adapters/adapters/drizzle-adapter/index.html +116 -0
- package/coverage/html/backend/src/pkgs/db-adapters/adapters/index.html +116 -0
- package/coverage/html/backend/src/pkgs/db-adapters/adapters/kysely-adapter/dialect.ts.html +670 -0
- package/coverage/html/backend/src/pkgs/db-adapters/adapters/kysely-adapter/index.html +131 -0
- package/coverage/html/backend/src/pkgs/db-adapters/adapters/kysely-adapter/kysely-adapter.ts.html +3634 -0
- package/coverage/html/backend/src/pkgs/db-adapters/adapters/kysely-adapter/tests/index.html +116 -0
- package/coverage/html/backend/src/pkgs/db-adapters/adapters/kysely-adapter/tests/test-utils.ts.html +1417 -0
- package/coverage/html/backend/src/pkgs/db-adapters/adapters/memory-adapter/index.html +116 -0
- package/coverage/html/backend/src/pkgs/db-adapters/adapters/memory-adapter/memory-adapter.ts.html +2071 -0
- package/coverage/html/backend/src/pkgs/db-adapters/adapters/prisma-adapter/index.html +116 -0
- package/coverage/html/backend/src/pkgs/db-adapters/adapters/prisma-adapter/prisma-adapter.ts.html +1834 -0
- package/coverage/html/backend/src/pkgs/db-adapters/adapters/test.ts.html +316 -0
- package/coverage/html/backend/src/pkgs/db-adapters/index.html +131 -0
- package/coverage/html/backend/src/pkgs/db-adapters/utils.ts.html +238 -0
- package/coverage/html/backend/src/pkgs/migrations/get-migration.ts.html +343 -0
- package/coverage/html/backend/src/pkgs/migrations/get-schema/get-schema.ts.html +217 -0
- package/coverage/html/backend/src/pkgs/migrations/get-schema/index.html +146 -0
- package/coverage/html/backend/src/pkgs/migrations/get-schema/process-fields.ts.html +280 -0
- package/coverage/html/backend/src/pkgs/migrations/get-schema/process-tables.ts.html +289 -0
- package/coverage/html/backend/src/pkgs/migrations/index.html +176 -0
- package/coverage/html/backend/src/pkgs/migrations/migration-builders.ts.html +595 -0
- package/coverage/html/backend/src/pkgs/migrations/migration-execution.ts.html +301 -0
- package/coverage/html/backend/src/pkgs/migrations/schema-comparison.ts.html +694 -0
- package/coverage/html/backend/src/pkgs/migrations/type-mapping.ts.html +817 -0
- package/coverage/html/backend/src/pkgs/results/core/error-class.ts.html +976 -0
- package/coverage/html/backend/src/pkgs/results/core/error-codes.ts.html +703 -0
- package/coverage/html/backend/src/pkgs/results/core/index.html +146 -0
- package/coverage/html/backend/src/pkgs/results/core/tracing.ts.html +280 -0
- package/coverage/html/backend/src/pkgs/results/create-telemetry-options.ts.html +271 -0
- package/coverage/html/backend/src/pkgs/results/index.html +131 -0
- package/coverage/html/backend/src/pkgs/results/orpc-error-handler.ts.html +496 -0
- package/coverage/html/backend/src/pkgs/results/results/index.html +131 -0
- package/coverage/html/backend/src/pkgs/results/results/recovery-utils.ts.html +628 -0
- package/coverage/html/backend/src/pkgs/results/results/result-helpers.ts.html +1234 -0
- package/coverage/html/backend/src/pkgs/utils/env.ts.html +337 -0
- package/coverage/html/backend/src/pkgs/utils/index.html +146 -0
- package/coverage/html/backend/src/pkgs/utils/logger.ts.html +199 -0
- package/coverage/html/backend/src/pkgs/utils/url.ts.html +400 -0
- package/coverage/html/backend/src/router.ts.html +109 -0
- package/coverage/html/backend/src/schema/audit-log/index.html +146 -0
- package/coverage/html/backend/src/schema/audit-log/registry.ts.html +436 -0
- package/coverage/html/backend/src/schema/audit-log/schema.ts.html +223 -0
- package/coverage/html/backend/src/schema/audit-log/table.ts.html +640 -0
- package/coverage/html/backend/src/schema/consent/index.html +146 -0
- package/coverage/html/backend/src/schema/consent/registry.ts.html +616 -0
- package/coverage/html/backend/src/schema/consent/schema.ts.html +238 -0
- package/coverage/html/backend/src/schema/consent/table.ts.html +748 -0
- package/coverage/html/backend/src/schema/consent-policy/index.html +146 -0
- package/coverage/html/backend/src/schema/consent-policy/registry.ts.html +1063 -0
- package/coverage/html/backend/src/schema/consent-policy/schema.ts.html +265 -0
- package/coverage/html/backend/src/schema/consent-policy/table.ts.html +535 -0
- package/coverage/html/backend/src/schema/consent-purpose/index.html +146 -0
- package/coverage/html/backend/src/schema/consent-purpose/registry.ts.html +589 -0
- package/coverage/html/backend/src/schema/consent-purpose/schema.ts.html +259 -0
- package/coverage/html/backend/src/schema/consent-purpose/table.ts.html +547 -0
- package/coverage/html/backend/src/schema/consent-record/index.html +131 -0
- package/coverage/html/backend/src/schema/consent-record/schema.ts.html +211 -0
- package/coverage/html/backend/src/schema/consent-record/table.ts.html +457 -0
- package/coverage/html/backend/src/schema/create-registry.ts.html +148 -0
- package/coverage/html/backend/src/schema/definition.ts.html +685 -0
- package/coverage/html/backend/src/schema/domain/index.html +146 -0
- package/coverage/html/backend/src/schema/domain/registry.ts.html +973 -0
- package/coverage/html/backend/src/schema/domain/schema.ts.html +214 -0
- package/coverage/html/backend/src/schema/domain/table.ts.html +496 -0
- package/coverage/html/backend/src/schema/index.html +146 -0
- package/coverage/html/backend/src/schema/schemas.ts.html +166 -0
- package/coverage/html/backend/src/schema/subject/index.html +146 -0
- package/coverage/html/backend/src/schema/subject/registry.ts.html +973 -0
- package/coverage/html/backend/src/schema/subject/schema.ts.html +208 -0
- package/coverage/html/backend/src/schema/subject/table.ts.html +499 -0
- package/coverage/html/backend/src/server.ts.html +475 -0
- package/coverage/html/backend/src/testing/contract-testing.ts.html +1348 -0
- package/coverage/html/backend/src/testing/index.html +116 -0
- package/coverage/html/base.css +224 -0
- package/coverage/html/block-navigation.js +87 -0
- package/coverage/html/favicon.png +0 -0
- package/coverage/html/index.html +626 -0
- package/coverage/html/prettify.css +1 -0
- package/coverage/html/prettify.js +2 -0
- package/coverage/html/sort-arrow-sprite.png +0 -0
- package/coverage/html/sorter.js +196 -0
- package/dist/contracts/consent/index.d.ts +401 -0
- package/dist/contracts/consent/index.d.ts.map +1 -0
- package/dist/contracts/consent/index.test.d.ts +2 -0
- package/dist/contracts/consent/index.test.d.ts.map +1 -0
- package/dist/contracts/consent/post.contract.d.ts +212 -0
- package/dist/contracts/consent/post.contract.d.ts.map +1 -0
- package/dist/contracts/consent/post.contract.test.d.ts +2 -0
- package/dist/contracts/consent/post.contract.test.d.ts.map +1 -0
- package/dist/contracts/consent/show-banner.contract.d.ts +45 -0
- package/dist/contracts/consent/show-banner.contract.d.ts.map +1 -0
- package/dist/contracts/consent/show-banner.contract.test.d.ts +2 -0
- package/dist/contracts/consent/show-banner.contract.test.d.ts.map +1 -0
- package/dist/contracts/consent/verify.contract.d.ts +147 -0
- package/dist/contracts/consent/verify.contract.d.ts.map +1 -0
- package/dist/contracts/consent/verify.contract.test.d.ts +2 -0
- package/dist/contracts/consent/verify.contract.test.d.ts.map +1 -0
- package/dist/contracts/index.d.ts +963 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/meta/index.d.ts +78 -0
- package/dist/contracts/meta/index.d.ts.map +1 -0
- package/dist/contracts/meta/index.test.d.ts +2 -0
- package/dist/contracts/meta/index.test.d.ts.map +1 -0
- package/dist/contracts/meta/status.contract.d.ts +77 -0
- package/dist/contracts/meta/status.contract.d.ts.map +1 -0
- package/dist/contracts/meta/status.contract.test.d.ts +2 -0
- package/dist/contracts/meta/status.contract.test.d.ts.map +1 -0
- package/dist/contracts/shared/jurisdiction.schema.d.ts +24 -0
- package/dist/contracts/shared/jurisdiction.schema.d.ts.map +1 -0
- package/dist/core.cjs +3584 -0
- package/dist/core.d.ts +533 -76
- package/dist/core.d.ts.map +1 -1
- package/dist/{index.js → core.js} +1163 -1286
- package/dist/handlers/consent/index.d.ts +401 -0
- package/dist/handlers/consent/index.d.ts.map +1 -0
- package/dist/handlers/consent/post.handler.d.ts +234 -0
- package/dist/handlers/consent/post.handler.d.ts.map +1 -0
- package/dist/handlers/consent/show-banner.handler.d.ts +57 -0
- package/dist/handlers/consent/show-banner.handler.d.ts.map +1 -0
- package/dist/handlers/consent/show-banner.handler.test.d.ts +2 -0
- package/dist/handlers/consent/show-banner.handler.test.d.ts.map +1 -0
- package/dist/handlers/consent/verify.handler.d.ts +169 -0
- package/dist/handlers/consent/verify.handler.d.ts.map +1 -0
- package/dist/handlers/meta/index.d.ts +78 -0
- package/dist/handlers/meta/index.d.ts.map +1 -0
- package/dist/handlers/meta/status.handler.d.ts +76 -0
- package/dist/handlers/meta/status.handler.d.ts.map +1 -0
- package/dist/init.d.ts.map +1 -1
- package/dist/pkgs/api-router/hooks/processor.d.ts.map +1 -1
- package/dist/pkgs/api-router/types/router-props.d.ts +1 -1
- package/dist/pkgs/api-router/types/router-props.d.ts.map +1 -1
- package/dist/pkgs/api-router/utils/cors.d.ts +1 -1
- package/dist/pkgs/api-router/utils/cors.d.ts.map +1 -1
- package/dist/pkgs/data-model/fields/field-types.d.ts +1 -1
- package/dist/pkgs/data-model/fields/zod-fields.d.ts +32 -32
- package/dist/pkgs/data-model/index.cjs +1433 -1799
- package/dist/pkgs/data-model/index.js +20 -385
- package/dist/pkgs/data-model/schema/index.cjs +1402 -1768
- package/dist/pkgs/data-model/schema/index.js +20 -385
- package/dist/pkgs/db-adapters/adapter-factory.d.ts +2 -2
- package/dist/pkgs/db-adapters/adapter-factory.d.ts.map +1 -1
- package/dist/pkgs/db-adapters/adapters/drizzle-adapter/drizzle-adapter.d.ts +4 -4
- package/dist/pkgs/db-adapters/adapters/drizzle-adapter/index.cjs +19 -151
- package/dist/pkgs/db-adapters/adapters/drizzle-adapter/index.js +19 -151
- package/dist/pkgs/db-adapters/adapters/kysely-adapter/dialect.d.ts +1 -1
- package/dist/pkgs/db-adapters/adapters/kysely-adapter/index.cjs +17 -149
- package/dist/pkgs/db-adapters/adapters/kysely-adapter/index.js +17 -149
- package/dist/pkgs/db-adapters/adapters/kysely-adapter/tests/test-utils.d.ts +2 -2
- package/dist/pkgs/db-adapters/adapters/kysely-adapter/tests/test-utils.d.ts.map +1 -1
- package/dist/pkgs/db-adapters/adapters/memory-adapter/index.cjs +17 -149
- package/dist/pkgs/db-adapters/adapters/memory-adapter/index.js +17 -149
- package/dist/pkgs/db-adapters/adapters/prisma-adapter/index.cjs +19 -151
- package/dist/pkgs/db-adapters/adapters/prisma-adapter/index.js +19 -151
- package/dist/pkgs/db-adapters/index.cjs +31 -153
- package/dist/pkgs/db-adapters/index.js +31 -153
- package/dist/pkgs/migrations/get-schema/get-schema.d.ts +2 -2
- package/dist/pkgs/migrations/get-schema/index.d.ts +1 -1
- package/dist/pkgs/migrations/index.cjs +30 -153
- package/dist/pkgs/migrations/index.js +30 -153
- package/dist/pkgs/migrations/schema-comparison.d.ts.map +1 -1
- package/dist/pkgs/results/core/error-class.d.ts +23 -21
- package/dist/pkgs/results/core/error-class.d.ts.map +1 -1
- package/dist/pkgs/results/index.cjs +17 -150
- package/dist/pkgs/results/index.d.ts +0 -3
- package/dist/pkgs/results/index.d.ts.map +1 -1
- package/dist/pkgs/results/index.js +17 -138
- package/dist/pkgs/results/orpc-error-handler.d.ts +65 -0
- package/dist/pkgs/results/orpc-error-handler.d.ts.map +1 -0
- package/dist/pkgs/results/types.d.ts +7 -7
- package/dist/pkgs/results/types.d.ts.map +1 -1
- package/dist/pkgs/types/context.d.ts +15 -4
- package/dist/pkgs/types/context.d.ts.map +1 -1
- package/dist/pkgs/types/endpoints.d.ts +3 -4
- package/dist/pkgs/types/endpoints.d.ts.map +1 -1
- package/dist/pkgs/types/options.d.ts +2 -3
- package/dist/pkgs/types/options.d.ts.map +1 -1
- package/dist/pkgs/types/plugins.d.ts +2 -3
- package/dist/pkgs/types/plugins.d.ts.map +1 -1
- package/dist/pkgs/utils/index.d.ts +1 -0
- package/dist/pkgs/utils/index.d.ts.map +1 -1
- package/dist/pkgs/utils/logger.d.ts +16 -0
- package/dist/pkgs/utils/logger.d.ts.map +1 -0
- package/dist/router.cjs +1213 -0
- package/dist/router.d.ts +480 -0
- package/dist/router.d.ts.map +1 -0
- package/dist/router.js +1169 -0
- package/dist/schema/audit-log/table.d.ts +1 -1
- package/dist/schema/consent/table.d.ts +1 -1
- package/dist/schema/consent-policy/registry.d.ts +12 -12
- package/dist/schema/consent-policy/schema.d.ts +6 -6
- package/dist/schema/consent-policy/table.d.ts +7 -7
- package/dist/schema/consent-purpose/registry.d.ts +6 -6
- package/dist/schema/consent-purpose/schema.d.ts +6 -6
- package/dist/schema/consent-purpose/table.d.ts +7 -7
- package/dist/schema/consent-record/table.d.ts +1 -1
- package/dist/schema/create-registry.d.ts +32 -32
- package/dist/schema/definition.d.ts +19 -19
- package/dist/schema/domain/registry.d.ts +10 -10
- package/dist/schema/domain/schema.d.ts +5 -5
- package/dist/schema/domain/table.d.ts +6 -6
- package/dist/schema/index.cjs +1409 -1775
- package/dist/schema/index.js +20 -385
- package/dist/schema/schemas.d.ts +19 -19
- package/dist/schema/subject/registry.d.ts +4 -4
- package/dist/schema/subject/schema.d.ts +2 -2
- package/dist/schema/subject/table.d.ts +3 -3
- package/dist/server.d.ts +2 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/testing/contract-testing.d.ts +37 -0
- package/dist/testing/contract-testing.d.ts.map +1 -0
- package/dist/types/context.d.ts +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/options.d.ts +33 -2
- package/dist/types/options.d.ts.map +1 -1
- package/dist/types/plugins.d.ts +3 -4
- package/dist/types/plugins.d.ts.map +1 -1
- package/package.json +22 -30
- package/rslib.config.ts +2 -5
- package/src/contracts/consent/index.test.ts +5 -0
- package/src/contracts/consent/index.ts +9 -0
- package/src/contracts/consent/post.contract.test.ts +526 -0
- package/src/contracts/consent/post.contract.ts +160 -0
- package/src/contracts/consent/show-banner.contract.test.ts +214 -0
- package/src/contracts/consent/show-banner.contract.ts +45 -0
- package/src/contracts/consent/verify.contract.test.ts +185 -0
- package/src/contracts/consent/verify.contract.ts +126 -0
- package/src/contracts/index.ts +18 -0
- package/src/contracts/meta/index.test.ts +5 -0
- package/src/contracts/meta/index.ts +5 -0
- package/src/contracts/meta/status.contract.test.ts +338 -0
- package/src/contracts/meta/status.contract.ts +37 -0
- package/src/contracts/shared/jurisdiction.schema.ts +30 -0
- package/src/core.ts +451 -159
- package/src/handlers/consent/index.ts +9 -0
- package/src/handlers/consent/post.handler.ts +273 -0
- package/src/handlers/consent/show-banner.handler.test.ts +148 -0
- package/src/handlers/consent/show-banner.handler.ts +150 -0
- package/src/handlers/consent/verify.handler.ts +305 -0
- package/src/handlers/meta/index.ts +5 -0
- package/src/handlers/meta/status.handler.ts +47 -0
- package/src/init.ts +8 -5
- package/src/pkgs/api-router/hooks/__tests__/processor.test.ts +6 -0
- package/src/pkgs/api-router/hooks/processor.ts +2 -0
- package/src/pkgs/api-router/types/router-props.ts +1 -1
- package/src/pkgs/api-router/utils/cors.ts +1 -1
- package/src/pkgs/data-model/fields/field-types.ts +1 -1
- package/src/pkgs/data-model/fields/id-generator.ts +1 -1
- package/src/pkgs/db-adapters/README.md +3 -3
- package/src/pkgs/db-adapters/adapter-factory.ts +8 -4
- package/src/pkgs/db-adapters/adapters/drizzle-adapter/drizzle-adapter.ts +13 -13
- package/src/pkgs/db-adapters/adapters/kysely-adapter/dialect.ts +1 -1
- package/src/pkgs/db-adapters/adapters/kysely-adapter/tests/postgres.test.ts +1 -1
- package/src/pkgs/db-adapters/adapters/kysely-adapter/tests/sqlite.test.ts +1 -1
- package/src/pkgs/db-adapters/adapters/kysely-adapter/tests/test-utils.ts +2 -2
- package/src/pkgs/migrations/get-migration.ts +3 -3
- package/src/pkgs/migrations/get-schema/get-schema.ts +2 -2
- package/src/pkgs/migrations/get-schema/index.ts +1 -1
- package/src/pkgs/migrations/migration-builders.ts +2 -2
- package/src/pkgs/migrations/migration-execution.ts +2 -2
- package/src/pkgs/migrations/schema-comparison.ts +5 -4
- package/src/pkgs/results/__tests__/error-class.test.ts +8 -7
- package/src/pkgs/results/core/error-class.ts +31 -43
- package/src/pkgs/results/index.ts +0 -10
- package/src/pkgs/results/orpc-error-handler.ts +137 -0
- package/src/pkgs/results/types.ts +8 -7
- package/src/pkgs/types/context.ts +18 -4
- package/src/pkgs/types/endpoints.ts +3 -5
- package/src/pkgs/types/options.ts +2 -3
- package/src/pkgs/types/plugins.ts +2 -3
- package/src/pkgs/utils/index.ts +1 -0
- package/src/pkgs/utils/logger.ts +38 -0
- package/src/router.ts +8 -0
- package/src/schema/audit-log/table.ts +1 -1
- package/src/schema/consent/table.ts +1 -1
- package/src/schema/consent-policy/table.ts +1 -1
- package/src/schema/consent-purpose/table.ts +1 -1
- package/src/schema/consent-record/table.ts +1 -1
- package/src/schema/definition.ts +2 -2
- package/src/schema/domain/table.ts +1 -1
- package/src/schema/subject/table.ts +1 -1
- package/src/server.ts +130 -0
- package/src/testing/contract-testing.ts +437 -0
- package/src/types/context.ts +1 -1
- package/src/types/index.ts +2 -2
- package/src/types/options.ts +38 -2
- package/src/types/plugins.ts +3 -4
- package/dist/index.cjs +0 -3701
- package/dist/index.d.ts +0 -11
- package/dist/index.d.ts.map +0 -1
- package/dist/init.test.d.ts +0 -2
- package/dist/init.test.d.ts.map +0 -1
- package/dist/integrations/cloudflare.cjs +0 -312
- package/dist/integrations/cloudflare.d.ts +0 -32
- package/dist/integrations/cloudflare.d.ts.map +0 -1
- package/dist/integrations/cloudflare.js +0 -278
- package/dist/integrations/next.cjs +0 -276
- package/dist/integrations/next.d.ts +0 -68
- package/dist/integrations/next.d.ts.map +0 -1
- package/dist/integrations/next.js +0 -239
- package/dist/integrations/node.cjs +0 -257
- package/dist/integrations/node.d.ts +0 -29
- package/dist/integrations/node.d.ts.map +0 -1
- package/dist/integrations/node.js +0 -223
- package/dist/pkgs/api-router/index.d.ts +0 -9
- package/dist/pkgs/api-router/index.d.ts.map +0 -1
- package/dist/pkgs/api-router/utils/define-route.d.ts +0 -87
- package/dist/pkgs/api-router/utils/define-route.d.ts.map +0 -1
- package/dist/pkgs/logger/__tests__/console-formatter.test.d.ts +0 -2
- package/dist/pkgs/logger/__tests__/console-formatter.test.d.ts.map +0 -1
- package/dist/pkgs/logger/__tests__/integration.test.d.ts +0 -2
- package/dist/pkgs/logger/__tests__/integration.test.d.ts.map +0 -1
- package/dist/pkgs/logger/__tests__/log-levels.test.d.ts +0 -2
- package/dist/pkgs/logger/__tests__/log-levels.test.d.ts.map +0 -1
- package/dist/pkgs/logger/__tests__/logger-factory.test.d.ts +0 -2
- package/dist/pkgs/logger/__tests__/logger-factory.test.d.ts.map +0 -1
- package/dist/pkgs/logger/__tests__/result-logging.test.d.ts +0 -2
- package/dist/pkgs/logger/__tests__/result-logging.test.d.ts.map +0 -1
- package/dist/pkgs/logger/__tests__/types.test.d.ts +0 -2
- package/dist/pkgs/logger/__tests__/types.test.d.ts.map +0 -1
- package/dist/pkgs/logger/console-formatter.d.ts +0 -56
- package/dist/pkgs/logger/console-formatter.d.ts.map +0 -1
- package/dist/pkgs/logger/index.cjs +0 -240
- package/dist/pkgs/logger/index.d.ts +0 -35
- package/dist/pkgs/logger/index.d.ts.map +0 -1
- package/dist/pkgs/logger/index.js +0 -185
- package/dist/pkgs/logger/log-levels.d.ts +0 -29
- package/dist/pkgs/logger/log-levels.d.ts.map +0 -1
- package/dist/pkgs/logger/logger-factory.d.ts +0 -42
- package/dist/pkgs/logger/logger-factory.d.ts.map +0 -1
- package/dist/pkgs/logger/result-logging.d.ts +0 -71
- package/dist/pkgs/logger/result-logging.d.ts.map +0 -1
- package/dist/pkgs/logger/telemetry.d.ts +0 -14
- package/dist/pkgs/logger/telemetry.d.ts.map +0 -1
- package/dist/pkgs/logger/types.d.ts +0 -121
- package/dist/pkgs/logger/types.d.ts.map +0 -1
- package/dist/pkgs/results/__tests__/retrieval-pipeline.test.d.ts +0 -2
- package/dist/pkgs/results/__tests__/retrieval-pipeline.test.d.ts.map +0 -1
- package/dist/pkgs/results/__tests__/validation-pipeline.test.d.ts +0 -2
- package/dist/pkgs/results/__tests__/validation-pipeline.test.d.ts.map +0 -1
- package/dist/pkgs/results/h3-integration.d.ts +0 -52
- package/dist/pkgs/results/h3-integration.d.ts.map +0 -1
- package/dist/pkgs/results/pipeline/retrieval-pipeline.d.ts +0 -101
- package/dist/pkgs/results/pipeline/retrieval-pipeline.d.ts.map +0 -1
- package/dist/pkgs/results/pipeline/validation-pipeline.d.ts +0 -89
- package/dist/pkgs/results/pipeline/validation-pipeline.d.ts.map +0 -1
- package/dist/response-types.d.ts +0 -19
- package/dist/response-types.d.ts.map +0 -1
- package/dist/routes/__test__/index.test.d.ts +0 -17
- package/dist/routes/__test__/index.test.d.ts.map +0 -1
- package/dist/routes/__test__/set-consent.test.d.ts +0 -2
- package/dist/routes/__test__/set-consent.test.d.ts.map +0 -1
- package/dist/routes/__test__/show-consent-banner.test.d.ts +0 -2
- package/dist/routes/__test__/show-consent-banner.test.d.ts.map +0 -1
- package/dist/routes/__test__/status.test.d.ts +0 -2
- package/dist/routes/__test__/status.test.d.ts.map +0 -1
- package/dist/routes/__test__/verify-consent.test.d.ts +0 -2
- package/dist/routes/__test__/verify-consent.test.d.ts.map +0 -1
- package/dist/routes/index.d.ts +0 -3
- package/dist/routes/index.d.ts.map +0 -1
- package/dist/routes/set-consent.d.ts +0 -89
- package/dist/routes/set-consent.d.ts.map +0 -1
- package/dist/routes/show-consent-banner.d.ts +0 -15
- package/dist/routes/show-consent-banner.d.ts.map +0 -1
- package/dist/routes/status.d.ts +0 -44
- package/dist/routes/status.d.ts.map +0 -1
- package/dist/routes/types.d.ts +0 -7
- package/dist/routes/types.d.ts.map +0 -1
- package/dist/routes/verify-consent.d.ts +0 -38
- package/dist/routes/verify-consent.d.ts.map +0 -1
- package/src/docs/ADVANCED_JSON_HANDLING.md +0 -99
- package/src/docs/neverthrow.md +0 -171
- package/src/index.ts +0 -34
- package/src/init.test.ts +0 -219
- package/src/integrations/cloudflare.ts +0 -269
- package/src/integrations/next.ts +0 -204
- package/src/integrations/node.ts +0 -141
- package/src/pkgs/api-router/index.ts +0 -148
- package/src/pkgs/api-router/types/h3.d.ts +0 -42
- package/src/pkgs/api-router/utils/define-route.ts +0 -410
- package/src/pkgs/logger/README.md +0 -213
- package/src/pkgs/logger/__tests__/console-formatter.test.ts +0 -67
- package/src/pkgs/logger/__tests__/integration.test.ts +0 -184
- package/src/pkgs/logger/__tests__/log-levels.test.ts +0 -77
- package/src/pkgs/logger/__tests__/logger-factory.test.ts +0 -156
- package/src/pkgs/logger/__tests__/result-logging.test.ts +0 -209
- package/src/pkgs/logger/__tests__/types.test.ts +0 -94
- package/src/pkgs/logger/console-formatter.ts +0 -75
- package/src/pkgs/logger/doc.md +0 -569
- package/src/pkgs/logger/index.ts +0 -59
- package/src/pkgs/logger/log-levels.ts +0 -46
- package/src/pkgs/logger/logger-factory.ts +0 -121
- package/src/pkgs/logger/result-logging.ts +0 -134
- package/src/pkgs/logger/telemetry.ts +0 -96
- package/src/pkgs/logger/types.ts +0 -138
- package/src/pkgs/results/__tests__/retrieval-pipeline.test.ts +0 -157
- package/src/pkgs/results/__tests__/validation-pipeline.test.ts +0 -151
- package/src/pkgs/results/h3-integration.ts +0 -142
- package/src/pkgs/results/pipeline/retrieval-pipeline.ts +0 -188
- package/src/pkgs/results/pipeline/validation-pipeline.ts +0 -164
- package/src/plugins/.keep +0 -0
- package/src/response-types.ts +0 -29
- package/src/routes/__test__/index.test.ts +0 -112
- package/src/routes/__test__/set-consent.test.ts +0 -242
- package/src/routes/__test__/show-consent-banner.test.ts +0 -98
- package/src/routes/__test__/status.test.ts +0 -64
- package/src/routes/__test__/verify-consent.test.ts +0 -266
- package/src/routes/index.ts +0 -12
- package/src/routes/set-consent.ts +0 -249
- package/src/routes/show-consent-banner.ts +0 -131
- package/src/routes/status.ts +0 -61
- package/src/routes/types.ts +0 -7
- package/src/routes/verify-consent.ts +0 -206
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __webpack_require__ = {};
|
|
3
|
-
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
-
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: definition[key]
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
})();
|
|
11
|
-
(()=>{
|
|
12
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
-
})();
|
|
14
|
-
(()=>{
|
|
15
|
-
__webpack_require__.r = (exports1)=>{
|
|
16
|
-
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
-
value: 'Module'
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
-
value: true
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
})();
|
|
24
|
-
var __webpack_exports__ = {};
|
|
25
|
-
__webpack_require__.r(__webpack_exports__);
|
|
26
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
toNodeHandler: ()=>toNodeHandler
|
|
28
|
-
});
|
|
29
|
-
require("neverthrow");
|
|
30
|
-
const external_h3_namespaceObject = require("h3");
|
|
31
|
-
const error_codes_ERROR_CODES = Object.freeze({
|
|
32
|
-
NOT_FOUND: 'Resource not found',
|
|
33
|
-
BAD_REQUEST: 'Bad request',
|
|
34
|
-
CONFLICT: 'Conflict with current state',
|
|
35
|
-
MISSING_REQUIRED_PARAMETER: 'Missing required parameter',
|
|
36
|
-
UNAUTHORIZED: 'Unauthorized',
|
|
37
|
-
FORBIDDEN: 'Forbidden',
|
|
38
|
-
INTERNAL_SERVER_ERROR: 'Internal server error',
|
|
39
|
-
INITIALIZATION_FAILED: 'Initialization failed',
|
|
40
|
-
DATABASE_CONNECTION_ERROR: 'Database connection error',
|
|
41
|
-
DATABASE_QUERY_ERROR: 'Database query error',
|
|
42
|
-
INVALID_CONFIGURATION: 'Invalid configuration',
|
|
43
|
-
REQUEST_HANDLER_ERROR: 'Request handler error',
|
|
44
|
-
INVALID_REQUEST: 'Invalid request',
|
|
45
|
-
UNKNOWN_ERROR: 'Unknown error',
|
|
46
|
-
NETWORK_ERROR: 'Network error',
|
|
47
|
-
PLUGIN_INITIALIZATION_FAILED: 'Plugin initialization failed',
|
|
48
|
-
API_RETRIEVAL_ERROR: 'API retrieval error',
|
|
49
|
-
VALIDATION_ERROR: 'Validation error',
|
|
50
|
-
UNEXPECTED: 'Unexpected error'
|
|
51
|
-
});
|
|
52
|
-
const ERROR_CATEGORIES = Object.freeze({
|
|
53
|
-
VALIDATION: 'validation',
|
|
54
|
-
AUTHORIZATION: 'authorization',
|
|
55
|
-
STORAGE: 'storage',
|
|
56
|
-
NETWORK: 'network',
|
|
57
|
-
PLUGIN: 'plugin',
|
|
58
|
-
CONFIGURATION: 'configuration',
|
|
59
|
-
UNEXPECTED: 'unexpected'
|
|
60
|
-
});
|
|
61
|
-
const api_namespaceObject = require("@opentelemetry/api");
|
|
62
|
-
api_namespaceObject.trace.getTracer('@doubletie/results');
|
|
63
|
-
class error_class_DoubleTieError extends external_h3_namespaceObject.H3Error {
|
|
64
|
-
code;
|
|
65
|
-
category;
|
|
66
|
-
meta;
|
|
67
|
-
constructor(message, options = {
|
|
68
|
-
code: error_codes_ERROR_CODES.UNKNOWN_ERROR,
|
|
69
|
-
status: 500,
|
|
70
|
-
category: ERROR_CATEGORIES.UNEXPECTED,
|
|
71
|
-
cause: void 0,
|
|
72
|
-
meta: {}
|
|
73
|
-
}){
|
|
74
|
-
super(message, {
|
|
75
|
-
cause: options.cause
|
|
76
|
-
});
|
|
77
|
-
this.name = this.constructor.name;
|
|
78
|
-
this.code = options.code ?? error_codes_ERROR_CODES.UNKNOWN_ERROR;
|
|
79
|
-
this.statusCode = options.status ?? 500;
|
|
80
|
-
this.category = options.category ?? ERROR_CATEGORIES.UNEXPECTED;
|
|
81
|
-
this.meta = options.meta ?? {};
|
|
82
|
-
this.data = {
|
|
83
|
-
code: this.code,
|
|
84
|
-
category: this.category,
|
|
85
|
-
meta: this.meta
|
|
86
|
-
};
|
|
87
|
-
tracing_withSpan('create_doubletie_error', async (span)=>{
|
|
88
|
-
span.setAttributes({
|
|
89
|
-
'error.name': this.name,
|
|
90
|
-
'error.message': message,
|
|
91
|
-
'error.code': this.code,
|
|
92
|
-
'error.status': this.statusCode,
|
|
93
|
-
'error.category': this.category,
|
|
94
|
-
'error.has_cause': !!this.cause,
|
|
95
|
-
'error.cause_type': this.cause instanceof Error ? this.cause.constructor.name : typeof this.cause,
|
|
96
|
-
'error.has_meta': !!this.meta
|
|
97
|
-
});
|
|
98
|
-
if (this.cause instanceof Error) span.recordException(this.cause);
|
|
99
|
-
});
|
|
100
|
-
if (Error.captureStackTrace) Error.captureStackTrace(this, this.constructor);
|
|
101
|
-
}
|
|
102
|
-
static isDoubleTieError(error) {
|
|
103
|
-
return error instanceof error_class_DoubleTieError;
|
|
104
|
-
}
|
|
105
|
-
toJSON() {
|
|
106
|
-
const validationErrorMessage = this.meta?.validationErrors ? String(this.meta.validationErrors) : void 0;
|
|
107
|
-
const stackTrace = this.stack ? this.stack.split('\n').map((line)=>line.trim()).filter((line)=>line && !line.includes('Error: ')) : [];
|
|
108
|
-
return {
|
|
109
|
-
statusCode: this.statusCode,
|
|
110
|
-
message: validationErrorMessage || this.message,
|
|
111
|
-
statusMessage: this.statusMessage,
|
|
112
|
-
data: {
|
|
113
|
-
code: this.code,
|
|
114
|
-
category: this.category,
|
|
115
|
-
meta: this.meta,
|
|
116
|
-
...'production' === process.env.NODE_ENV ? {} : {
|
|
117
|
-
stack: stackTrace
|
|
118
|
-
},
|
|
119
|
-
...validationErrorMessage && this.message ? {
|
|
120
|
-
originalMessage: this.message
|
|
121
|
-
} : {},
|
|
122
|
-
...this.cause ? {
|
|
123
|
-
cause: this.cause instanceof Error ? {
|
|
124
|
-
name: this.cause.name,
|
|
125
|
-
message: this.cause.message,
|
|
126
|
-
stack: this.cause.stack ? this.cause.stack.split('\n').map((line)=>line.trim()) : void 0
|
|
127
|
-
} : this.cause
|
|
128
|
-
} : {}
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
static fromResponse(response, data) {
|
|
133
|
-
let message = `HTTP error ${response.status}`;
|
|
134
|
-
let errorCode = `HTTP ${response.status}`;
|
|
135
|
-
let errorMeta = {};
|
|
136
|
-
if (data && 'object' == typeof data && null !== data) {
|
|
137
|
-
const errorObj = data;
|
|
138
|
-
if ('string' == typeof errorObj.message) message = errorObj.message;
|
|
139
|
-
if ('string' == typeof errorObj.code) errorCode = errorObj.code;
|
|
140
|
-
if ('object' == typeof errorObj.data && null !== errorObj.data) errorMeta = errorObj.data;
|
|
141
|
-
}
|
|
142
|
-
return new error_class_DoubleTieError(message, {
|
|
143
|
-
code: errorCode,
|
|
144
|
-
status: response.status,
|
|
145
|
-
meta: errorMeta
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
withMeta(additionalMeta) {
|
|
149
|
-
return new error_class_DoubleTieError(this.message, {
|
|
150
|
-
code: this.code,
|
|
151
|
-
status: this.statusCode,
|
|
152
|
-
category: this.category,
|
|
153
|
-
cause: this.cause instanceof Error ? this.cause : void 0,
|
|
154
|
-
meta: {
|
|
155
|
-
...this.meta,
|
|
156
|
-
...additionalMeta
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
static createSubclass(name) {
|
|
161
|
-
const ErrorSubclass = class extends error_class_DoubleTieError {
|
|
162
|
-
constructor(message, options){
|
|
163
|
-
super(message, options);
|
|
164
|
-
this.name = name;
|
|
165
|
-
}
|
|
166
|
-
};
|
|
167
|
-
Object.defineProperty(ErrorSubclass, 'name', {
|
|
168
|
-
value: name
|
|
169
|
-
});
|
|
170
|
-
return ErrorSubclass;
|
|
171
|
-
}
|
|
172
|
-
static formatValidationError(error) {
|
|
173
|
-
if (!error.meta) return error.message;
|
|
174
|
-
let formattedMessage = `${error.message} (${error.code})`;
|
|
175
|
-
if (error.meta.validationErrors) formattedMessage += `\nValidation Errors: ${JSON.stringify(error.meta.validationErrors, null, 2)}`;
|
|
176
|
-
const otherMeta = Object.fromEntries(Object.entries(error.meta).filter(([key])=>'validationErrors' !== key));
|
|
177
|
-
if (Object.keys(otherMeta).length > 0) formattedMessage += `\nAdditional Context: ${JSON.stringify(otherMeta, null, 2)}`;
|
|
178
|
-
return formattedMessage;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
function toNodeHandler(instance) {
|
|
182
|
-
return async (request)=>{
|
|
183
|
-
try {
|
|
184
|
-
const basePath = instance.options?.basePath || '/api/c15t';
|
|
185
|
-
const originalUrl = new URL(request.url);
|
|
186
|
-
let pathWithoutBase = originalUrl.pathname;
|
|
187
|
-
if (pathWithoutBase.startsWith(basePath)) {
|
|
188
|
-
pathWithoutBase = pathWithoutBase.substring(basePath.length);
|
|
189
|
-
if (!pathWithoutBase.startsWith('/')) pathWithoutBase = `/${pathWithoutBase}`;
|
|
190
|
-
}
|
|
191
|
-
const rewrittenUrl = new URL(originalUrl.toString());
|
|
192
|
-
rewrittenUrl.pathname = pathWithoutBase;
|
|
193
|
-
const rewrittenRequest = new Request(rewrittenUrl.toString(), {
|
|
194
|
-
method: request.method,
|
|
195
|
-
headers: request.headers,
|
|
196
|
-
body: request.body,
|
|
197
|
-
credentials: 'include',
|
|
198
|
-
duplex: [
|
|
199
|
-
'GET',
|
|
200
|
-
'HEAD'
|
|
201
|
-
].includes(request.method) ? void 0 : 'half'
|
|
202
|
-
});
|
|
203
|
-
await updateBaseUrl(request, basePath);
|
|
204
|
-
const result = await instance.handler(rewrittenRequest);
|
|
205
|
-
return await result.match((response)=>response, (error)=>{
|
|
206
|
-
const status = error.statusCode || 500;
|
|
207
|
-
const message = error.message || error_codes_ERROR_CODES.INTERNAL_SERVER_ERROR;
|
|
208
|
-
return new Response(JSON.stringify({
|
|
209
|
-
error: true,
|
|
210
|
-
code: error.code || error_codes_ERROR_CODES.INTERNAL_SERVER_ERROR,
|
|
211
|
-
message,
|
|
212
|
-
meta: error.meta
|
|
213
|
-
}), {
|
|
214
|
-
status,
|
|
215
|
-
headers: {
|
|
216
|
-
'Content-Type': 'application/json'
|
|
217
|
-
}
|
|
218
|
-
});
|
|
219
|
-
});
|
|
220
|
-
} catch (error) {
|
|
221
|
-
return new Response(JSON.stringify({
|
|
222
|
-
error: true,
|
|
223
|
-
code: error_codes_ERROR_CODES.INTERNAL_SERVER_ERROR,
|
|
224
|
-
message: 'An unexpected error occurred',
|
|
225
|
-
meta: {
|
|
226
|
-
error: String(error)
|
|
227
|
-
}
|
|
228
|
-
}), {
|
|
229
|
-
status: 500,
|
|
230
|
-
headers: {
|
|
231
|
-
'Content-Type': 'application/json'
|
|
232
|
-
}
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
|
-
};
|
|
236
|
-
async function updateBaseUrl(request, basePath) {
|
|
237
|
-
if (!instance.$context) return;
|
|
238
|
-
try {
|
|
239
|
-
const contextResult = await instance.$context;
|
|
240
|
-
contextResult.match((context)=>{
|
|
241
|
-
const url = new URL(request.url);
|
|
242
|
-
const baseURL = `${url.protocol}//${url.host}${basePath}`;
|
|
243
|
-
if (!context.baseURL || context.baseURL !== baseURL) {
|
|
244
|
-
context.baseURL = baseURL;
|
|
245
|
-
if (context.options) context.options.baseURL = baseURL;
|
|
246
|
-
}
|
|
247
|
-
}, ()=>{});
|
|
248
|
-
} catch {}
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
exports.toNodeHandler = __webpack_exports__.toNodeHandler;
|
|
252
|
-
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
253
|
-
"toNodeHandler"
|
|
254
|
-
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
255
|
-
Object.defineProperty(exports, '__esModule', {
|
|
256
|
-
value: true
|
|
257
|
-
});
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { C15TInstance } from '../core';
|
|
2
|
-
/**
|
|
3
|
-
* Convert a c15t handler to a pure Node.js/Cloudflare Worker handler.
|
|
4
|
-
*
|
|
5
|
-
* This adapter converts between Web API Request/Response objects and c15t,
|
|
6
|
-
* letting c15t/H3 handle all the HTTP logic including CORS.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```typescript
|
|
10
|
-
* // Node.js with standard Request/Response objects
|
|
11
|
-
* import { toNodeHandler } from '@c15t/backend/integrations/node';
|
|
12
|
-
* import { c15t } from './c15t';
|
|
13
|
-
*
|
|
14
|
-
* // Create the request handler
|
|
15
|
-
* const handler = toNodeHandler(c15t);
|
|
16
|
-
*
|
|
17
|
-
* // Example for Cloudflare Worker
|
|
18
|
-
* export default {
|
|
19
|
-
* async fetch(request, env, ctx) {
|
|
20
|
-
* return await handler(request);
|
|
21
|
-
* }
|
|
22
|
-
* };
|
|
23
|
-
* ```
|
|
24
|
-
*
|
|
25
|
-
* @param instance - The c15t instance to adapt
|
|
26
|
-
* @returns A handler function that takes a Request and returns a Response
|
|
27
|
-
*/
|
|
28
|
-
export declare function toNodeHandler(instance: C15TInstance): (request: Request) => Promise<Response>;
|
|
29
|
-
//# sourceMappingURL=node.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/integrations/node.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAI3C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,YAAY,IACrC,SAAS,OAAO,KAAG,OAAO,CAAC,QAAQ,CAAC,CA6GlD"}
|
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
import "neverthrow";
|
|
2
|
-
import * as __WEBPACK_EXTERNAL_MODULE_h3__ from "h3";
|
|
3
|
-
import * as __WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__ from "@opentelemetry/api";
|
|
4
|
-
const error_codes_ERROR_CODES = Object.freeze({
|
|
5
|
-
NOT_FOUND: 'Resource not found',
|
|
6
|
-
BAD_REQUEST: 'Bad request',
|
|
7
|
-
CONFLICT: 'Conflict with current state',
|
|
8
|
-
MISSING_REQUIRED_PARAMETER: 'Missing required parameter',
|
|
9
|
-
UNAUTHORIZED: 'Unauthorized',
|
|
10
|
-
FORBIDDEN: 'Forbidden',
|
|
11
|
-
INTERNAL_SERVER_ERROR: 'Internal server error',
|
|
12
|
-
INITIALIZATION_FAILED: 'Initialization failed',
|
|
13
|
-
DATABASE_CONNECTION_ERROR: 'Database connection error',
|
|
14
|
-
DATABASE_QUERY_ERROR: 'Database query error',
|
|
15
|
-
INVALID_CONFIGURATION: 'Invalid configuration',
|
|
16
|
-
REQUEST_HANDLER_ERROR: 'Request handler error',
|
|
17
|
-
INVALID_REQUEST: 'Invalid request',
|
|
18
|
-
UNKNOWN_ERROR: 'Unknown error',
|
|
19
|
-
NETWORK_ERROR: 'Network error',
|
|
20
|
-
PLUGIN_INITIALIZATION_FAILED: 'Plugin initialization failed',
|
|
21
|
-
API_RETRIEVAL_ERROR: 'API retrieval error',
|
|
22
|
-
VALIDATION_ERROR: 'Validation error',
|
|
23
|
-
UNEXPECTED: 'Unexpected error'
|
|
24
|
-
});
|
|
25
|
-
const ERROR_CATEGORIES = Object.freeze({
|
|
26
|
-
VALIDATION: 'validation',
|
|
27
|
-
AUTHORIZATION: 'authorization',
|
|
28
|
-
STORAGE: 'storage',
|
|
29
|
-
NETWORK: 'network',
|
|
30
|
-
PLUGIN: 'plugin',
|
|
31
|
-
CONFIGURATION: 'configuration',
|
|
32
|
-
UNEXPECTED: 'unexpected'
|
|
33
|
-
});
|
|
34
|
-
__WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__.trace.getTracer('@doubletie/results');
|
|
35
|
-
class error_class_DoubleTieError extends __WEBPACK_EXTERNAL_MODULE_h3__.H3Error {
|
|
36
|
-
code;
|
|
37
|
-
category;
|
|
38
|
-
meta;
|
|
39
|
-
constructor(message, options = {
|
|
40
|
-
code: error_codes_ERROR_CODES.UNKNOWN_ERROR,
|
|
41
|
-
status: 500,
|
|
42
|
-
category: ERROR_CATEGORIES.UNEXPECTED,
|
|
43
|
-
cause: void 0,
|
|
44
|
-
meta: {}
|
|
45
|
-
}){
|
|
46
|
-
super(message, {
|
|
47
|
-
cause: options.cause
|
|
48
|
-
});
|
|
49
|
-
this.name = this.constructor.name;
|
|
50
|
-
this.code = options.code ?? error_codes_ERROR_CODES.UNKNOWN_ERROR;
|
|
51
|
-
this.statusCode = options.status ?? 500;
|
|
52
|
-
this.category = options.category ?? ERROR_CATEGORIES.UNEXPECTED;
|
|
53
|
-
this.meta = options.meta ?? {};
|
|
54
|
-
this.data = {
|
|
55
|
-
code: this.code,
|
|
56
|
-
category: this.category,
|
|
57
|
-
meta: this.meta
|
|
58
|
-
};
|
|
59
|
-
tracing_withSpan('create_doubletie_error', async (span)=>{
|
|
60
|
-
span.setAttributes({
|
|
61
|
-
'error.name': this.name,
|
|
62
|
-
'error.message': message,
|
|
63
|
-
'error.code': this.code,
|
|
64
|
-
'error.status': this.statusCode,
|
|
65
|
-
'error.category': this.category,
|
|
66
|
-
'error.has_cause': !!this.cause,
|
|
67
|
-
'error.cause_type': this.cause instanceof Error ? this.cause.constructor.name : typeof this.cause,
|
|
68
|
-
'error.has_meta': !!this.meta
|
|
69
|
-
});
|
|
70
|
-
if (this.cause instanceof Error) span.recordException(this.cause);
|
|
71
|
-
});
|
|
72
|
-
if (Error.captureStackTrace) Error.captureStackTrace(this, this.constructor);
|
|
73
|
-
}
|
|
74
|
-
static isDoubleTieError(error) {
|
|
75
|
-
return error instanceof error_class_DoubleTieError;
|
|
76
|
-
}
|
|
77
|
-
toJSON() {
|
|
78
|
-
const validationErrorMessage = this.meta?.validationErrors ? String(this.meta.validationErrors) : void 0;
|
|
79
|
-
const stackTrace = this.stack ? this.stack.split('\n').map((line)=>line.trim()).filter((line)=>line && !line.includes('Error: ')) : [];
|
|
80
|
-
return {
|
|
81
|
-
statusCode: this.statusCode,
|
|
82
|
-
message: validationErrorMessage || this.message,
|
|
83
|
-
statusMessage: this.statusMessage,
|
|
84
|
-
data: {
|
|
85
|
-
code: this.code,
|
|
86
|
-
category: this.category,
|
|
87
|
-
meta: this.meta,
|
|
88
|
-
...'production' === process.env.NODE_ENV ? {} : {
|
|
89
|
-
stack: stackTrace
|
|
90
|
-
},
|
|
91
|
-
...validationErrorMessage && this.message ? {
|
|
92
|
-
originalMessage: this.message
|
|
93
|
-
} : {},
|
|
94
|
-
...this.cause ? {
|
|
95
|
-
cause: this.cause instanceof Error ? {
|
|
96
|
-
name: this.cause.name,
|
|
97
|
-
message: this.cause.message,
|
|
98
|
-
stack: this.cause.stack ? this.cause.stack.split('\n').map((line)=>line.trim()) : void 0
|
|
99
|
-
} : this.cause
|
|
100
|
-
} : {}
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
static fromResponse(response, data) {
|
|
105
|
-
let message = `HTTP error ${response.status}`;
|
|
106
|
-
let errorCode = `HTTP ${response.status}`;
|
|
107
|
-
let errorMeta = {};
|
|
108
|
-
if (data && 'object' == typeof data && null !== data) {
|
|
109
|
-
const errorObj = data;
|
|
110
|
-
if ('string' == typeof errorObj.message) message = errorObj.message;
|
|
111
|
-
if ('string' == typeof errorObj.code) errorCode = errorObj.code;
|
|
112
|
-
if ('object' == typeof errorObj.data && null !== errorObj.data) errorMeta = errorObj.data;
|
|
113
|
-
}
|
|
114
|
-
return new error_class_DoubleTieError(message, {
|
|
115
|
-
code: errorCode,
|
|
116
|
-
status: response.status,
|
|
117
|
-
meta: errorMeta
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
withMeta(additionalMeta) {
|
|
121
|
-
return new error_class_DoubleTieError(this.message, {
|
|
122
|
-
code: this.code,
|
|
123
|
-
status: this.statusCode,
|
|
124
|
-
category: this.category,
|
|
125
|
-
cause: this.cause instanceof Error ? this.cause : void 0,
|
|
126
|
-
meta: {
|
|
127
|
-
...this.meta,
|
|
128
|
-
...additionalMeta
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
static createSubclass(name) {
|
|
133
|
-
const ErrorSubclass = class extends error_class_DoubleTieError {
|
|
134
|
-
constructor(message, options){
|
|
135
|
-
super(message, options);
|
|
136
|
-
this.name = name;
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
Object.defineProperty(ErrorSubclass, 'name', {
|
|
140
|
-
value: name
|
|
141
|
-
});
|
|
142
|
-
return ErrorSubclass;
|
|
143
|
-
}
|
|
144
|
-
static formatValidationError(error) {
|
|
145
|
-
if (!error.meta) return error.message;
|
|
146
|
-
let formattedMessage = `${error.message} (${error.code})`;
|
|
147
|
-
if (error.meta.validationErrors) formattedMessage += `\nValidation Errors: ${JSON.stringify(error.meta.validationErrors, null, 2)}`;
|
|
148
|
-
const otherMeta = Object.fromEntries(Object.entries(error.meta).filter(([key])=>'validationErrors' !== key));
|
|
149
|
-
if (Object.keys(otherMeta).length > 0) formattedMessage += `\nAdditional Context: ${JSON.stringify(otherMeta, null, 2)}`;
|
|
150
|
-
return formattedMessage;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
function toNodeHandler(instance) {
|
|
154
|
-
return async (request)=>{
|
|
155
|
-
try {
|
|
156
|
-
const basePath = instance.options?.basePath || '/api/c15t';
|
|
157
|
-
const originalUrl = new URL(request.url);
|
|
158
|
-
let pathWithoutBase = originalUrl.pathname;
|
|
159
|
-
if (pathWithoutBase.startsWith(basePath)) {
|
|
160
|
-
pathWithoutBase = pathWithoutBase.substring(basePath.length);
|
|
161
|
-
if (!pathWithoutBase.startsWith('/')) pathWithoutBase = `/${pathWithoutBase}`;
|
|
162
|
-
}
|
|
163
|
-
const rewrittenUrl = new URL(originalUrl.toString());
|
|
164
|
-
rewrittenUrl.pathname = pathWithoutBase;
|
|
165
|
-
const rewrittenRequest = new Request(rewrittenUrl.toString(), {
|
|
166
|
-
method: request.method,
|
|
167
|
-
headers: request.headers,
|
|
168
|
-
body: request.body,
|
|
169
|
-
credentials: 'include',
|
|
170
|
-
duplex: [
|
|
171
|
-
'GET',
|
|
172
|
-
'HEAD'
|
|
173
|
-
].includes(request.method) ? void 0 : 'half'
|
|
174
|
-
});
|
|
175
|
-
await updateBaseUrl(request, basePath);
|
|
176
|
-
const result = await instance.handler(rewrittenRequest);
|
|
177
|
-
return await result.match((response)=>response, (error)=>{
|
|
178
|
-
const status = error.statusCode || 500;
|
|
179
|
-
const message = error.message || error_codes_ERROR_CODES.INTERNAL_SERVER_ERROR;
|
|
180
|
-
return new Response(JSON.stringify({
|
|
181
|
-
error: true,
|
|
182
|
-
code: error.code || error_codes_ERROR_CODES.INTERNAL_SERVER_ERROR,
|
|
183
|
-
message,
|
|
184
|
-
meta: error.meta
|
|
185
|
-
}), {
|
|
186
|
-
status,
|
|
187
|
-
headers: {
|
|
188
|
-
'Content-Type': 'application/json'
|
|
189
|
-
}
|
|
190
|
-
});
|
|
191
|
-
});
|
|
192
|
-
} catch (error) {
|
|
193
|
-
return new Response(JSON.stringify({
|
|
194
|
-
error: true,
|
|
195
|
-
code: error_codes_ERROR_CODES.INTERNAL_SERVER_ERROR,
|
|
196
|
-
message: 'An unexpected error occurred',
|
|
197
|
-
meta: {
|
|
198
|
-
error: String(error)
|
|
199
|
-
}
|
|
200
|
-
}), {
|
|
201
|
-
status: 500,
|
|
202
|
-
headers: {
|
|
203
|
-
'Content-Type': 'application/json'
|
|
204
|
-
}
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
};
|
|
208
|
-
async function updateBaseUrl(request, basePath) {
|
|
209
|
-
if (!instance.$context) return;
|
|
210
|
-
try {
|
|
211
|
-
const contextResult = await instance.$context;
|
|
212
|
-
contextResult.match((context)=>{
|
|
213
|
-
const url = new URL(request.url);
|
|
214
|
-
const baseURL = `${url.protocol}//${url.host}${basePath}`;
|
|
215
|
-
if (!context.baseURL || context.baseURL !== baseURL) {
|
|
216
|
-
context.baseURL = baseURL;
|
|
217
|
-
if (context.options) context.options.baseURL = baseURL;
|
|
218
|
-
}
|
|
219
|
-
}, ()=>{});
|
|
220
|
-
} catch {}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
export { toNodeHandler };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { RouterProps } from './types/router-props';
|
|
2
|
-
export { defineRoute } from './utils/define-route';
|
|
3
|
-
/**
|
|
4
|
-
* Creates an API handler with proper context and CORS handling
|
|
5
|
-
*/
|
|
6
|
-
export declare function createApiHandler({ options, context }: RouterProps): {
|
|
7
|
-
handler: import("h3").WebHandler;
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pkgs/api-router/index.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAOxD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,WAAW;;EA6HjE"}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import type { H3Event, H3EventContext, RouterMethod } from 'h3';
|
|
2
|
-
import type { ZodType, z } from 'zod';
|
|
3
|
-
import type { Route } from '../../../routes/types';
|
|
4
|
-
import type { Endpoint, EndpointHandler, EndpointOptions } from '../../types/endpoints';
|
|
5
|
-
type ValidatedData<TBody extends ZodType | undefined, TQuery extends ZodType | undefined, TParams extends ZodType | undefined> = {
|
|
6
|
-
body: TBody extends ZodType ? z.infer<TBody> : undefined;
|
|
7
|
-
query: TQuery extends ZodType ? z.infer<TQuery> : undefined;
|
|
8
|
-
params: TParams extends ZodType ? z.infer<TParams> : undefined;
|
|
9
|
-
};
|
|
10
|
-
type ValidatedContext<TBody extends ZodType | undefined, TQuery extends ZodType | undefined, TParams extends ZodType | undefined> = H3EventContext & {
|
|
11
|
-
validated: ValidatedData<TBody, TQuery, TParams>;
|
|
12
|
-
};
|
|
13
|
-
type ValidatedEvent<TBody extends ZodType | undefined, TQuery extends ZodType | undefined, TParams extends ZodType | undefined> = Omit<H3Event, 'context'> & {
|
|
14
|
-
context: ValidatedContext<TBody, TQuery, TParams>;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* Defines a type-safe API route with validation and proper error handling
|
|
18
|
-
*
|
|
19
|
-
* This utility function creates a complete API route definition with:
|
|
20
|
-
* - Path and method definition
|
|
21
|
-
* - Request validation (body, query params, path params)
|
|
22
|
-
* - Consistent error handling
|
|
23
|
-
* - Type-safe response handling
|
|
24
|
-
*
|
|
25
|
-
* @param config - Configuration for the route including path, method, validations and handler
|
|
26
|
-
* @returns A Route object that can be used in the router
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```ts
|
|
30
|
-
* // Define a route with validation and type-safe response
|
|
31
|
-
* export const createUser = defineRoute<UserResponse, UserSchema>({
|
|
32
|
-
* path: '/users',
|
|
33
|
-
* method: 'post',
|
|
34
|
-
* validations: {
|
|
35
|
-
* body: UserSchema,
|
|
36
|
-
* },
|
|
37
|
-
* handler: async (event) => {
|
|
38
|
-
* const { body } = event.context.validated;
|
|
39
|
-
* // Implementation...
|
|
40
|
-
* return { id: newUser.id, name: body.name, email: body.email };
|
|
41
|
-
* }
|
|
42
|
-
* });
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
|
-
export declare function defineRoute<TResponse, TBodySchema extends ZodType = never, TQuerySchema extends ZodType = never, TParamsSchema extends ZodType = never>(config: {
|
|
46
|
-
path: string;
|
|
47
|
-
method: RouterMethod;
|
|
48
|
-
validations?: {
|
|
49
|
-
body?: TBodySchema;
|
|
50
|
-
query?: TQuerySchema;
|
|
51
|
-
params?: TParamsSchema;
|
|
52
|
-
};
|
|
53
|
-
handler: (event: ValidatedEvent<TBodySchema extends never ? undefined : TBodySchema, TQuerySchema extends never ? undefined : TQuerySchema, TParamsSchema extends never ? undefined : TParamsSchema>) => Promise<TResponse>;
|
|
54
|
-
}): Route & {
|
|
55
|
-
responseType: TResponse;
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* Creates a simple endpoint with optional middleware
|
|
59
|
-
*
|
|
60
|
-
* @param path - The path for this endpoint
|
|
61
|
-
* @param handler - Handler function for the endpoint
|
|
62
|
-
* @param options - Optional configuration options
|
|
63
|
-
* @returns An Endpoint object
|
|
64
|
-
*/
|
|
65
|
-
export declare function defineRoute(path: string, handler: EndpointHandler, options?: EndpointOptions): Endpoint;
|
|
66
|
-
/**
|
|
67
|
-
* Extracts the response type from a route definition
|
|
68
|
-
*
|
|
69
|
-
* This utility type allows extracting the response type from a route defined
|
|
70
|
-
* with defineRoute for use in client-side code.
|
|
71
|
-
*
|
|
72
|
-
* @example
|
|
73
|
-
* ```ts
|
|
74
|
-
* // Server-side route definition
|
|
75
|
-
* export const getUser = defineRoute<UserResponse>({...});
|
|
76
|
-
*
|
|
77
|
-
* // Client-side type usage
|
|
78
|
-
* type UserResponse = RouteResponseType<typeof getUser>;
|
|
79
|
-
* ```
|
|
80
|
-
*/
|
|
81
|
-
export type RouteResponseType<T extends Route & {
|
|
82
|
-
responseType: unknown;
|
|
83
|
-
}> = T extends Route & {
|
|
84
|
-
responseType: infer R;
|
|
85
|
-
} ? R : never;
|
|
86
|
-
export {};
|
|
87
|
-
//# sourceMappingURL=define-route.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"define-route.d.ts","sourceRoot":"","sources":["../../../../src/pkgs/api-router/utils/define-route.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAQhE,OAAO,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOtC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EACX,QAAQ,EACR,eAAe,EACf,eAAe,EACf,MAAM,uBAAuB,CAAC;AAG/B,KAAK,aAAa,CACjB,KAAK,SAAS,OAAO,GAAG,SAAS,EACjC,MAAM,SAAS,OAAO,GAAG,SAAS,EAClC,OAAO,SAAS,OAAO,GAAG,SAAS,IAChC;IACH,IAAI,EAAE,KAAK,SAAS,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC;IACzD,KAAK,EAAE,MAAM,SAAS,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IAC5D,MAAM,EAAE,OAAO,SAAS,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;CAC/D,CAAC;AAEF,KAAK,gBAAgB,CACpB,KAAK,SAAS,OAAO,GAAG,SAAS,EACjC,MAAM,SAAS,OAAO,GAAG,SAAS,EAClC,OAAO,SAAS,OAAO,GAAG,SAAS,IAChC,cAAc,GAAG;IACpB,SAAS,EAAE,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;CACjD,CAAC;AAEF,KAAK,cAAc,CAClB,KAAK,SAAS,OAAO,GAAG,SAAS,EACjC,MAAM,SAAS,OAAO,GAAG,SAAS,EAClC,OAAO,SAAS,OAAO,GAAG,SAAS,IAChC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG;IAC9B,OAAO,EAAE,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;CAClD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,WAAW,CAC1B,SAAS,EACT,WAAW,SAAS,OAAO,GAAG,KAAK,EACnC,YAAY,SAAS,OAAO,GAAG,KAAK,EACpC,aAAa,SAAS,OAAO,GAAG,KAAK,EACpC,MAAM,EAAE;IACT,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,YAAY,CAAC;IACrB,WAAW,CAAC,EAAE;QACb,IAAI,CAAC,EAAE,WAAW,CAAC;QACnB,KAAK,CAAC,EAAE,YAAY,CAAC;QACrB,MAAM,CAAC,EAAE,aAAa,CAAC;KACvB,CAAC;IACF,OAAO,EAAE,CACR,KAAK,EAAE,cAAc,CACpB,WAAW,SAAS,KAAK,GAAG,SAAS,GAAG,WAAW,EACnD,YAAY,SAAS,KAAK,GAAG,SAAS,GAAG,YAAY,EACrD,aAAa,SAAS,KAAK,GAAG,SAAS,GAAG,aAAa,CACvD,KACG,OAAO,CAAC,SAAS,CAAC,CAAC;CACxB,GAAG,KAAK,GAAG;IAAE,YAAY,EAAE,SAAS,CAAA;CAAE,CAAC;AAExC;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAC1B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,eAAe,EACxB,OAAO,CAAC,EAAE,eAAe,GACvB,QAAQ,CAAC;AAgRZ;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,KAAK,GAAG;IAAE,YAAY,EAAE,OAAO,CAAA;CAAE,IACxE,CAAC,SAAS,KAAK,GAAG;IAAE,YAAY,EAAE,MAAM,CAAC,CAAA;CAAE,GAAG,CAAC,GAAG,KAAK,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"console-formatter.test.d.ts","sourceRoot":"","sources":["../../../../src/pkgs/logger/__tests__/console-formatter.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integration.test.d.ts","sourceRoot":"","sources":["../../../../src/pkgs/logger/__tests__/integration.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"log-levels.test.d.ts","sourceRoot":"","sources":["../../../../src/pkgs/logger/__tests__/log-levels.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger-factory.test.d.ts","sourceRoot":"","sources":["../../../../src/pkgs/logger/__tests__/logger-factory.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"result-logging.test.d.ts","sourceRoot":"","sources":["../../../../src/pkgs/logger/__tests__/result-logging.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.test.d.ts","sourceRoot":"","sources":["../../../../src/pkgs/logger/__tests__/types.test.ts"],"names":[],"mappings":""}
|