@geekmidas/testkit 10.0.0-alpha.12 → 10.0.0-alpha.13

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 (262) hide show
  1. package/dist/Factory.cjs +51 -2
  2. package/dist/Factory.cjs.map +1 -0
  3. package/dist/Factory.d.cts +143 -3
  4. package/dist/Factory.d.cts.map +1 -0
  5. package/dist/Factory.d.mts +143 -3
  6. package/dist/Factory.d.mts.map +1 -0
  7. package/dist/Factory.mjs +50 -2
  8. package/dist/Factory.mjs.map +1 -0
  9. package/dist/KyselyFactory.cjs +237 -4
  10. package/dist/KyselyFactory.cjs.map +1 -0
  11. package/dist/KyselyFactory.d.cts +224 -4
  12. package/dist/KyselyFactory.d.cts.map +1 -0
  13. package/dist/KyselyFactory.d.mts +224 -4
  14. package/dist/KyselyFactory.d.mts.map +1 -0
  15. package/dist/KyselyFactory.mjs +236 -4
  16. package/dist/KyselyFactory.mjs.map +1 -0
  17. package/dist/ObjectionFactory.cjs +265 -4
  18. package/dist/ObjectionFactory.cjs.map +1 -0
  19. package/dist/ObjectionFactory.d.cts +237 -4
  20. package/dist/ObjectionFactory.d.cts.map +1 -0
  21. package/dist/ObjectionFactory.d.mts +237 -4
  22. package/dist/ObjectionFactory.d.mts.map +1 -0
  23. package/dist/ObjectionFactory.mjs +264 -4
  24. package/dist/ObjectionFactory.mjs.map +1 -0
  25. package/dist/PostgresKyselyMigrator.cjs +94 -3
  26. package/dist/PostgresKyselyMigrator.cjs.map +1 -0
  27. package/dist/PostgresKyselyMigrator.d.cts +80 -3
  28. package/dist/PostgresKyselyMigrator.d.cts.map +1 -0
  29. package/dist/PostgresKyselyMigrator.d.mts +80 -3
  30. package/dist/PostgresKyselyMigrator.d.mts.map +1 -0
  31. package/dist/PostgresKyselyMigrator.mjs +93 -3
  32. package/dist/PostgresKyselyMigrator.mjs.map +1 -0
  33. package/dist/{PostgresMigrator-C_QQ6q35.d.mts → PostgresMigrator-CoHQ95cT.d.cts} +2 -3
  34. package/dist/PostgresMigrator-CoHQ95cT.d.cts.map +1 -0
  35. package/dist/{PostgresMigrator-CeYy-eHF.d.cts → PostgresMigrator-CoHQ95cT.d.mts} +2 -3
  36. package/dist/PostgresMigrator-CoHQ95cT.d.mts.map +1 -0
  37. package/dist/PostgresMigrator.cjs +169 -2
  38. package/dist/PostgresMigrator.cjs.map +1 -0
  39. package/dist/PostgresMigrator.d.cts +1 -1
  40. package/dist/PostgresMigrator.d.mts +1 -1
  41. package/dist/PostgresMigrator.mjs +166 -2
  42. package/dist/PostgresMigrator.mjs.map +1 -0
  43. package/dist/PostgresObjectionMigrator.cjs +118 -3
  44. package/dist/PostgresObjectionMigrator.cjs.map +1 -0
  45. package/dist/PostgresObjectionMigrator.d.cts +75 -3
  46. package/dist/PostgresObjectionMigrator.d.cts.map +1 -0
  47. package/dist/PostgresObjectionMigrator.d.mts +75 -3
  48. package/dist/PostgresObjectionMigrator.d.mts.map +1 -0
  49. package/dist/PostgresObjectionMigrator.mjs +117 -3
  50. package/dist/PostgresObjectionMigrator.mjs.map +1 -0
  51. package/dist/VitestKyselyTransactionIsolator.cjs +66 -3
  52. package/dist/VitestKyselyTransactionIsolator.cjs.map +1 -0
  53. package/dist/VitestKyselyTransactionIsolator.d.cts +60 -3
  54. package/dist/VitestKyselyTransactionIsolator.d.cts.map +1 -0
  55. package/dist/VitestKyselyTransactionIsolator.d.mts +60 -3
  56. package/dist/VitestKyselyTransactionIsolator.d.mts.map +1 -0
  57. package/dist/VitestKyselyTransactionIsolator.mjs +65 -3
  58. package/dist/VitestKyselyTransactionIsolator.mjs.map +1 -0
  59. package/dist/VitestObjectionTransactionIsolator.cjs +62 -3
  60. package/dist/VitestObjectionTransactionIsolator.cjs.map +1 -0
  61. package/dist/VitestObjectionTransactionIsolator.d.cts +56 -3
  62. package/dist/VitestObjectionTransactionIsolator.d.cts.map +1 -0
  63. package/dist/VitestObjectionTransactionIsolator.d.mts +56 -3
  64. package/dist/VitestObjectionTransactionIsolator.d.mts.map +1 -0
  65. package/dist/VitestObjectionTransactionIsolator.mjs +61 -3
  66. package/dist/VitestObjectionTransactionIsolator.mjs.map +1 -0
  67. package/dist/VitestTransactionIsolator.cjs +187 -4
  68. package/dist/VitestTransactionIsolator.cjs.map +1 -0
  69. package/dist/VitestTransactionIsolator.d.cts +219 -2
  70. package/dist/VitestTransactionIsolator.d.cts.map +1 -0
  71. package/dist/VitestTransactionIsolator.d.mts +219 -2
  72. package/dist/VitestTransactionIsolator.d.mts.map +1 -0
  73. package/dist/VitestTransactionIsolator.mjs +184 -2
  74. package/dist/VitestTransactionIsolator.mjs.map +1 -0
  75. package/dist/aws.cjs +3 -4
  76. package/dist/aws.cjs.map +1 -1
  77. package/dist/aws.d.cts +3 -8
  78. package/dist/aws.d.cts.map +1 -1
  79. package/dist/aws.d.mts +3 -8
  80. package/dist/aws.d.mts.map +1 -1
  81. package/dist/aws.mjs +1 -2
  82. package/dist/aws.mjs.map +1 -1
  83. package/dist/benchmark.cjs +2 -2
  84. package/dist/benchmark.cjs.map +1 -1
  85. package/dist/benchmark.d.cts +4 -6
  86. package/dist/benchmark.d.cts.map +1 -1
  87. package/dist/benchmark.d.mts +4 -6
  88. package/dist/benchmark.d.mts.map +1 -1
  89. package/dist/benchmark.mjs +1 -1
  90. package/dist/benchmark.mjs.map +1 -1
  91. package/dist/better-auth.cjs +4 -4
  92. package/dist/better-auth.cjs.map +1 -1
  93. package/dist/better-auth.d.cts +13142 -5
  94. package/dist/better-auth.d.cts.map +1 -1
  95. package/dist/better-auth.d.mts +13142 -5
  96. package/dist/better-auth.d.mts.map +1 -1
  97. package/dist/better-auth.mjs +2 -2
  98. package/dist/better-auth.mjs.map +1 -1
  99. package/dist/faker.cjs +262 -8
  100. package/dist/faker.cjs.map +1 -0
  101. package/dist/faker.d.cts +162 -2
  102. package/dist/faker.d.cts.map +1 -0
  103. package/dist/faker.d.mts +162 -2
  104. package/dist/faker.d.mts.map +1 -0
  105. package/dist/faker.mjs +255 -2
  106. package/dist/faker.mjs.map +1 -0
  107. package/dist/helpers.cjs +6 -5
  108. package/dist/helpers.cjs.map +1 -1
  109. package/dist/helpers.d.cts +1 -5
  110. package/dist/helpers.d.cts.map +1 -1
  111. package/dist/helpers.d.mts +1 -5
  112. package/dist/helpers.d.mts.map +1 -1
  113. package/dist/helpers.mjs +1 -2
  114. package/dist/helpers.mjs.map +1 -1
  115. package/dist/initScript.cjs +15 -15
  116. package/dist/initScript.cjs.map +1 -1
  117. package/dist/initScript.d.cts +2 -4
  118. package/dist/initScript.d.cts.map +1 -1
  119. package/dist/initScript.d.mts +2 -4
  120. package/dist/initScript.d.mts.map +1 -1
  121. package/dist/initScript.mjs +10 -12
  122. package/dist/initScript.mjs.map +1 -1
  123. package/dist/kysely.cjs +10 -13
  124. package/dist/kysely.cjs.map +1 -1
  125. package/dist/kysely.d.cts +10 -14
  126. package/dist/kysely.d.cts.map +1 -1
  127. package/dist/kysely.d.mts +10 -14
  128. package/dist/kysely.d.mts.map +1 -1
  129. package/dist/kysely.mjs +10 -14
  130. package/dist/kysely.mjs.map +1 -1
  131. package/dist/logger.cjs +3 -4
  132. package/dist/logger.cjs.map +1 -1
  133. package/dist/logger.d.cts +1 -5
  134. package/dist/logger.d.cts.map +1 -1
  135. package/dist/logger.d.mts +1 -5
  136. package/dist/logger.d.mts.map +1 -1
  137. package/dist/logger.mjs +1 -2
  138. package/dist/logger.mjs.map +1 -1
  139. package/dist/objection.cjs +10 -13
  140. package/dist/objection.cjs.map +1 -1
  141. package/dist/objection.d.cts +10 -14
  142. package/dist/objection.d.cts.map +1 -1
  143. package/dist/objection.d.mts +10 -14
  144. package/dist/objection.d.mts.map +1 -1
  145. package/dist/objection.mjs +10 -14
  146. package/dist/objection.mjs.map +1 -1
  147. package/dist/os/directory.cjs +31 -2
  148. package/dist/os/directory.cjs.map +1 -0
  149. package/dist/os/directory.d.cts +9 -2
  150. package/dist/os/directory.d.cts.map +1 -0
  151. package/dist/os/directory.d.mts +9 -2
  152. package/dist/os/directory.d.mts.map +1 -0
  153. package/dist/os/directory.mjs +25 -2
  154. package/dist/os/directory.mjs.map +1 -0
  155. package/dist/os/index.cjs +3 -3
  156. package/dist/os/index.d.cts +1 -1
  157. package/dist/os/index.d.mts +1 -1
  158. package/dist/os/index.mjs +2 -3
  159. package/dist/requestContext.cjs +10 -11
  160. package/dist/requestContext.cjs.map +1 -1
  161. package/dist/requestContext.d.cts +4 -8
  162. package/dist/requestContext.d.cts.map +1 -1
  163. package/dist/requestContext.d.mts +4 -8
  164. package/dist/requestContext.d.mts.map +1 -1
  165. package/dist/requestContext.mjs +1 -2
  166. package/dist/requestContext.mjs.map +1 -1
  167. package/dist/{chunk-CUT6urMc.cjs → rolldown-runtime-VH7oDXx4.cjs} +8 -10
  168. package/dist/timer.cjs +2 -2
  169. package/dist/timer.cjs.map +1 -1
  170. package/dist/timer.d.cts +1 -4
  171. package/dist/timer.d.cts.map +1 -1
  172. package/dist/timer.d.mts +1 -4
  173. package/dist/timer.d.mts.map +1 -1
  174. package/dist/timer.mjs +1 -1
  175. package/dist/timer.mjs.map +1 -1
  176. package/package.json +8 -8
  177. package/dist/Factory-BFVnMMCC.mjs +0 -51
  178. package/dist/Factory-BFVnMMCC.mjs.map +0 -1
  179. package/dist/Factory-BhjUOBWN.cjs +0 -57
  180. package/dist/Factory-BhjUOBWN.cjs.map +0 -1
  181. package/dist/Factory-Bx0AJXZB.d.cts +0 -147
  182. package/dist/Factory-Bx0AJXZB.d.cts.map +0 -1
  183. package/dist/Factory-ClyZLRsO.d.mts +0 -147
  184. package/dist/Factory-ClyZLRsO.d.mts.map +0 -1
  185. package/dist/KyselyFactory-BFqVIn_0.cjs +0 -246
  186. package/dist/KyselyFactory-BFqVIn_0.cjs.map +0 -1
  187. package/dist/KyselyFactory-CTZmiGI9.d.mts +0 -228
  188. package/dist/KyselyFactory-CTZmiGI9.d.mts.map +0 -1
  189. package/dist/KyselyFactory-DMswpwji.mjs +0 -241
  190. package/dist/KyselyFactory-DMswpwji.mjs.map +0 -1
  191. package/dist/KyselyFactory-KLeKH43i.d.cts +0 -228
  192. package/dist/KyselyFactory-KLeKH43i.d.cts.map +0 -1
  193. package/dist/ObjectionFactory-BeFBYcan.cjs +0 -272
  194. package/dist/ObjectionFactory-BeFBYcan.cjs.map +0 -1
  195. package/dist/ObjectionFactory-DDrKwAoO.d.mts +0 -241
  196. package/dist/ObjectionFactory-DDrKwAoO.d.mts.map +0 -1
  197. package/dist/ObjectionFactory-QCJ7u0Ql.mjs +0 -267
  198. package/dist/ObjectionFactory-QCJ7u0Ql.mjs.map +0 -1
  199. package/dist/ObjectionFactory-aMGvAKt9.d.cts +0 -241
  200. package/dist/ObjectionFactory-aMGvAKt9.d.cts.map +0 -1
  201. package/dist/PostgresKyselyMigrator-B2M6Gjvv.d.cts +0 -84
  202. package/dist/PostgresKyselyMigrator-B2M6Gjvv.d.cts.map +0 -1
  203. package/dist/PostgresKyselyMigrator-BGBxjnFv.cjs +0 -101
  204. package/dist/PostgresKyselyMigrator-BGBxjnFv.cjs.map +0 -1
  205. package/dist/PostgresKyselyMigrator-CvwXycJE.d.mts +0 -84
  206. package/dist/PostgresKyselyMigrator-CvwXycJE.d.mts.map +0 -1
  207. package/dist/PostgresKyselyMigrator-PI0QhvB1.mjs +0 -95
  208. package/dist/PostgresKyselyMigrator-PI0QhvB1.mjs.map +0 -1
  209. package/dist/PostgresMigrator-C_QQ6q35.d.mts.map +0 -1
  210. package/dist/PostgresMigrator-CeYy-eHF.d.cts.map +0 -1
  211. package/dist/PostgresMigrator-DVAY04qN.mjs +0 -166
  212. package/dist/PostgresMigrator-DVAY04qN.mjs.map +0 -1
  213. package/dist/PostgresMigrator-M9jpzOvN.cjs +0 -172
  214. package/dist/PostgresMigrator-M9jpzOvN.cjs.map +0 -1
  215. package/dist/PostgresObjectionMigrator-1j6YIB1c.d.mts +0 -79
  216. package/dist/PostgresObjectionMigrator-1j6YIB1c.d.mts.map +0 -1
  217. package/dist/PostgresObjectionMigrator-DHVC9h_P.d.cts +0 -79
  218. package/dist/PostgresObjectionMigrator-DHVC9h_P.d.cts.map +0 -1
  219. package/dist/PostgresObjectionMigrator-DSaPhwjY.cjs +0 -123
  220. package/dist/PostgresObjectionMigrator-DSaPhwjY.cjs.map +0 -1
  221. package/dist/PostgresObjectionMigrator-DjPKdUbm.mjs +0 -118
  222. package/dist/PostgresObjectionMigrator-DjPKdUbm.mjs.map +0 -1
  223. package/dist/VitestKyselyTransactionIsolator-1Saieke7.mjs +0 -67
  224. package/dist/VitestKyselyTransactionIsolator-1Saieke7.mjs.map +0 -1
  225. package/dist/VitestKyselyTransactionIsolator-BjJSXryR.cjs +0 -72
  226. package/dist/VitestKyselyTransactionIsolator-BjJSXryR.cjs.map +0 -1
  227. package/dist/VitestKyselyTransactionIsolator-CwlTo6yf.d.mts +0 -64
  228. package/dist/VitestKyselyTransactionIsolator-CwlTo6yf.d.mts.map +0 -1
  229. package/dist/VitestKyselyTransactionIsolator-DJasVuIZ.d.cts +0 -64
  230. package/dist/VitestKyselyTransactionIsolator-DJasVuIZ.d.cts.map +0 -1
  231. package/dist/VitestObjectionTransactionIsolator-B_VSWFum.mjs +0 -63
  232. package/dist/VitestObjectionTransactionIsolator-B_VSWFum.mjs.map +0 -1
  233. package/dist/VitestObjectionTransactionIsolator-CTTjvTPO.d.cts +0 -60
  234. package/dist/VitestObjectionTransactionIsolator-CTTjvTPO.d.cts.map +0 -1
  235. package/dist/VitestObjectionTransactionIsolator-CyZG6nq4.d.mts +0 -60
  236. package/dist/VitestObjectionTransactionIsolator-CyZG6nq4.d.mts.map +0 -1
  237. package/dist/VitestObjectionTransactionIsolator-DDoJTu7e.cjs +0 -68
  238. package/dist/VitestObjectionTransactionIsolator-DDoJTu7e.cjs.map +0 -1
  239. package/dist/VitestTransactionIsolator-BLaw80cx.d.mts +0 -223
  240. package/dist/VitestTransactionIsolator-BLaw80cx.d.mts.map +0 -1
  241. package/dist/VitestTransactionIsolator-CvwPecpl.mjs +0 -188
  242. package/dist/VitestTransactionIsolator-CvwPecpl.mjs.map +0 -1
  243. package/dist/VitestTransactionIsolator-DyiX-QtK.cjs +0 -206
  244. package/dist/VitestTransactionIsolator-DyiX-QtK.cjs.map +0 -1
  245. package/dist/VitestTransactionIsolator-glcxyS_R.d.cts +0 -223
  246. package/dist/VitestTransactionIsolator-glcxyS_R.d.cts.map +0 -1
  247. package/dist/directory-BIcVWgJk.d.cts +0 -13
  248. package/dist/directory-BIcVWgJk.d.cts.map +0 -1
  249. package/dist/directory-BxjqmtCT.mjs +0 -27
  250. package/dist/directory-BxjqmtCT.mjs.map +0 -1
  251. package/dist/directory-CYXmolu1.d.mts +0 -13
  252. package/dist/directory-CYXmolu1.d.mts.map +0 -1
  253. package/dist/directory-DD_xQoSh.cjs +0 -33
  254. package/dist/directory-DD_xQoSh.cjs.map +0 -1
  255. package/dist/faker-B14IEMIN.cjs +0 -304
  256. package/dist/faker-B14IEMIN.cjs.map +0 -1
  257. package/dist/faker-BGKYFoCT.mjs +0 -262
  258. package/dist/faker-BGKYFoCT.mjs.map +0 -1
  259. package/dist/faker-BSH1EMtg.d.cts +0 -166
  260. package/dist/faker-BSH1EMtg.d.cts.map +0 -1
  261. package/dist/faker-BcjUfHxx.d.mts +0 -166
  262. package/dist/faker-BcjUfHxx.d.mts.map +0 -1
