@c15t/backend 0.0.1-rc.10
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 +11 -0
- package/.turbo/turbo-check-types.log +5 -0
- package/.turbo/turbo-fmt.log +7 -0
- package/.turbo/turbo-lint.log +6 -0
- package/.turbo/turbo-test.log +26 -0
- package/README-next.md +223 -0
- package/README.md +164 -0
- package/dist/api/call.d.ts +176 -0
- package/dist/api/call.d.ts.map +1 -0
- package/dist/api/index.d.ts +935 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/middlewares/index.d.ts +39 -0
- package/dist/api/middlewares/index.d.ts.map +1 -0
- package/dist/api/middlewares/origin-check.d.ts +82 -0
- package/dist/api/middlewares/origin-check.d.ts.map +1 -0
- package/dist/api/middlewares/validate-context.d.ts +38 -0
- package/dist/api/middlewares/validate-context.d.ts.map +1 -0
- package/dist/api/routes/__tests__/consent.test.d.ts +2 -0
- package/dist/api/routes/__tests__/consent.test.d.ts.map +1 -0
- package/dist/api/routes/__tests__/status.test.d.ts +2 -0
- package/dist/api/routes/__tests__/status.test.d.ts.map +1 -0
- package/dist/api/routes/error.d.ts +57 -0
- package/dist/api/routes/error.d.ts.map +1 -0
- package/dist/api/routes/generate-consent-receipt.d.ts +130 -0
- package/dist/api/routes/generate-consent-receipt.d.ts.map +1 -0
- package/dist/api/routes/get-consent-history.d.ts +133 -0
- package/dist/api/routes/get-consent-history.d.ts.map +1 -0
- package/dist/api/routes/get-consent-policy.d.ts +164 -0
- package/dist/api/routes/get-consent-policy.d.ts.map +1 -0
- package/dist/api/routes/get-consent.d.ts +148 -0
- package/dist/api/routes/get-consent.d.ts.map +1 -0
- package/dist/api/routes/index.d.ts +339 -0
- package/dist/api/routes/index.d.ts.map +1 -0
- package/dist/api/routes/ok.d.ts +87 -0
- package/dist/api/routes/ok.d.ts.map +1 -0
- package/dist/api/routes/set-consent.d.ts +245 -0
- package/dist/api/routes/set-consent.d.ts.map +1 -0
- package/dist/api/routes/show-consent-banner.d.ts +127 -0
- package/dist/api/routes/show-consent-banner.d.ts.map +1 -0
- package/dist/api/routes/status.d.ts +61 -0
- package/dist/api/routes/status.d.ts.map +1 -0
- package/dist/api/routes/verify-consent.d.ts +179 -0
- package/dist/api/routes/verify-consent.d.ts.map +1 -0
- package/dist/api/routes/withdraw-consent.d.ts +194 -0
- package/dist/api/routes/withdraw-consent.d.ts.map +1 -0
- package/dist/api/to-endpoints.d.ts +35 -0
- package/dist/api/to-endpoints.d.ts.map +1 -0
- package/dist/client/index.cjs +139 -0
- package/dist/client/index.d.ts +203 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +106 -0
- package/dist/client/types.d.ts +431 -0
- package/dist/client/types.d.ts.map +1 -0
- package/dist/core.d.ts +124 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/core.test.d.ts +2 -0
- package/dist/core.test.d.ts.map +1 -0
- package/dist/db/adapters/drizzle-adapter/drizzle-adapter.d.ts +122 -0
- package/dist/db/adapters/drizzle-adapter/drizzle-adapter.d.ts.map +1 -0
- package/dist/db/adapters/drizzle-adapter/index.d.ts +2 -0
- package/dist/db/adapters/drizzle-adapter/index.d.ts.map +1 -0
- package/dist/db/adapters/drizzle.cjs +1531 -0
- package/dist/db/adapters/drizzle.js +1489 -0
- package/dist/db/adapters/kysely-adapter/dialect.d.ts +72 -0
- package/dist/db/adapters/kysely-adapter/dialect.d.ts.map +1 -0
- package/dist/db/adapters/kysely-adapter/index.d.ts +4 -0
- package/dist/db/adapters/kysely-adapter/index.d.ts.map +1 -0
- package/dist/db/adapters/kysely-adapter/kysely-adapter.d.ts +98 -0
- package/dist/db/adapters/kysely-adapter/kysely-adapter.d.ts.map +1 -0
- package/dist/db/adapters/kysely-adapter/types.d.ts +281 -0
- package/dist/db/adapters/kysely-adapter/types.d.ts.map +1 -0
- package/dist/db/adapters/kysely.cjs +1551 -0
- package/dist/db/adapters/kysely.js +1508 -0
- package/dist/db/adapters/memory-adapter/index.d.ts +2 -0
- package/dist/db/adapters/memory-adapter/index.d.ts.map +1 -0
- package/dist/db/adapters/memory-adapter/memory-adapter.d.ts +56 -0
- package/dist/db/adapters/memory-adapter/memory-adapter.d.ts.map +1 -0
- package/dist/db/adapters/memory.cjs +1391 -0
- package/dist/db/adapters/memory.js +1349 -0
- package/dist/db/adapters/prisma-adapter/index.d.ts +2 -0
- package/dist/db/adapters/prisma-adapter/index.d.ts.map +1 -0
- package/dist/db/adapters/prisma-adapter/prisma-adapter.d.ts +143 -0
- package/dist/db/adapters/prisma-adapter/prisma-adapter.d.ts.map +1 -0
- package/dist/db/adapters/prisma.cjs +1503 -0
- package/dist/db/adapters/prisma.js +1461 -0
- package/dist/db/adapters/types.d.ts +154 -0
- package/dist/db/adapters/types.d.ts.map +1 -0
- package/dist/db/adapters/utils.d.ts +36 -0
- package/dist/db/adapters/utils.d.ts.map +1 -0
- package/dist/db/core/fields/field-factory.d.ts +383 -0
- package/dist/db/core/fields/field-factory.d.ts.map +1 -0
- package/dist/db/core/fields/field-inference.d.ts +218 -0
- package/dist/db/core/fields/field-inference.d.ts.map +1 -0
- package/dist/db/core/fields/field-options-integration.d.ts +90 -0
- package/dist/db/core/fields/field-options-integration.d.ts.map +1 -0
- package/dist/db/core/fields/field-types.d.ts +182 -0
- package/dist/db/core/fields/field-types.d.ts.map +1 -0
- package/dist/db/core/fields/id-generator.d.ts +19 -0
- package/dist/db/core/fields/id-generator.d.ts.map +1 -0
- package/dist/db/core/fields/index.d.ts +8 -0
- package/dist/db/core/fields/index.d.ts.map +1 -0
- package/dist/db/core/fields/superjson-utils.d.ts +34 -0
- package/dist/db/core/fields/superjson-utils.d.ts.map +1 -0
- package/dist/db/core/fields/zod-fields.d.ts +1011 -0
- package/dist/db/core/fields/zod-fields.d.ts.map +1 -0
- package/dist/db/core/get-schema.d.ts +36 -0
- package/dist/db/core/get-schema.d.ts.map +1 -0
- package/dist/db/core/types.d.ts +41 -0
- package/dist/db/core/types.d.ts.map +1 -0
- package/dist/db/create-registry.d.ts +760 -0
- package/dist/db/create-registry.d.ts.map +1 -0
- package/dist/db/hooks/create-hooks.d.ts +32 -0
- package/dist/db/hooks/create-hooks.d.ts.map +1 -0
- package/dist/db/hooks/index.d.ts +40 -0
- package/dist/db/hooks/index.d.ts.map +1 -0
- package/dist/db/hooks/types.d.ts +133 -0
- package/dist/db/hooks/types.d.ts.map +1 -0
- package/dist/db/hooks/update-hooks.d.ts +33 -0
- package/dist/db/hooks/update-hooks.d.ts.map +1 -0
- package/dist/db/hooks/update-many-hooks.d.ts +55 -0
- package/dist/db/hooks/update-many-hooks.d.ts.map +1 -0
- package/dist/db/hooks/utils.d.ts +62 -0
- package/dist/db/hooks/utils.d.ts.map +1 -0
- package/dist/db/hooks/with-hooks-factory.d.ts +33 -0
- package/dist/db/hooks/with-hooks-factory.d.ts.map +1 -0
- package/dist/db/index.cjs +2458 -0
- package/dist/db/index.d.ts +11 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +2404 -0
- package/dist/db/migration/get-migration.d.ts +32 -0
- package/dist/db/migration/get-migration.d.ts.map +1 -0
- package/dist/db/migration/get-schema/get-schema.d.ts +27 -0
- package/dist/db/migration/get-schema/get-schema.d.ts.map +1 -0
- package/dist/db/migration/get-schema/index.d.ts +21 -0
- package/dist/db/migration/get-schema/index.d.ts.map +1 -0
- package/dist/db/migration/get-schema/process-fields.d.ts +16 -0
- package/dist/db/migration/get-schema/process-fields.d.ts.map +1 -0
- package/dist/db/migration/get-schema/process-tables.d.ts +13 -0
- package/dist/db/migration/get-schema/process-tables.d.ts.map +1 -0
- package/dist/db/migration/get-schema/types.d.ts +17 -0
- package/dist/db/migration/get-schema/types.d.ts.map +1 -0
- package/dist/db/migration/index.cjs +1613 -0
- package/dist/db/migration/index.d.ts +14 -0
- package/dist/db/migration/index.d.ts.map +1 -0
- package/dist/db/migration/index.js +1571 -0
- package/dist/db/migration/migration-builders.d.ts +28 -0
- package/dist/db/migration/migration-builders.d.ts.map +1 -0
- package/dist/db/migration/migration-execution.d.ts +12 -0
- package/dist/db/migration/migration-execution.d.ts.map +1 -0
- package/dist/db/migration/schema-comparison.d.ts +54 -0
- package/dist/db/migration/schema-comparison.d.ts.map +1 -0
- package/dist/db/migration/type-mapping.d.ts +86 -0
- package/dist/db/migration/type-mapping.d.ts.map +1 -0
- package/dist/db/migration/types.d.ts +37 -0
- package/dist/db/migration/types.d.ts.map +1 -0
- package/dist/db/schema/audit-log/index.d.ts +4 -0
- package/dist/db/schema/audit-log/index.d.ts.map +1 -0
- package/dist/db/schema/audit-log/registry.d.ts +128 -0
- package/dist/db/schema/audit-log/registry.d.ts.map +1 -0
- package/dist/db/schema/audit-log/schema.d.ts +67 -0
- package/dist/db/schema/audit-log/schema.d.ts.map +1 -0
- package/dist/db/schema/audit-log/table.d.ts +175 -0
- package/dist/db/schema/audit-log/table.d.ts.map +1 -0
- package/dist/db/schema/audit-log/types.d.ts +29 -0
- package/dist/db/schema/audit-log/types.d.ts.map +1 -0
- package/dist/db/schema/consent/index.d.ts +4 -0
- package/dist/db/schema/consent/index.d.ts.map +1 -0
- package/dist/db/schema/consent/registry.d.ts +318 -0
- package/dist/db/schema/consent/registry.d.ts.map +1 -0
- package/dist/db/schema/consent/schema.d.ts +135 -0
- package/dist/db/schema/consent/schema.d.ts.map +1 -0
- package/dist/db/schema/consent/table.d.ts +245 -0
- package/dist/db/schema/consent/table.d.ts.map +1 -0
- package/dist/db/schema/consent/types.d.ts +37 -0
- package/dist/db/schema/consent/types.d.ts.map +1 -0
- package/dist/db/schema/consent-geo-location/index.d.ts +4 -0
- package/dist/db/schema/consent-geo-location/index.d.ts.map +1 -0
- package/dist/db/schema/consent-geo-location/registry.d.ts +96 -0
- package/dist/db/schema/consent-geo-location/registry.d.ts.map +1 -0
- package/dist/db/schema/consent-geo-location/schema.d.ts +71 -0
- package/dist/db/schema/consent-geo-location/schema.d.ts.map +1 -0
- package/dist/db/schema/consent-geo-location/table.d.ts +167 -0
- package/dist/db/schema/consent-geo-location/table.d.ts.map +1 -0
- package/dist/db/schema/consent-geo-location/types.d.ts +21 -0
- package/dist/db/schema/consent-geo-location/types.d.ts.map +1 -0
- package/dist/db/schema/consent-policy/index.d.ts +4 -0
- package/dist/db/schema/consent-policy/index.d.ts.map +1 -0
- package/dist/db/schema/consent-policy/registry.d.ts +186 -0
- package/dist/db/schema/consent-policy/registry.d.ts.map +1 -0
- package/dist/db/schema/consent-policy/schema.d.ts +68 -0
- package/dist/db/schema/consent-policy/schema.d.ts.map +1 -0
- package/dist/db/schema/consent-policy/table.d.ts +147 -0
- package/dist/db/schema/consent-policy/table.d.ts.map +1 -0
- package/dist/db/schema/consent-policy/types.d.ts +28 -0
- package/dist/db/schema/consent-policy/types.d.ts.map +1 -0
- package/dist/db/schema/consent-purpose/index.d.ts +4 -0
- package/dist/db/schema/consent-purpose/index.d.ts.map +1 -0
- package/dist/db/schema/consent-purpose/registry.d.ts +136 -0
- package/dist/db/schema/consent-purpose/registry.d.ts.map +1 -0
- package/dist/db/schema/consent-purpose/schema.d.ts +79 -0
- package/dist/db/schema/consent-purpose/schema.d.ts.map +1 -0
- package/dist/db/schema/consent-purpose/table.d.ts +161 -0
- package/dist/db/schema/consent-purpose/table.d.ts.map +1 -0
- package/dist/db/schema/consent-purpose/types.d.ts +16 -0
- package/dist/db/schema/consent-purpose/types.d.ts.map +1 -0
- package/dist/db/schema/consent-purpose-junction/index.d.ts +4 -0
- package/dist/db/schema/consent-purpose-junction/index.d.ts.map +1 -0
- package/dist/db/schema/consent-purpose-junction/registry.d.ts +109 -0
- package/dist/db/schema/consent-purpose-junction/registry.d.ts.map +1 -0
- package/dist/db/schema/consent-purpose-junction/schema.d.ts +57 -0
- package/dist/db/schema/consent-purpose-junction/schema.d.ts.map +1 -0
- package/dist/db/schema/consent-purpose-junction/table.d.ts +138 -0
- package/dist/db/schema/consent-purpose-junction/table.d.ts.map +1 -0
- package/dist/db/schema/consent-purpose-junction/types.d.ts +14 -0
- package/dist/db/schema/consent-purpose-junction/types.d.ts.map +1 -0
- package/dist/db/schema/consent-record/index.d.ts +4 -0
- package/dist/db/schema/consent-record/index.d.ts.map +1 -0
- package/dist/db/schema/consent-record/registry.d.ts +119 -0
- package/dist/db/schema/consent-record/registry.d.ts.map +1 -0
- package/dist/db/schema/consent-record/schema.d.ts +57 -0
- package/dist/db/schema/consent-record/schema.d.ts.map +1 -0
- package/dist/db/schema/consent-record/table.d.ts +123 -0
- package/dist/db/schema/consent-record/table.d.ts.map +1 -0
- package/dist/db/schema/consent-record/types.d.ts +21 -0
- package/dist/db/schema/consent-record/types.d.ts.map +1 -0
- package/dist/db/schema/consent-withdrawal/index.d.ts +4 -0
- package/dist/db/schema/consent-withdrawal/index.d.ts.map +1 -0
- package/dist/db/schema/consent-withdrawal/registry.d.ts +134 -0
- package/dist/db/schema/consent-withdrawal/registry.d.ts.map +1 -0
- package/dist/db/schema/consent-withdrawal/schema.d.ts +67 -0
- package/dist/db/schema/consent-withdrawal/schema.d.ts.map +1 -0
- package/dist/db/schema/consent-withdrawal/table.d.ts +170 -0
- package/dist/db/schema/consent-withdrawal/table.d.ts.map +1 -0
- package/dist/db/schema/consent-withdrawal/types.d.ts +28 -0
- package/dist/db/schema/consent-withdrawal/types.d.ts.map +1 -0
- package/dist/db/schema/definition.d.ts +1100 -0
- package/dist/db/schema/definition.d.ts.map +1 -0
- package/dist/db/schema/domain/index.d.ts +4 -0
- package/dist/db/schema/domain/index.d.ts.map +1 -0
- package/dist/db/schema/domain/registry.d.ts +169 -0
- package/dist/db/schema/domain/registry.d.ts.map +1 -0
- package/dist/db/schema/domain/schema.d.ts +60 -0
- package/dist/db/schema/domain/schema.d.ts.map +1 -0
- package/dist/db/schema/domain/table.d.ts +140 -0
- package/dist/db/schema/domain/table.d.ts.map +1 -0
- package/dist/db/schema/domain/types.d.ts +27 -0
- package/dist/db/schema/domain/types.d.ts.map +1 -0
- package/dist/db/schema/geo-location/index.d.ts +4 -0
- package/dist/db/schema/geo-location/index.d.ts.map +1 -0
- package/dist/db/schema/geo-location/registry.d.ts +114 -0
- package/dist/db/schema/geo-location/registry.d.ts.map +1 -0
- package/dist/db/schema/geo-location/schema.d.ts +58 -0
- package/dist/db/schema/geo-location/schema.d.ts.map +1 -0
- package/dist/db/schema/geo-location/table.d.ts +132 -0
- package/dist/db/schema/geo-location/table.d.ts.map +1 -0
- package/dist/db/schema/geo-location/types.d.ts +17 -0
- package/dist/db/schema/geo-location/types.d.ts.map +1 -0
- package/dist/db/schema/index.d.ts +85 -0
- package/dist/db/schema/index.d.ts.map +1 -0
- package/dist/db/schema/parser.d.ts +183 -0
- package/dist/db/schema/parser.d.ts.map +1 -0
- package/dist/db/schema/schemas.d.ts +383 -0
- package/dist/db/schema/schemas.d.ts.map +1 -0
- package/dist/db/schema/subject/index.d.ts +4 -0
- package/dist/db/schema/subject/index.d.ts.map +1 -0
- package/dist/db/schema/subject/registry.d.ts +141 -0
- package/dist/db/schema/subject/registry.d.ts.map +1 -0
- package/dist/db/schema/subject/schema.d.ts +56 -0
- package/dist/db/schema/subject/schema.d.ts.map +1 -0
- package/dist/db/schema/subject/table.d.ts +136 -0
- package/dist/db/schema/subject/table.d.ts.map +1 -0
- package/dist/db/schema/subject/types.d.ts +22 -0
- package/dist/db/schema/subject/types.d.ts.map +1 -0
- package/dist/db/schema/types.d.ts +136 -0
- package/dist/db/schema/types.d.ts.map +1 -0
- package/dist/db/utils/adapter-factory.d.ts +21 -0
- package/dist/db/utils/adapter-factory.d.ts.map +1 -0
- package/dist/db/utils/index.d.ts +10 -0
- package/dist/db/utils/index.d.ts.map +1 -0
- package/dist/db/utils.d.ts +4 -0
- package/dist/db/utils.d.ts.map +1 -0
- package/dist/error/codes.cjs +68 -0
- package/dist/error/codes.d.ts +175 -0
- package/dist/error/codes.d.ts.map +1 -0
- package/dist/error/codes.js +35 -0
- package/dist/error/error.d.ts +79 -0
- package/dist/error/error.d.ts.map +1 -0
- package/dist/error/index.cjs +172 -0
- package/dist/error/index.d.ts +9 -0
- package/dist/error/index.d.ts.map +1 -0
- package/dist/error/index.js +129 -0
- package/dist/error/logging.d.ts +25 -0
- package/dist/error/logging.d.ts.map +1 -0
- package/dist/error/pipeline.d.ts +19 -0
- package/dist/error/pipeline.d.ts.map +1 -0
- package/dist/error/recovery.d.ts +22 -0
- package/dist/error/recovery.d.ts.map +1 -0
- package/dist/error/results.d.ts +56 -0
- package/dist/error/results.d.ts.map +1 -0
- package/dist/index.cjs +4777 -0
- package/dist/index.d.ts +46 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4708 -0
- package/dist/init.d.ts +52 -0
- package/dist/init.d.ts.map +1 -0
- package/dist/init.test.d.ts +2 -0
- package/dist/init.test.d.ts.map +1 -0
- package/dist/integrations/index.cjs +281 -0
- package/dist/integrations/index.d.ts +7 -0
- package/dist/integrations/index.d.ts.map +1 -0
- package/dist/integrations/index.js +248 -0
- package/dist/integrations/next.cjs +131 -0
- package/dist/integrations/next.d.ts +29 -0
- package/dist/integrations/next.d.ts.map +1 -0
- package/dist/integrations/next.js +99 -0
- package/dist/integrations/react.cjs +182 -0
- package/dist/integrations/react.d.ts +257 -0
- package/dist/integrations/react.d.ts.map +1 -0
- package/dist/integrations/react.js +150 -0
- package/dist/plugins/geo/index.d.ts +2 -0
- package/dist/plugins/geo/index.d.ts.map +1 -0
- package/dist/test/utils.d.ts +65 -0
- package/dist/test/utils.d.ts.map +1 -0
- package/dist/types/api.d.ts +89 -0
- package/dist/types/api.d.ts.map +1 -0
- package/dist/types/context.d.ts +205 -0
- package/dist/types/context.d.ts.map +1 -0
- package/dist/types/helper.d.ts +78 -0
- package/dist/types/helper.d.ts.map +1 -0
- package/dist/types/index.cjs +19 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +0 -0
- package/dist/types/options.d.ts +172 -0
- package/dist/types/options.d.ts.map +1 -0
- package/dist/types/plugins.d.ts +442 -0
- package/dist/types/plugins.d.ts.map +1 -0
- package/dist/utils/env.d.ts +77 -0
- package/dist/utils/env.d.ts.map +1 -0
- package/dist/utils/hide-metadata.d.ts +22 -0
- package/dist/utils/hide-metadata.d.ts.map +1 -0
- package/dist/utils/index.cjs +268 -0
- package/dist/utils/index.d.ts +18 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +210 -0
- package/dist/utils/ip.d.ts +10 -0
- package/dist/utils/ip.d.ts.map +1 -0
- package/dist/utils/json.d.ts +14 -0
- package/dist/utils/json.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +108 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/url.d.ts +87 -0
- package/dist/utils/url.d.ts.map +1 -0
- package/dist/utils/wildcard.d.ts +46 -0
- package/dist/utils/wildcard.d.ts.map +1 -0
- package/knip.json +37 -0
- package/package.json +146 -0
- package/rslib.config.ts +104 -0
- package/src/api/call.ts +177 -0
- package/src/api/index.ts +303 -0
- package/src/api/middlewares/index.ts +38 -0
- package/src/api/middlewares/origin-check.ts +260 -0
- package/src/api/middlewares/validate-context.ts +175 -0
- package/src/api/routes/__tests__/consent.test.ts +270 -0
- package/src/api/routes/__tests__/status.test.ts +36 -0
- package/src/api/routes/error.ts +130 -0
- package/src/api/routes/generate-consent-receipt.ts +244 -0
- package/src/api/routes/get-consent-history.ts +128 -0
- package/src/api/routes/get-consent-policy.ts +327 -0
- package/src/api/routes/get-consent.ts +230 -0
- package/src/api/routes/index.ts +12 -0
- package/src/api/routes/ok.ts +45 -0
- package/src/api/routes/set-consent.ts +328 -0
- package/src/api/routes/show-consent-banner.ts +149 -0
- package/src/api/routes/status.ts +62 -0
- package/src/api/routes/verify-consent.ts +272 -0
- package/src/api/routes/withdraw-consent.ts +293 -0
- package/src/api/to-endpoints.ts +371 -0
- package/src/client/index.ts +471 -0
- package/src/client/types.ts +458 -0
- package/src/core.test.ts +303 -0
- package/src/core.ts +267 -0
- package/src/db/adapters/drizzle-adapter/drizzle-adapter.ts +711 -0
- package/src/db/adapters/drizzle-adapter/index.ts +1 -0
- package/src/db/adapters/kysely-adapter/dialect.ts +192 -0
- package/src/db/adapters/kysely-adapter/index.ts +3 -0
- package/src/db/adapters/kysely-adapter/kysely-adapter.ts +1168 -0
- package/src/db/adapters/kysely-adapter/types.ts +307 -0
- package/src/db/adapters/memory-adapter/index.ts +1 -0
- package/src/db/adapters/memory-adapter/memory-adapter.ts +648 -0
- package/src/db/adapters/prisma-adapter/index.ts +1 -0
- package/src/db/adapters/prisma-adapter/prisma-adapter.ts +586 -0
- package/src/db/adapters/types.ts +203 -0
- package/src/db/adapters/utils.ts +51 -0
- package/src/db/core/fields/field-factory.ts +804 -0
- package/src/db/core/fields/field-inference.ts +298 -0
- package/src/db/core/fields/field-options-integration.ts +135 -0
- package/src/db/core/fields/field-types.ts +233 -0
- package/src/db/core/fields/id-generator.ts +57 -0
- package/src/db/core/fields/index.ts +56 -0
- package/src/db/core/fields/superjson-utils.ts +155 -0
- package/src/db/core/fields/zod-fields.ts +269 -0
- package/src/db/core/get-schema.ts +102 -0
- package/src/db/core/types.ts +52 -0
- package/src/db/create-registry.ts +31 -0
- package/src/db/hooks/create-hooks.ts +88 -0
- package/src/db/hooks/index.ts +39 -0
- package/src/db/hooks/types.ts +164 -0
- package/src/db/hooks/update-hooks.ts +91 -0
- package/src/db/hooks/update-many-hooks.ts +176 -0
- package/src/db/hooks/utils.ts +151 -0
- package/src/db/hooks/with-hooks-factory.ts +68 -0
- package/src/db/index.ts +32 -0
- package/src/db/migration/get-migration.ts +89 -0
- package/src/db/migration/get-schema/get-schema.ts +44 -0
- package/src/db/migration/get-schema/index.ts +20 -0
- package/src/db/migration/get-schema/process-fields.ts +66 -0
- package/src/db/migration/get-schema/process-tables.ts +68 -0
- package/src/db/migration/get-schema/types.ts +18 -0
- package/src/db/migration/index.ts +18 -0
- package/src/db/migration/migration-builders.ts +170 -0
- package/src/db/migration/migration-execution.ts +79 -0
- package/src/db/migration/schema-comparison.ts +216 -0
- package/src/db/migration/type-mapping.ts +255 -0
- package/src/db/migration/types.ts +46 -0
- package/src/db/schema/audit-log/index.ts +3 -0
- package/src/db/schema/audit-log/registry.ts +228 -0
- package/src/db/schema/audit-log/schema.ts +46 -0
- package/src/db/schema/audit-log/table.ts +185 -0
- package/src/db/schema/audit-log/types.ts +29 -0
- package/src/db/schema/consent/index.ts +3 -0
- package/src/db/schema/consent/registry.ts +381 -0
- package/src/db/schema/consent/schema.ts +65 -0
- package/src/db/schema/consent/table.ts +220 -0
- package/src/db/schema/consent/types.ts +39 -0
- package/src/db/schema/consent-geo-location/index.ts +3 -0
- package/src/db/schema/consent-geo-location/registry.ts +124 -0
- package/src/db/schema/consent-geo-location/schema.ts +51 -0
- package/src/db/schema/consent-geo-location/table.ts +169 -0
- package/src/db/schema/consent-geo-location/types.ts +21 -0
- package/src/db/schema/consent-policy/index.ts +3 -0
- package/src/db/schema/consent-policy/registry.ts +313 -0
- package/src/db/schema/consent-policy/schema.ts +47 -0
- package/src/db/schema/consent-policy/table.ts +141 -0
- package/src/db/schema/consent-policy/types.ts +28 -0
- package/src/db/schema/consent-purpose/index.ts +3 -0
- package/src/db/schema/consent-purpose/registry.ts +188 -0
- package/src/db/schema/consent-purpose/schema.ts +58 -0
- package/src/db/schema/consent-purpose/table.ts +154 -0
- package/src/db/schema/consent-purpose/types.ts +16 -0
- package/src/db/schema/consent-purpose-junction/index.ts +3 -0
- package/src/db/schema/consent-purpose-junction/registry.ts +189 -0
- package/src/db/schema/consent-purpose-junction/schema.ts +49 -0
- package/src/db/schema/consent-purpose-junction/table.ts +142 -0
- package/src/db/schema/consent-purpose-junction/types.ts +14 -0
- package/src/db/schema/consent-record/index.ts +3 -0
- package/src/db/schema/consent-record/registry.ts +209 -0
- package/src/db/schema/consent-record/schema.ts +42 -0
- package/src/db/schema/consent-record/table.ts +124 -0
- package/src/db/schema/consent-record/types.ts +21 -0
- package/src/db/schema/consent-withdrawal/index.ts +3 -0
- package/src/db/schema/consent-withdrawal/registry.ts +219 -0
- package/src/db/schema/consent-withdrawal/schema.ts +48 -0
- package/src/db/schema/consent-withdrawal/table.ts +181 -0
- package/src/db/schema/consent-withdrawal/types.ts +29 -0
- package/src/db/schema/definition.ts +196 -0
- package/src/db/schema/domain/index.ts +3 -0
- package/src/db/schema/domain/registry.ts +272 -0
- package/src/db/schema/domain/schema.ts +43 -0
- package/src/db/schema/domain/table.ts +137 -0
- package/src/db/schema/domain/types.ts +27 -0
- package/src/db/schema/geo-location/index.ts +3 -0
- package/src/db/schema/geo-location/registry.ts +159 -0
- package/src/db/schema/geo-location/schema.ts +45 -0
- package/src/db/schema/geo-location/table.ts +148 -0
- package/src/db/schema/geo-location/types.ts +18 -0
- package/src/db/schema/index.ts +96 -0
- package/src/db/schema/parser.ts +417 -0
- package/src/db/schema/schemas.ts +35 -0
- package/src/db/schema/subject/index.ts +3 -0
- package/src/db/schema/subject/registry.ts +371 -0
- package/src/db/schema/subject/schema.ts +41 -0
- package/src/db/schema/subject/table.ts +139 -0
- package/src/db/schema/subject/types.ts +22 -0
- package/src/db/schema/types.ts +154 -0
- package/src/db/utils/adapter-factory.ts +64 -0
- package/src/db/utils/index.ts +10 -0
- package/src/db/utils.ts +42 -0
- package/src/docs/ADVANCED_JSON_HANDLING.md +99 -0
- package/src/docs/neverthrow.md +171 -0
- package/src/error/codes.ts +201 -0
- package/src/error/error.ts +145 -0
- package/src/error/index.ts +23 -0
- package/src/error/logging.ts +52 -0
- package/src/error/pipeline.ts +57 -0
- package/src/error/recovery.ts +45 -0
- package/src/error/results.ts +100 -0
- package/src/index.ts +79 -0
- package/src/init.test.ts +235 -0
- package/src/init.ts +261 -0
- package/src/integrations/index.ts +10 -0
- package/src/integrations/next.ts +136 -0
- package/src/integrations/react.ts +567 -0
- package/src/plugins/geo/index.ts +563 -0
- package/src/test/utils.ts +244 -0
- package/src/types/api.ts +101 -0
- package/src/types/context.ts +235 -0
- package/src/types/helper.ts +87 -0
- package/src/types/index.ts +5 -0
- package/src/types/options.ts +189 -0
- package/src/types/plugins.ts +538 -0
- package/src/utils/env.ts +103 -0
- package/src/utils/hide-metadata.ts +21 -0
- package/src/utils/index.ts +17 -0
- package/src/utils/ip.ts +45 -0
- package/src/utils/json.ts +19 -0
- package/src/utils/logger.ts +252 -0
- package/src/utils/url.ts +194 -0
- package/src/utils/wildcard.ts +253 -0
- package/tsconfig.json +12 -0
- package/vitest.config.ts +14 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the available log severity levels
|
|
3
|
+
*
|
|
4
|
+
* These levels determine the priority and visibility of log messages.
|
|
5
|
+
* The order from highest to lowest severity is typically:
|
|
6
|
+
* error > warn > info > success > debug
|
|
7
|
+
*/
|
|
8
|
+
export type LogLevel = 'info' | 'success' | 'warn' | 'error' | 'debug';
|
|
9
|
+
/**
|
|
10
|
+
* Array of all available log levels in order of importance
|
|
11
|
+
*
|
|
12
|
+
* This const array ensures type safety when working with log levels
|
|
13
|
+
* and provides a reference for level comparisons.
|
|
14
|
+
*/
|
|
15
|
+
export declare const levels: readonly ["info", "success", "warn", "error", "debug"];
|
|
16
|
+
/**
|
|
17
|
+
* Determines if a log message should be published based on configured log level
|
|
18
|
+
*
|
|
19
|
+
* @param currentLogLevel - The configured log level threshold for the logger
|
|
20
|
+
* @param logLevel - The level of the message being evaluated
|
|
21
|
+
* @returns Boolean indicating whether the message should be published
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* // Only publish if error level is at or above the current log level
|
|
26
|
+
* if (shouldPublishLog('warn', 'error')) {
|
|
27
|
+
* // This will return true as error is more severe than warn
|
|
28
|
+
* }
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare function shouldPublishLog(currentLogLevel: LogLevel, logLevel: LogLevel): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Configuration interface for logger instances
|
|
34
|
+
*
|
|
35
|
+
* Provides options to customize logger behavior including
|
|
36
|
+
* disabling logs, setting log levels, and custom log handlers.
|
|
37
|
+
*/
|
|
38
|
+
export interface Logger {
|
|
39
|
+
/**
|
|
40
|
+
* Whether logging is disabled
|
|
41
|
+
*
|
|
42
|
+
* When true, no logs will be published regardless of log level
|
|
43
|
+
*/
|
|
44
|
+
disabled?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* The minimum log level to publish
|
|
47
|
+
*
|
|
48
|
+
* Only logs with this level or higher severity will be published
|
|
49
|
+
* Note that 'success' is excluded as it's typically handled as 'info'
|
|
50
|
+
*/
|
|
51
|
+
level?: Exclude<LogLevel, 'success'>;
|
|
52
|
+
/**
|
|
53
|
+
* Custom log handler function
|
|
54
|
+
*
|
|
55
|
+
* When provided, this function will be called instead of console methods
|
|
56
|
+
*
|
|
57
|
+
* @param level - The severity level of the log message
|
|
58
|
+
* @param message - The message to log
|
|
59
|
+
* @param args - Additional data to include in the log
|
|
60
|
+
*/
|
|
61
|
+
log?: (level: Exclude<LogLevel, 'success'>, message: string, ...args: unknown[]) => void;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Type representing the parameters for log handlers
|
|
65
|
+
*
|
|
66
|
+
* This utility type extracts parameter types from the Logger.log function,
|
|
67
|
+
* excluding the first parameter (log level).
|
|
68
|
+
*/
|
|
69
|
+
export type LogHandlerParams = Parameters<NonNullable<Logger['log']>> extends [
|
|
70
|
+
LogLevel,
|
|
71
|
+
...infer Rest
|
|
72
|
+
] ? Rest : never;
|
|
73
|
+
/**
|
|
74
|
+
* Creates a configured logger instance with methods for each log level
|
|
75
|
+
*
|
|
76
|
+
* @param options - Configuration options for the logger
|
|
77
|
+
* @returns An object with methods for each log level
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```ts
|
|
81
|
+
* // Create a logger that only shows warnings and errors
|
|
82
|
+
* const logger = createLogger({ level: 'warn' });
|
|
83
|
+
*
|
|
84
|
+
* // These will be output
|
|
85
|
+
* logger.error('This is an error');
|
|
86
|
+
* logger.warn('This is a warning');
|
|
87
|
+
*
|
|
88
|
+
* // These will be suppressed
|
|
89
|
+
* logger.info('This info won\'t be shown');
|
|
90
|
+
* logger.debug('This debug message won\'t be shown');
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
export declare const createLogger: (options?: Logger) => Record<LogLevel, (...params: LogHandlerParams) => void>;
|
|
94
|
+
/**
|
|
95
|
+
* Default logger instance with standard configuration
|
|
96
|
+
*
|
|
97
|
+
* Ready-to-use logger with default settings (logs errors only)
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```ts
|
|
101
|
+
* import { logger } from './logger';
|
|
102
|
+
*
|
|
103
|
+
* logger.error('Something went wrong');
|
|
104
|
+
* logger.info('This won\'t be shown with default settings');
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
export declare const logger: Record<LogLevel, (message: string, ...args: unknown[]) => void>;
|
|
108
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAEvE;;;;;GAKG;AACH,eAAO,MAAM,MAAM,wDAAyD,CAAC;AAE7E;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAC/B,eAAe,EAAE,QAAQ,EACzB,QAAQ,EAAE,QAAQ,GAChB,OAAO,CAET;AAED;;;;;GAKG;AACH,MAAM,WAAW,MAAM;IACtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAErC;;;;;;;;OAQG;IACH,GAAG,CAAC,EAAE,CACL,KAAK,EAAE,OAAO,CAAC,QAAQ,EAAE,SAAS,CAAC,EACnC,OAAO,EAAE,MAAM,EACf,GAAG,IAAI,EAAE,OAAO,EAAE,KACd,IAAI,CAAC;CACV;AAED;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS;IAC7E,QAAQ;IACR,GAAG,MAAM,IAAI;CACb,GACE,IAAI,GACJ,KAAK,CAAC;AAsET;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,YAAY,GACxB,UAAU,MAAM,KACd,MAAM,CAAC,QAAQ,EAAE,CAAC,GAAG,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAwDxD,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,MAAM,4DAvEkC,IAAI,CAuErB,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Determines the base URL for API requests
|
|
3
|
+
*
|
|
4
|
+
* Attempts to derive a base URL from multiple sources in the following order:
|
|
5
|
+
* 1. The provided URL parameter
|
|
6
|
+
* 2. Various environment variables
|
|
7
|
+
* 3. Current window location (if in browser)
|
|
8
|
+
*
|
|
9
|
+
* @param url - Optional explicit URL to use
|
|
10
|
+
* @param path - Optional path to append to the URL if it doesn't have one
|
|
11
|
+
* @returns The determined base URL or undefined if unable to determine
|
|
12
|
+
*
|
|
13
|
+
* @throws {C15TError} When the provided URL is invalid
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* // Get the base URL with default path ('/api/auth')
|
|
18
|
+
* const baseUrl = getBaseURL();
|
|
19
|
+
*
|
|
20
|
+
* // Get the base URL with custom path
|
|
21
|
+
* const apiUrl = getBaseURL(undefined, '/api/v2');
|
|
22
|
+
*
|
|
23
|
+
* // Use an explicit URL
|
|
24
|
+
* const customUrl = getBaseURL('https://example.com');
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare function getBaseURL(url?: string, path?: string): string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Extracts the origin component from a URL
|
|
30
|
+
*
|
|
31
|
+
* @param url - The URL to extract the origin from
|
|
32
|
+
* @returns The origin of the URL or null if invalid
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* getOrigin('https://example.com/path'); // 'https://example.com'
|
|
37
|
+
* getOrigin('invalid-url'); // null
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare function getOrigin(url: string): string | null;
|
|
41
|
+
/**
|
|
42
|
+
* Extracts the protocol component from a URL
|
|
43
|
+
*
|
|
44
|
+
* @param url - The URL to extract the protocol from
|
|
45
|
+
* @returns The protocol of the URL (including colon) or null if invalid
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* getProtocol('https://example.com'); // 'https:'
|
|
50
|
+
* getProtocol('http://example.com'); // 'http:'
|
|
51
|
+
* getProtocol('invalid-url'); // null
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
export declare function getProtocol(url: string): string | null;
|
|
55
|
+
/**
|
|
56
|
+
* Checks if a string is a valid URL with a protocol
|
|
57
|
+
*
|
|
58
|
+
* Determines if the URL includes a protocol component (e.g., 'http://', 'https://'),
|
|
59
|
+
* which indicates it's a fully qualified URL rather than a relative path.
|
|
60
|
+
*
|
|
61
|
+
* @param url - The URL string to check
|
|
62
|
+
* @returns Boolean indicating whether the URL includes a protocol
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```ts
|
|
66
|
+
* checkURLValidity('https://example.com'); // true
|
|
67
|
+
* checkURLValidity('example.com'); // false (no protocol)
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
export declare const checkURLValidity: (url: string) => boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Extracts the host component from a URL
|
|
73
|
+
*
|
|
74
|
+
* If the URL is a fully qualified URL with a protocol, it parses the host correctly.
|
|
75
|
+
* If not, it assumes the entire string is the host.
|
|
76
|
+
*
|
|
77
|
+
* @param url - The URL to extract the host from
|
|
78
|
+
* @returns The host component of the URL
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```ts
|
|
82
|
+
* getHost('https://example.com/path'); // 'example.com'
|
|
83
|
+
* getHost('example.com'); // 'example.com'
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
export declare function getHost(url: string): string;
|
|
87
|
+
//# sourceMappingURL=url.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../src/utils/url.ts"],"names":[],"mappings":"AA6DA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,UAAU,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,sBAoBrD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,iBAOpC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,iBAOtC;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,YAG3C,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,UAMlC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transforms one or more glob patterns into a RegExp pattern
|
|
3
|
+
*/
|
|
4
|
+
declare function transform(pattern: string | string[], separator?: string | boolean): string;
|
|
5
|
+
export default transform;
|
|
6
|
+
interface WildcardMatchOptions {
|
|
7
|
+
/** Separator to be used to split patterns and samples into segments */
|
|
8
|
+
separator?: string | boolean;
|
|
9
|
+
/** Flags to pass to the RegExp */
|
|
10
|
+
flags?: string;
|
|
11
|
+
}
|
|
12
|
+
interface isMatch {
|
|
13
|
+
/**
|
|
14
|
+
* Tests if a sample string matches the pattern(s)
|
|
15
|
+
*
|
|
16
|
+
* ```js
|
|
17
|
+
* isMatch('foo') //=> true
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
(sample: string): boolean;
|
|
21
|
+
/** Compiled regular expression */
|
|
22
|
+
regexp: RegExp;
|
|
23
|
+
/** Original pattern or array of patterns that was used to compile the RegExp */
|
|
24
|
+
pattern: string | string[];
|
|
25
|
+
/** Options that were used to compile the RegExp */
|
|
26
|
+
options: WildcardMatchOptions;
|
|
27
|
+
}
|
|
28
|
+
declare function isMatch(regexp: RegExp, sample: string): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Compiles one or more glob patterns into a RegExp and returns an isMatch function.
|
|
31
|
+
* The isMatch function takes a sample string as its only argument and returns `true`
|
|
32
|
+
* if the string matches the pattern(s).
|
|
33
|
+
*
|
|
34
|
+
* ```js
|
|
35
|
+
* wildcardMatch('src/*.js')('src/index.js') //=> true
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* ```js
|
|
39
|
+
* const isMatch = wildcardMatch('*.example.com', '.')
|
|
40
|
+
* isMatch('foo.example.com') //=> true
|
|
41
|
+
* isMatch('foo.bar.com') //=> false
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
declare function wildcardMatch(pattern: string | string[], options?: string | boolean | WildcardMatchOptions): isMatch;
|
|
45
|
+
export { wildcardMatch, type isMatch };
|
|
46
|
+
//# sourceMappingURL=wildcard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wildcard.d.ts","sourceRoot":"","sources":["../../src/utils/wildcard.ts"],"names":[],"mappings":"AAsCA;;GAEG;AACH,iBAAS,SAAS,CACjB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,SAAS,GAAE,MAAM,GAAG,OAAc,GAChC,MAAM,CAyGR;AAED,eAAe,SAAS,CAAC;AAEzB,UAAU,oBAAoB;IAC7B,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAE7B,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAID,UAAU,OAAO;IAChB;;;;;;OAMG;IACH,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;IAE1B,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;IAEf,gFAAgF;IAChF,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE3B,mDAAmD;IACnD,OAAO,EAAE,oBAAoB,CAAC;CAC9B;AAED,iBAAS,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,WAM9C;AAED;;;;;;;;;;;;;;GAcG;AACH,iBAAS,aAAa,CACrB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,oBAAoB,WA0CjD;AAED,OAAO,EAAE,aAAa,EAAE,KAAK,OAAO,EAAE,CAAC"}
|
package/knip.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://unpkg.com/knip@latest/schema.json",
|
|
3
|
+
"entry": [
|
|
4
|
+
"./src/index.ts",
|
|
5
|
+
"./src/core.ts",
|
|
6
|
+
"./src/init.ts",
|
|
7
|
+
"./src/types/index.ts",
|
|
8
|
+
"./src/utils/index.ts",
|
|
9
|
+
"./src/client/index.ts",
|
|
10
|
+
"./src/db/adapters/prisma-adapter/index.ts",
|
|
11
|
+
"./src/db/adapters/drizzle-adapter/index.ts",
|
|
12
|
+
"./src/db/adapters/memory-adapter/index.ts",
|
|
13
|
+
"./src/error/index.ts",
|
|
14
|
+
"./src/error/codes.ts",
|
|
15
|
+
"./src/integrations/index.ts",
|
|
16
|
+
"./src/integrations/next.ts",
|
|
17
|
+
"./src/integrations/react.ts",
|
|
18
|
+
"./src/db/index.ts",
|
|
19
|
+
"./src/plugins/index.ts"
|
|
20
|
+
],
|
|
21
|
+
"project": "**/*.{js,ts,jsx,tsx}",
|
|
22
|
+
"ignoreDependencies": [
|
|
23
|
+
"typescript",
|
|
24
|
+
"@c15t/typescript-config",
|
|
25
|
+
"@better-fetch/fetch",
|
|
26
|
+
"drizzle-orm"
|
|
27
|
+
],
|
|
28
|
+
"ignoreBinaries": ["biome", "rslib"],
|
|
29
|
+
"ignore": ["**/*.spec.{js,ts}", "**/*.test.{js,ts}"],
|
|
30
|
+
"rules": {
|
|
31
|
+
"exports": "warn",
|
|
32
|
+
"types": "warn",
|
|
33
|
+
"dependencies": "error",
|
|
34
|
+
"files": "warn"
|
|
35
|
+
},
|
|
36
|
+
"ignoreExportsUsedInFile": true
|
|
37
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@c15t/backend",
|
|
3
|
+
"version": "0.0.1-rc.10",
|
|
4
|
+
"license": "GPL-3.0-only",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"require": "./dist/index.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./types": {
|
|
16
|
+
"types": "./dist/types/index.d.ts",
|
|
17
|
+
"import": "./dist/types/index.js",
|
|
18
|
+
"require": "./dist/types/index.cjs"
|
|
19
|
+
},
|
|
20
|
+
"./utils": {
|
|
21
|
+
"types": "./dist/utils/index.d.ts",
|
|
22
|
+
"import": "./dist/utils/index.js",
|
|
23
|
+
"require": "./dist/utils/index.cjs"
|
|
24
|
+
},
|
|
25
|
+
"./client": {
|
|
26
|
+
"types": "./dist/client/index.d.ts",
|
|
27
|
+
"import": "./dist/client/index.js",
|
|
28
|
+
"require": "./dist/client/index.cjs"
|
|
29
|
+
},
|
|
30
|
+
"./db": {
|
|
31
|
+
"types": "./dist/db/index.d.ts",
|
|
32
|
+
"import": "./dist/db/index.js",
|
|
33
|
+
"require": "./dist/db/index.cjs"
|
|
34
|
+
},
|
|
35
|
+
"./db/migration": {
|
|
36
|
+
"types": "./dist/db/migration/index.d.ts",
|
|
37
|
+
"import": "./dist/db/migration/index.js",
|
|
38
|
+
"require": "./dist/db/migration/index.cjs"
|
|
39
|
+
},
|
|
40
|
+
"./db/adapters/prisma": {
|
|
41
|
+
"import": {
|
|
42
|
+
"types": "./dist/db/adapters/prisma-adapter/index.d.ts",
|
|
43
|
+
"import": "./dist/db/adapters/prisma.js"
|
|
44
|
+
},
|
|
45
|
+
"require": {
|
|
46
|
+
"types": "./dist/db/adapters/prisma-adapter/index.d.ts",
|
|
47
|
+
"default": "./dist/db/adapters/prisma.cjs"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"./db/adapters/drizzle": {
|
|
51
|
+
"import": {
|
|
52
|
+
"types": "./dist/db/adapters/drizzle-adapter/index.d.ts",
|
|
53
|
+
"import": "./dist/db/adapters/drizzle.js"
|
|
54
|
+
},
|
|
55
|
+
"require": {
|
|
56
|
+
"types": "./dist/db/adapters/drizzle-adapter/index.d.ts",
|
|
57
|
+
"default": "./dist/db/adapters/drizzle.cjs"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"./db/adapters/kysely": {
|
|
61
|
+
"import": {
|
|
62
|
+
"types": "./dist/db/adapters/kysely-adapter/index.d.ts",
|
|
63
|
+
"import": "./dist/db/adapters/kysely.js"
|
|
64
|
+
},
|
|
65
|
+
"require": {
|
|
66
|
+
"types": "./dist/db/adapters/kysely-adapter/index.d.ts",
|
|
67
|
+
"default": "./dist/db/adapters/kysely.cjs"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"./db/adapters/memory": {
|
|
71
|
+
"import": {
|
|
72
|
+
"types": "./dist/db/adapters/memory-adapter/index.d.ts",
|
|
73
|
+
"import": "./dist/db/adapters/memory.js"
|
|
74
|
+
},
|
|
75
|
+
"require": {
|
|
76
|
+
"types": "./dist/db/adapters/memory-adapter/index.d.ts",
|
|
77
|
+
"default": "./dist/db/adapters/memory.cjs"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"./plugins/geo": {
|
|
81
|
+
"types": "./dist/plugins/geo.d.ts",
|
|
82
|
+
"import": "./dist/plugins/geo.js",
|
|
83
|
+
"require": "./dist/plugins/geo.cjs"
|
|
84
|
+
},
|
|
85
|
+
"./error": {
|
|
86
|
+
"types": "./dist/error/index.d.ts",
|
|
87
|
+
"import": "./dist/error/index.js",
|
|
88
|
+
"require": "./dist/error/index.cjs"
|
|
89
|
+
},
|
|
90
|
+
"./error/codes": {
|
|
91
|
+
"types": "./dist/error/codes.d.ts",
|
|
92
|
+
"import": "./dist/error/codes.js",
|
|
93
|
+
"require": "./dist/error/codes.cjs"
|
|
94
|
+
},
|
|
95
|
+
"./package.json": "./package.json",
|
|
96
|
+
"./integrations": {
|
|
97
|
+
"types": "./dist/integrations/index.d.ts",
|
|
98
|
+
"import": "./dist/integrations/index.js",
|
|
99
|
+
"require": "./dist/integrations/index.cjs"
|
|
100
|
+
},
|
|
101
|
+
"./integrations/next": {
|
|
102
|
+
"types": "./dist/integrations/next.d.ts",
|
|
103
|
+
"import": "./dist/integrations/next.js",
|
|
104
|
+
"require": "./dist/integrations/next.cjs"
|
|
105
|
+
},
|
|
106
|
+
"./integrations/react": {
|
|
107
|
+
"types": "./dist/integrations/react.d.ts",
|
|
108
|
+
"import": "./dist/integrations/react.js",
|
|
109
|
+
"require": "./dist/integrations/react.cjs"
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"main": "./dist/index.cjs",
|
|
113
|
+
"module": "./dist/index.js",
|
|
114
|
+
"types": "./dist/index.d.ts",
|
|
115
|
+
"scripts": {
|
|
116
|
+
"build": "rslib build",
|
|
117
|
+
"check-types": "tsc --noEmit",
|
|
118
|
+
"dev": "rslib build --watch",
|
|
119
|
+
"fmt": "pnpm biome format --write . && biome check --formatter-enabled=false --linter-enabled=false --organize-imports-enabled=true --write",
|
|
120
|
+
"knip": "knip",
|
|
121
|
+
"lint": "pnpm biome lint ./src",
|
|
122
|
+
"test": "vitest"
|
|
123
|
+
},
|
|
124
|
+
"dependencies": {
|
|
125
|
+
"@better-fetch/fetch": "^1.1.15",
|
|
126
|
+
"base-x": "^5.0.1",
|
|
127
|
+
"better-call": "^1.0.4",
|
|
128
|
+
"better-sqlite3": "^11.8.1",
|
|
129
|
+
"defu": "^6.1.4",
|
|
130
|
+
"drizzle-orm": "^0.40.0",
|
|
131
|
+
"kysely": "^0.27.6",
|
|
132
|
+
"mysql2": "^3.13.0",
|
|
133
|
+
"neverthrow": "^8.2.0",
|
|
134
|
+
"pg": "^8.14.0",
|
|
135
|
+
"superjson": "^2.2.2",
|
|
136
|
+
"zod": "^3.24.2"
|
|
137
|
+
},
|
|
138
|
+
"devDependencies": {
|
|
139
|
+
"@c15t/typescript-config": "workspace:*",
|
|
140
|
+
"@types/better-sqlite3": "^7.6.12",
|
|
141
|
+
"@types/node": "^22.13.10",
|
|
142
|
+
"@types/pg": "^8.11.11",
|
|
143
|
+
"knip": "^5.45.0",
|
|
144
|
+
"typescript": "^5.8.2"
|
|
145
|
+
}
|
|
146
|
+
}
|
package/rslib.config.ts
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { defineConfig } from '@rslib/core';
|
|
2
|
+
|
|
3
|
+
const externals = [
|
|
4
|
+
// Database packages
|
|
5
|
+
'prisma',
|
|
6
|
+
'@prisma/client',
|
|
7
|
+
'better-sqlite3',
|
|
8
|
+
'mongodb',
|
|
9
|
+
'drizzle-orm',
|
|
10
|
+
'bson',
|
|
11
|
+
'mongodb-connection-string-url',
|
|
12
|
+
'@mongodb-js/saslprep',
|
|
13
|
+
'kerberos',
|
|
14
|
+
'@mongodb-js/zstd',
|
|
15
|
+
'@aws-sdk/credential-providers',
|
|
16
|
+
'mongodb-client-encryption',
|
|
17
|
+
|
|
18
|
+
// UI frameworks
|
|
19
|
+
'react',
|
|
20
|
+
'vue',
|
|
21
|
+
'solid-js',
|
|
22
|
+
'solid-js/store',
|
|
23
|
+
'next/headers',
|
|
24
|
+
'$app/environment',
|
|
25
|
+
'@vue/runtime-dom',
|
|
26
|
+
'@vue/runtime-core',
|
|
27
|
+
'@vue/shared',
|
|
28
|
+
'@vue/reactivity',
|
|
29
|
+
'@vue/compiler-dom',
|
|
30
|
+
'@vue/compiler-core',
|
|
31
|
+
'csstype',
|
|
32
|
+
|
|
33
|
+
// Testing libraries
|
|
34
|
+
'vitest',
|
|
35
|
+
'@vitest/runner',
|
|
36
|
+
'@vitest/utils',
|
|
37
|
+
'@vitest/expect',
|
|
38
|
+
'@vitest/snapshot',
|
|
39
|
+
'@vitest/spy',
|
|
40
|
+
'chai',
|
|
41
|
+
'tinyspy',
|
|
42
|
+
|
|
43
|
+
// Utilities and others
|
|
44
|
+
'pathe',
|
|
45
|
+
'std-env',
|
|
46
|
+
'magic-string',
|
|
47
|
+
'pretty-format',
|
|
48
|
+
'p-limit',
|
|
49
|
+
'next/dist/compiled/@edge-runtime/cookies',
|
|
50
|
+
'@babel/types',
|
|
51
|
+
'@babel/parser',
|
|
52
|
+
'punycode',
|
|
53
|
+
];
|
|
54
|
+
|
|
55
|
+
export default defineConfig({
|
|
56
|
+
source: {
|
|
57
|
+
entry: {
|
|
58
|
+
index: ['./src/index.ts'],
|
|
59
|
+
'db/migration/index': ['./src/db/migration/index.ts'],
|
|
60
|
+
'types/index': ['./src/types/index.ts'],
|
|
61
|
+
'utils/index': ['./src/utils/index.ts'],
|
|
62
|
+
'client/index': ['./src/client/index.ts'],
|
|
63
|
+
'db/adapters/prisma': ['./src/db/adapters/prisma-adapter/index.ts'],
|
|
64
|
+
'db/adapters/drizzle': [
|
|
65
|
+
'./src/db/adapters/drizzle-adapter/drizzle-adapter.ts',
|
|
66
|
+
],
|
|
67
|
+
'db/adapters/memory': [
|
|
68
|
+
'./src/db/adapters/memory-adapter/memory-adapter.ts',
|
|
69
|
+
],
|
|
70
|
+
'db/adapters/kysely': [
|
|
71
|
+
'./src/db/adapters/kysely-adapter/kysely-adapter.ts',
|
|
72
|
+
],
|
|
73
|
+
'error/index': ['./src/error/index.ts'],
|
|
74
|
+
'error/codes': ['./src/error/codes.ts'],
|
|
75
|
+
'integrations/index': ['./src/integrations/index.ts'],
|
|
76
|
+
'integrations/next': ['./src/integrations/next.ts'],
|
|
77
|
+
'integrations/react': ['./src/integrations/react.ts'],
|
|
78
|
+
'db/index': ['./src/db/index.ts'],
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
lib: [
|
|
82
|
+
{
|
|
83
|
+
dts: true,
|
|
84
|
+
bundle: true,
|
|
85
|
+
format: 'esm',
|
|
86
|
+
output: {
|
|
87
|
+
externals,
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
dts: true,
|
|
92
|
+
bundle: true,
|
|
93
|
+
format: 'cjs',
|
|
94
|
+
output: {
|
|
95
|
+
externals,
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
output: {
|
|
100
|
+
target: 'node',
|
|
101
|
+
cleanDistPath: true,
|
|
102
|
+
externals,
|
|
103
|
+
},
|
|
104
|
+
});
|