@voidhash/mimic-effect 0.0.8 → 1.0.0-beta.1

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 (176) hide show
  1. package/.turbo/turbo-build.log +93 -89
  2. package/README.md +385 -0
  3. package/dist/ColdStorage.cjs +60 -0
  4. package/dist/ColdStorage.d.cts +53 -0
  5. package/dist/ColdStorage.d.cts.map +1 -0
  6. package/dist/ColdStorage.d.mts +53 -0
  7. package/dist/ColdStorage.d.mts.map +1 -0
  8. package/dist/ColdStorage.mjs +60 -0
  9. package/dist/ColdStorage.mjs.map +1 -0
  10. package/dist/DocumentManager.cjs +193 -82
  11. package/dist/DocumentManager.d.cts +33 -19
  12. package/dist/DocumentManager.d.cts.map +1 -1
  13. package/dist/DocumentManager.d.mts +33 -19
  14. package/dist/DocumentManager.d.mts.map +1 -1
  15. package/dist/DocumentManager.mjs +189 -67
  16. package/dist/DocumentManager.mjs.map +1 -1
  17. package/dist/Errors.cjs +45 -0
  18. package/dist/Errors.d.cts +81 -0
  19. package/dist/Errors.d.cts.map +1 -0
  20. package/dist/Errors.d.mts +81 -0
  21. package/dist/Errors.d.mts.map +1 -0
  22. package/dist/Errors.mjs +40 -0
  23. package/dist/Errors.mjs.map +1 -0
  24. package/dist/HotStorage.cjs +77 -0
  25. package/dist/HotStorage.d.cts +54 -0
  26. package/dist/HotStorage.d.cts.map +1 -0
  27. package/dist/HotStorage.d.mts +54 -0
  28. package/dist/HotStorage.d.mts.map +1 -0
  29. package/dist/HotStorage.mjs +77 -0
  30. package/dist/HotStorage.mjs.map +1 -0
  31. package/dist/Metrics.cjs +121 -0
  32. package/dist/Metrics.d.cts +27 -0
  33. package/dist/Metrics.d.cts.map +1 -0
  34. package/dist/Metrics.d.mts +27 -0
  35. package/dist/Metrics.d.mts.map +1 -0
  36. package/dist/Metrics.mjs +106 -0
  37. package/dist/Metrics.mjs.map +1 -0
  38. package/dist/MimicAuthService.cjs +61 -45
  39. package/dist/MimicAuthService.d.cts +61 -48
  40. package/dist/MimicAuthService.d.cts.map +1 -1
  41. package/dist/MimicAuthService.d.mts +61 -48
  42. package/dist/MimicAuthService.d.mts.map +1 -1
  43. package/dist/MimicAuthService.mjs +60 -36
  44. package/dist/MimicAuthService.mjs.map +1 -1
  45. package/dist/MimicClusterServerEngine.cjs +443 -0
  46. package/dist/MimicClusterServerEngine.d.cts +17 -0
  47. package/dist/MimicClusterServerEngine.d.cts.map +1 -0
  48. package/dist/MimicClusterServerEngine.d.mts +17 -0
  49. package/dist/MimicClusterServerEngine.d.mts.map +1 -0
  50. package/dist/MimicClusterServerEngine.mjs +445 -0
  51. package/dist/MimicClusterServerEngine.mjs.map +1 -0
  52. package/dist/MimicServer.cjs +205 -96
  53. package/dist/MimicServer.d.cts +9 -110
  54. package/dist/MimicServer.d.cts.map +1 -1
  55. package/dist/MimicServer.d.mts +9 -110
  56. package/dist/MimicServer.d.mts.map +1 -1
  57. package/dist/MimicServer.mjs +206 -90
  58. package/dist/MimicServer.mjs.map +1 -1
  59. package/dist/MimicServerEngine.cjs +97 -0
  60. package/dist/MimicServerEngine.d.cts +75 -0
  61. package/dist/MimicServerEngine.d.cts.map +1 -0
  62. package/dist/MimicServerEngine.d.mts +75 -0
  63. package/dist/MimicServerEngine.d.mts.map +1 -0
  64. package/dist/MimicServerEngine.mjs +97 -0
  65. package/dist/MimicServerEngine.mjs.map +1 -0
  66. package/dist/PresenceManager.cjs +75 -91
  67. package/dist/PresenceManager.d.cts +17 -66
  68. package/dist/PresenceManager.d.cts.map +1 -1
  69. package/dist/PresenceManager.d.mts +17 -66
  70. package/dist/PresenceManager.d.mts.map +1 -1
  71. package/dist/PresenceManager.mjs +74 -78
  72. package/dist/PresenceManager.mjs.map +1 -1
  73. package/dist/Protocol.cjs +146 -0
  74. package/dist/Protocol.d.cts +203 -0
  75. package/dist/Protocol.d.cts.map +1 -0
  76. package/dist/Protocol.d.mts +203 -0
  77. package/dist/Protocol.d.mts.map +1 -0
  78. package/dist/Protocol.mjs +132 -0
  79. package/dist/Protocol.mjs.map +1 -0
  80. package/dist/Types.d.cts +172 -0
  81. package/dist/Types.d.cts.map +1 -0
  82. package/dist/Types.d.mts +172 -0
  83. package/dist/Types.d.mts.map +1 -0
  84. package/dist/_virtual/rolldown_runtime.cjs +1 -25
  85. package/dist/_virtual/rolldown_runtime.mjs +4 -1
  86. package/dist/index.cjs +37 -75
  87. package/dist/index.d.cts +13 -12
  88. package/dist/index.d.mts +13 -12
  89. package/dist/index.mjs +12 -12
  90. package/package.json +14 -6
  91. package/src/ColdStorage.ts +136 -0
  92. package/src/DocumentManager.ts +445 -193
  93. package/src/Errors.ts +100 -0
  94. package/src/HotStorage.ts +165 -0
  95. package/src/Metrics.ts +163 -0
  96. package/src/MimicAuthService.ts +126 -64
  97. package/src/MimicClusterServerEngine.ts +824 -0
  98. package/src/MimicServer.ts +448 -195
  99. package/src/MimicServerEngine.ts +272 -0
  100. package/src/PresenceManager.ts +169 -240
  101. package/src/Protocol.ts +350 -0
  102. package/src/Types.ts +231 -0
  103. package/src/index.ts +57 -23
  104. package/tests/ColdStorage.test.ts +136 -0
  105. package/tests/DocumentManager.test.ts +158 -287
  106. package/tests/HotStorage.test.ts +143 -0
  107. package/tests/MimicAuthService.test.ts +102 -134
  108. package/tests/MimicClusterServerEngine.test.ts +587 -0
  109. package/tests/MimicServer.test.ts +90 -226
  110. package/tests/MimicServerEngine.test.ts +521 -0
  111. package/tests/PresenceManager.test.ts +22 -63
  112. package/tests/Protocol.test.ts +190 -0
  113. package/tsconfig.json +1 -1
  114. package/dist/DocumentProtocol.cjs +0 -94
  115. package/dist/DocumentProtocol.d.cts +0 -113
  116. package/dist/DocumentProtocol.d.cts.map +0 -1
  117. package/dist/DocumentProtocol.d.mts +0 -113
  118. package/dist/DocumentProtocol.d.mts.map +0 -1
  119. package/dist/DocumentProtocol.mjs +0 -89
  120. package/dist/DocumentProtocol.mjs.map +0 -1
  121. package/dist/MimicConfig.cjs +0 -60
  122. package/dist/MimicConfig.d.cts +0 -141
  123. package/dist/MimicConfig.d.cts.map +0 -1
  124. package/dist/MimicConfig.d.mts +0 -141
  125. package/dist/MimicConfig.d.mts.map +0 -1
  126. package/dist/MimicConfig.mjs +0 -50
  127. package/dist/MimicConfig.mjs.map +0 -1
  128. package/dist/MimicDataStorage.cjs +0 -83
  129. package/dist/MimicDataStorage.d.cts +0 -113
  130. package/dist/MimicDataStorage.d.cts.map +0 -1
  131. package/dist/MimicDataStorage.d.mts +0 -113
  132. package/dist/MimicDataStorage.d.mts.map +0 -1
  133. package/dist/MimicDataStorage.mjs +0 -74
  134. package/dist/MimicDataStorage.mjs.map +0 -1
  135. package/dist/WebSocketHandler.cjs +0 -365
  136. package/dist/WebSocketHandler.d.cts +0 -34
  137. package/dist/WebSocketHandler.d.cts.map +0 -1
  138. package/dist/WebSocketHandler.d.mts +0 -34
  139. package/dist/WebSocketHandler.d.mts.map +0 -1
  140. package/dist/WebSocketHandler.mjs +0 -355
  141. package/dist/WebSocketHandler.mjs.map +0 -1
  142. package/dist/auth/NoAuth.cjs +0 -43
  143. package/dist/auth/NoAuth.d.cts +0 -22
  144. package/dist/auth/NoAuth.d.cts.map +0 -1
  145. package/dist/auth/NoAuth.d.mts +0 -22
  146. package/dist/auth/NoAuth.d.mts.map +0 -1
  147. package/dist/auth/NoAuth.mjs +0 -36
  148. package/dist/auth/NoAuth.mjs.map +0 -1
  149. package/dist/errors.cjs +0 -74
  150. package/dist/errors.d.cts +0 -89
  151. package/dist/errors.d.cts.map +0 -1
  152. package/dist/errors.d.mts +0 -89
  153. package/dist/errors.d.mts.map +0 -1
  154. package/dist/errors.mjs +0 -67
  155. package/dist/errors.mjs.map +0 -1
  156. package/dist/storage/InMemoryDataStorage.cjs +0 -57
  157. package/dist/storage/InMemoryDataStorage.d.cts +0 -19
  158. package/dist/storage/InMemoryDataStorage.d.cts.map +0 -1
  159. package/dist/storage/InMemoryDataStorage.d.mts +0 -19
  160. package/dist/storage/InMemoryDataStorage.d.mts.map +0 -1
  161. package/dist/storage/InMemoryDataStorage.mjs +0 -48
  162. package/dist/storage/InMemoryDataStorage.mjs.map +0 -1
  163. package/src/DocumentProtocol.ts +0 -112
  164. package/src/MimicConfig.ts +0 -211
  165. package/src/MimicDataStorage.ts +0 -157
  166. package/src/WebSocketHandler.ts +0 -735
  167. package/src/auth/NoAuth.ts +0 -46
  168. package/src/errors.ts +0 -113
  169. package/src/storage/InMemoryDataStorage.ts +0 -66
  170. package/tests/DocumentProtocol.test.ts +0 -113
  171. package/tests/InMemoryDataStorage.test.ts +0 -190
  172. package/tests/MimicConfig.test.ts +0 -290
  173. package/tests/MimicDataStorage.test.ts +0 -190
  174. package/tests/NoAuth.test.ts +0 -94
  175. package/tests/WebSocketHandler.test.ts +0 -321
  176. package/tests/errors.test.ts +0 -77