package/dist/aws.cjs CHANGED
@@ -1,6 +1,5 @@
1
- const require_chunk = require('./chunk-CUT6urMc.cjs');
2
- const vitest = require_chunk.__toESM(require("vitest"));
3
-
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ let vitest = require("vitest");
4
3
  //#region src/aws.ts
5
4
  /**
6
5
  * Shared test utilities for AWS Lambda adapter testing
@@ -118,9 +117,9 @@ function createMockV2Event(overrides = {}) {
118
117
  ...overrides
119
118
  };
120
119
  }
121
-
122
120
  //#endregion
123
121
  exports.createMockContext = createMockContext;
124
122
  exports.createMockV1Event = createMockV1Event;
125
123
  exports.createMockV2Event = createMockV2Event;
124
+
126
125
  //# sourceMappingURL=aws.cjs.map
package/dist/aws.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"aws.cjs","names":["overrides: Partial<APIGatewayProxyEvent>","overrides: Partial<APIGatewayProxyEventV2>"],"sources":["../src/aws.ts"],"sourcesContent":["import type {\n\tAPIGatewayProxyEvent,\n\tAPIGatewayProxyEventV2,\n\tContext,\n} from 'aws-lambda';\nimport { vi } from 'vitest';\n\n/**\n * Shared test utilities for AWS Lambda adapter testing\n */\n\n/**\n * Creates a mock AWS Lambda Context for testing\n */\nexport function createMockContext(): Context {\n\treturn {\n\t\tawsRequestId: 'test-request-id',\n\t\tcallbackWaitsForEmptyEventLoop: false,\n\t\tfunctionName: 'test-function',\n\t\tfunctionVersion: '1',\n\t\tinvokedFunctionArn:\n\t\t\t'arn:aws:lambda:us-east-1:123456789012:function:test-function',\n\t\tmemoryLimitInMB: '128',\n\t\tlogGroupName: '/aws/lambda/test-function',\n\t\tlogStreamName: '2024/01/01/[$LATEST]abcdef123456',\n\t\tgetRemainingTimeInMillis: () => 5000,\n\t\tdone: vi.fn(),\n\t\tfail: vi.fn(),\n\t\tsucceed: vi.fn(),\n\t};\n}\n\n/**\n * Creates a mock AWS API Gateway V1 (REST API) event for testing\n */\nexport function createMockV1Event(\n\toverrides: Partial<APIGatewayProxyEvent> = {},\n): APIGatewayProxyEvent {\n\treturn {\n\t\tbody: null,\n\t\theaders: {\n\t\t\t'content-type': 'application/json',\n\t\t\t'user-agent': 'test-agent',\n\t\t\thost: 'test.example.com',\n\t\t},\n\t\tmultiValueHeaders: {},\n\t\thttpMethod: 'GET',\n\t\tisBase64Encoded: false,\n\t\tpath: '/test',\n\t\tpathParameters: null,\n\t\tqueryStringParameters: null,\n\t\tmultiValueQueryStringParameters: null,\n\t\tstageVariables: null,\n\t\trequestContext: {\n\t\t\taccountId: '123456789012',\n\t\t\tapiId: 'api-id',\n\t\t\tauthorizer: null,\n\t\t\tprotocol: 'HTTP/1.1',\n\t\t\thttpMethod: 'GET',\n\t\t\tpath: '/test',\n\t\t\tstage: 'test',\n\t\t\trequestId: 'request-id',\n\t\t\trequestTimeEpoch: 1704067200000,\n\t\t\tresourceId: 'resource-id',\n\t\t\tresourcePath: '/test',\n\t\t\tidentity: {\n\t\t\t\taccessKey: null,\n\t\t\t\taccountId: null,\n\t\t\t\tapiKey: null,\n\t\t\t\tapiKeyId: null,\n\t\t\t\tcaller: null,\n\t\t\t\tcognitoAuthenticationProvider: null,\n\t\t\t\tcognitoAuthenticationType: null,\n\t\t\t\tcognitoIdentityId: null,\n\t\t\t\tcognitoIdentityPoolId: null,\n\t\t\t\tprincipalOrgId: null,\n\t\t\t\tsourceIp: '127.0.0.1',\n\t\t\t\tuser: null,\n\t\t\t\tuserAgent: 'test-agent',\n\t\t\t\tuserArn: null,\n\t\t\t\tclientCert: null,\n\t\t\t},\n\t\t},\n\t\tresource: '/test',\n\t\t...overrides,\n\t};\n}\n\n/**\n * Creates a mock AWS API Gateway V2 (HTTP API) event for testing\n */\nexport function createMockV2Event(\n\toverrides: Partial<APIGatewayProxyEventV2> = {},\n): APIGatewayProxyEventV2 {\n\treturn {\n\t\tversion: '2.0',\n\t\trouteKey: 'GET /test',\n\t\trawPath: '/test',\n\t\trawQueryString: '',\n\t\theaders: {\n\t\t\t'content-type': 'application/json',\n\t\t\t'user-agent': 'test-agent',\n\t\t\thost: 'test.example.com',\n\t\t},\n\t\trequestContext: {\n\t\t\taccountId: '123456789012',\n\t\t\tapiId: 'api-id',\n\t\t\tdomainName: 'test.example.com',\n\t\t\tdomainPrefix: 'api',\n\t\t\trequestId: 'request-id',\n\t\t\trouteKey: 'GET /test',\n\t\t\tstage: 'test',\n\t\t\ttime: '01/Jan/2024:00:00:00 +0000',\n\t\t\ttimeEpoch: 1704067200000,\n\t\t\thttp: {\n\t\t\t\tmethod: 'GET',\n\t\t\t\tpath: '/test',\n\t\t\t\tprotocol: 'HTTP/1.1',\n\t\t\t\tsourceIp: '127.0.0.1',\n\t\t\t\tuserAgent: 'test-agent',\n\t\t\t},\n\t\t},\n\t\tbody: undefined,\n\t\tpathParameters: undefined,\n\t\tisBase64Encoded: false,\n\t\tstageVariables: undefined,\n\t\tqueryStringParameters: undefined,\n\t\tcookies: undefined,\n\t\t...overrides,\n\t};\n}\n"],"mappings":";;;;;;;;;;AAcA,SAAgB,oBAA6B;AAC5C,QAAO;EACN,cAAc;EACd,gCAAgC;EAChC,cAAc;EACd,iBAAiB;EACjB,oBACC;EACD,iBAAiB;EACjB,cAAc;EACd,eAAe;EACf,0BAA0B,MAAM;EAChC,MAAM,UAAG,IAAI;EACb,MAAM,UAAG,IAAI;EACb,SAAS,UAAG,IAAI;CAChB;AACD;;;;AAKD,SAAgB,kBACfA,YAA2C,CAAE,GACtB;AACvB,QAAO;EACN,MAAM;EACN,SAAS;GACR,gBAAgB;GAChB,cAAc;GACd,MAAM;EACN;EACD,mBAAmB,CAAE;EACrB,YAAY;EACZ,iBAAiB;EACjB,MAAM;EACN,gBAAgB;EAChB,uBAAuB;EACvB,iCAAiC;EACjC,gBAAgB;EAChB,gBAAgB;GACf,WAAW;GACX,OAAO;GACP,YAAY;GACZ,UAAU;GACV,YAAY;GACZ,MAAM;GACN,OAAO;GACP,WAAW;GACX,kBAAkB;GAClB,YAAY;GACZ,cAAc;GACd,UAAU;IACT,WAAW;IACX,WAAW;IACX,QAAQ;IACR,UAAU;IACV,QAAQ;IACR,+BAA+B;IAC/B,2BAA2B;IAC3B,mBAAmB;IACnB,uBAAuB;IACvB,gBAAgB;IAChB,UAAU;IACV,MAAM;IACN,WAAW;IACX,SAAS;IACT,YAAY;GACZ;EACD;EACD,UAAU;EACV,GAAG;CACH;AACD;;;;AAKD,SAAgB,kBACfC,YAA6C,CAAE,GACtB;AACzB,QAAO;EACN,SAAS;EACT,UAAU;EACV,SAAS;EACT,gBAAgB;EAChB,SAAS;GACR,gBAAgB;GAChB,cAAc;GACd,MAAM;EACN;EACD,gBAAgB;GACf,WAAW;GACX,OAAO;GACP,YAAY;GACZ,cAAc;GACd,WAAW;GACX,UAAU;GACV,OAAO;GACP,MAAM;GACN,WAAW;GACX,MAAM;IACL,QAAQ;IACR,MAAM;IACN,UAAU;IACV,UAAU;IACV,WAAW;GACX;EACD;EACD;EACA;EACA,iBAAiB;EACjB;EACA;EACA;EACA,GAAG;CACH;AACD"}
1
+ {"version":3,"file":"aws.cjs","names":["vi"],"sources":["../src/aws.ts"],"sourcesContent":["import type {\n\tAPIGatewayProxyEvent,\n\tAPIGatewayProxyEventV2,\n\tContext,\n} from 'aws-lambda';\nimport { vi } from 'vitest';\n\n/**\n * Shared test utilities for AWS Lambda adapter testing\n */\n\n/**\n * Creates a mock AWS Lambda Context for testing\n */\nexport function createMockContext(): Context {\n\treturn {\n\t\tawsRequestId: 'test-request-id',\n\t\tcallbackWaitsForEmptyEventLoop: false,\n\t\tfunctionName: 'test-function',\n\t\tfunctionVersion: '1',\n\t\tinvokedFunctionArn:\n\t\t\t'arn:aws:lambda:us-east-1:123456789012:function:test-function',\n\t\tmemoryLimitInMB: '128',\n\t\tlogGroupName: '/aws/lambda/test-function',\n\t\tlogStreamName: '2024/01/01/[$LATEST]abcdef123456',\n\t\tgetRemainingTimeInMillis: () => 5000,\n\t\tdone: vi.fn(),\n\t\tfail: vi.fn(),\n\t\tsucceed: vi.fn(),\n\t};\n}\n\n/**\n * Creates a mock AWS API Gateway V1 (REST API) event for testing\n */\nexport function createMockV1Event(\n\toverrides: Partial<APIGatewayProxyEvent> = {},\n): APIGatewayProxyEvent {\n\treturn {\n\t\tbody: null,\n\t\theaders: {\n\t\t\t'content-type': 'application/json',\n\t\t\t'user-agent': 'test-agent',\n\t\t\thost: 'test.example.com',\n\t\t},\n\t\tmultiValueHeaders: {},\n\t\thttpMethod: 'GET',\n\t\tisBase64Encoded: false,\n\t\tpath: '/test',\n\t\tpathParameters: null,\n\t\tqueryStringParameters: null,\n\t\tmultiValueQueryStringParameters: null,\n\t\tstageVariables: null,\n\t\trequestContext: {\n\t\t\taccountId: '123456789012',\n\t\t\tapiId: 'api-id',\n\t\t\tauthorizer: null,\n\t\t\tprotocol: 'HTTP/1.1',\n\t\t\thttpMethod: 'GET',\n\t\t\tpath: '/test',\n\t\t\tstage: 'test',\n\t\t\trequestId: 'request-id',\n\t\t\trequestTimeEpoch: 1704067200000,\n\t\t\tresourceId: 'resource-id',\n\t\t\tresourcePath: '/test',\n\t\t\tidentity: {\n\t\t\t\taccessKey: null,\n\t\t\t\taccountId: null,\n\t\t\t\tapiKey: null,\n\t\t\t\tapiKeyId: null,\n\t\t\t\tcaller: null,\n\t\t\t\tcognitoAuthenticationProvider: null,\n\t\t\t\tcognitoAuthenticationType: null,\n\t\t\t\tcognitoIdentityId: null,\n\t\t\t\tcognitoIdentityPoolId: null,\n\t\t\t\tprincipalOrgId: null,\n\t\t\t\tsourceIp: '127.0.0.1',\n\t\t\t\tuser: null,\n\t\t\t\tuserAgent: 'test-agent',\n\t\t\t\tuserArn: null,\n\t\t\t\tclientCert: null,\n\t\t\t},\n\t\t},\n\t\tresource: '/test',\n\t\t...overrides,\n\t};\n}\n\n/**\n * Creates a mock AWS API Gateway V2 (HTTP API) event for testing\n */\nexport function createMockV2Event(\n\toverrides: Partial<APIGatewayProxyEventV2> = {},\n): APIGatewayProxyEventV2 {\n\treturn {\n\t\tversion: '2.0',\n\t\trouteKey: 'GET /test',\n\t\trawPath: '/test',\n\t\trawQueryString: '',\n\t\theaders: {\n\t\t\t'content-type': 'application/json',\n\t\t\t'user-agent': 'test-agent',\n\t\t\thost: 'test.example.com',\n\t\t},\n\t\trequestContext: {\n\t\t\taccountId: '123456789012',\n\t\t\tapiId: 'api-id',\n\t\t\tdomainName: 'test.example.com',\n\t\t\tdomainPrefix: 'api',\n\t\t\trequestId: 'request-id',\n\t\t\trouteKey: 'GET /test',\n\t\t\tstage: 'test',\n\t\t\ttime: '01/Jan/2024:00:00:00 +0000',\n\t\t\ttimeEpoch: 1704067200000,\n\t\t\thttp: {\n\t\t\t\tmethod: 'GET',\n\t\t\t\tpath: '/test',\n\t\t\t\tprotocol: 'HTTP/1.1',\n\t\t\t\tsourceIp: '127.0.0.1',\n\t\t\t\tuserAgent: 'test-agent',\n\t\t\t},\n\t\t},\n\t\tbody: undefined,\n\t\tpathParameters: undefined,\n\t\tisBase64Encoded: false,\n\t\tstageVariables: undefined,\n\t\tqueryStringParameters: undefined,\n\t\tcookies: undefined,\n\t\t...overrides,\n\t};\n}\n"],"mappings":";;;;;;;;;AAcA,SAAgB,oBAA6B;CAC5C,OAAO;EACN,cAAc;EACd,gCAAgC;EAChC,cAAc;EACd,iBAAiB;EACjB,oBACC;EACD,iBAAiB;EACjB,cAAc;EACd,eAAe;EACf,gCAAgC;EAChC,MAAMA,OAAAA,GAAG,GAAG;EACZ,MAAMA,OAAAA,GAAG,GAAG;EACZ,SAASA,OAAAA,GAAG,GAAG;CAChB;AACD;;;;AAKA,SAAgB,kBACf,YAA2C,CAAC,GACrB;CACvB,OAAO;EACN,MAAM;EACN,SAAS;GACR,gBAAgB;GAChB,cAAc;GACd,MAAM;EACP;EACA,mBAAmB,CAAC;EACpB,YAAY;EACZ,iBAAiB;EACjB,MAAM;EACN,gBAAgB;EAChB,uBAAuB;EACvB,iCAAiC;EACjC,gBAAgB;EAChB,gBAAgB;GACf,WAAW;GACX,OAAO;GACP,YAAY;GACZ,UAAU;GACV,YAAY;GACZ,MAAM;GACN,OAAO;GACP,WAAW;GACX,kBAAkB;GAClB,YAAY;GACZ,cAAc;GACd,UAAU;IACT,WAAW;IACX,WAAW;IACX,QAAQ;IACR,UAAU;IACV,QAAQ;IACR,+BAA+B;IAC/B,2BAA2B;IAC3B,mBAAmB;IACnB,uBAAuB;IACvB,gBAAgB;IAChB,UAAU;IACV,MAAM;IACN,WAAW;IACX,SAAS;IACT,YAAY;GACb;EACD;EACA,UAAU;EACV,GAAG;CACJ;AACD;;;;AAKA,SAAgB,kBACf,YAA6C,CAAC,GACrB;CACzB,OAAO;EACN,SAAS;EACT,UAAU;EACV,SAAS;EACT,gBAAgB;EAChB,SAAS;GACR,gBAAgB;GAChB,cAAc;GACd,MAAM;EACP;EACA,gBAAgB;GACf,WAAW;GACX,OAAO;GACP,YAAY;GACZ,cAAc;GACd,WAAW;GACX,UAAU;GACV,OAAO;GACP,MAAM;GACN,WAAW;GACX,MAAM;IACL,QAAQ;IACR,MAAM;IACN,UAAU;IACV,UAAU;IACV,WAAW;GACZ;EACD;EACA,MAAM,KAAA;EACN,gBAAgB,KAAA;EAChB,iBAAiB;EACjB,gBAAgB,KAAA;EAChB,uBAAuB,KAAA;EACvB,SAAS,KAAA;EACT,GAAG;CACJ;AACD"}
package/dist/aws.d.cts CHANGED
@@ -1,24 +1,19 @@
1
1
  import { APIGatewayProxyEvent, APIGatewayProxyEventV2, Context } from "aws-lambda";
