@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
|
@@ -148,7 +148,7 @@ external_zod_namespaceObject.z.discriminatedUnion('type', [
|
|
|
148
148
|
numberArrayFieldSchema
|
|
149
149
|
]);
|
|
150
150
|
require("neverthrow");
|
|
151
|
-
const
|
|
151
|
+
const server_namespaceObject = require("@orpc/server");
|
|
152
152
|
const error_codes_ERROR_CODES = Object.freeze({
|
|
153
153
|
NOT_FOUND: 'Resource not found',
|
|
154
154
|
BAD_REQUEST: 'Bad request',
|
|
@@ -180,9 +180,9 @@ const ERROR_CATEGORIES = Object.freeze({
|
|
|
180
180
|
UNEXPECTED: 'unexpected'
|
|
181
181
|
});
|
|
182
182
|
const api_namespaceObject = require("@opentelemetry/api");
|
|
183
|
-
const
|
|
183
|
+
const tracer = api_namespaceObject.trace.getTracer('@doubletie/results');
|
|
184
184
|
async function tracing_withSpan(name, fn, attributes = {}) {
|
|
185
|
-
return await
|
|
185
|
+
return await tracer.startActiveSpan(name, async (span)=>{
|
|
186
186
|
try {
|
|
187
187
|
span.setAttributes(attributes);
|
|
188
188
|
const result = await fn(span);
|
|
@@ -215,10 +215,10 @@ async function tracing_withSpan(name, fn, attributes = {}) {
|
|
|
215
215
|
}
|
|
216
216
|
});
|
|
217
217
|
}
|
|
218
|
-
class error_class_DoubleTieError extends
|
|
219
|
-
code;
|
|
218
|
+
class error_class_DoubleTieError extends server_namespaceObject.ORPCError {
|
|
220
219
|
category;
|
|
221
220
|
meta;
|
|
221
|
+
statusCode;
|
|
222
222
|
constructor(message, options = {
|
|
223
223
|
code: error_codes_ERROR_CODES.UNKNOWN_ERROR,
|
|
224
224
|
status: 500,
|
|
@@ -226,22 +226,18 @@ class error_class_DoubleTieError extends external_h3_namespaceObject.H3Error {
|
|
|
226
226
|
cause: void 0,
|
|
227
227
|
meta: {}
|
|
228
228
|
}){
|
|
229
|
-
super(
|
|
230
|
-
|
|
229
|
+
super(options.code ?? error_codes_ERROR_CODES.UNKNOWN_ERROR, {
|
|
230
|
+
message,
|
|
231
|
+
cause: options.cause,
|
|
232
|
+
data: options.meta ?? {}
|
|
231
233
|
});
|
|
232
|
-
this.name =
|
|
233
|
-
this.code = options.code ?? error_codes_ERROR_CODES.UNKNOWN_ERROR;
|
|
234
|
-
this.statusCode = options.status ?? 500;
|
|
234
|
+
this.name = 'DoubleTieError';
|
|
235
235
|
this.category = options.category ?? ERROR_CATEGORIES.UNEXPECTED;
|
|
236
236
|
this.meta = options.meta ?? {};
|
|
237
|
-
this.
|
|
238
|
-
code: this.code,
|
|
239
|
-
category: this.category,
|
|
240
|
-
meta: this.meta
|
|
241
|
-
};
|
|
237
|
+
this.statusCode = options.status ?? 500;
|
|
242
238
|
tracing_withSpan('create_doubletie_error', async (span)=>{
|
|
243
239
|
span.setAttributes({
|
|
244
|
-
'error.name': this.name,
|
|
240
|
+
'error.name': this.constructor.name,
|
|
245
241
|
'error.message': message,
|
|
246
242
|
'error.code': this.code,
|
|
247
243
|
'error.status': this.statusCode,
|
|
@@ -261,11 +257,11 @@ class error_class_DoubleTieError extends external_h3_namespaceObject.H3Error {
|
|
|
261
257
|
const validationErrorMessage = this.meta?.validationErrors ? String(this.meta.validationErrors) : void 0;
|
|
262
258
|
const stackTrace = this.stack ? this.stack.split('\n').map((line)=>line.trim()).filter((line)=>line && !line.includes('Error: ')) : [];
|
|
263
259
|
return {
|
|
264
|
-
|
|
260
|
+
code: this.code,
|
|
265
261
|
message: validationErrorMessage || this.message,
|
|
266
|
-
|
|
262
|
+
status: this.statusCode,
|
|
263
|
+
defined: true,
|
|
267
264
|
data: {
|
|
268
|
-
code: this.code,
|
|
269
265
|
category: this.category,
|
|
270
266
|
meta: this.meta,
|
|
271
267
|
...'production' === process.env.NODE_ENV ? {} : {
|
|
@@ -316,7 +312,9 @@ class error_class_DoubleTieError extends external_h3_namespaceObject.H3Error {
|
|
|
316
312
|
const ErrorSubclass = class extends error_class_DoubleTieError {
|
|
317
313
|
constructor(message, options){
|
|
318
314
|
super(message, options);
|
|
319
|
-
this
|
|
315
|
+
Object.defineProperty(this, 'name', {
|
|
316
|
+
value: name
|
|
317
|
+
});
|
|
320
318
|
}
|
|
321
319
|
};
|
|
322
320
|
Object.defineProperty(ErrorSubclass, 'name', {
|
|
@@ -333,137 +331,7 @@ class error_class_DoubleTieError extends external_h3_namespaceObject.H3Error {
|
|
|
333
331
|
return formattedMessage;
|
|
334
332
|
}
|
|
335
333
|
}
|
|
336
|
-
|
|
337
|
-
reset: '\x1b[0m',
|
|
338
|
-
bright: '\x1b[1m',
|
|
339
|
-
dim: '\x1b[2m',
|
|
340
|
-
underscore: '\x1b[4m',
|
|
341
|
-
blink: '\x1b[5m',
|
|
342
|
-
reverse: '\x1b[7m',
|
|
343
|
-
hidden: '\x1b[8m',
|
|
344
|
-
fg: {
|
|
345
|
-
black: '\x1b[30m',
|
|
346
|
-
red: '\x1b[31m',
|
|
347
|
-
green: '\x1b[32m',
|
|
348
|
-
yellow: '\x1b[33m',
|
|
349
|
-
blue: '\x1b[34m',
|
|
350
|
-
magenta: '\x1b[35m',
|
|
351
|
-
cyan: '\x1b[36m',
|
|
352
|
-
white: '\x1b[37m'
|
|
353
|
-
},
|
|
354
|
-
bg: {
|
|
355
|
-
black: '\x1b[40m',
|
|
356
|
-
red: '\x1b[41m',
|
|
357
|
-
green: '\x1b[42m',
|
|
358
|
-
yellow: '\x1b[43m',
|
|
359
|
-
blue: '\x1b[44m',
|
|
360
|
-
magenta: '\x1b[45m',
|
|
361
|
-
cyan: '\x1b[46m',
|
|
362
|
-
white: '\x1b[47m'
|
|
363
|
-
}
|
|
364
|
-
};
|
|
365
|
-
const levelColors = {
|
|
366
|
-
info: colors.fg.blue,
|
|
367
|
-
success: colors.fg.green,
|
|
368
|
-
warn: colors.fg.yellow,
|
|
369
|
-
error: colors.fg.red,
|
|
370
|
-
debug: colors.fg.magenta
|
|
371
|
-
};
|
|
372
|
-
const formatMessage = (level, message, appName = 'c15t')=>{
|
|
373
|
-
const timestamp = new Date().toISOString();
|
|
374
|
-
return `${colors.dim}${timestamp}${colors.reset} ${levelColors[level]}${level.toUpperCase()}${colors.reset} ${colors.bright}[${appName}]:${colors.reset} ${message}`;
|
|
375
|
-
};
|
|
376
|
-
const levels = [
|
|
377
|
-
'error',
|
|
378
|
-
'warn',
|
|
379
|
-
'info',
|
|
380
|
-
'success',
|
|
381
|
-
'debug'
|
|
382
|
-
];
|
|
383
|
-
function shouldPublishLog(currentLogLevel, logLevel) {
|
|
384
|
-
const currentLevelIndex = levels.indexOf(currentLogLevel);
|
|
385
|
-
const messageLevelIndex = levels.indexOf(logLevel);
|
|
386
|
-
if ('debug' === currentLogLevel) return 'debug' === logLevel;
|
|
387
|
-
return messageLevelIndex <= currentLevelIndex;
|
|
388
|
-
}
|
|
389
|
-
const LOGGER_TRACER_NAME = '@doubletie/logger';
|
|
390
|
-
const LOG_LEVEL_TO_SPAN_STATUS = {
|
|
391
|
-
error: api_namespaceObject.SpanStatusCode.ERROR,
|
|
392
|
-
warn: api_namespaceObject.SpanStatusCode.OK,
|
|
393
|
-
info: api_namespaceObject.SpanStatusCode.OK,
|
|
394
|
-
success: api_namespaceObject.SpanStatusCode.OK,
|
|
395
|
-
debug: api_namespaceObject.SpanStatusCode.OK
|
|
396
|
-
};
|
|
397
|
-
const telemetry_getTracer = (options)=>{
|
|
398
|
-
if (options?.telemetry?.tracer) return options.telemetry.tracer;
|
|
399
|
-
return api_namespaceObject.trace.getTracer(LOGGER_TRACER_NAME);
|
|
400
|
-
};
|
|
401
|
-
const createLogSpan = (level, message, args = [], options)=>{
|
|
402
|
-
if (options?.telemetry?.disabled) return null;
|
|
403
|
-
const tracer = telemetry_getTracer(options);
|
|
404
|
-
const span = tracer.startSpan('log_entry', {
|
|
405
|
-
attributes: {
|
|
406
|
-
'log.level': level,
|
|
407
|
-
'log.message': message,
|
|
408
|
-
'log.has_args': args.length > 0,
|
|
409
|
-
...options?.telemetry?.defaultAttributes || {}
|
|
410
|
-
}
|
|
411
|
-
});
|
|
412
|
-
if (args.length > 0 && 'object' == typeof args[0] && null !== args[0]) {
|
|
413
|
-
const data = args[0];
|
|
414
|
-
for (const [key, value] of Object.entries(data))if (null != value) span.setAttribute(`log.data.${key}`, String(value));
|
|
415
|
-
}
|
|
416
|
-
span.setStatus({
|
|
417
|
-
code: LOG_LEVEL_TO_SPAN_STATUS[level],
|
|
418
|
-
message: 'error' === level || 'warn' === level ? message : void 0
|
|
419
|
-
});
|
|
420
|
-
return span;
|
|
421
|
-
};
|
|
422
|
-
const withLogSpan = async (level, message, args, operation, options)=>{
|
|
423
|
-
const span = createLogSpan(level, message, args, options);
|
|
424
|
-
if (!span) return operation();
|
|
425
|
-
try {
|
|
426
|
-
const result = await operation();
|
|
427
|
-
return result;
|
|
428
|
-
} catch (error) {
|
|
429
|
-
span.setStatus({
|
|
430
|
-
code: api_namespaceObject.SpanStatusCode.ERROR,
|
|
431
|
-
message: error instanceof Error ? error.message : String(error)
|
|
432
|
-
});
|
|
433
|
-
throw error;
|
|
434
|
-
} finally{
|
|
435
|
-
span.end();
|
|
436
|
-
}
|
|
437
|
-
};
|
|
438
|
-
const createLogger = (options)=>{
|
|
439
|
-
if (options && 'object' == typeof options && levels.every((level)=>'function' == typeof options[level])) return options;
|
|
440
|
-
const loggerOptions = options;
|
|
441
|
-
const enabled = loggerOptions?.disabled !== true;
|
|
442
|
-
const logLevel = loggerOptions?.level ?? 'error';
|
|
443
|
-
const appName = loggerOptions?.appName ?? 'c15t';
|
|
444
|
-
const logFunc = async (level, message, args = [])=>{
|
|
445
|
-
if (!enabled || !shouldPublishLog(logLevel, level)) return;
|
|
446
|
-
await withLogSpan(level, message, args, async ()=>{
|
|
447
|
-
const formattedMessage = formatMessage(level, message, appName);
|
|
448
|
-
if (!loggerOptions || 'function' != typeof loggerOptions.log) {
|
|
449
|
-
if ('error' === level) console.error(formattedMessage, ...args);
|
|
450
|
-
else if ('warn' === level) console.warn(formattedMessage, ...args);
|
|
451
|
-
else if ('info' === level) console.log(formattedMessage, ...args);
|
|
452
|
-
else if ('debug' === level) console.debug(formattedMessage, ...args);
|
|
453
|
-
else if ('success' === level) console.log(formattedMessage, ...args);
|
|
454
|
-
return;
|
|
455
|
-
}
|
|
456
|
-
loggerOptions.log('success' === level ? 'info' : level, message, ...args);
|
|
457
|
-
});
|
|
458
|
-
};
|
|
459
|
-
return Object.fromEntries(levels.map((level)=>[
|
|
460
|
-
level,
|
|
461
|
-
(...[message, ...args])=>logFunc(level, message, args).catch((error)=>{
|
|
462
|
-
console.error('Logger error:', error);
|
|
463
|
-
})
|
|
464
|
-
]));
|
|
465
|
-
};
|
|
466
|
-
createLogger();
|
|
334
|
+
require("@doubletie/logger");
|
|
467
335
|
const auditLogSchema = external_zod_namespaceObject.z.object({
|
|
468
336
|
id: external_zod_namespaceObject.z.string(),
|
|
469
337
|
entityType: external_zod_namespaceObject.z.string(),
|
|
@@ -2,8 +2,9 @@ import * as __WEBPACK_EXTERNAL_MODULE_drizzle_orm_51e552b8__ from "drizzle-orm";
|
|
|
2
2
|
import * as __WEBPACK_EXTERNAL_MODULE_base_x_aeb88370__ from "base-x";
|
|
3
3
|
import * as __WEBPACK_EXTERNAL_MODULE_zod__ from "zod";
|
|
4
4
|
import "neverthrow";
|
|
5
|
-
import * as
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__orpc_server_0dae8408__ from "@orpc/server";
|
|
6
6
|
import * as __WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__ from "@opentelemetry/api";
|
|
7
|
+
import "@doubletie/logger";
|
|
7
8
|
import "node:crypto";
|
|
8
9
|
const COMMON_TIMEZONES = {
|
|
9
10
|
UTC: 'UTC',
|
|
@@ -143,9 +144,9 @@ const ERROR_CATEGORIES = Object.freeze({
|
|
|
143
144
|
CONFIGURATION: 'configuration',
|
|
144
145
|
UNEXPECTED: 'unexpected'
|
|
145
146
|
});
|
|
146
|
-
const
|
|
147
|
+
const tracer = __WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__.trace.getTracer('@doubletie/results');
|
|
147
148
|
async function tracing_withSpan(name, fn, attributes = {}) {
|
|
148
|
-
return await
|
|
149
|
+
return await tracer.startActiveSpan(name, async (span)=>{
|
|
149
150
|
try {
|
|
150
151
|
span.setAttributes(attributes);
|
|
151
152
|
const result = await fn(span);
|
|
@@ -178,10 +179,10 @@ async function tracing_withSpan(name, fn, attributes = {}) {
|
|
|
178
179
|
}
|
|
179
180
|
});
|
|
180
181
|
}
|
|
181
|
-
class error_class_DoubleTieError extends
|
|
182
|
-
code;
|
|
182
|
+
class error_class_DoubleTieError extends __WEBPACK_EXTERNAL_MODULE__orpc_server_0dae8408__.ORPCError {
|
|
183
183
|
category;
|
|
184
184
|
meta;
|
|
185
|
+
statusCode;
|
|
185
186
|
constructor(message, options = {
|
|
186
187
|
code: error_codes_ERROR_CODES.UNKNOWN_ERROR,
|
|
187
188
|
status: 500,
|
|
@@ -189,22 +190,18 @@ class error_class_DoubleTieError extends __WEBPACK_EXTERNAL_MODULE_h3__.H3Error
|
|
|
189
190
|
cause: void 0,
|
|
190
191
|
meta: {}
|
|
191
192
|
}){
|
|
192
|
-
super(
|
|
193
|
-
|
|
193
|
+
super(options.code ?? error_codes_ERROR_CODES.UNKNOWN_ERROR, {
|
|
194
|
+
message,
|
|
195
|
+
cause: options.cause,
|
|
196
|
+
data: options.meta ?? {}
|
|
194
197
|
});
|
|
195
|
-
this.name =
|
|
196
|
-
this.code = options.code ?? error_codes_ERROR_CODES.UNKNOWN_ERROR;
|
|
197
|
-
this.statusCode = options.status ?? 500;
|
|
198
|
+
this.name = 'DoubleTieError';
|
|
198
199
|
this.category = options.category ?? ERROR_CATEGORIES.UNEXPECTED;
|
|
199
200
|
this.meta = options.meta ?? {};
|
|
200
|
-
this.
|
|
201
|
-
code: this.code,
|
|
202
|
-
category: this.category,
|
|
203
|
-
meta: this.meta
|
|
204
|
-
};
|
|
201
|
+
this.statusCode = options.status ?? 500;
|
|
205
202
|
tracing_withSpan('create_doubletie_error', async (span)=>{
|
|
206
203
|
span.setAttributes({
|
|
207
|
-
'error.name': this.name,
|
|
204
|
+
'error.name': this.constructor.name,
|
|
208
205
|
'error.message': message,
|
|
209
206
|
'error.code': this.code,
|
|
210
207
|
'error.status': this.statusCode,
|
|
@@ -224,11 +221,11 @@ class error_class_DoubleTieError extends __WEBPACK_EXTERNAL_MODULE_h3__.H3Error
|
|
|
224
221
|
const validationErrorMessage = this.meta?.validationErrors ? String(this.meta.validationErrors) : void 0;
|
|
225
222
|
const stackTrace = this.stack ? this.stack.split('\n').map((line)=>line.trim()).filter((line)=>line && !line.includes('Error: ')) : [];
|
|
226
223
|
return {
|
|
227
|
-
|
|
224
|
+
code: this.code,
|
|
228
225
|
message: validationErrorMessage || this.message,
|
|
229
|
-
|
|
226
|
+
status: this.statusCode,
|
|
227
|
+
defined: true,
|
|
230
228
|
data: {
|
|
231
|
-
code: this.code,
|
|
232
229
|
category: this.category,
|
|
233
230
|
meta: this.meta,
|
|
234
231
|
...'production' === process.env.NODE_ENV ? {} : {
|
|
@@ -279,7 +276,9 @@ class error_class_DoubleTieError extends __WEBPACK_EXTERNAL_MODULE_h3__.H3Error
|
|
|
279
276
|
const ErrorSubclass = class extends error_class_DoubleTieError {
|
|
280
277
|
constructor(message, options){
|
|
281
278
|
super(message, options);
|
|
282
|
-
this
|
|
279
|
+
Object.defineProperty(this, 'name', {
|
|
280
|
+
value: name
|
|
281
|
+
});
|
|
283
282
|
}
|
|
284
283
|
};
|
|
285
284
|
Object.defineProperty(ErrorSubclass, 'name', {
|
|
@@ -296,137 +295,6 @@ class error_class_DoubleTieError extends __WEBPACK_EXTERNAL_MODULE_h3__.H3Error
|
|
|
296
295
|
return formattedMessage;
|
|
297
296
|
}
|
|
298
297
|
}
|
|
299
|
-
const levels = [
|
|
300
|
-
'error',
|
|
301
|
-
'warn',
|
|
302
|
-
'info',
|
|
303
|
-
'success',
|
|
304
|
-
'debug'
|
|
305
|
-
];
|
|
306
|
-
function shouldPublishLog(currentLogLevel, logLevel) {
|
|
307
|
-
const currentLevelIndex = levels.indexOf(currentLogLevel);
|
|
308
|
-
const messageLevelIndex = levels.indexOf(logLevel);
|
|
309
|
-
if ('debug' === currentLogLevel) return 'debug' === logLevel;
|
|
310
|
-
return messageLevelIndex <= currentLevelIndex;
|
|
311
|
-
}
|
|
312
|
-
const colors = {
|
|
313
|
-
reset: '\x1b[0m',
|
|
314
|
-
bright: '\x1b[1m',
|
|
315
|
-
dim: '\x1b[2m',
|
|
316
|
-
underscore: '\x1b[4m',
|
|
317
|
-
blink: '\x1b[5m',
|
|
318
|
-
reverse: '\x1b[7m',
|
|
319
|
-
hidden: '\x1b[8m',
|
|
320
|
-
fg: {
|
|
321
|
-
black: '\x1b[30m',
|
|
322
|
-
red: '\x1b[31m',
|
|
323
|
-
green: '\x1b[32m',
|
|
324
|
-
yellow: '\x1b[33m',
|
|
325
|
-
blue: '\x1b[34m',
|
|
326
|
-
magenta: '\x1b[35m',
|
|
327
|
-
cyan: '\x1b[36m',
|
|
328
|
-
white: '\x1b[37m'
|
|
329
|
-
},
|
|
330
|
-
bg: {
|
|
331
|
-
black: '\x1b[40m',
|
|
332
|
-
red: '\x1b[41m',
|
|
333
|
-
green: '\x1b[42m',
|
|
334
|
-
yellow: '\x1b[43m',
|
|
335
|
-
blue: '\x1b[44m',
|
|
336
|
-
magenta: '\x1b[45m',
|
|
337
|
-
cyan: '\x1b[46m',
|
|
338
|
-
white: '\x1b[47m'
|
|
339
|
-
}
|
|
340
|
-
};
|
|
341
|
-
const levelColors = {
|
|
342
|
-
info: colors.fg.blue,
|
|
343
|
-
success: colors.fg.green,
|
|
344
|
-
warn: colors.fg.yellow,
|
|
345
|
-
error: colors.fg.red,
|
|
346
|
-
debug: colors.fg.magenta
|
|
347
|
-
};
|
|
348
|
-
const formatMessage = (level, message, appName = 'c15t')=>{
|
|
349
|
-
const timestamp = new Date().toISOString();
|
|
350
|
-
return `${colors.dim}${timestamp}${colors.reset} ${levelColors[level]}${level.toUpperCase()}${colors.reset} ${colors.bright}[${appName}]:${colors.reset} ${message}`;
|
|
351
|
-
};
|
|
352
|
-
const LOGGER_TRACER_NAME = '@doubletie/logger';
|
|
353
|
-
const LOG_LEVEL_TO_SPAN_STATUS = {
|
|
354
|
-
error: __WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__.SpanStatusCode.ERROR,
|
|
355
|
-
warn: __WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__.SpanStatusCode.OK,
|
|
356
|
-
info: __WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__.SpanStatusCode.OK,
|
|
357
|
-
success: __WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__.SpanStatusCode.OK,
|
|
358
|
-
debug: __WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__.SpanStatusCode.OK
|
|
359
|
-
};
|
|
360
|
-
const telemetry_getTracer = (options)=>{
|
|
361
|
-
if (options?.telemetry?.tracer) return options.telemetry.tracer;
|
|
362
|
-
return __WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__.trace.getTracer(LOGGER_TRACER_NAME);
|
|
363
|
-
};
|
|
364
|
-
const createLogSpan = (level, message, args = [], options)=>{
|
|
365
|
-
if (options?.telemetry?.disabled) return null;
|
|
366
|
-
const tracer = telemetry_getTracer(options);
|
|
367
|
-
const span = tracer.startSpan('log_entry', {
|
|
368
|
-
attributes: {
|
|
369
|
-
'log.level': level,
|
|
370
|
-
'log.message': message,
|
|
371
|
-
'log.has_args': args.length > 0,
|
|
372
|
-
...options?.telemetry?.defaultAttributes || {}
|
|
373
|
-
}
|
|
374
|
-
});
|
|
375
|
-
if (args.length > 0 && 'object' == typeof args[0] && null !== args[0]) {
|
|
376
|
-
const data = args[0];
|
|
377
|
-
for (const [key, value] of Object.entries(data))if (null != value) span.setAttribute(`log.data.${key}`, String(value));
|
|
378
|
-
}
|
|
379
|
-
span.setStatus({
|
|
380
|
-
code: LOG_LEVEL_TO_SPAN_STATUS[level],
|
|
381
|
-
message: 'error' === level || 'warn' === level ? message : void 0
|
|
382
|
-
});
|
|
383
|
-
return span;
|
|
384
|
-
};
|
|
385
|
-
const withLogSpan = async (level, message, args, operation, options)=>{
|
|
386
|
-
const span = createLogSpan(level, message, args, options);
|
|
387
|
-
if (!span) return operation();
|
|
388
|
-
try {
|
|
389
|
-
const result = await operation();
|
|
390
|
-
return result;
|
|
391
|
-
} catch (error) {
|
|
392
|
-
span.setStatus({
|
|
393
|
-
code: __WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__.SpanStatusCode.ERROR,
|
|
394
|
-
message: error instanceof Error ? error.message : String(error)
|
|
395
|
-
});
|
|
396
|
-
throw error;
|
|
397
|
-
} finally{
|
|
398
|
-
span.end();
|
|
399
|
-
}
|
|
400
|
-
};
|
|
401
|
-
const createLogger = (options)=>{
|
|
402
|
-
if (options && 'object' == typeof options && levels.every((level)=>'function' == typeof options[level])) return options;
|
|
403
|
-
const loggerOptions = options;
|
|
404
|
-
const enabled = loggerOptions?.disabled !== true;
|
|
405
|
-
const logLevel = loggerOptions?.level ?? 'error';
|
|
406
|
-
const appName = loggerOptions?.appName ?? 'c15t';
|
|
407
|
-
const logFunc = async (level, message, args = [])=>{
|
|
408
|
-
if (!enabled || !shouldPublishLog(logLevel, level)) return;
|
|
409
|
-
await withLogSpan(level, message, args, async ()=>{
|
|
410
|
-
const formattedMessage = formatMessage(level, message, appName);
|
|
411
|
-
if (!loggerOptions || 'function' != typeof loggerOptions.log) {
|
|
412
|
-
if ('error' === level) console.error(formattedMessage, ...args);
|
|
413
|
-
else if ('warn' === level) console.warn(formattedMessage, ...args);
|
|
414
|
-
else if ('info' === level) console.log(formattedMessage, ...args);
|
|
415
|
-
else if ('debug' === level) console.debug(formattedMessage, ...args);
|
|
416
|
-
else if ('success' === level) console.log(formattedMessage, ...args);
|
|
417
|
-
return;
|
|
418
|
-
}
|
|
419
|
-
loggerOptions.log('success' === level ? 'info' : level, message, ...args);
|
|
420
|
-
});
|
|
421
|
-
};
|
|
422
|
-
return Object.fromEntries(levels.map((level)=>[
|
|
423
|
-
level,
|
|
424
|
-
(...[message, ...args])=>logFunc(level, message, args).catch((error)=>{
|
|
425
|
-
console.error('Logger error:', error);
|
|
426
|
-
})
|
|
427
|
-
]));
|
|
428
|
-
};
|
|
429
|
-
createLogger();
|
|
430
298
|
const auditLogSchema = __WEBPACK_EXTERNAL_MODULE_zod__.z.object({
|
|
431
299
|
id: __WEBPACK_EXTERNAL_MODULE_zod__.z.string(),
|
|
432
300
|
entityType: __WEBPACK_EXTERNAL_MODULE_zod__.z.string(),
|
|
@@ -12,7 +12,7 @@ import type { Database, KyselyDatabaseType } from './types';
|
|
|
12
12
|
* - Raw database connections (SQLite, MySQL, PostgreSQL)
|
|
13
13
|
* - Kysely dialect instances
|
|
14
14
|
*
|
|
15
|
-
* @param config - The
|
|
15
|
+
* @param config - The c15t configuration options containing database settings
|
|
16
16
|
* @returns An object containing the initialized Kysely instance and database type
|
|
17
17
|
*
|
|
18
18
|
* @example
|
|
@@ -150,7 +150,7 @@ external_zod_namespaceObject.z.discriminatedUnion('type', [
|
|
|
150
150
|
numberArrayFieldSchema
|
|
151
151
|
]);
|
|
152
152
|
require("neverthrow");
|
|
153
|
-
const
|
|
153
|
+
const server_namespaceObject = require("@orpc/server");
|
|
154
154
|
const error_codes_ERROR_CODES = Object.freeze({
|
|
155
155
|
NOT_FOUND: 'Resource not found',
|
|
156
156
|
BAD_REQUEST: 'Bad request',
|
|
@@ -183,10 +183,10 @@ const ERROR_CATEGORIES = Object.freeze({
|
|
|
183
183
|
});
|
|
184
184
|
const api_namespaceObject = require("@opentelemetry/api");
|
|
185
185
|
api_namespaceObject.trace.getTracer('@doubletie/results');
|
|
186
|
-
class error_class_DoubleTieError extends
|
|
187
|
-
code;
|
|
186
|
+
class error_class_DoubleTieError extends server_namespaceObject.ORPCError {
|
|
188
187
|
category;
|
|
189
188
|
meta;
|
|
189
|
+
statusCode;
|
|
190
190
|
constructor(message, options = {
|
|
191
191
|
code: error_codes_ERROR_CODES.UNKNOWN_ERROR,
|
|
192
192
|
status: 500,
|
|
@@ -194,22 +194,18 @@ class error_class_DoubleTieError extends external_h3_namespaceObject.H3Error {
|
|
|
194
194
|
cause: void 0,
|
|
195
195
|
meta: {}
|
|
196
196
|
}){
|
|
197
|
-
super(
|
|
198
|
-
|
|
197
|
+
super(options.code ?? error_codes_ERROR_CODES.UNKNOWN_ERROR, {
|
|
198
|
+
message,
|
|
199
|
+
cause: options.cause,
|
|
200
|
+
data: options.meta ?? {}
|
|
199
201
|
});
|
|
200
|
-
this.name =
|
|
201
|
-
this.code = options.code ?? error_codes_ERROR_CODES.UNKNOWN_ERROR;
|
|
202
|
-
this.statusCode = options.status ?? 500;
|
|
202
|
+
this.name = 'DoubleTieError';
|
|
203
203
|
this.category = options.category ?? ERROR_CATEGORIES.UNEXPECTED;
|
|
204
204
|
this.meta = options.meta ?? {};
|
|
205
|
-
this.
|
|
206
|
-
code: this.code,
|
|
207
|
-
category: this.category,
|
|
208
|
-
meta: this.meta
|
|
209
|
-
};
|
|
205
|
+
this.statusCode = options.status ?? 500;
|
|
210
206
|
tracing_withSpan('create_doubletie_error', async (span)=>{
|
|
211
207
|
span.setAttributes({
|
|
212
|
-
'error.name': this.name,
|
|
208
|
+
'error.name': this.constructor.name,
|
|
213
209
|
'error.message': message,
|
|
214
210
|
'error.code': this.code,
|
|
215
211
|
'error.status': this.statusCode,
|
|
@@ -229,11 +225,11 @@ class error_class_DoubleTieError extends external_h3_namespaceObject.H3Error {
|
|
|
229
225
|
const validationErrorMessage = this.meta?.validationErrors ? String(this.meta.validationErrors) : void 0;
|
|
230
226
|
const stackTrace = this.stack ? this.stack.split('\n').map((line)=>line.trim()).filter((line)=>line && !line.includes('Error: ')) : [];
|
|
231
227
|
return {
|
|
232
|
-
|
|
228
|
+
code: this.code,
|
|
233
229
|
message: validationErrorMessage || this.message,
|
|
234
|
-
|
|
230
|
+
status: this.statusCode,
|
|
231
|
+
defined: true,
|
|
235
232
|
data: {
|
|
236
|
-
code: this.code,
|
|
237
233
|
category: this.category,
|
|
238
234
|
meta: this.meta,
|
|
239
235
|
...'production' === process.env.NODE_ENV ? {} : {
|
|
@@ -284,7 +280,9 @@ class error_class_DoubleTieError extends external_h3_namespaceObject.H3Error {
|
|
|
284
280
|
const ErrorSubclass = class extends error_class_DoubleTieError {
|
|
285
281
|
constructor(message, options){
|
|
286
282
|
super(message, options);
|
|
287
|
-
this
|
|
283
|
+
Object.defineProperty(this, 'name', {
|
|
284
|
+
value: name
|
|
285
|
+
});
|
|
288
286
|
}
|
|
289
287
|
};
|
|
290
288
|
Object.defineProperty(ErrorSubclass, 'name', {
|
|
@@ -301,137 +299,7 @@ class error_class_DoubleTieError extends external_h3_namespaceObject.H3Error {
|
|
|
301
299
|
return formattedMessage;
|
|
302
300
|
}
|
|
303
301
|
}
|
|
304
|
-
|
|
305
|
-
reset: '\x1b[0m',
|
|
306
|
-
bright: '\x1b[1m',
|
|
307
|
-
dim: '\x1b[2m',
|
|
308
|
-
underscore: '\x1b[4m',
|
|
309
|
-
blink: '\x1b[5m',
|
|
310
|
-
reverse: '\x1b[7m',
|
|
311
|
-
hidden: '\x1b[8m',
|
|
312
|
-
fg: {
|
|
313
|
-
black: '\x1b[30m',
|
|
314
|
-
red: '\x1b[31m',
|
|
315
|
-
green: '\x1b[32m',
|
|
316
|
-
yellow: '\x1b[33m',
|
|
317
|
-
blue: '\x1b[34m',
|
|
318
|
-
magenta: '\x1b[35m',
|
|
319
|
-
cyan: '\x1b[36m',
|
|
320
|
-
white: '\x1b[37m'
|
|
321
|
-
},
|
|
322
|
-
bg: {
|
|
323
|
-
black: '\x1b[40m',
|
|
324
|
-
red: '\x1b[41m',
|
|
325
|
-
green: '\x1b[42m',
|
|
326
|
-
yellow: '\x1b[43m',
|
|
327
|
-
blue: '\x1b[44m',
|
|
328
|
-
magenta: '\x1b[45m',
|
|
329
|
-
cyan: '\x1b[46m',
|
|
330
|
-
white: '\x1b[47m'
|
|
331
|
-
}
|
|
332
|
-
};
|
|
333
|
-
const levelColors = {
|
|
334
|
-
info: colors.fg.blue,
|
|
335
|
-
success: colors.fg.green,
|
|
336
|
-
warn: colors.fg.yellow,
|
|
337
|
-
error: colors.fg.red,
|
|
338
|
-
debug: colors.fg.magenta
|
|
339
|
-
};
|
|
340
|
-
const formatMessage = (level, message, appName = 'c15t')=>{
|
|
341
|
-
const timestamp = new Date().toISOString();
|
|
342
|
-
return `${colors.dim}${timestamp}${colors.reset} ${levelColors[level]}${level.toUpperCase()}${colors.reset} ${colors.bright}[${appName}]:${colors.reset} ${message}`;
|
|
343
|
-
};
|
|
344
|
-
const levels = [
|
|
345
|
-
'error',
|
|
346
|
-
'warn',
|
|
347
|
-
'info',
|
|
348
|
-
'success',
|
|
349
|
-
'debug'
|
|
350
|
-
];
|
|
351
|
-
function shouldPublishLog(currentLogLevel, logLevel) {
|
|
352
|
-
const currentLevelIndex = levels.indexOf(currentLogLevel);
|
|
353
|
-
const messageLevelIndex = levels.indexOf(logLevel);
|
|
354
|
-
if ('debug' === currentLogLevel) return 'debug' === logLevel;
|
|
355
|
-
return messageLevelIndex <= currentLevelIndex;
|
|
356
|
-
}
|
|
357
|
-
const LOGGER_TRACER_NAME = '@doubletie/logger';
|
|
358
|
-
const LOG_LEVEL_TO_SPAN_STATUS = {
|
|
359
|
-
error: api_namespaceObject.SpanStatusCode.ERROR,
|
|
360
|
-
warn: api_namespaceObject.SpanStatusCode.OK,
|
|
361
|
-
info: api_namespaceObject.SpanStatusCode.OK,
|
|
362
|
-
success: api_namespaceObject.SpanStatusCode.OK,
|
|
363
|
-
debug: api_namespaceObject.SpanStatusCode.OK
|
|
364
|
-
};
|
|
365
|
-
const telemetry_getTracer = (options)=>{
|
|
366
|
-
if (options?.telemetry?.tracer) return options.telemetry.tracer;
|
|
367
|
-
return api_namespaceObject.trace.getTracer(LOGGER_TRACER_NAME);
|
|
368
|
-
};
|
|
369
|
-
const createLogSpan = (level, message, args = [], options)=>{
|
|
370
|
-
if (options?.telemetry?.disabled) return null;
|
|
371
|
-
const tracer = telemetry_getTracer(options);
|
|
372
|
-
const span = tracer.startSpan('log_entry', {
|
|
373
|
-
attributes: {
|
|
374
|
-
'log.level': level,
|
|
375
|
-
'log.message': message,
|
|
376
|
-
'log.has_args': args.length > 0,
|
|
377
|
-
...options?.telemetry?.defaultAttributes || {}
|
|
378
|
-
}
|
|
379
|
-
});
|
|
380
|
-
if (args.length > 0 && 'object' == typeof args[0] && null !== args[0]) {
|
|
381
|
-
const data = args[0];
|
|
382
|
-
for (const [key, value] of Object.entries(data))if (null != value) span.setAttribute(`log.data.${key}`, String(value));
|
|
383
|
-
}
|
|
384
|
-
span.setStatus({
|
|
385
|
-
code: LOG_LEVEL_TO_SPAN_STATUS[level],
|
|
386
|
-
message: 'error' === level || 'warn' === level ? message : void 0
|
|
387
|
-
});
|
|
388
|
-
return span;
|
|
389
|
-
};
|
|
390
|
-
const withLogSpan = async (level, message, args, operation, options)=>{
|
|
391
|
-
const span = createLogSpan(level, message, args, options);
|
|
392
|
-
if (!span) return operation();
|
|
393
|
-
try {
|
|
394
|
-
const result = await operation();
|
|
395
|
-
return result;
|
|
396
|
-
} catch (error) {
|
|
397
|
-
span.setStatus({
|
|
398
|
-
code: api_namespaceObject.SpanStatusCode.ERROR,
|
|
399
|
-
message: error instanceof Error ? error.message : String(error)
|
|
400
|
-
});
|
|
401
|
-
throw error;
|
|
402
|
-
} finally{
|
|
403
|
-
span.end();
|
|
404
|
-
}
|
|
405
|
-
};
|
|
406
|
-
const logger_factory_createLogger = (options)=>{
|
|
407
|
-
if (options && 'object' == typeof options && levels.every((level)=>'function' == typeof options[level])) return options;
|
|
408
|
-
const loggerOptions = options;
|
|
409
|
-
const enabled = loggerOptions?.disabled !== true;
|
|
410
|
-
const logLevel = loggerOptions?.level ?? 'error';
|
|
411
|
-
const appName = loggerOptions?.appName ?? 'c15t';
|
|
412
|
-
const logFunc = async (level, message, args = [])=>{
|
|
413
|
-
if (!enabled || !shouldPublishLog(logLevel, level)) return;
|
|
414
|
-
await withLogSpan(level, message, args, async ()=>{
|
|
415
|
-
const formattedMessage = formatMessage(level, message, appName);
|
|
416
|
-
if (!loggerOptions || 'function' != typeof loggerOptions.log) {
|
|
417
|
-
if ('error' === level) console.error(formattedMessage, ...args);
|
|
418
|
-
else if ('warn' === level) console.warn(formattedMessage, ...args);
|
|
419
|
-
else if ('info' === level) console.log(formattedMessage, ...args);
|
|
420
|
-
else if ('debug' === level) console.debug(formattedMessage, ...args);
|
|
421
|
-
else if ('success' === level) console.log(formattedMessage, ...args);
|
|
422
|
-
return;
|
|
423
|
-
}
|
|
424
|
-
loggerOptions.log('success' === level ? 'info' : level, message, ...args);
|
|
425
|
-
});
|
|
426
|
-
};
|
|
427
|
-
return Object.fromEntries(levels.map((level)=>[
|
|
428
|
-
level,
|
|
429
|
-
(...[message, ...args])=>logFunc(level, message, args).catch((error)=>{
|
|
430
|
-
console.error('Logger error:', error);
|
|
431
|
-
})
|
|
432
|
-
]));
|
|
433
|
-
};
|
|
434
|
-
logger_factory_createLogger();
|
|
302
|
+
require("@doubletie/logger");
|
|
435
303
|
const schema_auditLogSchema = external_zod_namespaceObject.z.object({
|
|
436
304
|
id: external_zod_namespaceObject.z.string(),
|
|
437
305
|
entityType: external_zod_namespaceObject.z.string(),
|