effect-app 4.0.0-beta.99 → 4.0.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 (391) hide show
  1. package/CHANGELOG.md +2042 -0
  2. package/dist/Array.d.ts +1 -17
  3. package/dist/Array.d.ts.map +1 -1
  4. package/dist/Array.js +3 -27
  5. package/dist/Chunk.d.ts +3 -27
  6. package/dist/Chunk.d.ts.map +1 -1
  7. package/dist/Chunk.js +4 -39
  8. package/dist/Config/SecretURL.d.ts +3 -1
  9. package/dist/Config/SecretURL.d.ts.map +1 -1
  10. package/dist/Config/SecretURL.js +3 -6
  11. package/dist/Config/internal/configSecretURL.d.ts.map +1 -1
  12. package/dist/Config/internal/configSecretURL.js +2 -2
  13. package/dist/Config.d.ts +0 -5
  14. package/dist/Config.d.ts.map +1 -1
  15. package/dist/Config.js +7 -5
  16. package/dist/ConfigProvider.d.ts +0 -37
  17. package/dist/ConfigProvider.d.ts.map +1 -1
  18. package/dist/ConfigProvider.js +5 -41
  19. package/dist/Context.d.ts +6 -4
  20. package/dist/Context.d.ts.map +1 -1
  21. package/dist/Context.js +4 -3
  22. package/dist/DataDependencies.d.ts +136 -0
  23. package/dist/DataDependencies.d.ts.map +1 -0
  24. package/dist/DataDependencies.js +112 -0
  25. package/dist/DateTime.d.ts +33 -0
  26. package/dist/DateTime.d.ts.map +1 -0
  27. package/dist/DateTime.js +18 -0
  28. package/dist/Effect.d.ts +3 -14
  29. package/dist/Effect.d.ts.map +1 -1
  30. package/dist/Effect.js +8 -26
  31. package/dist/Emailer.d.ts +51 -0
  32. package/dist/Emailer.d.ts.map +1 -0
  33. package/dist/Emailer.js +7 -0
  34. package/dist/Function.d.ts +0 -4
  35. package/dist/Function.d.ts.map +1 -1
  36. package/dist/Function.js +1 -7
  37. package/dist/Layer.d.ts +6 -3
  38. package/dist/Layer.d.ts.map +1 -1
  39. package/dist/Layer.js +3 -2
  40. package/dist/Model/Repository/Registry.d.ts +22 -0
  41. package/dist/Model/Repository/Registry.d.ts.map +1 -0
  42. package/dist/Model/Repository/Registry.js +18 -0
  43. package/dist/Model/Repository/dependency.d.ts +6 -0
  44. package/dist/Model/Repository/dependency.d.ts.map +1 -0
  45. package/dist/Model/Repository/dependency.js +29 -0
  46. package/dist/Model/Repository/ext.d.ts +60 -0
  47. package/dist/Model/Repository/ext.d.ts.map +1 -0
  48. package/dist/Model/Repository/ext.js +124 -0
  49. package/dist/Model/Repository/internal/internal.d.ts +68 -0
  50. package/dist/Model/Repository/internal/internal.d.ts.map +1 -0
  51. package/dist/Model/Repository/internal/internal.js +610 -0
  52. package/dist/Model/Repository/legacy.d.ts +21 -0
  53. package/dist/Model/Repository/legacy.d.ts.map +1 -0
  54. package/dist/Model/Repository/legacy.js +2 -0
  55. package/dist/Model/Repository/makeRepo.d.ts +71 -0
  56. package/dist/Model/Repository/makeRepo.d.ts.map +1 -0
  57. package/dist/Model/Repository/makeRepo.js +30 -0
  58. package/dist/Model/Repository/service.d.ts +121 -0
  59. package/dist/Model/Repository/service.d.ts.map +1 -0
  60. package/dist/Model/Repository/service.js +2 -0
  61. package/dist/Model/Repository/validation.d.ts +72 -0
  62. package/dist/Model/Repository/validation.d.ts.map +1 -0
  63. package/dist/Model/Repository/validation.js +39 -0
  64. package/dist/Model/Repository.d.ts +8 -0
  65. package/dist/Model/Repository.d.ts.map +1 -0
  66. package/dist/Model/Repository.js +8 -0
  67. package/dist/Model/dsl.d.ts +34 -0
  68. package/dist/Model/dsl.d.ts.map +1 -0
  69. package/dist/Model/dsl.js +45 -0
  70. package/dist/Model/filter/filterApi.d.ts +30 -0
  71. package/dist/Model/filter/filterApi.d.ts.map +1 -0
  72. package/dist/Model/filter/filterApi.js +2 -0
  73. package/dist/Model/filter/types/errors.d.ts +29 -0
  74. package/dist/Model/filter/types/errors.d.ts.map +1 -0
  75. package/dist/Model/filter/types/errors.js +2 -0
  76. package/dist/Model/filter/types/fields.d.ts +15 -0
  77. package/dist/Model/filter/types/fields.d.ts.map +1 -0
  78. package/dist/Model/filter/types/fields.js +2 -0
  79. package/dist/Model/filter/types/path/common.d.ts +316 -0
  80. package/dist/Model/filter/types/path/common.d.ts.map +1 -0
  81. package/dist/Model/filter/types/path/common.js +2 -0
  82. package/dist/Model/filter/types/path/eager.d.ts +94 -0
  83. package/dist/Model/filter/types/path/eager.d.ts.map +1 -0
  84. package/dist/Model/filter/types/path/eager.js +36 -0
  85. package/dist/Model/filter/types/path/index.d.ts +4 -0
  86. package/dist/Model/filter/types/path/index.d.ts.map +1 -0
  87. package/dist/Model/filter/types/path/index.js +3 -0
  88. package/dist/Model/filter/types/utils.d.ts +79 -0
  89. package/dist/Model/filter/types/utils.d.ts.map +1 -0
  90. package/dist/Model/filter/types/utils.js +2 -0
  91. package/dist/Model/filter/types/validator.d.ts +30 -0
  92. package/dist/Model/filter/types/validator.d.ts.map +1 -0
  93. package/dist/Model/filter/types/validator.js +2 -0
  94. package/dist/Model/filter/types.d.ts +5 -0
  95. package/dist/Model/filter/types.d.ts.map +1 -0
  96. package/dist/Model/filter/types.js +7 -0
  97. package/dist/Model/query/dsl.d.ts +630 -0
  98. package/dist/Model/query/dsl.d.ts.map +1 -0
  99. package/dist/Model/query/dsl.js +376 -0
  100. package/dist/Model/query/new-kid-interpreter.d.ts +132 -0
  101. package/dist/Model/query/new-kid-interpreter.d.ts.map +1 -0
  102. package/dist/Model/query/new-kid-interpreter.js +369 -0
  103. package/dist/Model/query.d.ts +15 -0
  104. package/dist/Model/query.d.ts.map +1 -0
  105. package/dist/Model/query.js +3 -0
  106. package/dist/Model.d.ts +6 -0
  107. package/dist/Model.d.ts.map +1 -0
  108. package/dist/Model.js +6 -0
  109. package/dist/NonEmptySet.d.ts +3 -1
  110. package/dist/NonEmptySet.d.ts.map +1 -1
  111. package/dist/NonEmptySet.js +2 -2
  112. package/dist/Option.d.ts +1 -2
  113. package/dist/Option.d.ts.map +1 -1
  114. package/dist/Option.js +3 -7
  115. package/dist/Pure.d.ts +9 -7
  116. package/dist/Pure.d.ts.map +1 -1
  117. package/dist/Pure.js +20 -17
  118. package/dist/QueueMaker.d.ts +11 -0
  119. package/dist/QueueMaker.d.ts.map +1 -0
  120. package/dist/QueueMaker.js +11 -0
  121. package/dist/RequestContext.d.ts +87 -0
  122. package/dist/RequestContext.d.ts.map +1 -0
  123. package/dist/RequestContext.js +45 -0
  124. package/dist/RequestScopedDependencies.d.ts +21 -0
  125. package/dist/RequestScopedDependencies.d.ts.map +1 -0
  126. package/dist/RequestScopedDependencies.js +16 -0
  127. package/dist/Schema/Class.d.ts +163 -16
  128. package/dist/Schema/Class.d.ts.map +1 -1
  129. package/dist/Schema/Class.js +193 -21
  130. package/dist/Schema/FastCheck.d.ts.map +1 -1
  131. package/dist/Schema/SchemaParser.d.ts +5 -0
  132. package/dist/Schema/SchemaParser.d.ts.map +1 -0
  133. package/dist/Schema/SchemaParser.js +6 -0
  134. package/dist/Schema/SpecialJsonSchema.d.ts +15 -2
  135. package/dist/Schema/SpecialJsonSchema.d.ts.map +1 -1
  136. package/dist/Schema/SpecialJsonSchema.js +70 -12
  137. package/dist/Schema/SpecialOpenApi.d.ts +1 -1
  138. package/dist/Schema/SpecialOpenApi.js +3 -3
  139. package/dist/Schema/brand.d.ts +5 -5
  140. package/dist/Schema/brand.d.ts.map +1 -1
  141. package/dist/Schema/brand.js +6 -4
  142. package/dist/Schema/email.d.ts.map +1 -1
  143. package/dist/Schema/email.js +8 -5
  144. package/dist/Schema/ext.d.ts +279 -75
  145. package/dist/Schema/ext.d.ts.map +1 -1
  146. package/dist/Schema/ext.js +330 -72
  147. package/dist/Schema/moreStrings.d.ts +82 -48
  148. package/dist/Schema/moreStrings.d.ts.map +1 -1
  149. package/dist/Schema/moreStrings.js +85 -51
  150. package/dist/Schema/numbers.d.ts +33 -21
  151. package/dist/Schema/numbers.d.ts.map +1 -1
  152. package/dist/Schema/numbers.js +64 -12
  153. package/dist/Schema/phoneNumber.d.ts.map +1 -1
  154. package/dist/Schema/phoneNumber.js +6 -6
  155. package/dist/Schema/schema.d.ts +1 -1
  156. package/dist/Schema/schema.d.ts.map +1 -1
  157. package/dist/Schema/schema.js +2 -2
  158. package/dist/Schema/strings.d.ts +18 -4
  159. package/dist/Schema/strings.d.ts.map +1 -1
  160. package/dist/Schema/strings.js +1 -5
  161. package/dist/Schema.d.ts +224 -7
  162. package/dist/Schema.d.ts.map +1 -1
  163. package/dist/Schema.js +190 -24
  164. package/dist/SchemaAST.d.ts +2 -0
  165. package/dist/SchemaAST.d.ts.map +1 -0
  166. package/dist/SchemaAST.js +2 -0
  167. package/dist/Set.d.ts +4 -1
  168. package/dist/Set.d.ts.map +1 -1
  169. package/dist/Set.js +8 -6
  170. package/dist/Store.d.ts +215 -0
  171. package/dist/Store.d.ts.map +1 -0
  172. package/dist/Store.js +113 -0
  173. package/dist/_ext/Array.d.ts +1 -1
  174. package/dist/_ext/Array.d.ts.map +1 -1
  175. package/dist/_ext/Array.js +4 -2
  176. package/dist/_ext/ord.ext.d.ts +2 -1
  177. package/dist/_ext/ord.ext.d.ts.map +1 -1
  178. package/dist/_ext/ord.ext.js +2 -2
  179. package/dist/builtin.d.ts +2 -14
  180. package/dist/builtin.d.ts.map +1 -1
  181. package/dist/builtin.js +1 -1
  182. package/dist/client/InvalidationKeys.d.ts +30 -0
  183. package/dist/client/InvalidationKeys.d.ts.map +1 -0
  184. package/dist/client/InvalidationKeys.js +37 -0
  185. package/dist/client/apiClientFactory.d.ts +13 -8
  186. package/dist/client/apiClientFactory.d.ts.map +1 -1
  187. package/dist/client/apiClientFactory.js +154 -34
  188. package/dist/client/clientFor.d.ts +48 -13
  189. package/dist/client/clientFor.d.ts.map +1 -1
  190. package/dist/client/clientFor.js +9 -1
  191. package/dist/client/errors.d.ts +74 -28
  192. package/dist/client/errors.d.ts.map +1 -1
  193. package/dist/client/errors.js +41 -10
  194. package/dist/client/makeClient.d.ts +487 -32
  195. package/dist/client/makeClient.d.ts.map +1 -1
  196. package/dist/client/makeClient.js +47 -21
  197. package/dist/client.d.ts +2 -0
  198. package/dist/client.d.ts.map +1 -1
  199. package/dist/client.js +3 -1
  200. package/dist/faker.d.ts.map +1 -1
  201. package/dist/http/Request.d.ts +2 -2
  202. package/dist/http/Request.d.ts.map +1 -1
  203. package/dist/http/Request.js +2 -2
  204. package/dist/http/internal/lib.d.ts +12 -12
  205. package/dist/http/internal/lib.d.ts.map +1 -1
  206. package/dist/http/internal/lib.js +13 -13
  207. package/dist/ids.d.ts +32 -14
  208. package/dist/ids.d.ts.map +1 -1
  209. package/dist/ids.js +38 -7
  210. package/dist/index.d.ts +3 -0
  211. package/dist/index.d.ts.map +1 -1
  212. package/dist/index.js +5 -1
  213. package/dist/middleware.d.ts +12 -6
  214. package/dist/middleware.d.ts.map +1 -1
  215. package/dist/middleware.js +13 -7
  216. package/dist/migration/nativeEffect.d.ts +21 -0
  217. package/dist/migration/nativeEffect.d.ts.map +1 -0
  218. package/dist/migration/nativeEffect.js +598 -0
  219. package/dist/rpc/Invalidation.d.ts +1124 -0
  220. package/dist/rpc/Invalidation.d.ts.map +1 -0
  221. package/dist/rpc/Invalidation.js +178 -0
  222. package/dist/rpc/MiddlewareMaker.d.ts +10 -7
  223. package/dist/rpc/MiddlewareMaker.d.ts.map +1 -1
  224. package/dist/rpc/MiddlewareMaker.js +57 -37
  225. package/dist/rpc/RpcContextMap.d.ts +2 -2
  226. package/dist/rpc/RpcContextMap.d.ts.map +1 -1
  227. package/dist/rpc/RpcMiddleware.d.ts +13 -10
  228. package/dist/rpc/RpcMiddleware.d.ts.map +1 -1
  229. package/dist/rpc/RpcMiddleware.js +2 -2
  230. package/dist/rpc.d.ts +1 -1
  231. package/dist/rpc.d.ts.map +1 -1
  232. package/dist/rpc.js +2 -2
  233. package/dist/runtime.d.ts +19 -0
  234. package/dist/runtime.d.ts.map +1 -0
  235. package/dist/runtime.js +40 -0
  236. package/dist/setupRequest.d.ts +20 -0
  237. package/dist/setupRequest.d.ts.map +1 -0
  238. package/dist/setupRequest.js +72 -0
  239. package/dist/toast.d.ts +51 -0
  240. package/dist/toast.d.ts.map +1 -0
  241. package/dist/toast.js +34 -0
  242. package/dist/transform.d.ts +1 -1
  243. package/dist/transform.d.ts.map +1 -1
  244. package/dist/transform.js +4 -5
  245. package/dist/utils/effectify.d.ts +1 -1
  246. package/dist/utils/effectify.d.ts.map +1 -1
  247. package/dist/utils/effectify.js +2 -2
  248. package/dist/utils/extend.d.ts +6 -1
  249. package/dist/utils/extend.d.ts.map +1 -1
  250. package/dist/utils/extend.js +24 -6
  251. package/dist/utils/gen.d.ts +4 -4
  252. package/dist/utils/gen.d.ts.map +1 -1
  253. package/dist/utils/logLevel.d.ts +2 -2
  254. package/dist/utils/logLevel.d.ts.map +1 -1
  255. package/dist/utils/logger.d.ts +2 -1
  256. package/dist/utils/logger.d.ts.map +1 -1
  257. package/dist/utils/logger.js +2 -2
  258. package/dist/utils.d.ts +34 -45
  259. package/dist/utils.d.ts.map +1 -1
  260. package/dist/utils.js +33 -49
  261. package/dist/validation/validators.d.ts.map +1 -1
  262. package/dist/validation.d.ts.map +1 -1
  263. package/dist/withToast.d.ts +30 -0
  264. package/dist/withToast.d.ts.map +1 -0
  265. package/dist/withToast.js +64 -0
  266. package/package.json +25 -266
  267. package/src/Array.ts +7 -39
  268. package/src/Chunk.ts +6 -55
  269. package/src/Config/SecretURL.ts +6 -3
  270. package/src/Config/internal/configSecretURL.ts +2 -2
  271. package/src/Config.ts +6 -13
  272. package/src/ConfigProvider.ts +4 -47
  273. package/src/Context.ts +9 -8
  274. package/src/DataDependencies.ts +171 -0
  275. package/src/DateTime.ts +473 -0
  276. package/src/Effect.ts +10 -32
  277. package/src/Emailer.ts +51 -0
  278. package/src/Function.ts +0 -7
  279. package/src/Inputify.type.ts +1 -1
  280. package/src/Layer.ts +8 -5
  281. package/src/Model/Repository/Registry.ts +35 -0
  282. package/src/Model/Repository/dependency.ts +32 -0
  283. package/src/Model/Repository/ext.ts +374 -0
  284. package/src/Model/Repository/internal/internal.ts +987 -0
  285. package/src/Model/Repository/legacy.ts +29 -0
  286. package/src/Model/Repository/makeRepo.ts +168 -0
  287. package/src/Model/Repository/service.ts +676 -0
  288. package/src/Model/Repository/validation.ts +38 -0
  289. package/src/Model/Repository.ts +7 -0
  290. package/src/Model/dsl.ts +130 -0
  291. package/src/Model/filter/filterApi.ts +78 -0
  292. package/src/Model/filter/types/errors.ts +47 -0
  293. package/src/Model/filter/types/fields.ts +50 -0
  294. package/src/Model/filter/types/path/common.ts +404 -0
  295. package/src/Model/filter/types/path/eager.ts +329 -0
  296. package/src/Model/filter/types/path/index.ts +4 -0
  297. package/src/Model/filter/types/utils.ts +128 -0
  298. package/src/Model/filter/types/validator.ts +46 -0
  299. package/src/Model/filter/types.ts +6 -0
  300. package/src/Model/query/dsl.ts +3092 -0
  301. package/src/Model/query/new-kid-interpreter.ts +531 -0
  302. package/src/Model/query.ts +13 -0
  303. package/src/Model.ts +5 -0
  304. package/src/NonEmptySet.ts +6 -4
  305. package/src/Option.ts +3 -8
  306. package/src/Pure.ts +20 -17
  307. package/src/QueueMaker.ts +11 -0
  308. package/src/RequestContext.ts +48 -0
  309. package/src/RequestScopedDependencies.ts +45 -0
  310. package/src/Schema/Class.ts +550 -56
  311. package/src/Schema/SchemaParser.ts +12 -0
  312. package/src/Schema/SpecialJsonSchema.ts +75 -7
  313. package/src/Schema/SpecialOpenApi.ts +5 -5
  314. package/src/Schema/brand.ts +27 -12
  315. package/src/Schema/email.ts +9 -7
  316. package/src/Schema/ext.ts +405 -95
  317. package/src/Schema/moreStrings.ts +213 -88
  318. package/src/Schema/numbers.ts +107 -29
  319. package/src/Schema/phoneNumber.ts +8 -9
  320. package/src/Schema/schema.ts +1 -1
  321. package/src/Schema/strings.ts +23 -14
  322. package/src/Schema.ts +403 -46
  323. package/src/SchemaAST.ts +1 -0
  324. package/src/Set.ts +10 -5
  325. package/src/Store.ts +325 -0
  326. package/src/_ext/Array.ts +4 -2
  327. package/src/_ext/ord.ext.ts +2 -1
  328. package/src/builtin-json.d.ts +24 -0
  329. package/src/builtin.ts +16 -21
  330. package/src/client/InvalidationKeys.ts +55 -0
  331. package/src/client/apiClientFactory.ts +295 -129
  332. package/src/client/clientFor.ts +101 -33
  333. package/src/client/errors.ts +66 -20
  334. package/src/client/makeClient.ts +519 -60
  335. package/src/client.ts +6 -4
  336. package/src/http/Request.ts +4 -4
  337. package/src/http/internal/lib.ts +12 -12
  338. package/src/http.ts +1 -1
  339. package/src/ids.ts +45 -8
  340. package/src/index.ts +20 -16
  341. package/src/middleware.ts +12 -8
  342. package/src/migration/nativeEffect.ts +645 -0
  343. package/src/rpc/Invalidation.ts +278 -0
  344. package/src/rpc/MiddlewareMaker.ts +86 -79
  345. package/src/rpc/README.md +2 -2
  346. package/src/rpc/RpcContextMap.ts +4 -4
  347. package/src/rpc/RpcMiddleware.ts +18 -13
  348. package/src/rpc.ts +4 -4
  349. package/src/runtime.ts +57 -0
  350. package/src/setupRequest.ts +138 -0
  351. package/src/toast.ts +54 -0
  352. package/src/transform.ts +4 -4
  353. package/src/utils/effectify.ts +1 -1
  354. package/src/utils/extend.ts +24 -5
  355. package/src/utils/gen.ts +7 -7
  356. package/src/utils/logLevel.ts +1 -1
  357. package/src/utils/logger.ts +3 -2
  358. package/src/utils.ts +85 -175
  359. package/src/validation.ts +2 -2
  360. package/src/withToast.ts +133 -0
  361. package/test/dateTimeLocal.test.ts +55 -0
  362. package/test/dist/dateTimeLocal.test.d.ts.map +1 -0
  363. package/test/dist/nativeEffectMigration.test.d.ts.map +1 -0
  364. package/test/dist/rpc.test.d.ts.map +1 -1
  365. package/test/dist/rpcMiddlewareContext.test.d.ts.map +1 -0
  366. package/test/moreStrings.test.ts +55 -10
  367. package/test/nativeEffectMigration.test.ts +77 -0
  368. package/test/rpc.test.ts +28 -11
  369. package/test/rpcMiddlewareContext.test.ts +63 -0
  370. package/test/schema.test.ts +318 -55
  371. package/test/secretURL.test.ts +4 -1
  372. package/test/special.test.ts +663 -131
  373. package/test/utils.test.ts +5 -5
  374. package/tsconfig.base.json +6 -4
  375. package/tsconfig.json +9 -1
  376. package/tsconfig.src.json +29 -29
  377. package/tsconfig.test.json +2 -2
  378. package/dist/Operations.d.ts +0 -124
  379. package/dist/Operations.d.ts.map +0 -1
  380. package/dist/Operations.js +0 -29
  381. package/dist/_ext/date.d.ts +0 -15
  382. package/dist/_ext/date.d.ts.map +0 -1
  383. package/dist/_ext/date.js +0 -16
  384. package/dist/_ext/misc.d.ts +0 -14
  385. package/dist/_ext/misc.d.ts.map +0 -1
  386. package/dist/_ext/misc.js +0 -17
  387. package/eslint.config.mjs +0 -26
  388. package/src/Operations.ts +0 -55
  389. package/src/_ext/date.ts +0 -27
  390. package/src/_ext/misc.ts +0 -46
  391. package/tsconfig.json.bak +0 -12