@@ -0,0 +1,106 @@
1
+ import { Metric, MetricBoundaries } from "effect";
2
+
3
+ //#region src/Metrics.ts
4
+ /**
5
+ * @voidhash/mimic-effect - Metrics
6
+ *
7
+ * Observability metrics using Effect's Metric API.
8
+ */
9
+ /**
10
+ * Current active WebSocket connections
11
+ */
12
+ const connectionsActive = Metric.gauge("mimic.connections.active");
13
+ /**
14
+ * Total connections over lifetime
15
+ */
16
+ const connectionsTotal = Metric.counter("mimic.connections.total");
17
+ /**
18
+ * Connection duration histogram (milliseconds)
19
+ */
20
+ const connectionsDuration = Metric.histogram("mimic.connections.duration_ms", MetricBoundaries.exponential({
21
+ start: 100,
22
+ factor: 2,
23
+ count: 15
24
+ }));
25
+ /**
26
+ * Connection errors (auth failures, etc.)
27
+ */
28
+ const connectionsErrors = Metric.counter("mimic.connections.errors");
29
+ /**
30
+ * Documents currently in memory
31
+ */
32
+ const documentsActive = Metric.gauge("mimic.documents.active");
33
+ /**
34
+ * New documents created
35
+ */
36
+ const documentsCreated = Metric.counter("mimic.documents.created");
37
+ /**
38
+ * Documents restored from storage
39
+ */
40
+ const documentsRestored = Metric.counter("mimic.documents.restored");
41
+ /**
42
+ * Documents garbage collected (evicted)
43
+ */
44
+ const documentsEvicted = Metric.counter("mimic.documents.evicted");
45
+ /**
46
+ * Successfully processed transactions
47
+ */
48
+ const transactionsProcessed = Metric.counter("mimic.transactions.processed");
49
+ /**
50
+ * Rejected transactions
51
+ */
52
+ const transactionsRejected = Metric.counter("mimic.transactions.rejected");
53
+ /**
54
+ * Transaction processing latency histogram (milliseconds)
55
+ */
56
+ const transactionsLatency = Metric.histogram("mimic.transactions.latency_ms", MetricBoundaries.exponential({
57
+ start: .1,
58
+ factor: 2,
59
+ count: 15
60
+ }));
61
+ /**
62
+ * Snapshots saved to ColdStorage
63
+ */
64
+ const storageSnapshots = Metric.counter("mimic.storage.snapshots");
65
+ /**
66
+ * Snapshot save duration histogram (milliseconds)
67
+ */
68
+ const storageSnapshotLatency = Metric.histogram("mimic.storage.snapshot_latency_ms", MetricBoundaries.exponential({
69
+ start: 1,
70
+ factor: 2,
71
+ count: 12
72
+ }));
73
+ /**
74
+ * WAL entries written to HotStorage
75
+ */
76
+ const storageWalAppends = Metric.counter("mimic.storage.wal_appends");
77
+ /**
78
+ * Presence set operations
79
+ */
80
+ const presenceUpdates = Metric.counter("mimic.presence.updates");
81
+ /**
82
+ * Active presence entries
83
+ */
84
+ const presenceActive = Metric.gauge("mimic.presence.active");
85
+ const MimicMetrics = {
86
+ connectionsActive,
87
+ connectionsTotal,
88
+ connectionsDuration,
89
+ connectionsErrors,
90
+ documentsActive,
91
+ documentsCreated,
92
+ documentsRestored,
93
+ documentsEvicted,
94
+ transactionsProcessed,
95
+ transactionsRejected,
96
+ transactionsLatency,
97
+ storageSnapshots,
98
+ storageSnapshotLatency,
99
+ storageWalAppends,
100
+ presenceUpdates,
101
+ presenceActive
102
+ };
103
+
104
+ //#endregion
105
+ export { MimicMetrics, connectionsActive, connectionsDuration, connectionsErrors, connectionsTotal, documentsActive, documentsCreated, documentsEvicted, documentsRestored, presenceActive, presenceUpdates, storageSnapshotLatency, storageSnapshots, storageWalAppends, transactionsLatency, transactionsProcessed, transactionsRejected };
106
+ //# sourceMappingURL=Metrics.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Metrics.mjs","names":[],"sources":["../src/Metrics.ts"],"sourcesContent":["/**\n * @voidhash/mimic-effect - Metrics\n *\n * Observability metrics using Effect's Metric API.\n */\nimport { Metric, MetricBoundaries } from \"effect\";\n\n// =============================================================================\n// Connection Metrics\n// =============================================================================\n\n/**\n * Current active WebSocket connections\n */\nexport const connectionsActive = Metric.gauge(\"mimic.connections.active\");\n\n/**\n * Total connections over lifetime\n */\nexport const connectionsTotal = Metric.counter(\"mimic.connections.total\");\n\n/**\n * Connection duration histogram (milliseconds)\n */\nexport const connectionsDuration = Metric.histogram(\n \"mimic.connections.duration_ms\",\n MetricBoundaries.exponential({\n start: 100,\n factor: 2,\n count: 15, // Up to ~3.2 million ms (~53 minutes)\n })\n);\n\n/**\n * Connection errors (auth failures, etc.)\n */\nexport const connectionsErrors = Metric.counter(\"mimic.connections.errors\");\n\n// =============================================================================\n// Document Metrics\n// =============================================================================\n\n/**\n * Documents currently in memory\n */\nexport const documentsActive = Metric.gauge(\"mimic.documents.active\");\n\n/**\n * New documents created\n */\nexport const documentsCreated = Metric.counter(\"mimic.documents.created\");\n\n/**\n * Documents restored from storage\n */\nexport const documentsRestored = Metric.counter(\"mimic.documents.restored\");\n\n/**\n * Documents garbage collected (evicted)\n */\nexport const documentsEvicted = Metric.counter(\"mimic.documents.evicted\");\n\n// =============================================================================\n// Transaction Metrics\n// =============================================================================\n\n/**\n * Successfully processed transactions\n */\nexport const transactionsProcessed = Metric.counter(\n \"mimic.transactions.processed\"\n);\n\n/**\n * Rejected transactions\n */\nexport const transactionsRejected = Metric.counter(\n \"mimic.transactions.rejected\"\n);\n\n/**\n * Transaction processing latency histogram (milliseconds)\n */\nexport const transactionsLatency = Metric.histogram(\n \"mimic.transactions.latency_ms\",\n MetricBoundaries.exponential({\n start: 0.1,\n factor: 2,\n count: 15, // Up to ~1638 ms\n })\n);\n\n// =============================================================================\n// Storage Metrics\n// =============================================================================\n\n/**\n * Snapshots saved to ColdStorage\n */\nexport const storageSnapshots = Metric.counter(\"mimic.storage.snapshots\");\n\n/**\n * Snapshot save duration histogram (milliseconds)\n */\nexport const storageSnapshotLatency = Metric.histogram(\n \"mimic.storage.snapshot_latency_ms\",\n MetricBoundaries.exponential({\n start: 1,\n factor: 2,\n count: 12, // Up to ~4 seconds\n })\n);\n\n/**\n * WAL entries written to HotStorage\n */\nexport const storageWalAppends = Metric.counter(\"mimic.storage.wal_appends\");\n\n// =============================================================================\n// Presence Metrics\n// =============================================================================\n\n/**\n * Presence set operations\n */\nexport const presenceUpdates = Metric.counter(\"mimic.presence.updates\");\n\n/**\n * Active presence entries\n */\nexport const presenceActive = Metric.gauge(\"mimic.presence.active\");\n\n// =============================================================================\n// Export namespace\n// =============================================================================\n\nexport const MimicMetrics = {\n // Connection\n connectionsActive,\n connectionsTotal,\n connectionsDuration,\n connectionsErrors,\n\n // Document\n documentsActive,\n documentsCreated,\n documentsRestored,\n documentsEvicted,\n\n // Transaction\n transactionsProcessed,\n transactionsRejected,\n transactionsLatency,\n\n // Storage\n storageSnapshots,\n storageSnapshotLatency,\n storageWalAppends,\n\n // Presence\n presenceUpdates,\n presenceActive,\n};\n"],"mappings":";;;;;;;;;;;AAcA,MAAa,oBAAoB,OAAO,MAAM,2BAA2B;;;;AAKzE,MAAa,mBAAmB,OAAO,QAAQ,0BAA0B;;;;AAKzE,MAAa,sBAAsB,OAAO,UACxC,iCACA,iBAAiB,YAAY;CAC3B,OAAO;CACP,QAAQ;CACR,OAAO;CACR,CAAC,CACH;;;;AAKD,MAAa,oBAAoB,OAAO,QAAQ,2BAA2B;;;;AAS3E,MAAa,kBAAkB,OAAO,MAAM,yBAAyB;;;;AAKrE,MAAa,mBAAmB,OAAO,QAAQ,0BAA0B;;;;AAKzE,MAAa,oBAAoB,OAAO,QAAQ,2BAA2B;;;;AAK3E,MAAa,mBAAmB,OAAO,QAAQ,0BAA0B;;;;AASzE,MAAa,wBAAwB,OAAO,QAC1C,+BACD;;;;AAKD,MAAa,uBAAuB,OAAO,QACzC,8BACD;;;;AAKD,MAAa,sBAAsB,OAAO,UACxC,iCACA,iBAAiB,YAAY;CAC3B,OAAO;CACP,QAAQ;CACR,OAAO;CACR,CAAC,CACH;;;;AASD,MAAa,mBAAmB,OAAO,QAAQ,0BAA0B;;;;AAKzE,MAAa,yBAAyB,OAAO,UAC3C,qCACA,iBAAiB,YAAY;CAC3B,OAAO;CACP,QAAQ;CACR,OAAO;CACR,CAAC,CACH;;;;AAKD,MAAa,oBAAoB,OAAO,QAAQ,4BAA4B;;;;AAS5E,MAAa,kBAAkB,OAAO,QAAQ,yBAAyB;;;;AAKvE,MAAa,iBAAiB,OAAO,MAAM,wBAAwB;AAMnE,MAAa,eAAe;CAE1B;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CAGA;CACA;CACA;CAGA;CACA;CACA;CAGA;CACA;CACD"}
@@ -1,55 +1,71 @@
1
- const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
2
- let effect_Effect = require("effect/Effect");
3
- effect_Effect = require_rolldown_runtime.__toESM(effect_Effect);
4
- let effect_Layer = require("effect/Layer");
5
- effect_Layer = require_rolldown_runtime.__toESM(effect_Layer);
6
- let effect_Context = require("effect/Context");
7
- effect_Context = require_rolldown_runtime.__toESM(effect_Context);
1
+ const require_Errors = require('./Errors.cjs');
2
+ let effect = require("effect");
8
3
 