2
-
3
2
  //#region src/aws.d.ts
4
-
5
3
  /**
6
4
  * Shared test utilities for AWS Lambda adapter testing
7
5
  */
8
6
  /**
9
7
  * Creates a mock AWS Lambda Context for testing
10
8
  */
11
- declare function createMockContext(): Context;
9
+ export declare function createMockContext(): Context;
12
10
  /**
13
11
  * Creates a mock AWS API Gateway V1 (REST API) event for testing
14
12
  */
15
- declare function createMockV1Event(overrides?: Partial<APIGatewayProxyEvent>): APIGatewayProxyEvent;
13
+ export declare function createMockV1Event(overrides?: Partial<APIGatewayProxyEvent>): APIGatewayProxyEvent;
16
14
  /**
17
15
  * Creates a mock AWS API Gateway V2 (HTTP API) event for testing
18
16
  */
19
- declare function createMockV2Event(overrides?: Partial<APIGatewayProxyEventV2>): APIGatewayProxyEventV2;
20
- //# sourceMappingURL=aws.d.ts.map
21
-
17
+ export declare function createMockV2Event(overrides?: Partial<APIGatewayProxyEventV2>): APIGatewayProxyEventV2;
22
18
  //#endregion
23
- export { createMockContext, createMockV1Event, createMockV2Event };
24
19
  //# sourceMappingURL=aws.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"aws.d.cts","names":[],"sources":["../src/aws.ts"],"sourcesContent":[],"mappings":";;;;;;AAcA;AAqBA;;;AACY,iBAtBI,iBAAA,CAAA,CAsBJ,EAtByB,OAsBzB;;AACW;AAsDvB;AAAiC,iBAxDjB,iBAAA,CAwDiB,SAAA,CAAA,EAvDrB,OAuDqB,CAvDb,oBAuDa,CAAA,CAAA,EAtD9B,oBAsD8B;;;;AAER,iBAFT,iBAAA,CAES,SAAA,CAAA,EADb,OACa,CADL,sBACK,CAAA,CAAA,EAAtB,sBAAsB"}
1
+ {"version":3,"file":"aws.d.cts","names":[],"sources":["../src/aws.ts"],"mappings":";;;;;;;;wBAcgB,qBAAqB;;;;wBAqBrB,kBACf,YAAW,QAAQ,wBACjB;;;;wBAsDa,kBACf,YAAW,QAAQ,0BACjB"}
package/dist/aws.d.mts CHANGED
@@ -1,24 +1,19 @@
1
1
  import { APIGatewayProxyEvent, APIGatewayProxyEventV2, Context } from "aws-lambda";
2
-
3
2
  //#region src/aws.d.ts
4
-
5
3
  /**
6
4
  * Shared test utilities for AWS Lambda adapter testing
7
5
  */
8
6
  /**
9
7
  * Creates a mock AWS Lambda Context for testing
10
8
  */
11
- declare function createMockContext(): Context;
9
+ export declare function createMockContext(): Context;
12
10
  /**
13
11
  * Creates a mock AWS API Gateway V1 (REST API) event for testing
14
12
  */
15
- declare function createMockV1Event(overrides?: Partial<APIGatewayProxyEvent>): APIGatewayProxyEvent;
13
+ export declare function createMockV1Event(overrides?: Partial<APIGatewayProxyEvent>): APIGatewayProxyEvent;
16
14
  /**
17
15
  * Creates a mock AWS API Gateway V2 (HTTP API) event for testing
18
16
  */
19
- declare function createMockV2Event(overrides?: Partial<APIGatewayProxyEventV2>): APIGatewayProxyEventV2;
20
- //# sourceMappingURL=aws.d.ts.map
21
-
17
+ export declare function createMockV2Event(overrides?: Partial<APIGatewayProxyEventV2>): APIGatewayProxyEventV2;
22
18
  //#endregion
23
- export { createMockContext, createMockV1Event, createMockV2Event };
24
19
  //# sourceMappingURL=aws.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"aws.d.mts","names":[],"sources":["../src/aws.ts"],"sourcesContent":[],"mappings":";;;;;;AAcA;AAqBA;;;AACY,iBAtBI,iBAAA,CAAA,CAsBJ,EAtByB,OAsBzB;;AACW;AAsDvB;AAAiC,iBAxDjB,iBAAA,CAwDiB,SAAA,CAAA,EAvDrB,OAuDqB,CAvDb,oBAuDa,CAAA,CAAA,EAtD9B,oBAsD8B;;;;AAER,iBAFT,iBAAA,CAES,SAAA,CAAA,EADb,OACa,CADL,sBACK,CAAA,CAAA,EAAtB,sBAAsB"}