package/package.json CHANGED
@@ -1,31 +1,31 @@
1
1
  {
2
2
  "name": "effect-app",
3
- "version": "4.0.0-beta.99",
3
+ "version": "4.0.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/effect-app/libs.git",
9
+ "directory": "packages/effect-app"
10
+ },
6
11
  "dependencies": {
7
12
  "@tsconfig/strictest": "^2.0.8",
8
- "date-fns": "^4.1.0",
9
- "nanoid": "^5.1.7",
13
+ "nanoid": "^5.1.11",
10
14
  "path-parser": "^6.1.0",
11
- "query-string": "^9.3.1",
12
- "ts-pattern": "^5.9.0",
15
+ "query-string": "^9.4.0",
13
16
  "ts-toolbelt": "^9.6.0",
14
- "uuid": "^13.0.0",
15
17
  "validator": "^13.15.35"
16
18
  },
17
19
  "devDependencies": {
18
20
  "@faker-js/faker": "^8.4.1",
19
- "@types/node": "25.5.2",
20
- "@types/uuid": "^11.0.0",
21
+ "@types/node": "25.9.1",
21
22
  "@types/validator": "^13.15.10",
22
- "fast-check": "~4.6.0",
23
- "typescript": "~6.0.2",
24
- "vitest": "^4.1.3",
25
- "@effect-app/eslint-shared-config": "0.5.7-beta.9"
23
+ "fast-check": "^4.9.0",
24
+ "typescript": "~6.0.3",
25
+ "vitest": "^4.1.7"
26
26
  },