9
4
  //#region src/MimicAuthService.ts
10
5
  /**
11
- * @since 0.0.1
12
- * Authentication service interface for Mimic connections.
13
- * Provides pluggable authentication adapters.
6
+ * @voidhash/mimic-effect - MimicAuthService
7
+ *
8
+ * Authentication and authorization service interface and implementations.
14
9
  */
15
- var MimicAuthService_exports = /* @__PURE__ */ require_rolldown_runtime.__export({
16
- MimicAuthServiceTag: () => MimicAuthServiceTag,
17
- layer: () => layer,
18
- layerEffect: () => layerEffect,
19
- layerService: () => layerService,
20
- make: () => make,
21
- makeEffect: () => makeEffect
22
- });
23
10
  /**
24
- * Context tag for MimicAuthService service.
11
+ * Context tag for MimicAuthService
25
12
  */
26
- var MimicAuthServiceTag = class extends effect_Context.Tag("@voidhash/mimic-server-effect/MimicAuthService")() {};
13
+ var MimicAuthServiceTag = class extends effect.Context.Tag("@voidhash/mimic-effect/MimicAuthService")() {};
27
14
  /**
28
- * Create a MimicAuthService layer from an auth handler function.
15
+ * Create a MimicAuthService layer from an Effect that produces the service.
16
+ *
17
+ * This allows you to access other Effect services when implementing authentication.
18
+ *
19
+ * @example
20
+ * ```typescript
21
+ * const Auth = MimicAuthService.make(
22
+ * Effect.gen(function*() {
23
+ * const db = yield* DatabaseService
24
+ * const jwt = yield* JwtService
25
+ *
26
+ * return {
27
+ * authenticate: (token, documentId) =>
28
+ * Effect.gen(function*() {
29
+ * const payload = yield* jwt.verify(token).pipe(
30
+ * Effect.mapError(() => new AuthenticationError({ reason: "Invalid token" }))
31
+ * )
32
+ *
33
+ * const permission = yield* db.getDocumentPermission(payload.userId, documentId)
34
+ *
35
+ * return { userId: payload.userId, permission }
36
+ * })
37
+ * }
38
+ * })
39
+ * )
40
+ * ```
29
41
  */