1
+ {"version":3,"file":"aws.d.mts","names":[],"sources":["../src/aws.ts"],"mappings":";;;;;;;;wBAcgB,qBAAqB;;;;wBAqBrB,kBACf,YAAW,QAAQ,wBACjB;;;;wBAsDa,kBACf,YAAW,QAAQ,0BACjB"}
package/dist/aws.mjs CHANGED
@@ -1,5 +1,4 @@
1
1
  import { vi } from "vitest";
2
-
3
2
  //#region src/aws.ts
4
3
  /**
5
4
  * Shared test utilities for AWS Lambda adapter testing
@@ -117,7 +116,7 @@ function createMockV2Event(overrides = {}) {
117
116
  ...overrides
118
117
  };
119
118
  }
120
-
121
119
  //#endregion
122
120
  export { createMockContext, createMockV1Event, createMockV2Event };
121
+
123
122
  //# sourceMappingURL=aws.mjs.map
package/dist/aws.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"aws.mjs","names":["overrides: Partial<APIGatewayProxyEvent>","overrides: Partial<APIGatewayProxyEventV2>"],"sources":["../src/aws.ts"],"sourcesContent":["import type {\n\tAPIGatewayProxyEvent,\n\tAPIGatewayProxyEventV2,\n\tContext,\n} from 'aws-lambda';\nimport { vi } from 'vitest';\n\n/**\n * Shared test utilities for AWS Lambda adapter testing\n */\n\n/**\n * Creates a mock AWS Lambda Context for testing\n */\nexport function createMockContext(): Context {\n\treturn {\n\t\tawsRequestId: 'test-request-id',\n\t\tcallbackWaitsForEmptyEventLoop: false,\n\t\tfunctionName: 'test-function',\n\t\tfunctionVersion: '1',\n\t\tinvokedFunctionArn:\n\t\t\t'arn:aws:lambda:us-east-1:123456789012:function:test-function',\n\t\tmemoryLimitInMB: '128',\n\t\tlogGroupName: '/aws/lambda/test-function',\n\t\tlogStreamName: '2024/01/01/[$LATEST]abcdef123456',\n\t\tgetRemainingTimeInMillis: () => 5000,\n\t\tdone: vi.fn(),\n\t\tfail: vi.fn(),\n\t\tsucceed: vi.fn(),\n\t};\n}\n\n/**\n * Creates a mock AWS API Gateway V1 (REST API) event for testing\n */\nexport function createMockV1Event(\n\toverrides: Partial<APIGatewayProxyEvent> = {},\n): APIGatewayProxyEvent {\n\treturn {\n\t\tbody: null,\n\t\theaders: {\n\t\t\t'content-type': 'application/json',\n\t\t\t'user-agent': 'test-agent',\n\t\t\thost: 'test.example.com',\n\t\t},\n\t\tmultiValueHeaders: {},\n\t\thttpMethod: 'GET',\n\t\tisBase64Encoded: false,\n\t\tpath: '/test',\n\t\tpathParameters: null,\n\t\tqueryStringParameters: null,\n\t\tmultiValueQueryStringParameters: null,\n\t\tstageVariables: null,\n\t\trequestContext: {\n\t\t\taccountId: '123456789012',\n\t\t\tapiId: 'api-id',\n\t\t\tauthorizer: null,\n\t\t\tprotocol: 'HTTP/1.1',\n\t\t\thttpMethod: 'GET',\n\t\t\tpath: '/test',\n\t\t\tstage: 'test',\n\t\t\trequestId: 'request-id',\n\t\t\trequestTimeEpoch: 1704067200000,\n\t\t\tresourceId: 'resource-id',\n\t\t\tresourcePath: '/test',\n\t\t\tidentity: {\n\t\t\t\taccessKey: null,\n\t\t\t\taccountId: null,\n\t\t\t\tapiKey: null,\n\t\t\t\tapiKeyId: null,\n\t\t\t\tcaller: null,\n\t\t\t\tcognitoAuthenticationProvider: null,\n\t\t\t\tcognitoAuthenticationType: null,\n\t\t\t\tcognitoIdentityId: null,\n\t\t\t\tcognitoIdentityPoolId: null,\n\t\t\t\tprincipalOrgId: null,\n\t\t\t\tsourceIp: '127.0.0.1',\n\t\t\t\tuser: null,\n\t\t\t\tuserAgent: 'test-agent',\n\t\t\t\tuserArn: null,\n\t\t\t\tclientCert: null,\n\t\t\t},\n\t\t},\n\t\tresource: '/test',\n\t\t...overrides,\n\t};\n}\n\n/**\n * Creates a mock AWS API Gateway V2 (HTTP API) event for testing\n */\nexport function createMockV2Event(\n\toverrides: Partial<APIGatewayProxyEventV2> = {},\n): APIGatewayProxyEventV2 {\n\treturn {\n\t\tversion: '2.0',\n\t\trouteKey: 'GET /test',\n\t\trawPath: '/test',\n\t\trawQueryString: '',\n\t\theaders: {\n\t\t\t'content-type': 'application/json',\n\t\t\t'user-agent': 'test-agent',\n\t\t\thost: 'test.example.com',\n\t\t},\n\t\trequestContext: {\n\t\t\taccountId: '123456789012',\n\t\t\tapiId: 'api-id',\n\t\t\tdomainName: 'test.example.com',\n\t\t\tdomainPrefix: 'api',\n\t\t\trequestId: 'request-id',\n\t\t\trouteKey: 'GET /test',\n\t\t\tstage: 'test',\n\t\t\ttime: '01/Jan/2024:00:00:00 +0000',\n\t\t\ttimeEpoch: 1704067200000,\n\t\t\thttp: {\n\t\t\t\tmethod: 'GET',\n\t\t\t\tpath: '/test',\n\t\t\t\tprotocol: 'HTTP/1.1',\n\t\t\t\tsourceIp: '127.0.0.1',\n\t\t\t\tuserAgent: 'test-agent',\n\t\t\t},\n\t\t},\n\t\tbody: undefined,\n\t\tpathParameters: undefined,\n\t\tisBase64Encoded: false,\n\t\tstageVariables: undefined,\n\t\tqueryStringParameters: undefined,\n\t\tcookies: undefined,\n\t\t...overrides,\n\t};\n}\n"],"mappings":";;;;;;;;;AAcA,SAAgB,oBAA6B;AAC5C,QAAO;EACN,cAAc;EACd,gCAAgC;EAChC,cAAc;EACd,iBAAiB;EACjB,oBACC;EACD,iBAAiB;EACjB,cAAc;EACd,eAAe;EACf,0BAA0B,MAAM;EAChC,MAAM,GAAG,IAAI;EACb,MAAM,GAAG,IAAI;EACb,SAAS,GAAG,IAAI;CAChB;AACD;;;;AAKD,SAAgB,kBACfA,YAA2C,CAAE,GACtB;AACvB,QAAO;EACN,MAAM;EACN,SAAS;GACR,gBAAgB;GAChB,cAAc;GACd,MAAM;EACN;EACD,mBAAmB,CAAE;EACrB,YAAY;EACZ,iBAAiB;EACjB,MAAM;EACN,gBAAgB;EAChB,uBAAuB;EACvB,iCAAiC;EACjC,gBAAgB;EAChB,gBAAgB;GACf,WAAW;GACX,OAAO;GACP,YAAY;GACZ,UAAU;GACV,YAAY;GACZ,MAAM;GACN,OAAO;GACP,WAAW;GACX,kBAAkB;GAClB,YAAY;GACZ,cAAc;GACd,UAAU;IACT,WAAW;IACX,WAAW;IACX,QAAQ;IACR,UAAU;IACV,QAAQ;IACR,+BAA+B;IAC/B,2BAA2B;IAC3B,mBAAmB;IACnB,uBAAuB;IACvB,gBAAgB;IAChB,UAAU;IACV,MAAM;IACN,WAAW;IACX,SAAS;IACT,YAAY;GACZ;EACD;EACD,UAAU;EACV,GAAG;CACH;AACD;;;;AAKD,SAAgB,kBACfC,YAA6C,CAAE,GACtB;AACzB,QAAO;EACN,SAAS;EACT,UAAU;EACV,SAAS;EACT,gBAAgB;EAChB,SAAS;GACR,gBAAgB;GAChB,cAAc;GACd,MAAM;EACN;EACD,gBAAgB;GACf,WAAW;GACX,OAAO;GACP,YAAY;GACZ,cAAc;GACd,WAAW;GACX,UAAU;GACV,OAAO;GACP,MAAM;GACN,WAAW;GACX,MAAM;IACL,QAAQ;IACR,MAAM;IACN,UAAU;IACV,UAAU;IACV,WAAW;GACX;EACD;EACD;EACA;EACA,iBAAiB;EACjB;EACA;EACA;EACA,GAAG;CACH;AACD"}
1
+ {"version":3,"file":"aws.mjs","names":[],"sources":["../src/aws.ts"],"sourcesContent":["import type {\n\tAPIGatewayProxyEvent,\n\tAPIGatewayProxyEventV2,\n\tContext,\n} from 'aws-lambda';\nimport { vi } from 'vitest';\n\n/**\n * Shared test utilities for AWS Lambda adapter testing\n */\n\n/**\n * Creates a mock AWS Lambda Context for testing\n */\nexport function createMockContext(): Context {\n\treturn {\n\t\tawsRequestId: 'test-request-id',\n\t\tcallbackWaitsForEmptyEventLoop: false,\n\t\tfunctionName: 'test-function',\n\t\tfunctionVersion: '1',\n\t\tinvokedFunctionArn:\n\t\t\t'arn:aws:lambda:us-east-1:123456789012:function:test-function',\n\t\tmemoryLimitInMB: '128',\n\t\tlogGroupName: '/aws/lambda/test-function',\n\t\tlogStreamName: '2024/01/01/[$LATEST]abcdef123456',\n\t\tgetRemainingTimeInMillis: () => 5000,\n\t\tdone: vi.fn(),\n\t\tfail: vi.fn(),\n\t\tsucceed: vi.fn(),\n\t};\n}\n\n/**\n * Creates a mock AWS API Gateway V1 (REST API) event for testing\n */\nexport function createMockV1Event(\n\toverrides: Partial<APIGatewayProxyEvent> = {},\n): APIGatewayProxyEvent {\n\treturn {\n\t\tbody: null,\n\t\theaders: {\n\t\t\t'content-type': 'application/json',\n\t\t\t'user-agent': 'test-agent',\n\t\t\thost: 'test.example.com',\n\t\t},\n\t\tmultiValueHeaders: {},\n\t\thttpMethod: 'GET',\n\t\tisBase64Encoded: false,\n\t\tpath: '/test',\n\t\tpathParameters: null,\n\t\tqueryStringParameters: null,\n\t\tmultiValueQueryStringParameters: null,\n\t\tstageVariables: null,\n\t\trequestContext: {\n\t\t\taccountId: '123456789012',\n\t\t\tapiId: 'api-id',\n\t\t\tauthorizer: null,\n\t\t\tprotocol: 'HTTP/1.1',\n\t\t\thttpMethod: 'GET',\n\t\t\tpath: '/test',\n\t\t\tstage: 'test',\n\t\t\trequestId: 'request-id',\n\t\t\trequestTimeEpoch: 1704067200000,\n\t\t\tresourceId: 'resource-id',\n\t\t\tresourcePath: '/test',\n\t\t\tidentity: {\n\t\t\t\taccessKey: null,\n\t\t\t\taccountId: null,\n\t\t\t\tapiKey: null,\n\t\t\t\tapiKeyId: null,\n\t\t\t\tcaller: null,\n\t\t\t\tcognitoAuthenticationProvider: null,\n\t\t\t\tcognitoAuthenticationType: null,\n\t\t\t\tcognitoIdentityId: null,\n\t\t\t\tcognitoIdentityPoolId: null,\n\t\t\t\tprincipalOrgId: null,\n\t\t\t\tsourceIp: '127.0.0.1',\n\t\t\t\tuser: null,\n\t\t\t\tuserAgent: 'test-agent',\n\t\t\t\tuserArn: null,\n\t\t\t\tclientCert: null,\n\t\t\t},\n\t\t},\n\t\tresource: '/test',\n\t\t...overrides,\n\t};\n}\n\n/**\n * Creates a mock AWS API Gateway V2 (HTTP API) event for testing\n */\nexport function createMockV2Event(\n\toverrides: Partial<APIGatewayProxyEventV2> = {},\n): APIGatewayProxyEventV2 {\n\treturn {\n\t\tversion: '2.0',\n\t\trouteKey: 'GET /test',\n\t\trawPath: '/test',\n\t\trawQueryString: '',\n\t\theaders: {\n\t\t\t'content-type': 'application/json',\n\t\t\t'user-agent': 'test-agent',\n\t\t\thost: 'test.example.com',\n\t\t},\n\t\trequestContext: {\n\t\t\taccountId: '123456789012',\n\t\t\tapiId: 'api-id',\n\t\t\tdomainName: 'test.example.com',\n\t\t\tdomainPrefix: 'api',\n\t\t\trequestId: 'request-id',\n\t\t\trouteKey: 'GET /test',\n\t\t\tstage: 'test',\n\t\t\ttime: '01/Jan/2024:00:00:00 +0000',\n\t\t\ttimeEpoch: 1704067200000,\n\t\t\thttp: {\n\t\t\t\tmethod: 'GET',\n\t\t\t\tpath: '/test',\n\t\t\t\tprotocol: 'HTTP/1.1',\n\t\t\t\tsourceIp: '127.0.0.1',\n\t\t\t\tuserAgent: 'test-agent',\n\t\t\t},\n\t\t},\n\t\tbody: undefined,\n\t\tpathParameters: undefined,\n\t\tisBase64Encoded: false,\n\t\tstageVariables: undefined,\n\t\tqueryStringParameters: undefined,\n\t\tcookies: undefined,\n\t\t...overrides,\n\t};\n}\n"],"mappings":";;;;;;;;AAcA,SAAgB,oBAA6B;CAC5C,OAAO;EACN,cAAc;EACd,gCAAgC;EAChC,cAAc;EACd,iBAAiB;EACjB,oBACC;EACD,iBAAiB;EACjB,cAAc;EACd,eAAe;EACf,gCAAgC;EAChC,MAAM,GAAG,GAAG;EACZ,MAAM,GAAG,GAAG;EACZ,SAAS,GAAG,GAAG;CAChB;AACD;;;;AAKA,SAAgB,kBACf,YAA2C,CAAC,GACrB;CACvB,OAAO;EACN,MAAM;EACN,SAAS;GACR,gBAAgB;GAChB,cAAc;GACd,MAAM;EACP;EACA,mBAAmB,CAAC;EACpB,YAAY;EACZ,iBAAiB;EACjB,MAAM;EACN,gBAAgB;EAChB,uBAAuB;EACvB,iCAAiC;EACjC,gBAAgB;EAChB,gBAAgB;GACf,WAAW;GACX,OAAO;GACP,YAAY;GACZ,UAAU;GACV,YAAY;GACZ,MAAM;GACN,OAAO;GACP,WAAW;GACX,kBAAkB;GAClB,YAAY;GACZ,cAAc;GACd,UAAU;IACT,WAAW;IACX,WAAW;IACX,QAAQ;IACR,UAAU;IACV,QAAQ;IACR,+BAA+B;IAC/B,2BAA2B;IAC3B,mBAAmB;IACnB,uBAAuB;IACvB,gBAAgB;IAChB,UAAU;IACV,MAAM;IACN,WAAW;IACX,SAAS;IACT,YAAY;GACb;EACD;EACA,UAAU;EACV,GAAG;CACJ;AACD;;;;AAKA,SAAgB,kBACf,YAA6C,CAAC,GACrB;CACzB,OAAO;EACN,SAAS;EACT,UAAU;EACV,SAAS;EACT,gBAAgB;EAChB,SAAS;GACR,gBAAgB;GAChB,cAAc;GACd,MAAM;EACP;EACA,gBAAgB;GACf,WAAW;GACX,OAAO;GACP,YAAY;GACZ,cAAc;GACd,WAAW;GACX,UAAU;GACV,OAAO;GACP,MAAM;GACN,WAAW;GACX,MAAM;IACL,QAAQ;IACR,MAAM;IACN,UAAU;IACV,UAAU;IACV,WAAW;GACZ;EACD;EACA,MAAM,KAAA;EACN,gBAAgB,KAAA;EAChB,iBAAiB;EACjB,gBAAgB,KAAA;EAChB,uBAAuB,KAAA;EACvB,SAAS,KAAA;EACT,GAAG;CACJ;AACD"}
@@ -1,4 +1,4 @@
1
-
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  //#region src/benchmark.ts
3
3
  /**
4
4
  * Generates an array of test records for benchmark data sets.
@@ -40,10 +40,10 @@ function randomIpAddress() {
40
40
  const octet = () => Math.floor(Math.random() * 256);
41
41
  return `${octet()}.${octet()}.${octet()}.${octet()}`;
42
42
  }
43
-
44
43
  //#endregion
45
44
  exports.generateCacheKeys = generateCacheKeys;
46
45
  exports.generateIpAddresses = generateIpAddresses;
47
46
  exports.generateTestData = generateTestData;
48
47
  exports.randomIpAddress = randomIpAddress;
48
+
49
49
  //# sourceMappingURL=benchmark.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"benchmark.cjs","names":["count: number","prefix: string","subnet: string"],"sources":["../src/benchmark.ts"],"sourcesContent":["/**\n * Generates an array of test records for benchmark data sets.\n *\n * @param count - Number of records to generate\n * @returns Array of test data objects\n */\nexport function generateTestData(\n\tcount: number,\n): Array<{ id: string; name: string; value: number }> {\n\treturn Array.from({ length: count }, (_, i) => ({\n\t\tid: `id-${i}`,\n\t\tname: `Item ${i}`,\n\t\tvalue: Math.random() * 1000,\n\t}));\n}\n\n/**\n * Generates unique keys for cache benchmarks to avoid collisions.\n *\n * @param prefix - Key prefix\n * @param count - Number of keys to generate\n * @returns Array of unique cache keys\n */\nexport function generateCacheKeys(prefix: string, count: number): string[] {\n\treturn Array.from({ length: count }, (_, i) => `${prefix}:${i}`);\n}\n\n/**\n * Generates IP addresses for rate limit benchmarks.\n *\n * @param count - Number of IPs to generate\n * @param subnet - Subnet prefix (default: '192.168.1')\n * @returns Array of IP addresses\n */\nexport function generateIpAddresses(\n\tcount: number,\n\tsubnet: string = '192.168.1',\n): string[] {\n\treturn Array.from({ length: count }, (_, i) => `${subnet}.${i % 256}`);\n}\n\n/**\n * Creates a random IP address for rate limit benchmarks.\n */\nexport function randomIpAddress(): string {\n\tconst octet = () => Math.floor(Math.random() * 256);\n\treturn `${octet()}.${octet()}.${octet()}.${octet()}`;\n}\n"],"mappings":";;;;;;;;AAMA,SAAgB,iBACfA,OACqD;AACrD,QAAO,MAAM,KAAK,EAAE,QAAQ,MAAO,GAAE,CAAC,GAAG,OAAO;EAC/C,KAAK,KAAK,EAAE;EACZ,OAAO,OAAO,EAAE;EAChB,OAAO,KAAK,QAAQ,GAAG;CACvB,GAAE;AACH;;;;;;;;AASD,SAAgB,kBAAkBC,QAAgBD,OAAyB;AAC1E,QAAO,MAAM,KAAK,EAAE,QAAQ,MAAO,GAAE,CAAC,GAAG,OAAO,EAAE,OAAO,GAAG,EAAE,EAAE;AAChE;;;;;;;;AASD,SAAgB,oBACfA,OACAE,SAAiB,aACN;AACX,QAAO,MAAM,KAAK,EAAE,QAAQ,MAAO,GAAE,CAAC,GAAG,OAAO,EAAE,OAAO,GAAG,IAAI,IAAI,EAAE;AACtE;;;;AAKD,SAAgB,kBAA0B;CACzC,MAAM,QAAQ,MAAM,KAAK,MAAM,KAAK,QAAQ,GAAG,IAAI;AACnD,SAAQ,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,GAAG,OAAO,CAAC,GAAG,OAAO,CAAC;AACnD"}