27
27
  "peerDependencies": {
28
- "effect": "^4.0.0-beta.47"
28
+ "effect": "^4.0.1"
29
29
  },
30
30
  "typesVersions": {
31
31
  "*": {
@@ -39,249 +39,10 @@
39
39
  "types": "./dist/index.d.ts",
40
40
  "default": "./dist/index.js"
41
41
  },
42
- "./Array": {
43
- "types": "./dist/Array.d.ts",
44
- "default": "./dist/Array.js"
45
- },
46
- "./Chunk": {
47
- "types": "./dist/Chunk.d.ts",
48
- "default": "./dist/Chunk.js"
49
- },
50
- "./Config": {
51
- "types": "./dist/Config.d.ts",
52
- "default": "./dist/Config.js"
53
- },
54
- "./Config/SecretURL": {
55
- "types": "./dist/Config/SecretURL.d.ts",
56
- "default": "./dist/Config/SecretURL.js"
57
- },
58
- "./ConfigProvider": {
59
- "types": "./dist/ConfigProvider.d.ts",
60
- "default": "./dist/ConfigProvider.js"
61
- },
62
- "./Context": {
63
- "types": "./dist/Context.d.ts",
64
- "default": "./dist/Context.js"
65
- },
66
- "./Effect": {
67
- "types": "./dist/Effect.d.ts",
68
- "default": "./dist/Effect.js"
69
- },
70
- "./Function": {
71
- "types": "./dist/Function.d.ts",
72
- "default": "./dist/Function.js"
73
- },
74
- "./Inputify.type": {
75
- "types": "./dist/Inputify.type.d.ts",
76
- "default": "./dist/Inputify.type.js"
77
- },
78
- "./Layer": {
79
- "types": "./dist/Layer.d.ts",
80
- "default": "./dist/Layer.js"
81
- },
82
- "./NonEmptySet": {
83
- "types": "./dist/NonEmptySet.d.ts",
84
- "default": "./dist/NonEmptySet.js"
85
- },
86
- "./Operations": {
87
- "types": "./dist/Operations.d.ts",
88
- "default": "./dist/Operations.js"
89
- },
90
- "./Option": {
91
- "types": "./dist/Option.d.ts",
92
- "default": "./dist/Option.js"
93
- },
94
- "./Pure": {
95
- "types": "./dist/Pure.d.ts",
96
- "default": "./dist/Pure.js"
97
- },
98
- "./Schema": {
99
- "types": "./dist/Schema.d.ts",
100
- "default": "./dist/Schema.js"
101
- },
102
- "./Schema/Class": {
103
- "types": "./dist/Schema/Class.d.ts",
104
- "default": "./dist/Schema/Class.js"
105
- },
106
- "./Schema/FastCheck": {
107
- "types": "./dist/Schema/FastCheck.d.ts",
108
- "default": "./dist/Schema/FastCheck.js"
109
- },
110
- "./Schema/Methods": {
111
- "types": "./dist/Schema/Methods.d.ts",
112
- "default": "./dist/Schema/Methods.js"
113
- },
114
- "./Schema/SpecialJsonSchema": {
115
- "types": "./dist/Schema/SpecialJsonSchema.d.ts",
116
- "default": "./dist/Schema/SpecialJsonSchema.js"
117
- },
118
- "./Schema/SpecialOpenApi": {
119
- "types": "./dist/Schema/SpecialOpenApi.d.ts",
120
- "default": "./dist/Schema/SpecialOpenApi.js"
121
- },
122
- "./Schema/brand": {
123
- "types": "./dist/Schema/brand.d.ts",
124
- "default": "./dist/Schema/brand.js"
125
- },
126
- "./Schema/email": {
127
- "types": "./dist/Schema/email.d.ts",
128
- "default": "./dist/Schema/email.js"
129
- },
130
- "./Schema/ext": {
131
- "types": "./dist/Schema/ext.d.ts",
132
- "default": "./dist/Schema/ext.js"
133
- },
134
- "./Schema/moreStrings": {
135
- "types": "./dist/Schema/moreStrings.d.ts",
136
- "default": "./dist/Schema/moreStrings.js"
137
- },
138
- "./Schema/numbers": {
139
- "types": "./dist/Schema/numbers.d.ts",
140
- "default": "./dist/Schema/numbers.js"
141
- },
142
- "./Schema/phoneNumber": {
143
- "types": "./dist/Schema/phoneNumber.d.ts",
144
- "default": "./dist/Schema/phoneNumber.js"
145
- },
146
- "./Schema/schema": {
147
- "types": "./dist/Schema/schema.d.ts",
148
- "default": "./dist/Schema/schema.js"
149
- },
150
- "./Schema/strings": {
151
- "types": "./dist/Schema/strings.d.ts",
152
- "default": "./dist/Schema/strings.js"
153
- },
154
- "./Set": {
155
- "types": "./dist/Set.d.ts",
156
- "default": "./dist/Set.js"
157
- },
158
- "./TypeTest": {
159
- "types": "./dist/TypeTest.d.ts",
160
- "default": "./dist/TypeTest.js"
161
- },
162
- "./Types": {
163
- "types": "./dist/Types.d.ts",
164
- "default": "./dist/Types.js"
165
- },
166
- "./Widen.type": {
167
- "types": "./dist/Widen.type.d.ts",
168
- "default": "./dist/Widen.type.js"
169
- },
170
- "./_ext/Array": {
171
- "types": "./dist/_ext/Array.d.ts",
172
- "default": "./dist/_ext/Array.js"
173
- },
174
- "./_ext/date": {
175
- "types": "./dist/_ext/date.d.ts",
176
- "default": "./dist/_ext/date.js"
177
- },
178
- "./_ext/misc": {
179
- "types": "./dist/_ext/misc.d.ts",
180
- "default": "./dist/_ext/misc.js"
181
- },
182
- "./_ext/ord.ext": {
183
- "types": "./dist/_ext/ord.ext.d.ts",
184
- "default": "./dist/_ext/ord.ext.js"
185
- },
186
- "./builtin": {
187
- "types": "./dist/builtin.d.ts",
188
- "default": "./dist/builtin.js"
189
- },
190
- "./client": {
191
- "types": "./dist/client.d.ts",
192
- "default": "./dist/client.js"
193
- },
194
- "./client/apiClientFactory": {
195
- "types": "./dist/client/apiClientFactory.d.ts",
196
- "default": "./dist/client/apiClientFactory.js"
197
- },
198
- "./client/clientFor": {
199
- "types": "./dist/client/clientFor.d.ts",
200
- "default": "./dist/client/clientFor.js"
201
- },
202
- "./client/errors": {
203
- "types": "./dist/client/errors.d.ts",
204
- "default": "./dist/client/errors.js"
205
- },
206
- "./client/makeClient": {
207
- "types": "./dist/client/makeClient.d.ts",
208
- "default": "./dist/client/makeClient.js"
209
- },
210
- "./faker": {
211
- "types": "./dist/faker.d.ts",
212
- "default": "./dist/faker.js"
213
- },
214
- "./http": {
215
- "types": "./dist/http.d.ts",
216
- "default": "./dist/http.js"
217
- },
218
- "./http/Request": {
219
- "types": "./dist/http/Request.d.ts",
220
- "default": "./dist/http/Request.js"
221
- },
222
- "./ids": {
223
- "types": "./dist/ids.d.ts",
224
- "default": "./dist/ids.js"
225
- },
226
- "./logger": {
227
- "types": "./dist/logger.d.ts",
228
- "default": "./dist/logger.js"
229
- },
230
- "./middleware": {
231
- "types": "./dist/middleware.d.ts",
232
- "default": "./dist/middleware.js"
233
- },
234
- "./rpc": {
235
- "types": "./dist/rpc.d.ts",
236
- "default": "./dist/rpc.js"
237
- },
238
- "./rpc/MiddlewareMaker": {
239
- "types": "./dist/rpc/MiddlewareMaker.d.ts",
240
- "default": "./dist/rpc/MiddlewareMaker.js"
241
- },
242
- "./rpc/RpcContextMap": {
243
- "types": "./dist/rpc/RpcContextMap.d.ts",
244
- "default": "./dist/rpc/RpcContextMap.js"
245
- },
246
- "./rpc/RpcMiddleware": {
247
- "types": "./dist/rpc/RpcMiddleware.d.ts",
248
- "default": "./dist/rpc/RpcMiddleware.js"
249
- },
250
- "./transform": {
251
- "types": "./dist/transform.d.ts",
252
- "default": "./dist/transform.js"
253
- },
254
- "./utils": {
255
- "types": "./dist/utils.d.ts",
256
- "default": "./dist/utils.js"
257
- },
258
- "./utils/effectify": {
259
- "types": "./dist/utils/effectify.d.ts",
260
- "default": "./dist/utils/effectify.js"
261
- },
262
- "./utils/extend": {
263
- "types": "./dist/utils/extend.d.ts",
264
- "default": "./dist/utils/extend.js"
265
- },
266
- "./utils/gen": {
267
- "types": "./dist/utils/gen.d.ts",
268
- "default": "./dist/utils/gen.js"
269
- },
270
- "./utils/logLevel": {
271
- "types": "./dist/utils/logLevel.d.ts",
272
- "default": "./dist/utils/logLevel.js"
273
- },
274
- "./utils/logger": {
275
- "types": "./dist/utils/logger.d.ts",
276
- "default": "./dist/utils/logger.js"
277
- },
278
- "./validation": {
279
- "types": "./dist/validation.d.ts",
280
- "default": "./dist/validation.js"
281
- },
282
- "./validation/validators": {
283
- "types": "./dist/validation/validators.d.ts",
284
- "default": "./dist/validation/validators.js"
42
+ "./internal/*": null,
43
+ "./*": {
44
+ "types": "./dist/*.d.ts",
45
+ "default": "./dist/*.js"
285
46
  }
286
47
  },
287
48
  "gitHead": "bd8e27eea3eff97db8739d577d67e7336c078d28",
@@ -295,26 +56,24 @@
295
56
  ],