30
- const layer = (options) => effect_Layer.succeed(MimicAuthServiceTag, { authenticate: (token) => effect_Effect.promise(() => Promise.resolve(options.authHandler(token))) });
31
- /**
32
- * Create a MimicAuthService layer from an auth service implementation.
33
- */
34
- const layerService = (service) => effect_Layer.succeed(MimicAuthServiceTag, service);
35
- /**
36
- * Create a MimicAuthService layer from an Effect that produces an auth service.
37
- */
38
- const layerEffect = (effect) => effect_Layer.effect(MimicAuthServiceTag, effect);
39
- /**
40
- * Create an auth service from an auth handler function.
41
- */
42
- const make = (authHandler) => ({ authenticate: (token) => effect_Effect.promise(() => Promise.resolve(authHandler(token))) });
43
- /**
44
- * Create an auth service from an Effect-based authenticate function.
45
- */
46
- const makeEffect = (authenticate) => ({ authenticate });
42
+ const make = (effect$1) => effect.Layer.effect(MimicAuthServiceTag, effect$1);
43
+ let NoAuth;
44
+ (function(_NoAuth) {
45
+ _NoAuth.make = () => effect.Layer.succeed(MimicAuthServiceTag, { authenticate: (_token, _documentId) => effect.Effect.succeed({
46
+ userId: "anonymous",
47
+ permission: "write"
48
+ }) });
49
+ })(NoAuth || (NoAuth = {}));
50
+ let Static;
51
+ (function(_Static) {
52
+ _Static.make = (options) => effect.Layer.succeed(MimicAuthServiceTag, { authenticate: (token, _documentId) => {
53
+ var _options$permissions$;
54
+ const permission = (_options$permissions$ = options.permissions[token]) !== null && _options$permissions$ !== void 0 ? _options$permissions$ : options.defaultPermission;
55
+ if (permission === void 0) return effect.Effect.fail(new require_Errors.AuthenticationError({ reason: "Unknown user" }));
56
+ return effect.Effect.succeed({
57
+ userId: token,
58
+ permission
59
+ });
60
+ } });
61
+ })(Static || (Static = {}));
62
+ const MimicAuthService = {
63
+ Tag: MimicAuthServiceTag,
64
+ make,
65
+ NoAuth,
66
+ Static
67
+ };
47
68
 
