@c15t/backend 1.2.0-canary.9 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/.turbo/turbo-build.log +53 -52
  2. package/CHANGELOG.md +7 -0
  3. package/dist/__tests__/server.test.d.ts +2 -0
  4. package/dist/__tests__/server.test.d.ts.map +1 -0
  5. package/dist/contracts/index.d.ts +1 -1
  6. package/dist/contracts/index.d.ts.map +1 -1
  7. package/dist/contracts.cjs +708 -0
  8. package/dist/contracts.js +661 -0
  9. package/dist/core.cjs +94 -47
  10. package/dist/core.d.ts.map +1 -1
  11. package/dist/core.js +94 -47
  12. package/dist/middleware/openapi/config.d.ts +1 -1
  13. package/dist/middleware/openapi/config.d.ts.map +1 -1
  14. package/dist/pkgs/data-model/index.cjs +57 -39
  15. package/dist/pkgs/data-model/index.js +57 -39
  16. package/dist/pkgs/data-model/schema/index.cjs +57 -39
  17. package/dist/pkgs/data-model/schema/index.js +57 -39
  18. package/dist/router.cjs +3 -1
  19. package/dist/router.js +3 -1
  20. package/dist/schema/consent-policy/registry.d.ts.map +1 -1
  21. package/dist/schema/create-registry.d.ts.map +1 -1
  22. package/dist/schema/index.cjs +57 -39
  23. package/dist/schema/index.js +57 -39
  24. package/package.json +7 -2
  25. package/rslib.config.ts +1 -0
  26. package/src/__tests__/server.test.ts +96 -0
  27. package/src/contracts/index.ts +2 -0
  28. package/src/core.ts +29 -1
  29. package/src/middleware/cors/cors.test.ts +0 -1
  30. package/src/middleware/openapi/config.ts +10 -7
  31. package/src/schema/consent-policy/registry.ts +74 -51
  32. package/.turbo/turbo-fmt.log +0 -7
  33. package/.turbo/turbo-test.log +0 -426
  34. package/coverage/coverage-final.json +0 -88
  35. package/coverage/coverage-summary.json +0 -89
  36. package/coverage/html/backend/index.html +0 -116
  37. package/coverage/html/backend/rslib.config.ts.html +0 -415
  38. package/coverage/html/backend/src/contracts/consent/index.html +0 -161
  39. package/coverage/html/backend/src/contracts/consent/index.ts.html +0 -112
  40. package/coverage/html/backend/src/contracts/consent/post.contract.ts.html +0 -550
  41. package/coverage/html/backend/src/contracts/consent/show-banner.contract.ts.html +0 -220
  42. package/coverage/html/backend/src/contracts/consent/verify.contract.ts.html +0 -463
  43. package/coverage/html/backend/src/contracts/index.html +0 -116
  44. package/coverage/html/backend/src/contracts/index.ts.html +0 -139
  45. package/coverage/html/backend/src/contracts/meta/index.html +0 -131
  46. package/coverage/html/backend/src/contracts/meta/index.ts.html +0 -100
  47. package/coverage/html/backend/src/contracts/meta/status.contract.ts.html +0 -196
  48. package/coverage/html/backend/src/contracts/shared/index.html +0 -116
  49. package/coverage/html/backend/src/contracts/shared/jurisdiction.schema.ts.html +0 -175
  50. package/coverage/html/backend/src/core.ts.html +0 -1342
  51. package/coverage/html/backend/src/handlers/consent/index.html +0 -161
  52. package/coverage/html/backend/src/handlers/consent/index.ts.html +0 -112
  53. package/coverage/html/backend/src/handlers/consent/post.handler.ts.html +0 -904
  54. package/coverage/html/backend/src/handlers/consent/show-banner.handler.ts.html +0 -532
  55. package/coverage/html/backend/src/handlers/consent/verify.handler.ts.html +0 -1000
  56. package/coverage/html/backend/src/handlers/meta/index.html +0 -131
  57. package/coverage/html/backend/src/handlers/meta/index.ts.html +0 -100
  58. package/coverage/html/backend/src/handlers/meta/status.handler.ts.html +0 -226
  59. package/coverage/html/backend/src/index.html +0 -161
  60. package/coverage/html/backend/src/init.ts.html +0 -1018
  61. package/coverage/html/backend/src/middleware/cors/cors.ts.html +0 -661
  62. package/coverage/html/backend/src/middleware/cors/index.html +0 -146
  63. package/coverage/html/backend/src/middleware/cors/is-origin-trusted.ts.html +0 -463
  64. package/coverage/html/backend/src/middleware/cors/process-cors.ts.html +0 -358
  65. package/coverage/html/backend/src/middleware/openapi/config.ts.html +0 -160
  66. package/coverage/html/backend/src/middleware/openapi/handlers.ts.html +0 -481
  67. package/coverage/html/backend/src/middleware/openapi/index.html +0 -131
  68. package/coverage/html/backend/src/pkgs/api-router/hooks/index.html +0 -116
  69. package/coverage/html/backend/src/pkgs/api-router/hooks/processor.ts.html +0 -544
  70. package/coverage/html/backend/src/pkgs/api-router/index.html +0 -116
  71. package/coverage/html/backend/src/pkgs/api-router/telemetry.ts.html +0 -334
  72. package/coverage/html/backend/src/pkgs/api-router/utils/index.html +0 -116
  73. package/coverage/html/backend/src/pkgs/api-router/utils/ip.ts.html +0 -361
  74. package/coverage/html/backend/src/pkgs/data-model/fields/field-factory.ts.html +0 -709
  75. package/coverage/html/backend/src/pkgs/data-model/fields/id-generator.ts.html +0 -256
  76. package/coverage/html/backend/src/pkgs/data-model/fields/index.html +0 -161
  77. package/coverage/html/backend/src/pkgs/data-model/fields/superjson-utils.ts.html +0 -136
  78. package/coverage/html/backend/src/pkgs/data-model/fields/zod-fields.ts.html +0 -496
  79. package/coverage/html/backend/src/pkgs/data-model/hooks/create-hooks.ts.html +0 -349
  80. package/coverage/html/backend/src/pkgs/data-model/hooks/index.html +0 -176
  81. package/coverage/html/backend/src/pkgs/data-model/hooks/update-hooks.ts.html +0 -358
  82. package/coverage/html/backend/src/pkgs/data-model/hooks/update-many-hooks.ts.html +0 -613
  83. package/coverage/html/backend/src/pkgs/data-model/hooks/utils.ts.html +0 -538
  84. package/coverage/html/backend/src/pkgs/data-model/hooks/with-hooks-factory.ts.html +0 -289
  85. package/coverage/html/backend/src/pkgs/db-adapters/adapter-factory.ts.html +0 -289
  86. package/coverage/html/backend/src/pkgs/db-adapters/adapters/drizzle-adapter/drizzle-adapter.ts.html +0 -2203
  87. package/coverage/html/backend/src/pkgs/db-adapters/adapters/drizzle-adapter/index.html +0 -116
  88. package/coverage/html/backend/src/pkgs/db-adapters/adapters/index.html +0 -116
  89. package/coverage/html/backend/src/pkgs/db-adapters/adapters/kysely-adapter/dialect.ts.html +0 -670
  90. package/coverage/html/backend/src/pkgs/db-adapters/adapters/kysely-adapter/index.html +0 -131
  91. package/coverage/html/backend/src/pkgs/db-adapters/adapters/kysely-adapter/kysely-adapter.ts.html +0 -3634
  92. package/coverage/html/backend/src/pkgs/db-adapters/adapters/kysely-adapter/tests/index.html +0 -116
  93. package/coverage/html/backend/src/pkgs/db-adapters/adapters/kysely-adapter/tests/test-utils.ts.html +0 -1417
  94. package/coverage/html/backend/src/pkgs/db-adapters/adapters/memory-adapter/index.html +0 -116
  95. package/coverage/html/backend/src/pkgs/db-adapters/adapters/memory-adapter/memory-adapter.ts.html +0 -2071
  96. package/coverage/html/backend/src/pkgs/db-adapters/adapters/prisma-adapter/index.html +0 -116
  97. package/coverage/html/backend/src/pkgs/db-adapters/adapters/prisma-adapter/prisma-adapter.ts.html +0 -1834
  98. package/coverage/html/backend/src/pkgs/db-adapters/adapters/test.ts.html +0 -316
  99. package/coverage/html/backend/src/pkgs/db-adapters/index.html +0 -131
  100. package/coverage/html/backend/src/pkgs/db-adapters/utils.ts.html +0 -238
  101. package/coverage/html/backend/src/pkgs/migrations/get-migration.ts.html +0 -343
  102. package/coverage/html/backend/src/pkgs/migrations/get-schema/get-schema.ts.html +0 -217
  103. package/coverage/html/backend/src/pkgs/migrations/get-schema/index.html +0 -146
  104. package/coverage/html/backend/src/pkgs/migrations/get-schema/process-fields.ts.html +0 -280
  105. package/coverage/html/backend/src/pkgs/migrations/get-schema/process-tables.ts.html +0 -289
  106. package/coverage/html/backend/src/pkgs/migrations/index.html +0 -176
  107. package/coverage/html/backend/src/pkgs/migrations/migration-builders.ts.html +0 -595
  108. package/coverage/html/backend/src/pkgs/migrations/migration-execution.ts.html +0 -301
  109. package/coverage/html/backend/src/pkgs/migrations/schema-comparison.ts.html +0 -694
  110. package/coverage/html/backend/src/pkgs/migrations/type-mapping.ts.html +0 -817
  111. package/coverage/html/backend/src/pkgs/results/core/error-class.ts.html +0 -976
  112. package/coverage/html/backend/src/pkgs/results/core/error-codes.ts.html +0 -703
  113. package/coverage/html/backend/src/pkgs/results/core/index.html +0 -146
  114. package/coverage/html/backend/src/pkgs/results/core/tracing.ts.html +0 -280
  115. package/coverage/html/backend/src/pkgs/results/create-telemetry-options.ts.html +0 -271
  116. package/coverage/html/backend/src/pkgs/results/index.html +0 -131
  117. package/coverage/html/backend/src/pkgs/results/orpc-error-handler.ts.html +0 -496
  118. package/coverage/html/backend/src/pkgs/results/results/index.html +0 -131
  119. package/coverage/html/backend/src/pkgs/results/results/recovery-utils.ts.html +0 -628
  120. package/coverage/html/backend/src/pkgs/results/results/result-helpers.ts.html +0 -1234
  121. package/coverage/html/backend/src/pkgs/utils/env.ts.html +0 -337
  122. package/coverage/html/backend/src/pkgs/utils/index.html +0 -146
  123. package/coverage/html/backend/src/pkgs/utils/logger.ts.html +0 -199
  124. package/coverage/html/backend/src/pkgs/utils/url.ts.html +0 -400
  125. package/coverage/html/backend/src/router.ts.html +0 -109
  126. package/coverage/html/backend/src/schema/audit-log/index.html +0 -146
  127. package/coverage/html/backend/src/schema/audit-log/registry.ts.html +0 -436
  128. package/coverage/html/backend/src/schema/audit-log/schema.ts.html +0 -223
  129. package/coverage/html/backend/src/schema/audit-log/table.ts.html +0 -640
  130. package/coverage/html/backend/src/schema/consent/index.html +0 -146
  131. package/coverage/html/backend/src/schema/consent/registry.ts.html +0 -616
  132. package/coverage/html/backend/src/schema/consent/schema.ts.html +0 -238
  133. package/coverage/html/backend/src/schema/consent/table.ts.html +0 -748
  134. package/coverage/html/backend/src/schema/consent-policy/index.html +0 -146
  135. package/coverage/html/backend/src/schema/consent-policy/registry.ts.html +0 -1063
  136. package/coverage/html/backend/src/schema/consent-policy/schema.ts.html +0 -265
  137. package/coverage/html/backend/src/schema/consent-policy/table.ts.html +0 -535
  138. package/coverage/html/backend/src/schema/consent-purpose/index.html +0 -146
  139. package/coverage/html/backend/src/schema/consent-purpose/registry.ts.html +0 -589
  140. package/coverage/html/backend/src/schema/consent-purpose/schema.ts.html +0 -259
  141. package/coverage/html/backend/src/schema/consent-purpose/table.ts.html +0 -547
  142. package/coverage/html/backend/src/schema/consent-record/index.html +0 -131
  143. package/coverage/html/backend/src/schema/consent-record/schema.ts.html +0 -211
  144. package/coverage/html/backend/src/schema/consent-record/table.ts.html +0 -457
  145. package/coverage/html/backend/src/schema/create-registry.ts.html +0 -148
  146. package/coverage/html/backend/src/schema/definition.ts.html +0 -685
  147. package/coverage/html/backend/src/schema/domain/index.html +0 -146
  148. package/coverage/html/backend/src/schema/domain/registry.ts.html +0 -973
  149. package/coverage/html/backend/src/schema/domain/schema.ts.html +0 -214
  150. package/coverage/html/backend/src/schema/domain/table.ts.html +0 -496
  151. package/coverage/html/backend/src/schema/index.html +0 -146
  152. package/coverage/html/backend/src/schema/schemas.ts.html +0 -166
  153. package/coverage/html/backend/src/schema/subject/index.html +0 -146
  154. package/coverage/html/backend/src/schema/subject/registry.ts.html +0 -973
  155. package/coverage/html/backend/src/schema/subject/schema.ts.html +0 -208
  156. package/coverage/html/backend/src/schema/subject/table.ts.html +0 -499
  157. package/coverage/html/backend/src/server.ts.html +0 -463
  158. package/coverage/html/backend/src/testing/contract-testing.ts.html +0 -1396
  159. package/coverage/html/backend/src/testing/index.html +0 -116
  160. package/coverage/html/base.css +0 -224
  161. package/coverage/html/block-navigation.js +0 -87
  162. package/coverage/html/favicon.png +0 -0
  163. package/coverage/html/index.html +0 -656
  164. package/coverage/html/prettify.css +0 -1
  165. package/coverage/html/prettify.js +0 -2
  166. package/coverage/html/sort-arrow-sprite.png +0 -0
  167. package/coverage/html/sorter.js +0 -196