296
57
  "scripts": {
297
58
  "watch": "pnpm build:tsc -w",
298
- "build:tsc": "pnpm clean-dist && effect-app-cli packagejson && pnpm check",
299
- "check": "tsc --build",
300
- "build:tsc-src": "pnpm clean-dist && effect-app-cli packagejson tsc --build ./tsconfig.src.json",
59
+ "build:tsc": "pnpm clean-dist && pnpm check && node ../../scripts/rewrite-dist-declaration-imports.mjs dist",
60
+ "check": "tsgo --build",
61
+ "build:tsc-src": "pnpm clean-dist && tsc --build ./tsconfig.src.json && node ../../scripts/rewrite-dist-declaration-imports.mjs dist",
301
62
  "build:src": "pnpm build:tsc-src",
302
63
  "build": "pnpm build:tsc",
303
- "watch2": "pnpm clean-dist && NODE_OPTIONS=--max-old-space-size=6144 tsc -w",
64
+ "watch2": "pnpm clean-dist && NODE_OPTIONS=--max-old-space-size=6144 tsgo -w",
304
65
  "clean": "rm -rf dist",
305
66
  "clean-dist": "sh ../../scripts/clean-dist.sh",
306
67
  "circular": "pnpm circular:src && pnpm circular:dist",
307
68
  "circular:src": "madge --circular --ts-config ./tsconfig.json --extensions ts ./src",
308
69
  "circular:dist": "madge --circular --extensions js ./dist",
309
- "compile": "NODE_OPTIONS=--max-old-space-size=6144 tsc --noEmit",
310
- "lint": "NODE_OPTIONS=--max-old-space-size=6144 ESLINT_TS=1 eslint ./src",
311
- "lint:watch": "ESLINT_TS=1 esw -w --changed --clear --ext ts,tsx .",
312
- "lint-fix": "pnpm lint --fix",
70
+ "compile": "NODE_OPTIONS=--max-old-space-size=6144 tsgo --noEmit",
71
+ "lint": "oxlint --type-aware ./src && pnpm exec dprint check --config ../../dprint.jsonc .",
72
+ "lint-fix": "oxlint --type-aware --fix ./src && pnpm exec dprint fmt --config ../../dprint.jsonc .",
313
73
  "test": "vitest",
314
74
  "test:run": "pnpm run test run --passWithNoTests",
315
75
  "testsuite": "pnpm lint && pnpm circular && pnpm run test:run",
316
76
  "ncu": "ncu",
317
- "pub": "pnpm prepublish && npm publish --access public",
318
- "prepublish": "cp -f ./tsconfig.json ./tsconfig.json.bak && node ../../scripts/mergeTsConfig.mjs ./tsconfig.json"
77
+ "pub": "npm publish --access public"
319
78
  }