48
69
  //#endregion
49
- exports.MimicAuthServiceTag = MimicAuthServiceTag;
50
- Object.defineProperty(exports, 'MimicAuthService_exports', {
51
- enumerable: true,
52
- get: function () {
53
- return MimicAuthService_exports;
54
- }
55
- });
70
+ exports.MimicAuthService = MimicAuthService;
71
+ exports.MimicAuthServiceTag = MimicAuthServiceTag;
@@ -1,65 +1,78 @@
1
- import * as Effect from "effect/Effect";
2
- import * as Layer from "effect/Layer";
3
- import * as Context from "effect/Context";
1
+ import { AuthContext, Permission } from "./Types.cjs";
2
+ import { AuthenticationError } from "./Errors.cjs";
3
+ import { Context, Effect, Layer } from "effect";
4
4
 
5
5
  //#region src/MimicAuthService.d.ts
6
- declare namespace MimicAuthService_d_exports {
7
- export { AuthHandler, AuthResult, MimicAuthService, MimicAuthServiceTag, layer, layerEffect, layerService, make, makeEffect };
8
- }
9
- /**
10
- * Result of an authentication attempt.
11
- */
12
- type AuthResult = {
13
- readonly success: true;
14
- readonly userId?: string;
15
- } | {
16
- readonly success: false;
17
- readonly error: string;
18
- };
19
- /**
20
- * Authentication handler function type.
21
- * Can be synchronous or return a Promise.
22
- */
23
- type AuthHandler = (token: string) => Promise<AuthResult> | AuthResult;
6
+
24
7
  /**
25
- * Authentication service interface.
26
- * Implementations can authenticate connections using various methods (JWT, API keys, etc.)
8
+ * MimicAuthService interface for authentication and authorization.
9
+ *
10
+ * The `authenticate` method receives the token from the client's auth message
11
+ * and the document ID being accessed. It should return an AuthContext on success
12
+ * or fail with AuthenticationError on failure.
13
+ *
14
+ * The permission in AuthContext determines what the user can do:
15
+ * - "read": Can subscribe, receive transactions, get snapshots
16
+ * - "write": All of the above, plus can submit transactions and set presence
27
17
  */
28
18
  interface MimicAuthService {
29
19
  /**
30
- * Authenticate a connection using the provided token.
31
- * @param token - The authentication token provided by the client
32
- * @returns The authentication result
20
+ * Authenticate a connection and return authorization context.
21
+ *
22
+ * @param token - The token provided by the client
23
+ * @param documentId - The document ID being accessed
24
+ * @returns AuthContext with userId and permission level
33
25
  */
34
- readonly authenticate: (token: string) => Effect.Effect<AuthResult>;
26
+ readonly authenticate: (token: string, documentId: string) => Effect.Effect<AuthContext, AuthenticationError>;
35
27
  }
36
- declare const MimicAuthServiceTag_base: Context.TagClass<MimicAuthServiceTag, "@voidhash/mimic-server-effect/MimicAuthService", MimicAuthService>;
28
+ declare const MimicAuthServiceTag_base: Context.TagClass<MimicAuthServiceTag, "@voidhash/mimic-effect/MimicAuthService", MimicAuthService>;
37
29
  /**
38
- * Context tag for MimicAuthService service.
30
+ * Context tag for MimicAuthService
39
31
  */
40
32
  declare class MimicAuthServiceTag extends MimicAuthServiceTag_base {}
41
33
  /**
42
- * Create a MimicAuthService layer from an auth handler function.
43
- */
44
- declare const layer: (options: {
45
- readonly authHandler: AuthHandler;
46
- }) => Layer.Layer<MimicAuthServiceTag>;
47
- /**
48
- * Create a MimicAuthService layer from an auth service implementation.
49
- */
50
- declare const layerService: (service: MimicAuthService) => Layer.Layer<MimicAuthServiceTag>;
51
- /**
52
- * Create a MimicAuthService layer from an Effect that produces an auth service.
53
- */
54
- declare const layerEffect: <E, R>(effect: Effect.Effect<MimicAuthService, E, R>) => Layer.Layer<MimicAuthServiceTag, E, R>;
55
- /**
56
- * Create an auth service from an auth handler function.
34
+ * No-authentication implementation.
35
+ *
36
+ * Everyone gets write access with userId "anonymous".
37
+ * ONLY USE FOR DEVELOPMENT/TESTING.
57
38
  */
58
- declare const make: (authHandler: AuthHandler) => MimicAuthService;
39
+ declare namespace NoAuth {
40
+ /**
41
+ * Create a NoAuth layer.
42
+ * All connections are authenticated with write permission.
43
+ */
44
+ const make: () => Layer.Layer<MimicAuthServiceTag>;
45
+ }
59
46
  /**
60
- * Create an auth service from an Effect-based authenticate function.
47
+ * Static permissions implementation.
48
+ *
49
+ * Permissions are defined at configuration time.
50
+ * The token is treated as the userId.
61
51
  */
