@shivaedev/effect-trpc 0.5.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/README.md +11 -12
- package/dist/testing/types.d.ts +1 -1
- package/dist/testing/types.d.ts.map +1 -1
- package/dist/testing/vitest.js +1 -1
- package/dist/testing/vitest.js.map +1 -1
- package/package.json +10 -21
- package/src/testing/types.ts +1 -1
- package/src/testing/vitest.ts +1 -1
- package/dist/client.d.ts +0 -2
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js +0 -2
- package/dist/client.js.map +0 -1
- package/dist/index.d.ts +0 -10
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -7
- package/dist/index.js.map +0 -1
- package/dist/testing.d.ts +0 -4
- package/dist/testing.d.ts.map +0 -1
- package/dist/testing.js +0 -3
- package/dist/testing.js.map +0 -1
- package/src/client.ts +0 -1
- package/src/index.ts +0 -34
- package/src/testing.ts +0 -19
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.0 - 2026-10-04
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- Breaking: no root entry and no module that re-exports another. `exports` maps one `"./*.ts"` pattern to every module outside `internal/` (`src` under the `source` condition, `dist` otherwise), and `"./internal/*": null` keeps `internal/` modules private, so you import the module that defines a name, and a bundler sees only the modules you use. Where each name now lives:
|
|
8
|
+
- `@shivaedev/effect-trpc`: `@shivaedev/effect-trpc/client/rejection.ts` (`EncodedRejection`), `@shivaedev/effect-trpc/adapter.ts` (`EffectTRPCAdapter`, `EffectTRPCRuntime`, `MakeEffectTRPCOptions`, `makeEffectTRPC`), `@shivaedev/effect-trpc/errors.ts` (`badRequest`, `conflict`, `fail`, `forbidden`, `internalServerError`, `notFound`, `preconditionFailed`, `unauthorized`), `@shivaedev/effect-trpc/procedure.ts` (`EffectProcedureBuilder`), `@shivaedev/effect-trpc/rejection.ts` (`RejectionError`, `RejectWithOptions`, `rejectionCode`, `rejectWith`), `@shivaedev/effect-trpc/rejection-formatter.ts` (`RejectionData`, `RejectionErrorShape`, `rejectionFormatter`, `withRejection`), `@shivaedev/effect-trpc/request-services.ts` (`EffectProcedureRequestServices`, `extendRequestServices`, `makeRequestServices`), `@shivaedev/effect-trpc/request-signal.ts` (`RequestSignal`), `@shivaedev/effect-trpc/types.ts` (`EffectTRPCErrorContext`, `EffectTRPCErrorMapper`, `EffectTRPCInstrument`, `EffectTRPCStreamInstrument`, `ProcedureInfo`, `ProcedureKind`)
|
|
9
|
+
- `@shivaedev/effect-trpc/client`: `@shivaedev/effect-trpc/client/rejection.ts` (`decodeRejection`, `EncodedRejection`, `rejectionOf`)
|
|
10
|
+
- `@shivaedev/effect-trpc/testing`: `@shivaedev/effect-trpc/testing/caller.ts` (`EffectCaller`, `EffectCallerFactory`, `makeEffectCaller`, `makeEffectCallerFactory`), `@shivaedev/effect-trpc/testing/types.ts` (`CallerOptions`, `CallerResult`, `MakeTrpcHarnessItOptions`, `MakeTrpcItOptions`, `TrpcHarnessIt`, `TrpcHarnessTest`, `TrpcHarnessTester`, `TrpcIt`, `TrpcTest`, `TrpcTester`), `@shivaedev/effect-trpc/testing/vitest.ts` (`makeTrpcHarnessIt`, `makeTrpcIt`)
|
|
11
|
+
|
|
3
12
|
## 0.5.1 - 2026-10-04
|
|
4
13
|
|
|
5
14
|
### Changed
|
package/README.md
CHANGED
|
@@ -21,10 +21,8 @@ builders to request-scoped Layers:
|
|
|
21
21
|
```ts
|
|
22
22
|
import { initTRPC } from "@trpc/server"
|
|
23
23
|
import { Layer, ManagedRuntime, Schema } from "effect"
|
|
24
|
-
import {
|
|
25
|
-
|
|
26
|
-
makeRequestServices,
|
|
27
|
-
} from "@shivaedev/effect-trpc"
|
|
24
|
+
import { makeEffectTRPC } from "@shivaedev/effect-trpc/adapter.ts"
|
|
25
|
+
import { makeRequestServices } from "@shivaedev/effect-trpc/request-services.ts"
|
|
28
26
|
|
|
29
27
|
const runtime = ManagedRuntime.make(ApplicationLive)
|
|
30
28
|
const adapter = makeEffectTRPC({ runtime })
|
|
@@ -121,8 +119,9 @@ client as data; every other failure keeps the handling above.
|
|
|
121
119
|
Install the formatter once, then declare the rejections a procedure may send:
|
|
122
120
|
|
|
123
121
|
```ts
|
|
124
|
-
import { rejectionFormatter
|
|
125
|
-
import {
|
|
122
|
+
import { rejectionFormatter } from "@shivaedev/effect-trpc/rejection-formatter.ts"
|
|
123
|
+
import { rejectWith } from "@shivaedev/effect-trpc/rejection.ts"
|
|
124
|
+
import { BadRequest, Conflict } from "@shivaedev/platform/errors/taxonomy.ts"
|
|
126
125
|
|
|
127
126
|
const t = initTRPC.context<RequestContext>().create({
|
|
128
127
|
errorFormatter: rejectionFormatter,
|
|
@@ -185,12 +184,12 @@ adds it to the error data, next to tRPC's own fields:
|
|
|
185
184
|
effect-contract operation's `error` schema works directly:
|
|
186
185
|
`rejectWith(SaveOrder.error)`.
|
|
187
186
|
|
|
188
|
-
The browser-safe `@shivaedev/effect-trpc/client`
|
|
187
|
+
The browser-safe `@shivaedev/effect-trpc/client/rejection.ts` module reads the rejection from
|
|
189
188
|
a `TRPCClientError`:
|
|
190
189
|
|
|
191
190
|
```ts
|
|
192
|
-
import { decodeRejection, rejectionOf } from "@shivaedev/effect-trpc/client"
|
|
193
|
-
import { rejectedField } from "@shivaedev/platform/errors"
|
|
191
|
+
import { decodeRejection, rejectionOf } from "@shivaedev/effect-trpc/client/rejection.ts"
|
|
192
|
+
import { rejectedField } from "@shivaedev/platform/errors/rejected-field.ts"
|
|
194
193
|
|
|
195
194
|
rejectionOf(error) // Option<{ _tag: string, invalidInput?: true, ... }>, still encoded
|
|
196
195
|
decodeRejection(Schema.Union([BadRequest, Conflict]))(error) // Option<BadRequest | Conflict>
|
|
@@ -203,11 +202,11 @@ Both return `Option.none()` for any error without a tagged rejection, and
|
|
|
203
202
|
`rejectionOf` also returns `Option.none()` when `invalidInput` is present but
|
|
204
203
|
not `true`. An input failure still decodes as the declared `BadRequest`; the
|
|
205
204
|
mark is read from `rejectionOf`, or from `error.data.rejection.invalidInput` on a
|
|
206
|
-
`TRPCClientError` typed by the router. The client
|
|
205
|
+
`TRPCClientError` typed by the router. The modules under `client/` import only `effect`.
|
|
207
206
|
|
|
208
207
|
## Vitest
|
|
209
208
|
|
|
210
|
-
Install `@effect/vitest` to use the optional testing
|
|
209
|
+
Install `@effect/vitest` to use the optional `testing/` modules:
|
|
211
210
|
|
|
212
211
|
```sh
|
|
213
212
|
pnpm add --save-dev @effect/vitest vitest
|
|
@@ -217,7 +216,7 @@ Configure the router caller and test Layer once in the application's test
|
|
|
217
216
|
support:
|
|
218
217
|
|
|
219
218
|
```ts
|
|
220
|
-
import { makeTrpcIt } from "@shivaedev/effect-trpc/testing"
|
|
219
|
+
import { makeTrpcIt } from "@shivaedev/effect-trpc/testing/vitest.ts"
|
|
221
220
|
|
|
222
221
|
export const it = makeTrpcIt({
|
|
223
222
|
adapter,
|
package/dist/testing/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TestContext, Vitest } from "@effect/vitest";
|
|
2
2
|
import type { Effect, Layer } from "effect";
|
|
3
|
-
import type { EffectClock, EffectTestOptions } from "@shivaedev/effect-test";
|
|
3
|
+
import type { EffectClock, EffectTestOptions } from "@shivaedev/effect-test/types.ts";
|
|
4
4
|
import type { EffectTRPCAdapter } from "#adapter.ts";
|
|
5
5
|
import type { AnyTestLayer } from "./any-test-layer.ts";
|
|
6
6
|
import type { EffectCallerFactory } from "./caller.ts";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/testing/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EAAE,MAAM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AC,CAAC,CAAC,GAAG,KAAK,CAAC;AAEjI,MAAM,MAAM,YAAY,CAAC,YAAY,IAAI,YAAY,SAAS,CAAC,GAAG,UAAU,EAAE,MAAM,UAAU,KAAK,MAAM,MAAM,GAC5G,MAAM,SAAS,MAAM,GACpB,MAAM,GACN,KAAK,GACN,KAAK,CAAC"}
|
package/dist/testing/vitest.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { it as effectIt } from "@effect/vitest";
|
|
2
2
|
import { Effect } from "effect";
|
|
3
|
-
import { makeEffectIt } from "@shivaedev/effect-test";
|
|
3
|
+
import { makeEffectIt } from "@shivaedev/effect-test/vitest.ts";
|
|
4
4
|
import { makeEffectCallerFactory } from "./caller.js";
|
|
5
5
|
function withEffectTRPC(tester) {
|
|
6
6
|
return new Proxy(effectIt, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vitest.js","sourceRoot":"","sources":["../../src/testing/vitest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,IAAI,QAAQ,EAAe,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAc,MAAM,QAAQ,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"vitest.js","sourceRoot":"","sources":["../../src/testing/vitest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,IAAI,QAAQ,EAAe,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAc,MAAM,QAAQ,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAEhE,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAItD,SAAS,cAAc,CAAC,MAAe;IACtC,OAAO,IAAI,KAAK,CAAC,QAAQ,EAAE;QAC1B,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ;YAC7B,IAAI,QAAQ,KAAK,YAAY,EAAE,CAAC;gBAC/B,OAAO,MAAM,CAAC;YACf,CAAC;YACD,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAChD,CAAC;KACD,CAAC,CAAC;AACJ,CAAC;AAKD,MAAM,UAAU,iBAAiB,CAChC,OAAoF;IAEpF,MAAM,EAAE,SAAS,EAAE,GAAG,YAAY,CAAC;QAClC,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,WAAW,EAAE,CAAC,OAAO,EAAE,EAAE,CACxB,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;YACnB,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,EAA4B,CAAC;YACnE,MAAM,IAAI,GAAG,uBAAuB,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;YACtF,OAAO,KAAK,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAClD,CAAC,CAAC;KACH,CAAC,CAAC;IAEH,OAAO,cAAc,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,CACzB,OAAmD,EACyC,EAAE,CAC9F,iBAAiB,CAAC;IACjB,GAAG,OAAO;IACV,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;CAC3C,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shivaedev/effect-trpc",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Effect-native procedures and testing for tRPC",
|
|
5
5
|
"homepage": "https://github.com/ShivaeDev/platform/tree/main/packages/effect-trpc#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -23,24 +23,13 @@
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"exports": {
|
|
26
|
-
"
|
|
27
|
-
"types": "./dist
|
|
28
|
-
"source": "./src
|
|
29
|
-
"import": "./dist
|
|
30
|
-
"default": "./dist
|
|
31
|
-
},
|
|
32
|
-
"./client": {
|
|
33
|
-
"types": "./dist/client.d.ts",
|
|
34
|
-
"source": "./src/client.ts",
|
|
35
|
-
"import": "./dist/client.js",
|
|
36
|
-
"default": "./dist/client.js"
|
|
37
|
-
},
|
|
38
|
-
"./testing": {
|
|
39
|
-
"types": "./dist/testing.d.ts",
|
|
40
|
-
"source": "./src/testing.ts",
|
|
41
|
-
"import": "./dist/testing.js",
|
|
42
|
-
"default": "./dist/testing.js"
|
|
26
|
+
"./*.ts": {
|
|
27
|
+
"types": "./dist/*.d.ts",
|
|
28
|
+
"source": "./src/*.ts",
|
|
29
|
+
"import": "./dist/*.js",
|
|
30
|
+
"default": "./dist/*.js"
|
|
43
31
|
},
|
|
32
|
+
"./internal/*": null,
|
|
44
33
|
"./package.json": "./package.json"
|
|
45
34
|
},
|
|
46
35
|
"files": [
|
|
@@ -50,12 +39,12 @@
|
|
|
50
39
|
"README.md"
|
|
51
40
|
],
|
|
52
41
|
"dependencies": {
|
|
53
|
-
"@shivaedev/effect-test": "0.
|
|
42
|
+
"@shivaedev/effect-test": "0.2.0"
|
|
54
43
|
},
|
|
55
44
|
"devDependencies": {
|
|
56
45
|
"@effect/vitest": "4.0.0-rc.112",
|
|
57
|
-
"@shivaedev/effect-contract": "0.
|
|
58
|
-
"@shivaedev/quality": "0.
|
|
46
|
+
"@shivaedev/effect-contract": "0.3.0",
|
|
47
|
+
"@shivaedev/quality": "0.9.0",
|
|
59
48
|
"@trpc/client": "11.18.0",
|
|
60
49
|
"@trpc/server": "11.18.0",
|
|
61
50
|
"@types/node": "24.10.1",
|
package/src/testing/types.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TestContext, Vitest } from "@effect/vitest";
|
|
2
2
|
import type { Effect, Layer } from "effect";
|
|
3
|
-
import type { EffectClock, EffectTestOptions } from "@shivaedev/effect-test";
|
|
3
|
+
import type { EffectClock, EffectTestOptions } from "@shivaedev/effect-test/types.ts";
|
|
4
4
|
import type { EffectTRPCAdapter } from "#adapter.ts";
|
|
5
5
|
import type { AnyTestLayer } from "./any-test-layer.ts";
|
|
6
6
|
import type { EffectCallerFactory } from "./caller.ts";
|
package/src/testing/vitest.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { it as effectIt, type Vitest } from "@effect/vitest";
|
|
2
2
|
import { Effect, type Layer } from "effect";
|
|
3
|
-
import { makeEffectIt } from "@shivaedev/effect-test";
|
|
3
|
+
import { makeEffectIt } from "@shivaedev/effect-test/vitest.ts";
|
|
4
4
|
import type { AnyTestLayer } from "./any-test-layer.ts";
|
|
5
5
|
import { makeEffectCallerFactory } from "./caller.ts";
|
|
6
6
|
import type { CallerOptions, CallerResult, MakeTrpcHarnessItOptions, MakeTrpcItOptions, TrpcHarnessIt, TrpcIt } from "./types.ts";
|
package/dist/client.d.ts
DELETED
package/dist/client.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/client.js
DELETED
package/dist/client.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAyB,WAAW,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export type { EncodedRejection } from "#client/rejection.ts";
|
|
2
|
-
export { type EffectTRPCAdapter, type EffectTRPCRuntime, type MakeEffectTRPCOptions, makeEffectTRPC, } from "./adapter.ts";
|
|
3
|
-
export { badRequest, conflict, fail, forbidden, internalServerError, notFound, preconditionFailed, unauthorized, } from "./errors.ts";
|
|
4
|
-
export type { EffectProcedureBuilder } from "./procedure.ts";
|
|
5
|
-
export { RejectionError, type RejectWithOptions, rejectionCode, rejectWith } from "./rejection.ts";
|
|
6
|
-
export { type RejectionData, type RejectionErrorShape, rejectionFormatter, withRejection } from "./rejection-formatter.ts";
|
|
7
|
-
export { type EffectProcedureRequestServices, extendRequestServices, makeRequestServices, } from "./request-services.ts";
|
|
8
|
-
export { RequestSignal } from "./request-signal.ts";
|
|
9
|
-
export type { EffectTRPCErrorContext, EffectTRPCErrorMapper, EffectTRPCInstrument, EffectTRPCStreamInstrument, ProcedureInfo, ProcedureKind, } from "./types.ts";
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EACN,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,cAAc,GACd,MAAM,cAAc,CAAC;AACtB,OAAO,EACN,UAAU,EACV,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,mBAAmB,EACnB,QAAQ,EACR,kBAAkB,EAClB,YAAY,GACZ,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,KAAK,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACnG,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,mBAAmB,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC3H,OAAO,EACN,KAAK,8BAA8B,EACnC,qBAAqB,EACrB,mBAAmB,GACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EACX,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,0BAA0B,EAC1B,aAAa,EACb,aAAa,GACb,MAAM,YAAY,CAAC"}
|
package/dist/index.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { makeEffectTRPC, } from "./adapter.js";
|
|
2
|
-
export { badRequest, conflict, fail, forbidden, internalServerError, notFound, preconditionFailed, unauthorized, } from "./errors.js";
|
|
3
|
-
export { RejectionError, rejectionCode, rejectWith } from "./rejection.js";
|
|
4
|
-
export { rejectionFormatter, withRejection } from "./rejection-formatter.js";
|
|
5
|
-
export { extendRequestServices, makeRequestServices, } from "./request-services.js";
|
|
6
|
-
export { RequestSignal } from "./request-signal.js";
|
|
7
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAIN,cAAc,GACd,MAAM,cAAc,CAAC;AACtB,OAAO,EACN,UAAU,EACV,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,mBAAmB,EACnB,QAAQ,EACR,kBAAkB,EAClB,YAAY,GACZ,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,cAAc,EAA0B,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACnG,OAAO,EAAgD,kBAAkB,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC3H,OAAO,EAEN,qBAAqB,EACrB,mBAAmB,GACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/testing.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { type EffectCaller, type EffectCallerFactory, makeEffectCaller, makeEffectCallerFactory, } from "#testing/caller.ts";
|
|
2
|
-
export type { CallerOptions, CallerResult, MakeTrpcHarnessItOptions, MakeTrpcItOptions, TrpcHarnessIt, TrpcHarnessTest, TrpcHarnessTester, TrpcIt, TrpcTest, TrpcTester, } from "#testing/types.ts";
|
|
3
|
-
export { makeTrpcHarnessIt, makeTrpcIt } from "#testing/vitest.ts";
|
|
4
|
-
//# sourceMappingURL=testing.d.ts.map
|
package/dist/testing.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../src/testing.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,gBAAgB,EAChB,uBAAuB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACX,aAAa,EACb,YAAY,EACZ,wBAAwB,EACxB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,MAAM,EACN,QAAQ,EACR,UAAU,GACV,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/testing.js
DELETED
package/dist/testing.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testing.js","sourceRoot":"","sources":["../src/testing.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,gBAAgB,EAChB,uBAAuB,GACvB,MAAM,oBAAoB,CAAC;AAa5B,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC"}
|
package/src/client.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { decodeRejection, type EncodedRejection, rejectionOf } from "#client/rejection.ts";
|
package/src/index.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export type { EncodedRejection } from "#client/rejection.ts";
|
|
2
|
-
export {
|
|
3
|
-
type EffectTRPCAdapter,
|
|
4
|
-
type EffectTRPCRuntime,
|
|
5
|
-
type MakeEffectTRPCOptions,
|
|
6
|
-
makeEffectTRPC,
|
|
7
|
-
} from "./adapter.ts";
|
|
8
|
-
export {
|
|
9
|
-
badRequest,
|
|
10
|
-
conflict,
|
|
11
|
-
fail,
|
|
12
|
-
forbidden,
|
|
13
|
-
internalServerError,
|
|
14
|
-
notFound,
|
|
15
|
-
preconditionFailed,
|
|
16
|
-
unauthorized,
|
|
17
|
-
} from "./errors.ts";
|
|
18
|
-
export type { EffectProcedureBuilder } from "./procedure.ts";
|
|
19
|
-
export { RejectionError, type RejectWithOptions, rejectionCode, rejectWith } from "./rejection.ts";
|
|
20
|
-
export { type RejectionData, type RejectionErrorShape, rejectionFormatter, withRejection } from "./rejection-formatter.ts";
|
|
21
|
-
export {
|
|
22
|
-
type EffectProcedureRequestServices,
|
|
23
|
-
extendRequestServices,
|
|
24
|
-
makeRequestServices,
|
|
25
|
-
} from "./request-services.ts";
|
|
26
|
-
export { RequestSignal } from "./request-signal.ts";
|
|
27
|
-
export type {
|
|
28
|
-
EffectTRPCErrorContext,
|
|
29
|
-
EffectTRPCErrorMapper,
|
|
30
|
-
EffectTRPCInstrument,
|
|
31
|
-
EffectTRPCStreamInstrument,
|
|
32
|
-
ProcedureInfo,
|
|
33
|
-
ProcedureKind,
|
|
34
|
-
} from "./types.ts";
|
package/src/testing.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export {
|
|
2
|
-
type EffectCaller,
|
|
3
|
-
type EffectCallerFactory,
|
|
4
|
-
makeEffectCaller,
|
|
5
|
-
makeEffectCallerFactory,
|
|
6
|
-
} from "#testing/caller.ts";
|
|
7
|
-
export type {
|
|
8
|
-
CallerOptions,
|
|
9
|
-
CallerResult,
|
|
10
|
-
MakeTrpcHarnessItOptions,
|
|
11
|
-
MakeTrpcItOptions,
|
|
12
|
-
TrpcHarnessIt,
|
|
13
|
-
TrpcHarnessTest,
|
|
14
|
-
TrpcHarnessTester,
|
|
15
|
-
TrpcIt,
|
|
16
|
-
TrpcTest,
|
|
17
|
-
TrpcTester,
|
|
18
|
-
} from "#testing/types.ts";
|
|
19
|
-
export { makeTrpcHarnessIt, makeTrpcIt } from "#testing/vitest.ts";
|