@bleedingdev/modern-js-plugin-bff 3.4.0-ultramodern.2 → 3.4.0-ultramodern.20
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/dist/cjs/runtime/effect/adapter.js +12 -59
- package/dist/cjs/runtime/effect/edge.js +1 -1
- package/dist/cjs/runtime/effect/handler.js +40 -3
- package/dist/cjs/runtime/effect/module.js +46 -27
- package/dist/cjs/runtime/effect-client/index.js +4 -0
- package/dist/cjs/utils/effectClientGenerator.js +13 -8
- package/dist/esm/runtime/effect/adapter.mjs +12 -59
- package/dist/esm/runtime/effect/edge.mjs +1 -1
- package/dist/esm/runtime/effect/handler.mjs +40 -3
- package/dist/esm/runtime/effect/module.mjs +46 -27
- package/dist/esm/runtime/effect-client/index.mjs +2 -1
- package/dist/esm/utils/effectClientGenerator.mjs +13 -8
- package/dist/esm-node/runtime/effect/adapter.mjs +12 -59
- package/dist/esm-node/runtime/effect/edge.mjs +1 -1
- package/dist/esm-node/runtime/effect/handler.mjs +40 -3
- package/dist/esm-node/runtime/effect/module.mjs +46 -27
- package/dist/esm-node/runtime/effect-client/index.mjs +2 -1
- package/dist/esm-node/utils/effectClientGenerator.mjs +13 -8
- package/dist/types/runtime/effect/adapter.d.ts +3 -19
- package/dist/types/runtime/effect/handler.d.ts +2 -5
- package/dist/types/runtime/effect/module.d.ts +3 -16
- package/dist/types/runtime/effect-client/index.d.ts +2 -3
- package/package.json +13 -13
|
@@ -20,27 +20,14 @@ export type EffectApiModule = {
|
|
|
20
20
|
export type LoadedEffectBffHandler = {
|
|
21
21
|
handler: EffectBffRequestHandler;
|
|
22
22
|
dispose?: () => Promise<void>;
|
|
23
|
-
/**
|
|
24
|
-
* True when the handler is known to apply `validateRequest` internally
|
|
25
|
-
* (including per batched item): `{ api, layer }` modules resolved through
|
|
26
|
-
* `createHttpApiHandler`, and `createHandler` factories branded by
|
|
27
|
-
* `defineEffectBff` (see `EFFECT_VALIDATOR_AWARE_FACTORY`). Plain
|
|
28
|
-
* `handler` exports and unbranded custom factories leave this unset; the
|
|
29
|
-
* adapter middleware must enforce the policy itself for those.
|
|
30
|
-
*/
|
|
31
|
-
appliesRequestValidator?: boolean;
|
|
32
23
|
};
|
|
33
24
|
export type ResolveEffectBffModuleHandlerOptions = {
|
|
34
25
|
openapi?: EffectBffOpenApiConfig;
|
|
35
26
|
dataPlatform?: EffectDataPlatformValidationOptions;
|
|
36
27
|
/**
|
|
37
|
-
* Server-seam request validator (cross-project policy).
|
|
38
|
-
* `createHttpApiHandler
|
|
39
|
-
*
|
|
40
|
-
* Note: plain `handler` exports and unbranded custom `createHandler`
|
|
41
|
-
* factories bypass this seam — the effect adapter enforces the policy in
|
|
42
|
-
* its middleware for those shapes instead (see
|
|
43
|
-
* `LoadedEffectBffHandler.appliesRequestValidator`).
|
|
28
|
+
* Server-seam request validator (cross-project policy). Strict Effect
|
|
29
|
+
* entries forward it into `createHttpApiHandler`, where it applies to
|
|
30
|
+
* direct, batched and rpc requests.
|
|
44
31
|
*/
|
|
45
32
|
validateRequest?: EffectRequestValidator;
|
|
46
33
|
onWarning?: (message: string) => void;
|
|
@@ -7,6 +7,7 @@ import { Rpc, RpcClient, RpcGroup, RpcSchema, RpcSerialization } from 'effect/un
|
|
|
7
7
|
export * as Effect from 'effect/Effect';
|
|
8
8
|
export * as Layer from 'effect/Layer';
|
|
9
9
|
export * as Schema from 'effect/Schema';
|
|
10
|
+
export * as HttpClientError from 'effect/unstable/http/HttpClientError';
|
|
10
11
|
export { HttpApi, HttpApiClient, HttpApiEndpoint, HttpApiGroup, HttpApiSchema, Rpc, RpcClient, RpcGroup, RpcSchema, RpcSerialization, };
|
|
11
12
|
export type EffectHttpApiClientOptions = {
|
|
12
13
|
baseUrl?: URL | string;
|
|
@@ -52,8 +53,6 @@ export type EffectRpcClientHandle<Rpcs extends Rpc.Any, Flatten extends boolean
|
|
|
52
53
|
export declare function view<T>(): <const Selection extends EffectViewSelection<T>>(selection: Selection) => Selection;
|
|
53
54
|
export declare function mask<T, const Selection extends EffectViewSelection<T>>(value: T, selection: Selection): EffectViewData<T, Selection>;
|
|
54
55
|
export declare function runEffectView<T, const Selection extends EffectViewSelection<T>>(request: PromiseLike<T>, selection: Selection): Promise<EffectViewData<T, Selection>>;
|
|
55
|
-
export declare function makeEffectHttpApiClient<ApiId extends string, Groups extends HttpApiGroup.Any>(api: HttpApi.HttpApi<ApiId, Groups>, options?: EffectHttpApiClientOptions): Effect.Effect<
|
|
56
|
-
readonly topLevel: false;
|
|
57
|
-
}> as HttpApiGroup.Name<Group>]: HttpApiClient.Client.Group<Group, Group["identifier"], never, never>; } & { readonly [Method in HttpApiClient.Client.TopLevelMethods<Groups, never, never> as Method[0]]: Method[1]; }>, never, Exclude<import("effect/unstable/httpapi/HttpApiMiddleware").MiddlewareClient<HttpApiEndpoint.Middleware<HttpApiGroup.Endpoints<Groups>>>, HttpClient.HttpClient>>;
|
|
56
|
+
export declare function makeEffectHttpApiClient<ApiId extends string, Groups extends HttpApiGroup.Any>(api: HttpApi.HttpApi<ApiId, Groups>, options?: EffectHttpApiClientOptions): Effect.Effect<HttpApiClient.Client<Groups>, never, HttpApiGroup.MiddlewareClient<Groups>>;
|
|
58
57
|
export declare function makeEffectRpcClient<Rpcs extends Rpc.Any, const Flatten extends boolean = false>(group: RpcGroup.RpcGroup<Rpcs>, options: EffectRpcClientOptions<Rpcs, Flatten>): Effect.Effect<EffectRpcClientHandle<Rpcs, Flatten>, EffectRpcClientError, never>;
|
|
59
58
|
export declare const runEffectRequest: <A, E>(effect: Effect.Effect<A, E>, options?: Effect.RunOptions | undefined) => Promise<A>;
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"modern",
|
|
18
18
|
"modern.js"
|
|
19
19
|
],
|
|
20
|
-
"version": "3.4.0-ultramodern.
|
|
20
|
+
"version": "3.4.0-ultramodern.20",
|
|
21
21
|
"types": "./dist/types/cli.d.ts",
|
|
22
22
|
"main": "./dist/cjs/cli.js",
|
|
23
23
|
"exports": {
|
|
@@ -157,12 +157,12 @@
|
|
|
157
157
|
"effect": "4.0.0-beta.89",
|
|
158
158
|
"qs": "^6.15.3",
|
|
159
159
|
"type-is": "^2.1.0",
|
|
160
|
-
"@modern-js/
|
|
161
|
-
"@modern-js/create-request": "npm:@bleedingdev/modern-js-create-request@3.4.0-ultramodern.
|
|
162
|
-
"@modern-js/server-core": "npm:@bleedingdev/modern-js-server-core@3.4.0-ultramodern.
|
|
163
|
-
"@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.4.0-ultramodern.
|
|
164
|
-
"@modern-js/
|
|
165
|
-
"@modern-js/
|
|
160
|
+
"@modern-js/bff-core": "npm:@bleedingdev/modern-js-bff-core@3.4.0-ultramodern.20",
|
|
161
|
+
"@modern-js/create-request": "npm:@bleedingdev/modern-js-create-request@3.4.0-ultramodern.20",
|
|
162
|
+
"@modern-js/server-core": "npm:@bleedingdev/modern-js-server-core@3.4.0-ultramodern.20",
|
|
163
|
+
"@modern-js/server-utils": "npm:@bleedingdev/modern-js-server-utils@3.4.0-ultramodern.20",
|
|
164
|
+
"@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.4.0-ultramodern.20",
|
|
165
|
+
"@modern-js/builder": "npm:@bleedingdev/modern-js-builder@3.4.0-ultramodern.20"
|
|
166
166
|
},
|
|
167
167
|
"devDependencies": {
|
|
168
168
|
"@rsbuild/core": "2.1.0",
|
|
@@ -174,12 +174,12 @@
|
|
|
174
174
|
"memfs": "^4.57.8",
|
|
175
175
|
"typescript": "^6.0.3",
|
|
176
176
|
"zod": "^4.4.3",
|
|
177
|
-
"@modern-js/
|
|
178
|
-
"@modern-js/
|
|
179
|
-
"@modern-js/
|
|
180
|
-
"@modern-js/
|
|
181
|
-
"@
|
|
182
|
-
"@
|
|
177
|
+
"@modern-js/app-tools": "npm:@bleedingdev/modern-js-app-tools@3.4.0-ultramodern.20",
|
|
178
|
+
"@modern-js/bff-runtime": "npm:@bleedingdev/modern-js-bff-runtime@3.4.0-ultramodern.20",
|
|
179
|
+
"@modern-js/runtime": "npm:@bleedingdev/modern-js-runtime@3.4.0-ultramodern.20",
|
|
180
|
+
"@modern-js/types": "npm:@bleedingdev/modern-js-types@3.4.0-ultramodern.20",
|
|
181
|
+
"@scripts/rstest-config": "2.66.0",
|
|
182
|
+
"@modern-js/plugin": "npm:@bleedingdev/modern-js-plugin@3.4.0-ultramodern.20"
|
|
183
183
|
},
|
|
184
184
|
"sideEffects": false,
|
|
185
185
|
"publishConfig": {
|