62
- declare const makeEffect: (authenticate: (token: string) => Effect.Effect<AuthResult>) => MimicAuthService;
52
+ declare namespace Static {
53
+ interface Options {
54
+ /**
55
+ * Map of userId (token) to permission level
56
+ */
57
+ readonly permissions: Record<string, Permission>;
58
+ /**
59
+ * Default permission for users not in the permissions map.
60
+ * If undefined, unknown users will fail authentication.
61
+ */
62
+ readonly defaultPermission?: Permission;
63
+ }
64
+ /**
65
+ * Create a Static auth layer.
66
+ * The token is treated as the userId, and permissions are looked up from the config.
67
+ */
68
+ const make: (options: Options) => Layer.Layer<MimicAuthServiceTag>;
69
+ }
70
+ declare const MimicAuthService: {
71
+ Tag: typeof MimicAuthServiceTag;
72
+ make: <E, R>(effect: Effect.Effect<MimicAuthService, E, R>) => Layer.Layer<MimicAuthServiceTag, E, R>;
73
+ NoAuth: typeof NoAuth;
74
+ Static: typeof Static;
75
+ };
63
76
  //#endregion
64
- export { MimicAuthServiceTag, MimicAuthService_d_exports };
77
+ export { MimicAuthService, MimicAuthServiceTag };
65
78
  //# sourceMappingURL=MimicAuthService.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MimicAuthService.d.cts","names":[],"sources":["../src/MimicAuthService.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;KAgBY,UAAA;;;;;;AAAZ,CAAA;AAQA;;;;AAA6E,KAAjE,WAAA,GAAiE,CAAA,KAAA,EAAA,MAAA,EAAA,GAAhC,OAAgC,CAAxB,UAAwB,CAAA,GAAV,UAAU;AAU7E;AAOC;;;UAPgB,gBAAA;;AAgBjB;AAWA;;;EAEI,SAAM,YAAA,EAAA,CAAA,KAAA,EAAA,MAAA,EAAA,GAvBkC,MAAA,CAAO,MAuBzC,CAvBgD,UAuBhD,CAAA;;AASV,cA/BC,wBAgC4C,kBAAA,oBAAA,EAAA,gDAAA,kBAAA,CAAA;;;;AADuB,cAtBvD,mBAAA,SAA4B,wBAAA,CAsB2B;;;;AAO1D,cAlBG,KAkBI,EAAA,CAAA,OAAA,EAAA;EACF,SAAA,WAAA,EAlBS,WAkBT;CAAqB,EAAA,GAjBhC,KAAA,CAAM,KAiB0B,CAjBpB,mBAiBoB,CAAA;;;;AAUvB,cAlBA,YAkBqB,EAAA,CAAc,OAAA,EAlBV,gBAqBpC,EAAA,GArBuD,KAAA,CAAM,KAqB7D,CArBmE,mBAqBnE,CAAA;AAKF;;;AAEG,cAtBU,WAsBV,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,MAAA,EArBO,MAAA,CAAO,MAqBd,CArBqB,gBAqBrB,EArBuC,CAqBvC,EArB0C,CAqB1C,CAAA,EAAA,GApBA,KAAA,CAAM,KAoBN,CApBY,mBAoBZ,EApBiC,CAoBjC,EApBoC,CAoBpC,CAAA;;;;cAVU,oBAAqB,gBAAc;;;;cAQnC,8CACsB,MAAA,CAAO,OAAO,gBAC9C"}