320
79
  }
package/src/Array.ts CHANGED
@@ -1,25 +1,8 @@
1
- import { Chunk, Effect } from "effect"
2
1
  import type { NonEmptyArray, NonEmptyReadonlyArray } from "effect/Array"
3
2
  import * as Array from "effect/Array"
4
- import * as T from "effect/Effect"
5
- import { dual, type Predicate } from "./Function.js"
6
- import * as Option from "./Option.js"
7
-
8
- export const toNonEmptyArray = Option.liftPredicate(Array.isReadonlyArrayNonEmpty)
9
-
10
- export const isArray: {
11
- // uses ReadonlyArray here because otherwise the second overload don't work when ROA is involved.
12
- (self: unknown): self is ReadonlyArray<unknown>
13
- <T>(self: T): self is Extract<T, ReadonlyArray<any>>
14
- } = Array.isArray
15
-
16
- export function NEAFromArray<T>(ar: Array<T>) {
17
- return ar.length ? Option.some(ar as NonEmptyArray<T>) : Option.none()
18
- }
19
-
20
- export function NEROArrayFromArray<T>(ar: ReadonlyArray<T>) {
21
- return ar.length ? Option.some(ar as NonEmptyReadonlyArray<T>) : Option.none()
22
- }
3
+ import * as Effect from "effect/Effect"
4
+ import { dual, type Predicate } from "./Function.ts"
5
+ import * as Option from "./Option.ts"
23
6
 