@@ -1,426 +0,0 @@
1
-
2
- 
3
- > @c15t/backend@1.2.0-canary.5 test /Users/christopherburns/glados/k/c15t/packages/backend
4
- > vitest run
5
-
6
- [?25l
7
-  RUN  v3.1.1 /Users/christopherburns/glados/k/c15t/packages/backend
8
- Coverage enabled with istanbul
9
-
10
- [?2026h
11
-  ❯ src/middleware/cors/cors.test.ts [queued]
12
-
13
-  Test Files 0 passed (17)
14
-  Tests 0 passed (0)
15
-  Start at 20:21:16
16
-  Duration 506ms
17
- [?2026l[?2026h
18
-  ❯ src/contracts/consent/post.contract.test.ts [queued]
19
-  ❯ src/contracts/consent/show-banner.contract.test.ts [queued]
20
-  ❯ src/contracts/consent/verify.contract.test.ts [queued]
21
-  ❯ src/contracts/meta/status.contract.test.ts [queued]
22
-  ❯ src/middleware/cors/cors.test.ts [queued]
23
-  ❯ src/pkgs/api-router/hooks/__tests__/processor.test.ts 0/6
24
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/postgres.test.ts [queued]
25
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/sqlite.test.ts [queued]
26
-  ❯ src/pkgs/results/__tests__/error-class.test.ts [queued]
27
-  ❯ src/pkgs/results/__tests__/recovery-utils.test.ts [queued]
28
-  ❯ src/pkgs/results/__tests__/result-helpers.test.ts [queued]
29
-
30
-  Test Files 0 passed (17)
31
-  Tests 0 passed (6)
32
-  Start at 20:21:16
33
-  Duration 977ms
34
- [?2026l[?2026h
35
-  ❯ src/contracts/consent/post.contract.test.ts [queued]
36
-  ❯ src/contracts/consent/show-banner.contract.test.ts [queued]
37
-  ❯ src/contracts/consent/verify.contract.test.ts [queued]
38
-  ❯ src/contracts/meta/status.contract.test.ts [queued]
39
-  ❯ src/middleware/cors/cors.test.ts [queued]
40
-  ❯ src/pkgs/api-router/hooks/__tests__/processor.test.ts 1/6
41
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/postgres.test.ts [queued]
42
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/sqlite.test.ts [queued]
43
-  ❯ src/pkgs/results/__tests__/error-class.test.ts [queued]
44
-  ❯ src/pkgs/results/__tests__/recovery-utils.test.ts [queued]
45
-  ❯ src/pkgs/results/__tests__/result-helpers.test.ts [queued]
46
-
47
-  Test Files 0 passed (17)
48
-  Tests 1 passed (6)
49
-  Start at 20:21:16
50
-  Duration 1.12s
51
- [?2026l[?2026h ✓ src/pkgs/api-router/hooks/__tests__/processor.test.ts (6 tests) 26ms
52
-
53
-  ❯ src/contracts/consent/post.contract.test.ts [queued]
54
-  ❯ src/contracts/consent/show-banner.contract.test.ts 1/9
55
-  ❯ src/contracts/consent/verify.contract.test.ts [queued]
56
-  ❯ src/contracts/meta/status.contract.test.ts 0/21
57
-  ❯ src/middleware/cors/cors.test.ts [queued]
58
-  ❯ src/pkgs/api-router/hooks/__tests__/processor.test.ts 6/6
59
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/postgres.test.ts [queued]
60
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/sqlite.test.ts [queued]
61
-  ❯ src/pkgs/results/__tests__/error-class.test.ts [queued]
62
-  ❯ src/pkgs/results/__tests__/recovery-utils.test.ts [queued]
63
-  ❯ src/pkgs/results/__tests__/result-helpers.test.ts [queued]
64
-
65
-  Test Files 1 passed (17)
66
-  Tests 7 passed (36)
67
-  Start at 20:21:16
68
-  Duration 1.45s
69
- [?2026l[?2026h ✓ src/contracts/consent/show-banner.contract.test.ts (9 tests) 7ms
70
- ✓ src/contracts/meta/status.contract.test.ts (21 tests) 10ms
71
-
72
-  ❯ src/contracts/consent/post.contract.test.ts [queued]
73
-  ❯ src/contracts/consent/show-banner.contract.test.ts 9/9
74
-  ❯ src/contracts/consent/verify.contract.test.ts [queued]
75
-  ❯ src/contracts/meta/status.contract.test.ts 21/21
76
-  ❯ src/middleware/cors/cors.test.ts [queued]
77
-  ❯ src/pkgs/api-router/hooks/__tests__/processor.test.ts 6/6
78
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/postgres.test.ts [queued]
79
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/sqlite.test.ts [queued]
80
-  ❯ src/pkgs/results/__tests__/error-class.test.ts 0/12
81
-  ❯ src/pkgs/results/__tests__/recovery-utils.test.ts 0/7
82
-  ❯ src/pkgs/results/__tests__/result-helpers.test.ts [queued]
83
-
84
-  Test Files 3 passed (17)
85
-  Tests 36 passed (55)
86
-  Start at 20:21:16
87
-  Duration 1.55s
88
- [?2026l[?2026h ✓ src/pkgs/results/__tests__/error-class.test.ts (12 tests) 23ms
89
- ✓ src/pkgs/results/__tests__/recovery-utils.test.ts (7 tests) 3ms
90
-
91
-  ❯ src/contracts/consent/post.contract.test.ts [queued]
92
-  ❯ src/contracts/consent/verify.contract.test.ts [queued]
93
-  ❯ src/contracts/meta/status.contract.test.ts 21/21
94
-  ❯ src/handlers/consent/show-banner.handler.test.ts [queued]
95
-  ❯ src/middleware/cors/cors.test.ts [queued]
96
-  ❯ src/middleware/cors/is-origin-trusted.test.ts [queued]
97
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/postgres.test.ts [queued]
98
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/sqlite.test.ts [queued]
99
-  ❯ src/pkgs/results/__tests__/error-class.test.ts 12/12
100
-  ❯ src/pkgs/results/__tests__/recovery-utils.test.ts 7/7
101
-  ❯ src/pkgs/results/__tests__/result-helpers.test.ts 0/11
102
-
103
-  Test Files 5 passed (17)
104
-  Tests 55 passed (66)
105
-  Start at 20:21:16
106
-  Duration 1.89s
107
- [?2026l[?2026h ✓ src/pkgs/results/__tests__/result-helpers.test.ts (11 tests) 5ms
108
-
109
-  ❯ src/contracts/consent/post.contract.test.ts [queued]
110
-  ❯ src/contracts/consent/verify.contract.test.ts [queued]
111
-  ❯ src/handlers/consent/show-banner.handler.test.ts [queued]
112
-  ❯ src/middleware/cors/cors.test.ts [queued]
113
-  ❯ src/middleware/cors/is-origin-trusted.test.ts [queued]
114
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/postgres.test.ts [queued]
115
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/sqlite.test.ts [queued]
116
-  ❯ src/pkgs/results/__tests__/error-class.test.ts 12/12
117
-  ❯ src/pkgs/results/__tests__/neverthrow-integration.test.ts [queued]
118
-  ❯ src/pkgs/results/__tests__/recovery-utils.test.ts 7/7
119
-
120
-  Test Files 6 passed (17)
121
-  Tests 66 passed (66)
122
-  Start at 20:21:16
123
-  Duration 1.99s
124
- [?2026l[?2026h ✓ src/middleware/cors/is-origin-trusted.test.ts (11 tests) 6ms
125
- ✓ src/handlers/consent/show-banner.handler.test.ts (9 tests) 18ms
126
-
127
-  ❯ src/contracts/consent/post.contract.test.ts [queued]
128
-  ❯ src/contracts/consent/verify.contract.test.ts [queued]
129
-  ❯ src/middleware/cors/cors.test.ts [queued]
130
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/postgres.test.ts [queued]
131
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/sqlite.test.ts [queued]
132
-  ❯ src/pkgs/results/__tests__/error-codes.test.ts 1/6
133
-  ❯ src/pkgs/results/__tests__/neverthrow-integration.test.ts [queued]
134
-  ❯ src/pkgs/results/__tests__/recovery-utils.test.ts 7/7
135
-
136
-  Test Files 8 passed (17)
137
-  Tests 87 passed (92)
138
-  Start at 20:21:16
139
-  Duration 2.09s
140
- [?2026l[?2026h ✓ src/pkgs/results/__tests__/error-codes.test.ts (6 tests) 3ms
141
-
142
-  ❯ src/contracts/consent/post.contract.test.ts [queued]
143
-  ❯ src/contracts/consent/verify.contract.test.ts [queued]
144
-  ❯ src/middleware/cors/cors.test.ts [queued]
145
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/postgres.test.ts [queued]
146
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/sqlite.test.ts [queued]
147
-  ❯ src/pkgs/results/__tests__/neverthrow-integration.test.ts 0/5
148
-  ❯ src/pkgs/results/__tests__/recovery-utils.test.ts 7/7
149
-
150
-  Test Files 9 passed (17)
151
-  Tests 92 passed (97)
152
-  Start at 20:21:16
153
-  Duration 2.19s
154
- [?2026l[?2026h ✓ src/pkgs/results/__tests__/neverthrow-integration.test.ts (5 tests) 8ms
155
-
156
-  ❯ src/contracts/consent/index.test.ts [queued]
157
-  ❯ src/contracts/consent/post.contract.test.ts [queued]
158
-  ❯ src/contracts/consent/verify.contract.test.ts [queued]
159
-  ❯ src/contracts/meta/index.test.ts 0/5
160
-  ❯ src/middleware/cors/cors.test.ts [queued]
161
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/postgres.test.ts [queued]
162
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/sqlite.test.ts [queued]
163
-
164
-  Test Files 10 passed (17)
165
-  Tests 97 passed (102)
166
-  Start at 20:21:16
167
-  Duration 2.29s
168
- [?2026l[?2026h ✓ src/contracts/meta/index.test.ts (5 tests) 4ms
169
-
170
-  ❯ src/contracts/consent/index.test.ts [queued]
171
-  ❯ src/contracts/consent/post.contract.test.ts [queued]
172
-  ❯ src/contracts/consent/verify.contract.test.ts 0/17
173
-  ❯ src/middleware/cors/cors.test.ts [queued]
174
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/postgres.test.ts [queued]
175
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/sqlite.test.ts [queued]
176
-
177
-  Test Files 11 passed (17)
178
-  Tests 102 passed (119)
179
-  Start at 20:21:16
180
-  Duration 2.60s
181
- [?2026l[?2026h ✓ src/contracts/consent/verify.contract.test.ts (17 tests) 8ms
182
- ✓ src/contracts/consent/index.test.ts (5 tests) 3ms
183
-
184
-  ❯ src/contracts/consent/post.contract.test.ts 1/41
185
-  ❯ src/middleware/cors/cors.test.ts [queued]
186
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/postgres.test.ts [queued]
187
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/sqlite.test.ts [queued]
188
-
189
-  Test Files 13 passed (17)
190
-  Tests 125 passed (165)
191
-  Start at 20:21:16
192
-  Duration 2.80s
193
- [?2026l[?2026h ✓ src/contracts/consent/post.contract.test.ts (41 tests) 18ms
194
-
195
-  ❯ src/middleware/cors/cors.test.ts [queued]
196
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/postgres.test.ts [queued]
197
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/sqlite.test.ts [queued]
198
-
199
-  Test Files 14 passed (17)
200
-  Tests 165 passed (165)
201
-  Start at 20:21:16
202
-  Duration 2.90s
203
- [?2026l[?2026h
204
-  ❯ src/middleware/cors/cors.test.ts [queued]
205
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/postgres.test.ts 0/9
206
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/sqlite.test.ts [queued]
207
-
208
-  Test Files 14 passed (17)
209
-  Tests 165 passed (174)
210
-  Start at 20:21:16
211
-  Duration 3.10s
212
- [?2026l[?2026hstdout | src/pkgs/db-adapters/adapters/kysely-adapter/tests/sqlite.test.ts > Kysely Adapter Tests > SQLite Tests
213
-  INFO [c15t] Creating table subject with fields: isIdentified, externalId, identityProvider, lastIpAddress, createdAt, updatedAt, subjectTimezone
214
- INFO [c15t] Adding column isIdentified (fieldName: isIdentified) to table subject
215
- INFO [c15t] Adding column externalId (fieldName: externalId) to table subject
216
- INFO [c15t] Adding column identityProvider (fieldName: identityProvider) to table subject
217
- INFO [c15t] Adding column lastIpAddress (fieldName: lastIpAddress) to table subject
218
- INFO [c15t] Adding column createdAt (fieldName: createdAt) to table subject
219
- INFO [c15t] Adding column updatedAt (fieldName: updatedAt) to table subject
220
- INFO [c15t] Adding column subjectTimezone (fieldName: subjectTimezone) to table subject
221
- INFO [c15t] SQL for table subject:
222
- create table "subject" ("id" text not null primary key, "isIdentified" integer not null, "externalId" text, "identityProvider" text, "lastIpAddress" text, "createdAt" date not null, "updatedAt" date not null, "subjectTimezone" text)
223
- INFO [c15t] Creating table consentPurpose with fields: code, name, description, isEssential, dataCategory, legalBasis, isActive, createdAt, updatedAt
224
- INFO [c15t] Adding column code (fieldName: code) to table consentPurpose
225
- INFO [c15t] Adding column name (fieldName: name) to table consentPurpose
226
- INFO [c15t] Adding column description (fieldName: description) to table consentPurpose
227
- INFO [c15t] Adding column isEssential (fieldName: isEssential) to table consentPurpose
228
- INFO [c15t] Adding column dataCategory (fieldName: dataCategory) to table consentPurpose
229
- INFO [c15t] Adding column legalBasis (fieldName: legalBasis) to table consentPurpose
230
- INFO [c15t] Adding column isActive (fieldName: isActive) to table consentPurpose
231
- INFO [c15t] Adding column createdAt (fieldName: createdAt) to table consentPurpose
232
- INFO [c15t] Adding column updatedAt (fieldName: updatedAt) to table consentPurpose
233
- INFO [c15t] SQL for table consentPurpose:
234
- create table "consentPurpose" ("id" text not null primary key, "code" text not null, "name" text not null, "description" text not null, "isEssential" integer not null, "dataCategory" text, "legalBasis" text, "isActive" integer not null, "createdAt" date not null, "updatedAt" date not null)
235
- INFO [c15t] Creating table domain with fields: name, description, allowedOrigins, isVerified, isActive, createdAt, updatedAt
236
- INFO [c15t] Adding column name (fieldName: name) to table domain
237
- INFO [c15t] Adding column description (fieldName: description) to table domain
238
- INFO [c15t] Adding column allowedOrigins (fieldName: allowedOrigins) to table domain
239
- INFO [c15t] Adding column isVerified (fieldName: isVerified) to table domain
240
- INFO [c15t] Adding column isActive (fieldName: isActive) to table domain
241
- INFO [c15t] Adding column createdAt (fieldName: createdAt) to table domain
242
- INFO [c15t] Adding column updatedAt (fieldName: updatedAt) to table domain
243
- INFO [c15t] SQL for table domain:
244
- create table "domain" ("id" text not null primary key, "name" text not null unique, "description" text, "allowedOrigins" text, "isVerified" integer not null, "isActive" integer not null, "createdAt" date not null, "updatedAt" date)
245
- INFO [c15t] Creating table consentPolicy with fields: version, type, name, effectiveDate, expirationDate, content, contentHash, isActive, createdAt
246
- INFO [c15t] Adding column version (fieldName: version) to table consentPolicy
247
- INFO [c15t] Adding column type (fieldName: type) to table consentPolicy
248
- INFO [c15t] Adding column name (fieldName: name) to table consentPolicy
249
- INFO [c15t] Adding column effectiveDate (fieldName: effectiveDate) to table consentPolicy
250
- INFO [c15t] Adding column expirationDate (fieldName: expirationDate) to table consentPolicy
251
- INFO [c15t] Adding column content (fieldName: content) to table consentPolicy
252
- INFO [c15t] Adding column contentHash (fieldName: contentHash) to table consentPolicy
253
- INFO [c15t] Adding column isActive (fieldName: isActive) to table consentPolicy
254
- INFO [c15t] Adding column createdAt (fieldName: createdAt) to table consentPolicy
255
- INFO [c15t] SQL for table consentPolicy:
256
- create table "consentPolicy" ("id" text not null primary key, "version" text not null, "type" text not null, "name" text not null, "effectiveDate" date not null, "expirationDate" date, "content" text not null, "contentHash" text not null, "isActive" integer not null, "createdAt" date not null)
257
- INFO [c15t] Creating table consent with fields: subjectId, domainId, purposeIds, metadata, policyId, ipAddress, userAgent, status, withdrawalReason, givenAt, validUntil, isActive
258
- INFO [c15t] Adding column subjectId (fieldName: subjectId) to table consent
259
- INFO [c15t] Adding column domainId (fieldName: domainId) to table consent
260
- INFO [c15t] Adding column purposeIds (fieldName: purposeIds) to table consent
261
- INFO [c15t] Adding column metadata (fieldName: metadata) to table consent
262
- INFO [c15t] Adding column policyId (fieldName: policyId) to table consent
263
- INFO [c15t] Adding column ipAddress (fieldName: ipAddress) to table consent
264
- INFO [c15t] Adding column userAgent (fieldName: userAgent) to table consent
265
- INFO [c15t] Adding column status (fieldName: status) to table consent
266
- INFO [c15t] Adding column withdrawalReason (fieldName: withdrawalReason) to table consent
267
- INFO [c15t] Adding column givenAt (fieldName: givenAt) to table consent
268
- INFO [c15t] Adding column validUntil (fieldName: validUntil) to table consent
269
- INFO [c15t] Adding column isActive (fieldName: isActive) to table consent
270
- INFO [c15t] SQL for table consent:
271
- create table "consent" ("id" text not null primary key, "subjectId" text not null references "subject" ("id"), "domainId" text not null references "domain" ("id"), "purposeIds" text, "metadata" text, "policyId" text references "consentPolicy" ("id"), "ipAddress" text, "userAgent" text, "status" text not null, "withdrawalReason" text, "givenAt" date not null, "validUntil" date, "isActive" integer not null)
272
- INFO [c15t] Creating table consentRecord with fields: subjectId, consentId, actionType, details, createdAt
273
- INFO [c15t] Adding column subjectId (fieldName: subjectId) to table consentRecord
274
- INFO [c15t] Adding column consentId (fieldName: consentId) to table consentRecord
275
- INFO [c15t] Adding column actionType (fieldName: actionType) to table consentRecord
276
- INFO [c15t] Adding column details (fieldName: details) to table consentRecord
277
- INFO [c15t] Adding column createdAt (fieldName: createdAt) to table consentRecord
278
- INFO [c15t] SQL for table consentRecord:
279
- create table "consentRecord" ("id" text not null primary key, "subjectId" text not null references "subject" ("id"), "consentId" text references "consent" ("id"), "actionType" text not null, "details" text, "createdAt" date not null)
280
- INFO [c15t] Creating table auditLog with fields: entityType, entityId, actionType, subjectId, ipAddress, userAgent, changes, metadata, createdAt, eventTimezone
281
- INFO [c15t] Adding column entityType (fieldName: entityType) to table auditLog
282
- INFO [c15t] Adding column entityId (fieldName: entityId) to table auditLog
283
- INFO [c15t] Adding column actionType (fieldName: actionType) to table auditLog
284
- INFO [c15t] Adding column subjectId (fieldName: subjectId) to table auditLog
285
- INFO [c15t] Adding column ipAddress (fieldName: ipAddress) to table auditLog
286
- INFO [c15t] Adding column userAgent (fieldName: userAgent) to table auditLog
287
- INFO [c15t] Adding column changes (fieldName: changes) to table auditLog
288
- INFO [c15t] Adding column metadata (fieldName: metadata) to table auditLog
289
- INFO [c15t] Adding column createdAt (fieldName: createdAt) to table auditLog
290
- INFO [c15t] Adding column eventTimezone (fieldName: eventTimezone) to table auditLog
291
- INFO [c15t] SQL for table auditLog:
292
- create table "auditLog" ("id" text not null primary key, "entityType" text not null, "entityId" text not null, "actionType" text not null, "subjectId" text references "subject" ("id"), "ipAddress" text, "userAgent" text, "changes" text, "metadata" text, "createdAt" date not null, "eventTimezone" text not null)
293
-
294
- ✓ src/pkgs/db-adapters/adapters/kysely-adapter/tests/sqlite.test.ts (9 tests | 1 skipped) 25ms
295
-
296
-  ❯ src/middleware/cors/cors.test.ts 0/23
297
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/postgres.test.ts 0/9
298
-
299
-  Test Files 15 passed (17)
300
-  Tests 173 passed | 1 skipped (206)
301
-  Start at 20:21:16
302
-  Duration 3.41s
303
- [?2026l[?2026h
304
-  ❯ src/middleware/cors/cors.test.ts 1/23
305
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/postgres.test.ts 0/9
306
-
307
-  Test Files 15 passed (17)
308
-  Tests 174 passed | 1 skipped (206)
309
-  Start at 20:21:16
310
-  Duration 3.52s
311
- [?2026l[?2026h ❯ src/middleware/cors/cors.test.ts (23 tests | 2 failed) 48ms
312
- ✓ C15T CORS Configuration > Wildcard Origin Configuration > should allow any origin when trustedOrigins includes "*" 18ms
313
- ✓ C15T CORS Configuration > Wildcard Origin Configuration > should handle requests without origin header 1ms
314
- ✓ C15T CORS Configuration > Specific Origin Configuration > should allow requests from trusted origins 2ms
315
- ✓ C15T CORS Configuration > Specific Origin Configuration > should deny requests from untrusted origins 1ms
316
- ✓ C15T CORS Configuration > Default Configuration > should use default CORS settings when no trustedOrigins specified 1ms
317
- ✓ C15T CORS Configuration > Preflight Requests > should handle OPTIONS requests correctly 1ms
318
- ✓ C15T CORS Configuration > Method Support > should support all required HTTP methods 2ms
319
- ✓ C15T CORS Configuration > CORS Blocking Scenarios > should block preflight requests from untrusted origins 1ms
320
- ✓ C15T CORS Configuration > CORS Blocking Scenarios > should block actual requests from untrusted origins 1ms
321
- ✓ C15T CORS Configuration > CORS Blocking Scenarios > should handle preflight requests with missing origin header 1ms
322
- ✓ C15T CORS Configuration > CORS Header Requirements > should include all required CORS headers for preflight requests from trusted origins 1ms
323
- ✓ C15T CORS Configuration > CORS Header Requirements > should NOT include CORS headers for preflight requests from untrusted origins 1ms
324
- ✓ C15T CORS Configuration > CORS Header Requirements > should include all required CORS headers for actual requests from trusted origins 1ms
325
- ✓ C15T CORS Configuration > CORS Header Requirements > should NOT include Access-Control-Allow-Origin for actual requests from untrusted origins 1ms
326
- ✓ C15T CORS Configuration > C15T CORS www/non-www Origin Handling > should allow www origin if non-www is trusted 1ms
327
- ✓ C15T CORS Configuration > C15T CORS www/non-www Origin Handling > should allow non-www origin if www is trusted 2ms
328
- ✓ C15T CORS Configuration > C15T CORS www/non-www Origin Handling > should allow both www and non-www origins if both are trusted 1ms
329
- ✓ C15T CORS Configuration > C15T CORS www/non-www Origin Handling > should deny unrelated origins 0ms
330
-  × C15T CORS Configuration > CORS trustedOrigins normalization and matching > should match http and https with and without www 5ms
331
-  → expected null to be 'http://localhost:3002' // Object.is equality
332
- ✓ C15T CORS Configuration > CORS trustedOrigins normalization and matching > should not match unrelated origins 0ms
333
- ✓ C15T CORS Configuration > CORS trustedOrigins normalization and matching > should match wildcard * 0ms
334
-  × C15T CORS Configuration > CORS trustedOrigins normalization and matching > should match with port 1ms
335
-  → expected null to be 'http://localhost:3002' // Object.is equality
336
- ✓ C15T CORS Configuration > CORS trustedOrigins normalization and matching > should not match if port is different 0ms
337
- stdout | src/pkgs/db-adapters/adapters/kysely-adapter/tests/postgres.test.ts > Kysely Adapter Tests > Postgres Tests
338
-  INFO [c15t] Creating table subject with fields: isIdentified, externalId, identityProvider, lastIpAddress, createdAt, updatedAt, subjectTimezone
339
- INFO [c15t] Adding column isIdentified (fieldName: isIdentified) to table subject
340
- INFO [c15t] Adding column externalId (fieldName: externalId) to table subject
341
- INFO [c15t] Adding column identityProvider (fieldName: identityProvider) to table subject
342
- INFO [c15t] Adding column lastIpAddress (fieldName: lastIpAddress) to table subject
343
- INFO [c15t] Adding column createdAt (fieldName: createdAt) to table subject
344
- INFO [c15t] Adding column updatedAt (fieldName: updatedAt) to table subject
345
- INFO [c15t] Adding column subjectTimezone (fieldName: subjectTimezone) to table subject
346
- INFO [c15t] SQL for table subject:
347
- create table "subject" ("id" text not null primary key, "isIdentified" boolean not null, "externalId" text, "identityProvider" text, "lastIpAddress" text, "createdAt" timestamp not null, "updatedAt" timestamp not null, "subjectTimezone" text)
348
- INFO [c15t] Creating table consentPurpose with fields: code, name, description, isEssential, dataCategory, legalBasis, isActive, createdAt, updatedAt
349
- INFO [c15t] Adding column code (fieldName: code) to table consentPurpose
350
- INFO [c15t] Adding column name (fieldName: name) to table consentPurpose
351
- INFO [c15t] Adding column description (fieldName: description) to table consentPurpose
352
- INFO [c15t] Adding column isEssential (fieldName: isEssential) to table consentPurpose
353
- INFO [c15t] Adding column dataCategory (fieldName: dataCategory) to table consentPurpose
354
- INFO [c15t] Adding column legalBasis (fieldName: legalBasis) to table consentPurpose
355
- INFO [c15t] Adding column isActive (fieldName: isActive) to table consentPurpose
356
- INFO [c15t] Adding column createdAt (fieldName: createdAt) to table consentPurpose
357
- INFO [c15t] Adding column updatedAt (fieldName: updatedAt) to table consentPurpose
358
- INFO [c15t] SQL for table consentPurpose:
359
- create table "consentPurpose" ("id" text not null primary key, "code" text not null, "name" text not null, "description" text not null, "isEssential" boolean not null, "dataCategory" text, "legalBasis" text, "isActive" boolean not null, "createdAt" timestamp not null, "updatedAt" timestamp not null)
360
- INFO [c15t] Creating table domain with fields: name, description, allowedOrigins, isVerified, isActive, createdAt, updatedAt
361
- INFO [c15t] Adding column name (fieldName: name) to table domain
362
- INFO [c15t] Adding column description (fieldName: description) to table domain
363
- INFO [c15t] Adding column allowedOrigins (fieldName: allowedOrigins) to table domain
364
- INFO [c15t] Adding column isVerified (fieldName: isVerified) to table domain
365
- INFO [c15t] Adding column isActive (fieldName: isActive) to table domain
366
- INFO [c15t] Adding column createdAt (fieldName: createdAt) to table domain
367
- INFO [c15t] Adding column updatedAt (fieldName: updatedAt) to table domain
368
- INFO [c15t] SQL for table domain:
369
- create table "domain" ("id" text not null primary key, "name" text not null unique, "description" text, "allowedOrigins" jsonb, "isVerified" boolean not null, "isActive" boolean not null, "createdAt" timestamp not null, "updatedAt" timestamp)
370
- INFO [c15t] Creating table consentPolicy with fields: version, type, name, effectiveDate, expirationDate, content, contentHash, isActive, createdAt
371
- INFO [c15t] Adding column version (fieldName: version) to table consentPolicy
372
- INFO [c15t] Adding column type (fieldName: type) to table consentPolicy
373
- INFO [c15t] Adding column name (fieldName: name) to table consentPolicy
374
- INFO [c15t] Adding column effectiveDate (fieldName: effectiveDate) to table consentPolicy
375
- INFO [c15t] Adding column expirationDate (fieldName: expirationDate) to table consentPolicy
376
- INFO [c15t] Adding column content (fieldName: content) to table consentPolicy
377
- INFO [c15t] Adding column contentHash (fieldName: contentHash) to table consentPolicy
378
- INFO [c15t] Adding column isActive (fieldName: isActive) to table consentPolicy
379
- INFO [c15t] Adding column createdAt (fieldName: createdAt) to table consentPolicy
380
- INFO [c15t] SQL for table consentPolicy:
381
- create table "consentPolicy" ("id" text not null primary key, "version" text not null, "type" text not null, "name" text not null, "effectiveDate" timestamp not null, "expirationDate" timestamp, "content" text not null, "contentHash" text not null, "isActive" boolean not null, "createdAt" timestamp not null)
382
- INFO [c15t] Creating table consent with fields: subjectId, domainId, purposeIds, metadata, policyId, ipAddress, userAgent, status, withdrawalReason, givenAt, validUntil, isActive
383
- INFO [c15t] Adding column subjectId (fieldName: subjectId) to table consent
384
- INFO [c15t] Adding column domainId (fieldName: domainId) to table consent
385
- INFO [c15t] Adding column purposeIds (fieldName: purposeIds) to table consent
386
- INFO [c15t] Adding column metadata (fieldName: metadata) to table consent
387
- INFO [c15t] Adding column policyId (fieldName: policyId) to table consent
388
- INFO [c15t] Adding column ipAddress (fieldName: ipAddress) to table consent
389
- INFO [c15t] Adding column userAgent (fieldName: userAgent) to table consent
390
- INFO [c15t] Adding column status (fieldName: status) to table consent
391
- INFO [c15t] Adding column withdrawalReason (fieldName: withdrawalReason) to table consent
392
- INFO [c15t] Adding column givenAt (fieldName: givenAt) to table consent
393
- INFO [c15t] Adding column validUntil (fieldName: validUntil) to table consent
394
- INFO [c15t] Adding column isActive (fieldName: isActive) to table consent
395
- INFO [c15t] SQL for table consent:
396
- create table "consent" ("id" text not null primary key, "subjectId" text not null references "subject" ("id"), "domainId" text not null references "domain" ("id"), "purposeIds" jsonb, "metadata" jsonb, "policyId" text references "consentPolicy" ("id"), "ipAddress" text, "userAgent" text, "status" text not null, "withdrawalReason" text, "givenAt" timestamp not null, "validUntil" timestamp, "isActive" boolean not null)
397
- INFO [c15t] Creating table consentRecord with fields: subjectId, consentId, actionType, details, createdAt
398
- INFO [c15t] Adding column subjectId (fieldName: subjectId) to table consentRecord
399
- INFO [c15t] Adding column consentId (fieldName: consentId) to table consentRecord
400
- INFO [c15t] Adding column actionType (fieldName: actionType) to table consentRecord
401
- INFO [c15t] Adding column details (fieldName: details) to table consentRecord
402
- INFO [c15t] Adding column createdAt (fieldName: createdAt) to table consentRecord
403
- INFO [c15t] SQL for table consentRecord:
404
- create table "consentRecord" ("id" text not null primary key, "subjectId" text not null references "subject" ("id"), "consentId" text references "consent" ("id"), "actionType" text not null, "details" jsonb, "createdAt" timestamp not null)
405
- INFO [c15t] Creating table auditLog with fields: entityType, entityId, actionType, subjectId, ipAddress, userAgent, changes, metadata, createdAt, eventTimezone
406
- INFO [c15t] Adding column entityType (fieldName: entityType) to table auditLog
407
- INFO [c15t] Adding column entityId (fieldName: entityId) to table auditLog
408
- INFO [c15t] Adding column actionType (fieldName: actionType) to table auditLog
409
- INFO [c15t] Adding column subjectId (fieldName: subjectId) to table auditLog
410
- INFO [c15t] Adding column ipAddress (fieldName: ipAddress) to table auditLog
411
- INFO [c15t] Adding column userAgent (fieldName: userAgent) to table auditLog
412
- INFO [c15t] Adding column changes (fieldName: changes) to table auditLog
413
- INFO [c15t] Adding column metadata (fieldName: metadata) to table auditLog
414
- INFO [c15t] Adding column createdAt (fieldName: createdAt) to table auditLog
415
- INFO [c15t] Adding column eventTimezone (fieldName: eventTimezone) to table auditLog
416
- INFO [c15t] SQL for table auditLog:
417
- create table "auditLog" ("id" text not null primary key, "entityType" text not null, "entityId" text not null, "actionType" text not null, "subjectId" text references "subject" ("id"), "ipAddress" text, "userAgent" text, "changes" jsonb, "metadata" jsonb, "createdAt" timestamp not null, "eventTimezone" text not null)
418
-
419
-
420
-  ❯ src/pkgs/db-adapters/adapters/kysely-adapter/tests/postgres.test.ts 1/9
421
-
422
-  Test Files 1 failed | 15 passed (17)
423
-  Tests 2 failed | 195 passed | 1 skipped (206)
424
-  Start at 20:21:16
425
-  Duration 3.92s
426
- [?2026l