1
+ {"version":3,"file":"MimicAuthService.d.cts","names":[],"sources":["../src/MimicAuthService.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAoCC;;;;;AASD;AAmDA;AAyBA;;AAK0B,UAtGT,gBAAA,CAsGS;EAKO;;;;;AA4BjC;;EA7EwB,SAAA,YAAA,EAAA,CAAA,KAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,GA/CjB,MAAA,CAAO,MA+CU,CA/CH,WA+CG,EA/CU,mBA+CV,CAAA;;cA9CvB,wBA8C4C,kBAAA,oBAAA,EAAA,yCAAA,kBAAA,CAAA;;;;AACN,cAtC1B,mBAAA,SAA4B,wBAAA,CAsCF;;;;;;;kBAatB,MAAA;;;;;oBAKS,KAAA,CAAM,MAAM;;;;;;;;kBAoBrB,MAAA;;;;;0BAKS,eAAe;;;;;iCAKR;;;;;;wBAOD,YAAU,KAAA,CAAM,MAAM;;cAqBzC;;uBA7EH,MAAA,CAAO,OAAO,kBAAkB,GAAG,OAC1C,KAAA,CAAM,MAAM,qBAAqB,GAAG"}
@@ -1,65 +1,78 @@
1
- import * as Effect from "effect/Effect";
2
- import * as Layer from "effect/Layer";
3
- import * as Context from "effect/Context";
1
+ import { AuthContext, Permission } from "./Types.mjs";
2
+ import { AuthenticationError } from "./Errors.mjs";
3
+ import { Context, Effect, Layer } from "effect";
4
4
 
5
5
  //#region src/MimicAuthService.d.ts
6
- declare namespace MimicAuthService_d_exports {
7
- export { AuthHandler, AuthResult, MimicAuthService, MimicAuthServiceTag, layer, layerEffect, layerService, make, makeEffect };
8
- }
9
- /**
10
- * Result of an authentication attempt.
11
- */
12
- type AuthResult = {
13
- readonly success: true;
14
- readonly userId?: string;
15
- } | {
16
- readonly success: false;
17
- readonly error: string;
18
- };
19
- /**
20
- * Authentication handler function type.
21
- * Can be synchronous or return a Promise.
22
- */
23
- type AuthHandler = (token: string) => Promise<AuthResult> | AuthResult;
6
+
24
7
  /**
25
- * Authentication service interface.
26
- * Implementations can authenticate connections using various methods (JWT, API keys, etc.)
8
+ * MimicAuthService interface for authentication and authorization.
9
+ *
10
+ * The `authenticate` method receives the token from the client's auth message
11
+ * and the document ID being accessed. It should return an AuthContext on success
12
+ * or fail with AuthenticationError on failure.
13
+ *
14
+ * The permission in AuthContext determines what the user can do:
15
+ * - "read": Can subscribe, receive transactions, get snapshots
16
+ * - "write": All of the above, plus can submit transactions and set presence
27
17
  */
28
18
  interface MimicAuthService {
29
19
  /**
30
- * Authenticate a connection using the provided token.
31
- * @param token - The authentication token provided by the client
32
- * @returns The authentication result
20
+ * Authenticate a connection and return authorization context.
21
+ *
22
+ * @param token - The token provided by the client
23
+ * @param documentId - The document ID being accessed
24
+ * @returns AuthContext with userId and permission level
33
25
  */
34
- readonly authenticate: (token: string) => Effect.Effect<AuthResult>;
26
+ readonly authenticate: (token: string, documentId: string) => Effect.Effect<AuthContext, AuthenticationError>;
35
27
  }
36
- declare const MimicAuthServiceTag_base: Context.TagClass<MimicAuthServiceTag, "@voidhash/mimic-server-effect/MimicAuthService", MimicAuthService>;
28
+ declare const MimicAuthServiceTag_base: Context.TagClass<MimicAuthServiceTag, "@voidhash/mimic-effect/MimicAuthService", MimicAuthService>;
37
29
  /**
38
- * Context tag for MimicAuthService service.
30
+ * Context tag for MimicAuthService
39
31
  */
40
32
  declare class MimicAuthServiceTag extends MimicAuthServiceTag_base {}
41
33
  /**
42
- * Create a MimicAuthService layer from an auth handler function.
43
- */
44
- declare const layer: (options: {
45
- readonly authHandler: AuthHandler;
46
- }) => Layer.Layer<MimicAuthServiceTag>;
47
- /**
48
- * Create a MimicAuthService layer from an auth service implementation.
49
- */
50
- declare const layerService: (service: MimicAuthService) => Layer.Layer<MimicAuthServiceTag>;
51
- /**
52
- * Create a MimicAuthService layer from an Effect that produces an auth service.
53
- */
54
- declare const layerEffect: <E, R>(effect: Effect.Effect<MimicAuthService, E, R>) => Layer.Layer<MimicAuthServiceTag, E, R>;
55
- /**
56
- * Create an auth service from an auth handler function.
34
+ * No-authentication implementation.
35
+ *
36
+ * Everyone gets write access with userId "anonymous".
37
+ * ONLY USE FOR DEVELOPMENT/TESTING.
57
38
  */
58
- declare const make: (authHandler: AuthHandler) => MimicAuthService;
39
+ declare namespace NoAuth {
40
+ /**
41
+ * Create a NoAuth layer.
42
+ * All connections are authenticated with write permission.
43
+ */
44
+ const make: () => Layer.Layer<MimicAuthServiceTag>;
45
+ }
59
46
  /**
60
- * Create an auth service from an Effect-based authenticate function.
47
+ * Static permissions implementation.
48
+ *
49
+ * Permissions are defined at configuration time.
50
+ * The token is treated as the userId.
61
51
  */
62
- declare const makeEffect: (authenticate: (token: string) => Effect.Effect<AuthResult>) => MimicAuthService;
52
+ declare namespace Static {
53
+ interface Options {
54
+ /**
55
+ * Map of userId (token) to permission level
56
+ */
57
+ readonly permissions: Record<string, Permission>;
58
+ /**
59
+ * Default permission for users not in the permissions map.
60
+ * If undefined, unknown users will fail authentication.
61
+ */
62
+ readonly defaultPermission?: Permission;
63
+ }
64
+ /**
65
+ * Create a Static auth layer.
66
+ * The token is treated as the userId, and permissions are looked up from the config.
67
+ */
68
+ const make: (options: Options) => Layer.Layer<MimicAuthServiceTag>;
69
+ }
70
+ declare const MimicAuthService: {
71
+ Tag: typeof MimicAuthServiceTag;
72
+ make: <E, R>(effect: Effect.Effect<MimicAuthService, E, R>) => Layer.Layer<MimicAuthServiceTag, E, R>;
73
+ NoAuth: typeof NoAuth;
74
+ Static: typeof Static;
75
+ };
63
76
  //#endregion
64
- export { MimicAuthServiceTag, MimicAuthService_d_exports };
77
+ export { MimicAuthService, MimicAuthServiceTag };
65
78
  //# sourceMappingURL=MimicAuthService.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MimicAuthService.d.mts","names":[],"sources":["../src/MimicAuthService.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;KAgBY,UAAA;;;;;;AAAZ,CAAA;AAQA;;;;AAA6E,KAAjE,WAAA,GAAiE,CAAA,KAAA,EAAA,MAAA,EAAA,GAAhC,OAAgC,CAAxB,UAAwB,CAAA,GAAV,UAAU;AAU7E;AAOC;;;UAPgB,gBAAA;;AAgBjB;AAWA;;;EAEI,SAAM,YAAA,EAAA,CAAA,KAAA,EAAA,MAAA,EAAA,GAvBkC,MAAA,CAAO,MAuBzC,CAvBgD,UAuBhD,CAAA;;AASV,cA/BC,wBAgC4C,kBAAA,oBAAA,EAAA,gDAAA,kBAAA,CAAA;;;;AADuB,cAtBvD,mBAAA,SAA4B,wBAAA,CAsB2B;;;;AAO1D,cAlBG,KAkBI,EAAA,CAAA,OAAA,EAAA;EACF,SAAA,WAAA,EAlBS,WAkBT;CAAqB,EAAA,GAjBhC,KAAA,CAAM,KAiB0B,CAjBpB,mBAiBoB,CAAA;;;;AAUvB,cAlBA,YAkBqB,EAAA,CAAc,OAAA,EAlBV,gBAqBpC,EAAA,GArBuD,KAAA,CAAM,KAqB7D,CArBmE,mBAqBnE,CAAA;AAKF;;;AAEG,cAtBU,WAsBV,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,MAAA,EArBO,MAAA,CAAO,MAqBd,CArBqB,gBAqBrB,EArBuC,CAqBvC,EArB0C,CAqB1C,CAAA,EAAA,GApBA,KAAA,CAAM,KAoBN,CApBY,mBAoBZ,EApBiC,CAoBjC,EApBoC,CAoBpC,CAAA;;;;cAVU,oBAAqB,gBAAc;;;;cAQnC,8CACsB,MAAA,CAAO,OAAO,gBAC9C"}
1
+ {"version":3,"file":"MimicAuthService.d.mts","names":[],"sources":["../src/MimicAuthService.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAoCC;;;;;AASD;AAmDA;AAyBA;;AAK0B,UAtGT,gBAAA,CAsGS;EAKO;;;;;AA4BjC;;EA7EwB,SAAA,YAAA,EAAA,CAAA,KAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,GA/CjB,MAAA,CAAO,MA+CU,CA/CH,WA+CG,EA/CU,mBA+CV,CAAA;;cA9CvB,wBA8C4C,kBAAA,oBAAA,EAAA,yCAAA,kBAAA,CAAA;;;;AACN,cAtC1B,mBAAA,SAA4B,wBAAA,CAsCF;;;;;;;kBAatB,MAAA;;;;;oBAKS,KAAA,CAAM,MAAM;;;;;;;;kBAoBrB,MAAA;;;;;0BAKS,eAAe;;;;;iCAKR;;;;;;wBAOD,YAAU,KAAA,CAAM,MAAM;;cAqBzC;;uBA7EH,MAAA,CAAO,OAAO,kBAAkB,GAAG,OAC1C,KAAA,CAAM,MAAM,qBAAqB,GAAG"}
@@ -1,47 +1,71 @@
1
- import { __export } from "./_virtual/rolldown_runtime.mjs";
2
- import * as Effect from "effect/Effect";
3
- import * as Layer from "effect/Layer";
4
- import * as Context from "effect/Context";
1
+ import { AuthenticationError } from "./Errors.mjs";
2
+ import { Context, Effect, Layer } from "effect";
5
3
 
6
4
  //#region src/MimicAuthService.ts
7
5
  /**
8
- * @since 0.0.1
9
- * Authentication service interface for Mimic connections.
10
- * Provides pluggable authentication adapters.
6
+ * @voidhash/mimic-effect - MimicAuthService
7
+ *
8
+ * Authentication and authorization service interface and implementations.
11
9
  */
12
- var MimicAuthService_exports = /* @__PURE__ */ __export({
13
- MimicAuthServiceTag: () => MimicAuthServiceTag,
14
- layer: () => layer,
15
- layerEffect: () => layerEffect,
16
- layerService: () => layerService,
17
- make: () => make,
18
- makeEffect: () => makeEffect
19
- });
20
10
  /**
21
- * Context tag for MimicAuthService service.
11
+ * Context tag for MimicAuthService
22
12
  */
23
- var MimicAuthServiceTag = class extends Context.Tag("@voidhash/mimic-server-effect/MimicAuthService")() {};
13
+ var MimicAuthServiceTag = class extends Context.Tag("@voidhash/mimic-effect/MimicAuthService")() {};
24
14
  /**
25
- * Create a MimicAuthService layer from an auth handler function.
15
+ * Create a MimicAuthService layer from an Effect that produces the service.
16
+ *
17
+ * This allows you to access other Effect services when implementing authentication.
18
+ *
19
+ * @example
20
+ * ```typescript
21
+ * const Auth = MimicAuthService.make(
22
+ * Effect.gen(function*() {
23
+ * const db = yield* DatabaseService
24
+ * const jwt = yield* JwtService
25
+ *
26
+ * return {
27
+ * authenticate: (token, documentId) =>
28
+ * Effect.gen(function*() {
29
+ * const payload = yield* jwt.verify(token).pipe(
30
+ * Effect.mapError(() => new AuthenticationError({ reason: "Invalid token" }))
31
+ * )
32
+ *
33
+ * const permission = yield* db.getDocumentPermission(payload.userId, documentId)
34
+ *
35
+ * return { userId: payload.userId, permission }
36
+ * })
37
+ * }
38
+ * })
39
+ * )
40
+ * ```
26
41
  */
27
- const layer = (options) => Layer.succeed(MimicAuthServiceTag, { authenticate: (token) => Effect.promise(() => Promise.resolve(options.authHandler(token))) });
28
- /**
29
- * Create a MimicAuthService layer from an auth service implementation.
30
- */
31
- const layerService = (service) => Layer.succeed(MimicAuthServiceTag, service);
32
- /**
33
- * Create a MimicAuthService layer from an Effect that produces an auth service.
34
- */
35
- const layerEffect = (effect) => Layer.effect(MimicAuthServiceTag, effect);
36
- /**
37
- * Create an auth service from an auth handler function.
38
- */
39
- const make = (authHandler) => ({ authenticate: (token) => Effect.promise(() => Promise.resolve(authHandler(token))) });
40
- /**
41
- * Create an auth service from an Effect-based authenticate function.
42
- */
43
- const makeEffect = (authenticate) => ({ authenticate });
42
+ const make = (effect) => Layer.effect(MimicAuthServiceTag, effect);
43
+ let NoAuth;
44
+ (function(_NoAuth) {
45
+ _NoAuth.make = () => Layer.succeed(MimicAuthServiceTag, { authenticate: (_token, _documentId) => Effect.succeed({
46
+ userId: "anonymous",
47
+ permission: "write"
48
+ }) });
49
+ })(NoAuth || (NoAuth = {}));
50
+ let Static;
51
+ (function(_Static) {
52
+ _Static.make = (options) => Layer.succeed(MimicAuthServiceTag, { authenticate: (token, _documentId) => {
53
+ var _options$permissions$;
54
+ const permission = (_options$permissions$ = options.permissions[token]) !== null && _options$permissions$ !== void 0 ? _options$permissions$ : options.defaultPermission;
55
+ if (permission === void 0) return Effect.fail(new AuthenticationError({ reason: "Unknown user" }));
56
+ return Effect.succeed({
57
+ userId: token,
58
+ permission
59
+ });
60
+ } });
61
+ })(Static || (Static = {}));
62
+ const MimicAuthService = {
63
+ Tag: MimicAuthServiceTag,
64
+ make,
65
+ NoAuth,
66
+ Static
67
+ };
44
68
 
45
69
  //#endregion
46
- export { MimicAuthServiceTag, MimicAuthService_exports };
70
+ export { MimicAuthService, MimicAuthServiceTag };
47
71
  //# sourceMappingURL=MimicAuthService.mjs.map