24
7
  export const groupByT = dual<
25
8
  <A, Key>(
@@ -85,26 +68,11 @@ export function filterWith<A>(self: ReadonlyArray<A>, predicates: ReadonlyArray<
85
68
  return self.filter((_) => predicates.every((f) => f(_)))
86
69
  }
87
70
 
88
- /**
89
- * Split the `items` array into multiple, smaller chunks of the given `size`.
90
- */
91
- export function* _chunk_<T>(items_: Iterable<T>, size: number) {
92
- const items = [...items_]
93
-
94
- while (items.length) {
95
- yield items.splice(0, size)
96
- }
97
- }
98
-
99
- /**
100
- * Split the `items` array into multiple, smaller chunks of the given `size`.
101
- */
102
- export function chunk_<T>(items_: Iterable<T>, size: number) {
103
- return Chunk.fromIterable(_chunk_(items_, size))
104
- }
105
-
106
71
  export function forEachEffectNA<A, R, E, B>(as: NonEmptyReadonlyArray<A>, f: (a: A) => Effect.Effect<B, E, R>) {
107
- return Effect.map(T.forEach(as, f), (_) => Option.getOrNull(toNonEmptyArray(_)))
72
+ return Effect.map(
73
+ Effect.forEach(as, f),
74
+ (_) => Option.getOrNull(Option.liftPredicate(Array.isReadonlyArrayNonEmpty)(_))
75
+ )
108
76
  }
109
77
 
110
78
  export * from "effect/Array"
package/src/Chunk.ts CHANGED
@@ -1,20 +1,19 @@
1
- import { pipe, type Predicate, type Refinement } from "./Function.js"
2
- import * as Option from "./Option.js"
1
+ import { pipe } from "./Function.ts"
2
+ import * as Option from "./Option.ts"
3
3
 
4
4
  import * as Chunk from "effect/Chunk"
5
- import { type Equivalence } from "effect/Equivalence"
6
- import * as Array from "./Array.js"
5
+ import * as Array from "./Array.ts"
7
6
 
8
7
  export * from "effect/Chunk"
9
8
 
10
- export const fromIterable = Chunk.fromIterable
11
-
12
9
  export function groupByTChunk_<A, Key extends PropertyKey>(c: Chunk.Chunk<A>, f: (a: A) => Key) {
13
10
  return pipe(Chunk.toReadonlyArray(c), Array.groupByT(f), Chunk.fromIterable)
14
11
  }
15
12
 
16
13
  /**
17
- * Returns the first element that satisfies the predicate.
14
+ * Returns the first `Some` produced by `f`.
15
+ *
16
+ * Effect's `Chunk.findFirst` takes a predicate, not an `Option`-returning function.
18
17
  */
19
18
  export function findFirstMap<A, B>(
20
19
  f: (a: A) => Option.Option<B>
@@ -31,51 +30,3 @@ export function findFirstMap<A, B>(
31
30
  return Option.none()
32
31
  }
33
32
  }
34
-
35
- export function toArray<T>(c: Chunk.Chunk<T>): T[] {
36
- return Chunk.toReadonlyArray(c) as T[]
37
- }
38
-
39
- /**
40
- * Remove duplicates from an array, keeping the first occurrence of an element.
41
- */
42
- export function uniq<A>(E: Equivalence<A>) {
43
- return (self: Chunk.Chunk<A>): Chunk.Chunk<A> => {
44
- let out = Chunk.fromIterable([] as A[])
45
- for (let i = 0; i < self.length; i++) {
46
- const a = Chunk.getUnsafe(self, i)
47
- if (!elem(E, a)(out)) {
48
- out = Chunk.append(out, a)
49
- }
50
- }
51
- return self.length === out.length ? self : out
52
- }
53
- }
54
-
55
- /**
56
- * Test if a value is a member of an array. Takes a `Equivalence<A>` as a single
57
- * argument which returns the function to use to search for a value of type `A`
58
- * in an array of type `Chunk<A>`.
59
- */
60
- export function elem<A>(E: Equivalence<A>, value: A) {
61
- return (self: Chunk.Chunk<A>): boolean => {
62
- for (let i = 0; i < self.length; i++) {
63
- if (E(Chunk.getUnsafe(self, i), value)) {
64
- return true
65
- }
66
- }
67
- return false
68
- }
69
- }
70
-
71
- export const ChunkPartition = Chunk.partition
72
-
73
- export const findFirstSimple: {
74
- <A, B extends A>(self: Chunk.Chunk<A>, refinement: Refinement<A, B>): Option.Option<B>
75
- <A>(self: Chunk.Chunk<A>, predicate: Predicate<A>): Option.Option<A>
76
- } = Chunk.findFirst
77
-
78
- export const findLastSimple: {
79
- <A, B extends A>(self: Chunk.Chunk<A>, refinement: Refinement<A, B>): Option.Option<B>
80
- <A>(self: Chunk.Chunk<A>, predicate: Predicate<A>): Option.Option<A>
81
- } = Chunk.findLast
@@ -1,9 +1,11 @@
1
1
  /**
2
2
  * @since 1.0.0
3
3
  */
4
- import { Config, type Equal, type Redacted } from "effect"
5
4
  import type * as Chunk from "effect/Chunk"
6
- import * as internal from "./internal/configSecretURL.js"
5
+ import * as Config from "effect/Config"
6
+ import type * as Equal from "effect/Equal"
7
+ import type * as Redacted from "effect/Redacted"
8
+ import * as internal from "./internal/configSecretURL.ts"
7
9
 
8
10
  // /**
9
11
  // * @since 1.0.0
@@ -21,6 +23,7 @@ import * as internal from "./internal/configSecretURL.js"
21
23
  * @since 1.0.0
22
24
  * @category models
23
25
  */
26
+ // eslint-disable-next-line import/namespace
24
27
  export interface SecretURL extends Redacted.Redacted, Equal.Equal {
25
28
  /** @internal */
26
29
  readonly raw: Array<number>
@@ -73,5 +76,5 @@ export const value: (self: SecretURL) => string = internal.value
73
76
  export const unsafeWipe: (self: SecretURL) => void = internal.unsafeWipe
74
77
 
75
78
  export const secretURL = (name?: string): Config.Config<SecretURL> => {
76
- return Config.map(Config.nonEmptyString(name), fromString)
79
+ return Config.map(Config.NonEmptyString(name), fromString)
77
80
  }
@@ -1,6 +1,6 @@
1
- import { Redacted } from "effect"
2
1
  import * as Chunk from "effect/Chunk"
3
- import type * as SecretURL from "../SecretURL.js"
2
+ import * as Redacted from "effect/Redacted"
3
+ import type * as SecretURL from "../SecretURL.ts"
4
4
 
5
5
  /** @internal */
6
6
  export const isSecretURL = (u: unknown): u is SecretURL.SecretURL => {
package/src/Config.ts CHANGED
@@ -1,14 +1,7 @@
1
- import { type Config, make } from "effect/Config"
2
- import { dual } from "effect/Function"
3
-
4
- import * as ConfigProvider from "./ConfigProvider.js"
5
-
6
- export const nested: {
7
- (name: string): <A>(self: Config<A>) => Config<A>
8
- <A>(self: Config<A>, name: string): Config<A>
9
- } = dual(
10
- 2,
11
- <A>(self: Config<A>, name: string): Config<A> => make((provider) => self.parse(ConfigProvider.nested(provider, name)))
12
- )
13
-
1
+ // `Config.nested` previously needed a local override because effect v3's `nested`
2
+ // did not run the provider's `mapInput`/`constantCase` over the nested namespace
3
+ // segment (see commit "fix Config.nested mapping"). As of effect 4.0.0-beta.84 the
4
+ // upstream `nested` threads the prefix through the lookup path, so the provider
5
+ // transform covers it — the override is obsolete and the old internals it used are
6
+ // gone. Re-export the native module directly.
14
7
  export * from "effect/Config"
@@ -1,48 +1,5 @@
1
- import { type ConfigProvider, make, type Path } from "effect/ConfigProvider"
2
- import { dual } from "effect/Function"
3
-
4
- /**
5
- * Scopes a provider so that all lookups are prefixed with the given path
6
- * segments.
7
- *
8
- * When to use:
9
- * - Namespacing config under a prefix like `"app"` or `"database"`.
10
- * - Reusing the same provider shape for multiple sub-configs.
11
- *
12
- * Accepts a single string or a full `Path` array. The prefix is prepended
13
- * *after* any `mapInput` transformation runs, so ordering matters when
14
- * composing with {@link mapInput} or {@link constantCase}.
15
- *
16
- * Supports both data-last and data-first calling conventions.
17
- *
18
- * **Example** (Nesting under a prefix)
19
- *
20
- * ```ts
21
- * import { ConfigProvider } from "effect"
22
- *
23
- * const provider = ConfigProvider.fromEnv({
24
- * env: { APP_HOST: "localhost", APP_PORT: "3000" }
25
- * })
26
- *
27
- * // Lookups for ["HOST"] now resolve to ["APP", "HOST"]
28
- * const scoped = ConfigProvider.nested(provider, "APP")
29
- * ```
30
- *
31
- * @see {@link mapInput} – for arbitrary path transformations
32
- *
33
- * @category Combinators
34
- * @since 4.0.0
35
- */
36
- export const nested: {
37
- (prefix: string | Path): (self: ConfigProvider) => ConfigProvider
38
- (self: ConfigProvider, prefix: string | Path): ConfigProvider
39
- } = dual(
40
- 2,
41
- (self: ConfigProvider, prefix: string | Path): ConfigProvider => {
42
- let path: Path = typeof prefix === "string" ? [prefix] : prefix
43
- if (self.mapInput) path = self.mapInput(path)
44
- return make(self.get, self.mapInput, self.prefix ? [...self.prefix, ...path] : path)
45
- }
46
- )
47
-
1
+ // Local `nested` override removed: it existed to make the nested namespace honour the
2
+ // provider's `mapInput`/`constantCase` (see commit "fix Config.nested mapping"), which
3
+ // effect 4.0.0-beta.84 now does natively. The old override also relied on internals
4
+ // (`provider.get`/`mapInput`/`prefix`) that no longer exist. Re-export native directly.
48
5
  export * from "effect/ConfigProvider"
package/src/Context.ts CHANGED
@@ -1,16 +1,17 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ /* eslint-disable import/namespace */
2
3
 
3
- import { type Effect, Layer, type Scope, type Types } from "effect"
4
4
  import * as CTX from "effect/Context"
5
- import { type Yieldable } from "./Effect.js"
5
+ import type * as Effect from "effect/Effect"
6
+ import * as Layer from "effect/Layer"
7
+ import type * as Scope from "effect/Scope"
8
+ import type * as Types from "effect/Types"
6
9
 
7
10
  export * from "effect/Context"
8
11
 
9
- export interface Opaque<Self extends object, in out Shape extends object>
10
- extends CTX.Key<Self, Self>, Yieldable<Opaque<Self, Shape>, Self, never, Self>
11
- {
12
+ export interface Opaque<Self extends object, in out Shape extends object> extends CTX.Key<Self, Self> {
12
13
  of(this: void, self: Shape): Self
13
- serviceMap(self: Shape): CTX.Context<Self>
14
+ context(self: Shape): CTX.Context<Self>
14
15
  // a version that leverages the Shape -> Self conversion
15
16
  toLayer: <E, R>(
16
17
  eff: Effect.Effect<Shape, E, R>
@@ -24,7 +25,7 @@ export interface Opaque<Self extends object, in out Shape extends object>
24
25
  // {
25
26
  // // temp while sorting out https://github.com/Effect-TS/effect-smol/pull/1534
26
27
  // of(self: Shape): Self
27
- // serviceMap2(self: Shape): CTX.Context<Self>
28
+ // contextMap2(self: Shape): CTX.Context<Self>
28
29
  // // a version that leverages the Shape -> Self conversion
29
30
  // toLayer: {
30
31
  // <E, R>(
@@ -93,7 +94,7 @@ export const accessCn = <
93
94
  >(
94
95
  Tag: Opaque<Self, Shape>,
95
96
  key: K
96
- ): Effect.Effect<Shape[K], never, Self> => Tag.useSync((s) => s[key]) as any
97
+ ): Effect.Effect<Shape[K], never, Self> => Tag.useSync((s) => s[key])
97
98
 
98
99
  /** Accessor for a service property that is an Effect. Delegates via `use`. */
99
100
  export const accessEffectCn = <