1
+ {"version":3,"file":"benchmark.cjs","names":[],"sources":["../src/benchmark.ts"],"sourcesContent":["/**\n * Generates an array of test records for benchmark data sets.\n *\n * @param count - Number of records to generate\n * @returns Array of test data objects\n */\nexport function generateTestData(\n\tcount: number,\n): Array<{ id: string; name: string; value: number }> {\n\treturn Array.from({ length: count }, (_, i) => ({\n\t\tid: `id-${i}`,\n\t\tname: `Item ${i}`,\n\t\tvalue: Math.random() * 1000,\n\t}));\n}\n\n/**\n * Generates unique keys for cache benchmarks to avoid collisions.\n *\n * @param prefix - Key prefix\n * @param count - Number of keys to generate\n * @returns Array of unique cache keys\n */\nexport function generateCacheKeys(prefix: string, count: number): string[] {\n\treturn Array.from({ length: count }, (_, i) => `${prefix}:${i}`);\n}\n\n/**\n * Generates IP addresses for rate limit benchmarks.\n *\n * @param count - Number of IPs to generate\n * @param subnet - Subnet prefix (default: '192.168.1')\n * @returns Array of IP addresses\n */\nexport function generateIpAddresses(\n\tcount: number,\n\tsubnet: string = '192.168.1',\n): string[] {\n\treturn Array.from({ length: count }, (_, i) => `${subnet}.${i % 256}`);\n}\n\n/**\n * Creates a random IP address for rate limit benchmarks.\n */\nexport function randomIpAddress(): string {\n\tconst octet = () => Math.floor(Math.random() * 256);\n\treturn `${octet()}.${octet()}.${octet()}.${octet()}`;\n}\n"],"mappings":";;;;;;;;AAMA,SAAgB,iBACf,OACqD;CACrD,OAAO,MAAM,KAAK,EAAE,QAAQ,MAAM,IAAI,GAAG,OAAO;EAC/C,IAAI,MAAM;EACV,MAAM,QAAQ;EACd,OAAO,KAAK,OAAO,IAAI;CACxB,EAAE;AACH;;;;;;;;AASA,SAAgB,kBAAkB,QAAgB,OAAyB;CAC1E,OAAO,MAAM,KAAK,EAAE,QAAQ,MAAM,IAAI,GAAG,MAAM,GAAG,OAAO,GAAG,GAAG;AAChE;;;;;;;;AASA,SAAgB,oBACf,OACA,SAAiB,aACN;CACX,OAAO,MAAM,KAAK,EAAE,QAAQ,MAAM,IAAI,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,KAAK;AACtE;;;;AAKA,SAAgB,kBAA0B;CACzC,MAAM,cAAc,KAAK,MAAM,KAAK,OAAO,IAAI,GAAG;CAClD,OAAO,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM;AAClD"}
@@ -5,7 +5,7 @@
5
5
  * @param count - Number of records to generate
6
6
  * @returns Array of test data objects
7
7
  */
8
- declare function generateTestData(count: number): Array<{
8
+ export declare function generateTestData(count: number): Array<{
9
9
  id: string;
10
10
  name: string;
11
11
  value: number;
@@ -17,7 +17,7 @@ declare function generateTestData(count: number): Array<{
17
17
  * @param count - Number of keys to generate
18
18
  * @returns Array of unique cache keys
19
19
  */
20
- declare function generateCacheKeys(prefix: string, count: number): string[];
20
+ export declare function generateCacheKeys(prefix: string, count: number): string[];
21
21
  /**
22
22
  * Generates IP addresses for rate limit benchmarks.
23
23
  *
@@ -25,12 +25,10 @@ declare function generateCacheKeys(prefix: string, count: number): string[];
25
25
  * @param subnet - Subnet prefix (default: '192.168.1')
26
26
  * @returns Array of IP addresses
27
27
  */
28
- declare function generateIpAddresses(count: number, subnet?: string): string[];
28
+ export declare function generateIpAddresses(count: number, subnet?: string): string[];
29
29
  /**
30
30
  * Creates a random IP address for rate limit benchmarks.
31
31
  */
32
- declare function randomIpAddress(): string;
33
- //# sourceMappingURL=benchmark.d.ts.map
32
+ export declare function randomIpAddress(): string;
34
33
  //#endregion
35
- export { generateCacheKeys, generateIpAddresses, generateTestData, randomIpAddress };
36
34
  //# sourceMappingURL=benchmark.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"benchmark.d.cts","names":[],"sources":["../src/benchmark.ts"],"sourcesContent":[],"mappings":";;AAMA;AAiBA;AAWA;AAUA;;iBAtCgB,gBAAA,iBAEb;;;;;;;;;;;;iBAea,iBAAA;;;;;;;;iBAWA,mBAAA;;;;iBAUA,eAAA,CAAA"}
1
+ {"version":3,"file":"benchmark.d.cts","names":[],"sources":["../src/benchmark.ts"],"mappings":";;;;;;;wBAMgB,iBACf,gBACE;EAAQ;EAAY;EAAc;;;;;;;;;wBAerB,kBAAkB,gBAAgB;;;;;;;;wBAWlC,oBACf,eACA;;;;wBAQe"}
@@ -5,7 +5,7 @@
5
5
  * @param count - Number of records to generate
6
6
  * @returns Array of test data objects
7
7
  */
8
- declare function generateTestData(count: number): Array<{
8
+ export declare function generateTestData(count: number): Array<{
9
9
  id: string;
10
10
  name: string;
11
11
  value: number;
@@ -17,7 +17,7 @@ declare function generateTestData(count: number): Array<{
17
17
  * @param count - Number of keys to generate
18
18
  * @returns Array of unique cache keys
19
19
  */
20
- declare function generateCacheKeys(prefix: string, count: number): string[];
20
+ export declare function generateCacheKeys(prefix: string, count: number): string[];
21
21
  /**
22
22
  * Generates IP addresses for rate limit benchmarks.
23
23
  *
@@ -25,12 +25,10 @@ declare function generateCacheKeys(prefix: string, count: number): string[];
25
25
  * @param subnet - Subnet prefix (default: '192.168.1')
26
26
  * @returns Array of IP addresses
27
27
  */
28
- declare function generateIpAddresses(count: number, subnet?: string): string[];
28
+ export declare function generateIpAddresses(count: number, subnet?: string): string[];
29
29
  /**
30
30
  * Creates a random IP address for rate limit benchmarks.
31
31
  */
32
- declare function randomIpAddress(): string;
33
- //# sourceMappingURL=benchmark.d.ts.map
32
+ export declare function randomIpAddress(): string;
34
33
  //#endregion
35
- export { generateCacheKeys, generateIpAddresses, generateTestData, randomIpAddress };
36
34
  //# sourceMappingURL=benchmark.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"benchmark.d.mts","names":[],"sources":["../src/benchmark.ts"],"sourcesContent":[],"mappings":";;AAMA;AAiBA;AAWA;AAUA;;iBAtCgB,gBAAA,iBAEb;;;;;;;;;;;;iBAea,iBAAA;;;;;;;;iBAWA,mBAAA;;;;iBAUA,eAAA,CAAA"}
1
+ {"version":3,"file":"benchmark.d.mts","names":[],"sources":["../src/benchmark.ts"],"mappings":";;;;;;;wBAMgB,iBACf,gBACE;EAAQ;EAAY;EAAc;;;;;;;;;wBAerB,kBAAkB,gBAAgB;;;;;;;;wBAWlC,oBACf,eACA;;;;wBAQe"}
@@ -39,7 +39,7 @@ function randomIpAddress() {
39
39
  const octet = () => Math.floor(Math.random() * 256);
40
40
  return `${octet()}.${octet()}.${octet()}.${octet()}`;
41
41
  }
42
-
43
42
  //#endregion
44
43
  export { generateCacheKeys, generateIpAddresses, generateTestData, randomIpAddress };
44
+
45
45
  //# sourceMappingURL=benchmark.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"benchmark.mjs","names":["count: number","prefix: string","subnet: string"],"sources":["../src/benchmark.ts"],"sourcesContent":["/**\n * Generates an array of test records for benchmark data sets.\n *\n * @param count - Number of records to generate\n * @returns Array of test data objects\n */\nexport function generateTestData(\n\tcount: number,\n): Array<{ id: string; name: string; value: number }> {\n\treturn Array.from({ length: count }, (_, i) => ({\n\t\tid: `id-${i}`,\n\t\tname: `Item ${i}`,\n\t\tvalue: Math.random() * 1000,\n\t}));\n}\n\n/**\n * Generates unique keys for cache benchmarks to avoid collisions.\n *\n * @param prefix - Key prefix\n * @param count - Number of keys to generate\n * @returns Array of unique cache keys\n */\nexport function generateCacheKeys(prefix: string, count: number): string[] {\n\treturn Array.from({ length: count }, (_, i) => `${prefix}:${i}`);\n}\n\n/**\n * Generates IP addresses for rate limit benchmarks.\n *\n * @param count - Number of IPs to generate\n * @param subnet - Subnet prefix (default: '192.168.1')\n * @returns Array of IP addresses\n */\nexport function generateIpAddresses(\n\tcount: number,\n\tsubnet: string = '192.168.1',\n): string[] {\n\treturn Array.from({ length: count }, (_, i) => `${subnet}.${i % 256}`);\n}\n\n/**\n * Creates a random IP address for rate limit benchmarks.\n */\nexport function randomIpAddress(): string {\n\tconst octet = () => Math.floor(Math.random() * 256);\n\treturn `${octet()}.${octet()}.${octet()}.${octet()}`;\n}\n"],"mappings":";;;;;;;AAMA,SAAgB,iBACfA,OACqD;AACrD,QAAO,MAAM,KAAK,EAAE,QAAQ,MAAO,GAAE,CAAC,GAAG,OAAO;EAC/C,KAAK,KAAK,EAAE;EACZ,OAAO,OAAO,EAAE;EAChB,OAAO,KAAK,QAAQ,GAAG;CACvB,GAAE;AACH;;;;;;;;AASD,SAAgB,kBAAkBC,QAAgBD,OAAyB;AAC1E,QAAO,MAAM,KAAK,EAAE,QAAQ,MAAO,GAAE,CAAC,GAAG,OAAO,EAAE,OAAO,GAAG,EAAE,EAAE;AAChE;;;;;;;;AASD,SAAgB,oBACfA,OACAE,SAAiB,aACN;AACX,QAAO,MAAM,KAAK,EAAE,QAAQ,MAAO,GAAE,CAAC,GAAG,OAAO,EAAE,OAAO,GAAG,IAAI,IAAI,EAAE;AACtE;;;;AAKD,SAAgB,kBAA0B;CACzC,MAAM,QAAQ,MAAM,KAAK,MAAM,KAAK,QAAQ,GAAG,IAAI;AACnD,SAAQ,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,GAAG,OAAO,CAAC,GAAG,OAAO,CAAC;AACnD"}
1
+ {"version":3,"file":"benchmark.mjs","names":[],"sources":["../src/benchmark.ts"],"sourcesContent":["/**\n * Generates an array of test records for benchmark data sets.\n *\n * @param count - Number of records to generate\n * @returns Array of test data objects\n */\nexport function generateTestData(\n\tcount: number,\n): Array<{ id: string; name: string; value: number }> {\n\treturn Array.from({ length: count }, (_, i) => ({\n\t\tid: `id-${i}`,\n\t\tname: `Item ${i}`,\n\t\tvalue: Math.random() * 1000,\n\t}));\n}\n\n/**\n * Generates unique keys for cache benchmarks to avoid collisions.\n *\n * @param prefix - Key prefix\n * @param count - Number of keys to generate\n * @returns Array of unique cache keys\n */\nexport function generateCacheKeys(prefix: string, count: number): string[] {\n\treturn Array.from({ length: count }, (_, i) => `${prefix}:${i}`);\n}\n\n/**\n * Generates IP addresses for rate limit benchmarks.\n *\n * @param count - Number of IPs to generate\n * @param subnet - Subnet prefix (default: '192.168.1')\n * @returns Array of IP addresses\n */\nexport function generateIpAddresses(\n\tcount: number,\n\tsubnet: string = '192.168.1',\n): string[] {\n\treturn Array.from({ length: count }, (_, i) => `${subnet}.${i % 256}`);\n}\n\n/**\n * Creates a random IP address for rate limit benchmarks.\n */\nexport function randomIpAddress(): string {\n\tconst octet = () => Math.floor(Math.random() * 256);\n\treturn `${octet()}.${octet()}.${octet()}.${octet()}`;\n}\n"],"mappings":";;;;;;;AAMA,SAAgB,iBACf,OACqD;CACrD,OAAO,MAAM,KAAK,EAAE,QAAQ,MAAM,IAAI,GAAG,OAAO;EAC/C,IAAI,MAAM;EACV,MAAM,QAAQ;EACd,OAAO,KAAK,OAAO,IAAI;CACxB,EAAE;AACH;;;;;;;;AASA,SAAgB,kBAAkB,QAAgB,OAAyB;CAC1E,OAAO,MAAM,KAAK,EAAE,QAAQ,MAAM,IAAI,GAAG,MAAM,GAAG,OAAO,GAAG,GAAG;AAChE;;;;;;;;AASA,SAAgB,oBACf,OACA,SAAiB,aACN;CACX,OAAO,MAAM,KAAK,EAAE,QAAQ,MAAM,IAAI,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,KAAK;AACtE;;;;AAKA,SAAgB,kBAA0B;CACzC,MAAM,cAAc,KAAK,MAAM,KAAK,OAAO,IAAI,GAAG;CAClD,OAAO,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM;AAClD"}
@@ -1,8 +1,8 @@
1
- const require_chunk = require('./chunk-CUT6urMc.cjs');
2
- const better_auth_adapters = require_chunk.__toESM(require("better-auth/adapters"));
3
-
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ let better_auth_adapters = require("better-auth/adapters");
4
3
  //#region src/better-auth.ts
5
4
  var MemoryStore = class {
5
+ data;
6
6
  constructor(initialData, data = /* @__PURE__ */ new Map()) {
7
7
  this.data = data;
8
8
  if (initialData) for (const [model, records] of Object.entries(initialData)) {
@@ -251,7 +251,7 @@ const memoryAdapter = (config = {}, store = /* @__PURE__ */ new Map()) => {
251
251
  getStore: () => store
252
252
  });
253
253
  };
254
-
255
254
  //#endregion
256
255
  exports.memoryAdapter = memoryAdapter;
256
+
257
257
  //# sourceMappingURL=better-auth.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"better-auth.cjs","names":["initialData?: Record<string, any[]>","data: Map<string, any>","modelName: string","result: Record<string, any[]>","record: any","where?: Where[]","result: boolean | null","v: unknown","records: any[]","sortBy?: SortBy","config: MemoryAdapterConfig","toDelete: string[]"],"sources":["../src/better-auth.ts"],"sourcesContent":["import {\n\tcreateAdapterFactory,\n\ttype DBAdapterDebugLogOption,\n\ttype Where,\n} from 'better-auth/adapters';\n\ninterface MemoryAdapterConfig {\n\tdebugLogs?: DBAdapterDebugLogOption;\n\tusePlural?: boolean;\n\tinitialData?: Record<string, any[]>;\n}\n\nclass MemoryStore {\n\tconstructor(\n\t\tinitialData?: Record<string, any[]>,\n\t\tprivate readonly data: Map<string, any> = new Map(),\n\t) {\n\t\tif (initialData) {\n\t\t\tfor (const [model, records] of Object.entries(initialData)) {\n\t\t\t\tconst modelData = new Map();\n\t\t\t\tfor (const record of records) {\n\t\t\t\t\tmodelData.set(record.id, { ...record });\n\t\t\t\t}\n\t\t\t\tthis.data.set(model, modelData);\n\t\t\t}\n\t\t}\n\t}\n\n\tgetModel(modelName: string): Map<string, any> {\n\t\tif (!this.data.has(modelName)) {\n\t\t\tthis.data.set(modelName, new Map());\n\t\t}\n\t\treturn this.data.get(modelName)!;\n\t}\n\n\tclear() {\n\t\tthis.data.clear();\n\t}\n\n\tgetAllData() {\n\t\tconst result: Record<string, any[]> = {};\n\t\tfor (const [model, records] of this.data.entries()) {\n\t\t\tresult[model] = Array.from(records.values());\n\t\t}\n\t\treturn result;\n\t}\n}\n\nfunction matchesWhere(record: any, where?: Where[]): boolean {\n\tif (!where || where.length === 0) return true;\n\n\tlet result: boolean | null = null;\n\n\tfor (const condition of where) {\n\t\tconst { field, operator = 'eq', connector = 'AND', mode } = condition;\n\t\t// `mode: 'insensitive'` compares strings case-folded on both sides — in\n\t\t// `in`/`not_in` lists too — the way the SQL adapters use ILIKE/LOWER().\n\t\tconst fold =\n\t\t\tmode === 'insensitive'\n\t\t\t\t? (v: unknown) => (typeof v === 'string' ? v.toLowerCase() : v)\n\t\t\t\t: (v: unknown) => v;\n\t\tconst recordValue = fold(record[field]) as any;\n\t\tconst value = (\n\t\t\tArray.isArray(condition.value)\n\t\t\t\t? (condition.value as unknown[]).map(fold)\n\t\t\t\t: fold(condition.value)\n\t\t) as any;\n\n\t\tlet matches = false;\n\n\t\tswitch (operator) {\n\t\t\tcase 'eq':\n\t\t\t\tmatches = recordValue === value;\n\t\t\t\tbreak;\n\t\t\tcase 'ne':\n\t\t\t\tmatches = recordValue !== value;\n\t\t\t\tbreak;\n\t\t\tcase 'lt':\n\t\t\t\tmatches = value != null && recordValue < value;\n\t\t\t\tbreak;\n\t\t\tcase 'lte':\n\t\t\t\tmatches = value != null && recordValue <= value;\n\t\t\t\tbreak;\n\t\t\tcase 'gt':\n\t\t\t\tmatches = value != null && recordValue > value;\n\t\t\t\tbreak;\n\t\t\tcase 'gte':\n\t\t\t\tmatches = value != null && recordValue >= value;\n\t\t\t\tbreak;\n\t\t\tcase 'in':\n\t\t\t\tmatches =\n\t\t\t\t\tArray.isArray(value) && (value as unknown[]).includes(recordValue);\n\t\t\t\tbreak;\n\t\t\tcase 'not_in':\n\t\t\t\tmatches =\n\t\t\t\t\tArray.isArray(value) && !(value as unknown[]).includes(recordValue);\n\t\t\t\tbreak;\n\t\t\tcase 'contains':\n\t\t\t\tmatches =\n\t\t\t\t\ttypeof recordValue === 'string' &&\n\t\t\t\t\ttypeof value === 'string' &&\n\t\t\t\t\trecordValue.includes(value);\n\t\t\t\tbreak;\n\t\t\tcase 'starts_with':\n\t\t\t\tmatches =\n\t\t\t\t\ttypeof recordValue === 'string' &&\n\t\t\t\t\ttypeof value === 'string' &&\n\t\t\t\t\trecordValue.startsWith(value);\n\t\t\t\tbreak;\n\t\t\tcase 'ends_with':\n\t\t\t\tmatches =\n\t\t\t\t\ttypeof recordValue === 'string' &&\n\t\t\t\t\ttypeof value === 'string' &&\n\t\t\t\t\trecordValue.endsWith(value);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tmatches = recordValue === value;\n\t\t}\n\n\t\t// Apply connector logic\n\t\tif (result === null) {\n\t\t\tresult = matches;\n\t\t} else if (connector === 'OR') {\n\t\t\tresult = result || matches;\n\t\t} else {\n\t\t\t// Default: AND\n\t\t\tresult = result && matches;\n\t\t}\n\t}\n\n\treturn result ?? true;\n}\ntype SortBy = {\n\tfield: string;\n\tdirection: 'asc' | 'desc';\n};\n\nfunction applySorting(records: any[], sortBy?: SortBy): any[] {\n\tif (!sortBy) return records;\n\n\tconst { field, direction } = sortBy;\n\n\treturn records.sort((a, b) => {\n\t\tconst aVal = a[field];\n\t\tconst bVal = b[field];\n\n\t\tif (aVal === bVal) return 0;\n\t\tif (aVal == null) return direction === 'asc' ? -1 : 1;\n\t\tif (bVal == null) return direction === 'asc' ? 1 : -1;\n\n\t\tconst comparison = aVal < bVal ? -1 : 1;\n\t\treturn direction === 'asc' ? comparison : -comparison;\n\t});\n}\n\nexport const memoryAdapter = (\n\tconfig: MemoryAdapterConfig = {},\n\tstore = new Map(),\n) => {\n\tconst storeInstance = new MemoryStore(config.initialData, store);\n\n\tconst adapterInstance = createAdapterFactory({\n\t\tconfig: {\n\t\t\tadapterId: 'memory-adapter',\n\t\t\tadapterName: 'Memory Adapter',\n\t\t\tusePlural: config.usePlural ?? false,\n\t\t\tdebugLogs: config.debugLogs ?? false,\n\t\t\tsupportsJSON: true,\n\t\t\tsupportsDates: true,\n\t\t\tsupportsBooleans: true,\n\t\t\tsupportsNumericIds: false,\n\t\t},\n\n\t\t// Note: The framework automatically transforms field names in both directions:\n\t\t// - Input data is already transformed before reaching the adapter (e.g., email -> email_address)\n\t\t// - Output data is automatically transformed after the adapter returns (e.g., email_address -> email)\n\t\t// Therefore, we should NOT call transformInput or transformOutput ourselves.\n\t\tadapter: ({\n\t\t\tdebugLog,\n\t\t\tgetModelName,\n\t\t\tgetFieldName,\n\t\t\ttransformWhereClause,\n\t\t}) => ({\n\t\t\tcreate: async ({ data, model }) => {\n\t\t\t\tdebugLog('CREATE', { model, data });\n\t\t\t\tconst modelName = getModelName(model);\n\t\t\t\tconst modelData = storeInstance.getModel(modelName);\n\n\t\t\t\t// Data is already transformed by the framework - store directly\n\t\t\t\tconst record = data as Record<string, unknown>;\n\t\t\t\tif (!record.id) {\n\t\t\t\t\trecord.id = crypto.randomUUID();\n\t\t\t\t}\n\n\t\t\t\tconst id = record.id as string;\n\t\t\t\tmodelData.set(id, { ...record });\n\t\t\t\treturn modelData.get(id);\n\t\t\t},\n\n\t\t\tfindOne: async ({ where, model }) => {\n\t\t\t\tdebugLog('FIND_ONE', { model, where });\n\t\t\t\tconst modelName = getModelName(model);\n\t\t\t\tconst modelData = storeInstance.getModel(modelName);\n\t\t\t\tconst transformedWhere = transformWhereClause({\n\t\t\t\t\tmodel,\n\t\t\t\t\twhere,\n\t\t\t\t\taction: 'findOne',\n\t\t\t\t});\n\n\t\t\t\tfor (const record of modelData.values()) {\n\t\t\t\t\tif (matchesWhere(record, transformedWhere)) {\n\t\t\t\t\t\treturn record;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t},\n\n\t\t\tfindMany: async ({ where, model, limit, offset, sortBy, select }) => {\n\t\t\t\tdebugLog('FIND_MANY', { model, where });\n\n\t\t\t\tconst modelName = getModelName(model);\n\t\t\t\tconst modelData = storeInstance.getModel(modelName);\n\t\t\t\tconst transformedWhere = transformWhereClause({\n\t\t\t\t\tmodel,\n\t\t\t\t\twhere,\n\t\t\t\t\taction: 'findMany',\n\t\t\t\t});\n\n\t\t\t\tlet results = Array.from(modelData.values()).filter((record) =>\n\t\t\t\t\tmatchesWhere(record, transformedWhere),\n\t\t\t\t);\n\n\t\t\t\tif (sortBy) {\n\t\t\t\t\tresults = applySorting(results, sortBy);\n\t\t\t\t}\n\n\t\t\t\tif (offset) {\n\t\t\t\t\tresults = results.slice(offset);\n\t\t\t\t}\n\t\t\t\tif (limit) {\n\t\t\t\t\tresults = results.slice(0, limit);\n\t\t\t\t}\n\n\t\t\t\t// Only the fields asked for, as a SELECT list would return — under\n\t\t\t\t// their stored names, which differ when the schema renames a field\n\t\t\t\t// (`fields: { email: 'email_address' }`).\n\t\t\t\tif (select?.length) {\n\t\t\t\t\tconst columns = select.map((field) => getFieldName({ model, field }));\n\t\t\t\t\treturn results.map((record) =>\n\t\t\t\t\t\tObject.fromEntries(\n\t\t\t\t\t\t\tcolumns.map((column) => [column, record[column]]),\n\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn results;\n\t\t\t},\n\n\t\t\tupdate: async ({ where, update, model }) => {\n\t\t\t\tdebugLog('UPDATE', { model, where });\n\n\t\t\t\tconst modelName = getModelName(model);\n\t\t\t\tconst modelData = storeInstance.getModel(modelName);\n\t\t\t\tconst transformedWhere = transformWhereClause({\n\t\t\t\t\tmodel,\n\t\t\t\t\twhere,\n\t\t\t\t\taction: 'update',\n\t\t\t\t});\n\n\t\t\t\tfor (const [id, record] of modelData.entries()) {\n\t\t\t\t\tif (matchesWhere(record, transformedWhere)) {\n\t\t\t\t\t\t// Update data is already transformed by the framework\n\t\t\t\t\t\tconst updated = { ...record, ...update };\n\t\t\t\t\t\tmodelData.set(id, updated);\n\t\t\t\t\t\treturn updated;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t},\n\n\t\t\tupdateMany: async ({ where, update, model }) => {\n\t\t\t\tdebugLog('UPDATE_MANY', { model, where });\n\t\t\t\tconst modelName = getModelName(model);\n\t\t\t\tconst modelData = storeInstance.getModel(modelName);\n\t\t\t\tconst transformedWhere = transformWhereClause({\n\t\t\t\t\tmodel,\n\t\t\t\t\twhere,\n\t\t\t\t\taction: 'updateMany',\n\t\t\t\t});\n\n\t\t\t\tlet count = 0;\n\n\t\t\t\tfor (const [id, record] of modelData.entries()) {\n\t\t\t\t\tif (matchesWhere(record, transformedWhere)) {\n\t\t\t\t\t\t// Update data is already transformed by the framework\n\t\t\t\t\t\tmodelData.set(id, { ...record, ...update });\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn count;\n\t\t\t},\n\n\t\t\tdelete: async ({ where, model }) => {\n\t\t\t\tdebugLog('DELETE', { model, where });\n\t\t\t\tconst modelName = getModelName(model);\n\t\t\t\tconst modelData = storeInstance.getModel(modelName);\n\t\t\t\tconst transformedWhere = transformWhereClause({\n\t\t\t\t\tmodel,\n\t\t\t\t\twhere,\n\t\t\t\t\taction: 'delete',\n\t\t\t\t});\n\n\t\t\t\tfor (const [id, record] of modelData.entries()) {\n\t\t\t\t\tif (matchesWhere(record, transformedWhere)) {\n\t\t\t\t\t\tmodelData.delete(id);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tdeleteMany: async ({ where, model }) => {\n\t\t\t\tdebugLog('DELETE_MANY', { model, where });\n\t\t\t\tconst modelName = getModelName(model);\n\t\t\t\tconst modelData = storeInstance.getModel(modelName);\n\t\t\t\tconst transformedWhere = transformWhereClause({\n\t\t\t\t\tmodel,\n\t\t\t\t\twhere,\n\t\t\t\t\taction: 'deleteMany',\n\t\t\t\t});\n\n\t\t\t\tconst toDelete: string[] = [];\n\t\t\t\tfor (const [id, record] of modelData.entries()) {\n\t\t\t\t\tif (matchesWhere(record, transformedWhere)) {\n\t\t\t\t\t\ttoDelete.push(id);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor (const id of toDelete) {\n\t\t\t\t\tmodelData.delete(id);\n\t\t\t\t}\n\t\t\t\treturn toDelete.length;\n\t\t\t},\n\n\t\t\tcount: async ({ where, model }) => {\n\t\t\t\tconst modelName = getModelName(model);\n\t\t\t\tconst modelData = storeInstance.getModel(modelName);\n\t\t\t\tconst transformedWhere = transformWhereClause({\n\t\t\t\t\tmodel,\n\t\t\t\t\twhere,\n\t\t\t\t\taction: 'count',\n\t\t\t\t});\n\n\t\t\t\treturn Array.from(modelData.values()).filter((record) =>\n\t\t\t\t\tmatchesWhere(record, transformedWhere),\n\t\t\t\t).length;\n\t\t\t},\n\t\t}),\n\t});\n\n\t// Add utility methods to the adapter\n\treturn Object.assign(adapterInstance, {\n\t\tclear: () => store.clear(),\n\t\tgetAllData: () => storeInstance.getAllData(),\n\t\tgetStore: () => store,\n\t});\n};\n"],"mappings":";;;;AAYA,IAAM,cAAN,MAAkB;CACjB,YACCA,aACiBC,uBAAyB,IAAI,OAC7C;EADgB;AAEjB,MAAI,YACH,MAAK,MAAM,CAAC,OAAO,QAAQ,IAAI,OAAO,QAAQ,YAAY,EAAE;GAC3D,MAAM,4BAAY,IAAI;AACtB,QAAK,MAAM,UAAU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AAI,OAAO,IAAI,UAAU,SAAS,CAC7C,KAAI,aAAa,QAAQ,iBAAiB,EAAE;AAC3C,eAAU,OAAO,GAAG;AACpB;IACA;GAEF;GAED,YAAY,OAAO,EAAE,OAAO,OAAO,KAAK;AACvC,aAAS,eAAe;KAAE;KAAO;IAAO,EAAC;IACzC,MAAM,YAAY,aAAa,MAAM;IACrC,MAAM,YAAY,cAAc,SAAS,UAAU;IACnD,MAAM,mBAAmB,qBAAqB;KAC7C;KACA;KACA,QAAQ;IACR,EAAC;IAEF,MAAMC,WAAqB,CAAE;AAC7B,SAAK,MAAM,CAAC,IAAI,OAAO,IAAI,UAAU,SAAS,CAC7C,KAAI,aAAa,QAAQ,iBAAiB,CACzC,UAAS,KAAK,GAAG;AAInB,SAAK,MAAM,MAAM,SAChB,WAAU,OAAO,GAAG;AAErB,WAAO,SAAS;GAChB;GAED,OAAO,OAAO,EAAE,OAAO,OAAO,KAAK;IAClC,MAAM,YAAY,aAAa,MAAM;IACrC,MAAM,YAAY,cAAc,SAAS,UAAU;IACnD,MAAM,mBAAmB,qBAAqB;KAC7C;KACA;KACA,QAAQ;IACR,EAAC;AAEF,WAAO,MAAM,KAAK,UAAU,QAAQ,CAAC,CAAC,OAAO,CAAC,WAC7C,aAAa,QAAQ,iBAAiB,CACtC,CAAC;GACF;EACD;CACD,EAAC;AAGF,QAAO,OAAO,OAAO,iBAAiB;EACrC,OAAO,MAAM,MAAM,OAAO;EAC1B,YAAY,MAAM,cAAc,YAAY;EAC5C,UAAU,MAAM;CAChB,EAAC;AACF"}
1
+ {"version":3,"file":"better-auth.cjs","names":["createAdapterFactory"],"sources":["../src/better-auth.ts"],"sourcesContent":["import {\n\tcreateAdapterFactory,\n\ttype DBAdapterDebugLogOption,\n\ttype Where,\n} from 'better-auth/adapters';\n\ninterface MemoryAdapterConfig {\n\tdebugLogs?: DBAdapterDebugLogOption;\n\tusePlural?: boolean;\n\tinitialData?: Record<string, any[]>;\n}\n\nclass MemoryStore {\n\tconstructor(\n\t\tinitialData?: Record<string, any[]>,\n\t\tprivate readonly data: Map<string, any> = new Map(),\n\t) {\n\t\tif (initialData) {\n\t\t\tfor (const [model, records] of Object.entries(initialData)) {\n\t\t\t\tconst modelData = new Map();\n\t\t\t\tfor (const record of records) {\n\t\t\t\t\tmodelData.set(record.id, { ...record });\n\t\t\t\t}\n\t\t\t\tthis.data.set(model, modelData);\n\t\t\t}\n\t\t}\n\t}\n\n\tgetModel(modelName: string): Map<string, any> {\n\t\tif (!this.data.has(modelName)) {\n\t\t\tthis.data.set(modelName, new Map());\n\t\t}\n\t\treturn this.data.get(modelName)!;\n\t}\n\n\tclear() {\n\t\tthis.data.clear();\n\t}\n\n\tgetAllData() {\n\t\tconst result: Record<string, any[]> = {};\n\t\tfor (const [model, records] of this.data.entries()) {\n\t\t\tresult[model] = Array.from(records.values());\n\t\t}\n\t\treturn result;\n\t}\n}\n\nfunction matchesWhere(record: any, where?: Where[]): boolean {\n\tif (!where || where.length === 0) return true;\n\n\tlet result: boolean | null = null;\n\n\tfor (const condition of where) {\n\t\tconst { field, operator = 'eq', connector = 'AND', mode } = condition;\n\t\t// `mode: 'insensitive'` compares strings case-folded on both sides — in\n\t\t// `in`/`not_in` lists too — the way the SQL adapters use ILIKE/LOWER().\n\t\tconst fold =\n\t\t\tmode === 'insensitive'\n\t\t\t\t? (v: unknown) => (typeof v === 'string' ? v.toLowerCase() : v)\n\t\t\t\t: (v: unknown) => v;\n\t\tconst recordValue = fold(record[field]) as any;\n\t\tconst value = (\n\t\t\tArray.isArray(condition.value)\n\t\t\t\t? (condition.value as unknown[]).map(fold)\n\t\t\t\t: fold(condition.value)\n\t\t) as any;\n\n\t\tlet matches = false;\n\n\t\tswitch (operator) {\n\t\t\tcase 'eq':\n\t\t\t\tmatches = recordValue === value;\n\t\t\t\tbreak;\n\t\t\tcase 'ne':\n\t\t\t\tmatches = recordValue !== value;\n\t\t\t\tbreak;\n\t\t\tcase 'lt':\n\t\t\t\tmatches = value != null && recordValue < value;\n\t\t\t\tbreak;\n\t\t\tcase 'lte':\n\t\t\t\tmatches = value != null && recordValue <= value;\n\t\t\t\tbreak;\n\t\t\tcase 'gt':\n\t\t\t\tmatches = value != null && recordValue > value;\n\t\t\t\tbreak;\n\t\t\tcase 'gte':\n\t\t\t\tmatches = value != null && recordValue >= value;\n\t\t\t\tbreak;\n\t\t\tcase 'in':\n\t\t\t\tmatches =\n\t\t\t\t\tArray.isArray(value) && (value as unknown[]).includes(recordValue);\n\t\t\t\tbreak;\n\t\t\tcase 'not_in':\n\t\t\t\tmatches =\n\t\t\t\t\tArray.isArray(value) && !(value as unknown[]).includes(recordValue);\n\t\t\t\tbreak;\n\t\t\tcase 'contains':\n\t\t\t\tmatches =\n\t\t\t\t\ttypeof recordValue === 'string' &&\n\t\t\t\t\ttypeof value === 'string' &&\n\t\t\t\t\trecordValue.includes(value);\n\t\t\t\tbreak;\n\t\t\tcase 'starts_with':\n\t\t\t\tmatches =\n\t\t\t\t\ttypeof recordValue === 'string' &&\n\t\t\t\t\ttypeof value === 'string' &&\n\t\t\t\t\trecordValue.startsWith(value);\n\t\t\t\tbreak;\n\t\t\tcase 'ends_with':\n\t\t\t\tmatches =\n\t\t\t\t\ttypeof recordValue === 'string' &&\n\t\t\t\t\ttypeof value === 'string' &&\n\t\t\t\t\trecordValue.endsWith(value);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tmatches = recordValue === value;\n\t\t}\n\n\t\t// Apply connector logic\n\t\tif (result === null) {\n\t\t\tresult = matches;\n\t\t} else if (connector === 'OR') {\n\t\t\tresult = result || matches;\n\t\t} else {\n\t\t\t// Default: AND\n\t\t\tresult = result && matches;\n\t\t}\n\t}\n\n\treturn result ?? true;\n}\ntype SortBy = {\n\tfield: string;\n\tdirection: 'asc' | 'desc';\n};\n\nfunction applySorting(records: any[], sortBy?: SortBy): any[] {\n\tif (!sortBy) return records;\n\n\tconst { field, direction } = sortBy;\n\n\treturn records.sort((a, b) => {\n\t\tconst aVal = a[field];\n\t\tconst bVal = b[field];\n\n\t\tif (aVal === bVal) return 0;\n\t\tif (aVal == null) return direction === 'asc' ? -1 : 1;\n\t\tif (bVal == null) return direction === 'asc' ? 1 : -1;\n\n\t\tconst comparison = aVal < bVal ? -1 : 1;\n\t\treturn direction === 'asc' ? comparison : -comparison;\n\t});\n}\n\nexport const memoryAdapter = (\n\tconfig: MemoryAdapterConfig = {},\n\tstore = new Map(),\n) => {\n\tconst storeInstance = new MemoryStore(config.initialData, store);\n\n\tconst adapterInstance = createAdapterFactory({\n\t\tconfig: {\n\t\t\tadapterId: 'memory-adapter',\n\t\t\tadapterName: 'Memory Adapter',\n\t\t\tusePlural: config.usePlural ?? false,\n\t\t\tdebugLogs: config.debugLogs ?? false,\n\t\t\tsupportsJSON: true,\n\t\t\tsupportsDates: true,\n\t\t\tsupportsBooleans: true,\n\t\t\tsupportsNumericIds: false,\n\t\t},\n\n\t\t// Note: The framework automatically transforms field names in both directions:\n\t\t// - Input data is already transformed before reaching the adapter (e.g., email -> email_address)\n\t\t// - Output data is automatically transformed after the adapter returns (e.g., email_address -> email)\n\t\t// Therefore, we should NOT call transformInput or transformOutput ourselves.\n\t\tadapter: ({\n\t\t\tdebugLog,\n\t\t\tgetModelName,\n\t\t\tgetFieldName,\n\t\t\ttransformWhereClause,\n\t\t}) => ({\n\t\t\tcreate: async ({ data, model }) => {\n\t\t\t\tdebugLog('CREATE', { model, data });\n\t\t\t\tconst modelName = getModelName(model);\n\t\t\t\tconst modelData = storeInstance.getModel(modelName);\n\n\t\t\t\t// Data is already transformed by the framework - store directly\n\t\t\t\tconst record = data as Record<string, unknown>;\n\t\t\t\tif (!record.id) {\n\t\t\t\t\trecord.id = crypto.randomUUID();\n\t\t\t\t}\n\n\t\t\t\tconst id = record.id as string;\n\t\t\t\tmodelData.set(id, { ...record });\n\t\t\t\treturn modelData.get(id);\n\t\t\t},\n\n\t\t\tfindOne: async ({ where, model }) => {\n\t\t\t\tdebugLog('FIND_ONE', { model, where });\n\t\t\t\tconst modelName = getModelName(model);\n\t\t\t\tconst modelData = storeInstance.getModel(modelName);\n\t\t\t\tconst transformedWhere = transformWhereClause({\n\t\t\t\t\tmodel,\n\t\t\t\t\twhere,\n\t\t\t\t\taction: 'findOne',\n\t\t\t\t});\n\n\t\t\t\tfor (const record of modelData.values()) {\n\t\t\t\t\tif (matchesWhere(record, transformedWhere)) {\n\t\t\t\t\t\treturn record;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t},\n\n\t\t\tfindMany: async ({ where, model, limit, offset, sortBy, select }) => {\n\t\t\t\tdebugLog('FIND_MANY', { model, where });\n\n\t\t\t\tconst modelName = getModelName(model);\n\t\t\t\tconst modelData = storeInstance.getModel(modelName);\n\t\t\t\tconst transformedWhere = transformWhereClause({\n\t\t\t\t\tmodel,\n\t\t\t\t\twhere,\n\t\t\t\t\taction: 'findMany',\n\t\t\t\t});\n\n\t\t\t\tlet results = Array.from(modelData.values()).filter((record) =>\n\t\t\t\t\tmatchesWhere(record, transformedWhere),\n\t\t\t\t);\n\n\t\t\t\tif (sortBy) {\n\t\t\t\t\tresults = applySorting(results, sortBy);\n\t\t\t\t}\n\n\t\t\t\tif (offset) {\n\t\t\t\t\tresults = results.slice(offset);\n\t\t\t\t}\n\t\t\t\tif (limit) {\n\t\t\t\t\tresults = results.slice(0, limit);\n\t\t\t\t}\n\n\t\t\t\t// Only the fields asked for, as a SELECT list would return — under\n\t\t\t\t// their stored names, which differ when the schema renames a field\n\t\t\t\t// (`fields: { email: 'email_address' }`).\n\t\t\t\tif (select?.length) {\n\t\t\t\t\tconst columns = select.map((field) => getFieldName({ model, field }));\n\t\t\t\t\treturn results.map((record) =>\n\t\t\t\t\t\tObject.fromEntries(\n\t\t\t\t\t\t\tcolumns.map((column) => [column, record[column]]),\n\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn results;\n\t\t\t},\n\n\t\t\tupdate: async ({ where, update, model }) => {\n\t\t\t\tdebugLog('UPDATE', { model, where });\n\n\t\t\t\tconst modelName = getModelName(model);\n\t\t\t\tconst modelData = storeInstance.getModel(modelName);\n\t\t\t\tconst transformedWhere = transformWhereClause({\n\t\t\t\t\tmodel,\n\t\t\t\t\twhere,\n\t\t\t\t\taction: 'update',\n\t\t\t\t});\n\n\t\t\t\tfor (const [id, record] of modelData.entries()) {\n\t\t\t\t\tif (matchesWhere(record, transformedWhere)) {\n\t\t\t\t\t\t// Update data is already transformed by the framework\n\t\t\t\t\t\tconst updated = { ...record, ...update };\n\t\t\t\t\t\tmodelData.set(id, updated);\n\t\t\t\t\t\treturn updated;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t},\n\n\t\t\tupdateMany: async ({ where, update, model }) => {\n\t\t\t\tdebugLog('UPDATE_MANY', { model, where });\n\t\t\t\tconst modelName = getModelName(model);\n\t\t\t\tconst modelData = storeInstance.getModel(modelName);\n\t\t\t\tconst transformedWhere = transformWhereClause({\n\t\t\t\t\tmodel,\n\t\t\t\t\twhere,\n\t\t\t\t\taction: 'updateMany',\n\t\t\t\t});\n\n\t\t\t\tlet count = 0;\n\n\t\t\t\tfor (const [id, record] of modelData.entries()) {\n\t\t\t\t\tif (matchesWhere(record, transformedWhere)) {\n\t\t\t\t\t\t// Update data is already transformed by the framework\n\t\t\t\t\t\tmodelData.set(id, { ...record, ...update });\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn count;\n\t\t\t},\n\n\t\t\tdelete: async ({ where, model }) => {\n\t\t\t\tdebugLog('DELETE', { model, where });\n\t\t\t\tconst modelName = getModelName(model);\n\t\t\t\tconst modelData = storeInstance.getModel(modelName);\n\t\t\t\tconst transformedWhere = transformWhereClause({\n\t\t\t\t\tmodel,\n\t\t\t\t\twhere,\n\t\t\t\t\taction: 'delete',\n\t\t\t\t});\n\n\t\t\t\tfor (const [id, record] of modelData.entries()) {\n\t\t\t\t\tif (matchesWhere(record, transformedWhere)) {\n\t\t\t\t\t\tmodelData.delete(id);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tdeleteMany: async ({ where, model }) => {\n\t\t\t\tdebugLog('DELETE_MANY', { model, where });\n\t\t\t\tconst modelName = getModelName(model);\n\t\t\t\tconst modelData = storeInstance.getModel(modelName);\n\t\t\t\tconst transformedWhere = transformWhereClause({\n\t\t\t\t\tmodel,\n\t\t\t\t\twhere,\n\t\t\t\t\taction: 'deleteMany',\n\t\t\t\t});\n\n\t\t\t\tconst toDelete: string[] = [];\n\t\t\t\tfor (const [id, record] of modelData.entries()) {\n\t\t\t\t\tif (matchesWhere(record, transformedWhere)) {\n\t\t\t\t\t\ttoDelete.push(id);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor (const id of toDelete) {\n\t\t\t\t\tmodelData.delete(id);\n\t\t\t\t}\n\t\t\t\treturn toDelete.length;\n\t\t\t},\n\n\t\t\tcount: async ({ where, model }) => {\n\t\t\t\tconst modelName = getModelName(model);\n\t\t\t\tconst modelData = storeInstance.getModel(modelName);\n\t\t\t\tconst transformedWhere = transformWhereClause({\n\t\t\t\t\tmodel,\n\t\t\t\t\twhere,\n\t\t\t\t\taction: 'count',\n\t\t\t\t});\n\n\t\t\t\treturn Array.from(modelData.values()).filter((record) =>\n\t\t\t\t\tmatchesWhere(record, transformedWhere),\n\t\t\t\t).length;\n\t\t\t},\n\t\t}),\n\t});\n\n\t// Add utility methods to the adapter\n\treturn Object.assign(adapterInstance, {\n\t\tclear: () => store.clear(),\n\t\tgetAllData: () => storeInstance.getAllData(),\n\t\tgetStore: () => store,\n\t});\n};\n"],"mappings":";;;AAYA,IAAM,cAAN,MAAkB;CAGC;CAFlB,YACC,aACA,uBAA0C,IAAI,IAAI,GACjD;EADgB,KAAA,OAAA;EAEjB,IAAI,aACH,KAAK,MAAM,CAAC,OAAO,YAAY,OAAO,Q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