@fragno-dev/core 0.1.7 → 0.1.8
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/.turbo/turbo-build.log +45 -53
- package/CHANGELOG.md +6 -0
- package/dist/api/api.d.ts +2 -2
- package/dist/api/api.js +3 -2
- package/dist/api/fragment-builder.d.ts +2 -4
- package/dist/api/fragment-builder.js +1 -1
- package/dist/api/fragment-instantiation.d.ts +2 -4
- package/dist/api/fragment-instantiation.js +3 -5
- package/dist/api/route.d.ts +2 -3
- package/dist/api/route.js +1 -1
- package/dist/api-BFrUCIsF.d.ts +963 -0
- package/dist/api-BFrUCIsF.d.ts.map +1 -0
- package/dist/client/client.d.ts +1 -3
- package/dist/client/client.js +4 -5
- package/dist/client/client.svelte.d.ts +2 -3
- package/dist/client/client.svelte.d.ts.map +1 -1
- package/dist/client/client.svelte.js +4 -5
- package/dist/client/client.svelte.js.map +1 -1
- package/dist/client/react.d.ts +2 -3
- package/dist/client/react.d.ts.map +1 -1
- package/dist/client/react.js +4 -5
- package/dist/client/react.js.map +1 -1
- package/dist/client/solid.d.ts +2 -3
- package/dist/client/solid.d.ts.map +1 -1
- package/dist/client/solid.js +4 -5
- package/dist/client/solid.js.map +1 -1
- package/dist/client/vanilla.d.ts +2 -3
- package/dist/client/vanilla.d.ts.map +1 -1
- package/dist/client/vanilla.js +4 -5
- package/dist/client/vanilla.js.map +1 -1
- package/dist/client/vue.d.ts +2 -3
- package/dist/client/vue.d.ts.map +1 -1
- package/dist/client/vue.js +4 -5
- package/dist/client/vue.js.map +1 -1
- package/dist/{client-C5LsYHEI.js → client-DAFHcKqA.js} +4 -4
- package/dist/{client-C5LsYHEI.js.map → client-DAFHcKqA.js.map} +1 -1
- package/dist/fragment-builder-Boh2vNHq.js +108 -0
- package/dist/fragment-builder-Boh2vNHq.js.map +1 -0
- package/dist/fragment-instantiation-DUT-HLl1.js +898 -0
- package/dist/fragment-instantiation-DUT-HLl1.js.map +1 -0
- package/dist/integrations/react-ssr.js +1 -1
- package/dist/mod.d.ts +2 -4
- package/dist/mod.js +4 -6
- package/dist/{route-C5Uryylh.js → route-C4CyNHkC.js} +8 -3
- package/dist/route-C4CyNHkC.js.map +1 -0
- package/dist/{ssr-BByDVfFD.js → ssr-kyKI7pqH.js} +1 -1
- package/dist/{ssr-BByDVfFD.js.map → ssr-kyKI7pqH.js.map} +1 -1
- package/dist/test/test.d.ts +6 -7
- package/dist/test/test.d.ts.map +1 -1
- package/dist/test/test.js +9 -7
- package/dist/test/test.js.map +1 -1
- package/package.json +1 -1
- package/src/api/api.ts +45 -6
- package/src/api/fragment-builder.ts +463 -25
- package/src/api/fragment-instantiation.test.ts +249 -7
- package/src/api/fragment-instantiation.ts +283 -16
- package/src/api/fragment-services.test.ts +462 -0
- package/src/api/fragment.test.ts +65 -17
- package/src/api/request-middleware.test.ts +6 -3
- package/src/api/route.test.ts +111 -1
- package/src/api/route.ts +323 -14
- package/src/mod.ts +11 -1
- package/src/test/test.test.ts +20 -15
- package/src/test/test.ts +48 -9
- package/dist/api-BWN97TOr.d.ts +0 -377
- package/dist/api-BWN97TOr.d.ts.map +0 -1
- package/dist/api-DngJDcmO.js +0 -54
- package/dist/api-DngJDcmO.js.map +0 -1
- package/dist/fragment-builder-DOnCVBqc.js +0 -47
- package/dist/fragment-builder-DOnCVBqc.js.map +0 -1
- package/dist/fragment-builder-MGr68GNb.d.ts +0 -409
- package/dist/fragment-builder-MGr68GNb.d.ts.map +0 -1
- package/dist/fragment-instantiation-C4wvwl6V.js +0 -446
- package/dist/fragment-instantiation-C4wvwl6V.js.map +0 -1
- package/dist/request-output-context-CdIjwmEN.js +0 -320
- package/dist/request-output-context-CdIjwmEN.js.map +0 -1
- package/dist/route-Bl9Zr1Yv.d.ts +0 -26
- package/dist/route-Bl9Zr1Yv.d.ts.map +0 -1
- package/dist/route-C5Uryylh.js.map +0 -1
package/src/test/test.ts
CHANGED
|
@@ -23,12 +23,14 @@ export interface CreateFragmentForTestOptions<
|
|
|
23
23
|
TServices,
|
|
24
24
|
TAdditionalContext extends Record<string, unknown>,
|
|
25
25
|
TOptions extends FragnoPublicConfig,
|
|
26
|
+
TRequiredInterfaces extends Record<string, unknown> = {},
|
|
26
27
|
> {
|
|
27
28
|
config: TConfig;
|
|
28
29
|
options?: Partial<TOptions>;
|
|
29
30
|
deps?: Partial<TDeps>;
|
|
30
31
|
services?: Partial<TServices>;
|
|
31
32
|
additionalContext?: Partial<TAdditionalContext>;
|
|
33
|
+
interfaceImplementations?: TRequiredInterfaces;
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
/**
|
|
@@ -108,18 +110,34 @@ export function createFragmentForTest<
|
|
|
108
110
|
TServices extends Record<string, unknown>,
|
|
109
111
|
TAdditionalContext extends Record<string, unknown>,
|
|
110
112
|
TOptions extends FragnoPublicConfig,
|
|
113
|
+
TRequiredInterfaces extends Record<string, unknown>,
|
|
114
|
+
TProvidedInterfaces extends Record<string, unknown>,
|
|
111
115
|
const TRoutesOrFactories extends readonly AnyRouteOrFactory[],
|
|
112
116
|
>(
|
|
113
117
|
fragmentBuilder: {
|
|
114
|
-
definition: FragmentDefinition<
|
|
118
|
+
definition: FragmentDefinition<
|
|
119
|
+
TConfig,
|
|
120
|
+
TDeps,
|
|
121
|
+
TServices,
|
|
122
|
+
TAdditionalContext,
|
|
123
|
+
TRequiredInterfaces,
|
|
124
|
+
TProvidedInterfaces
|
|
125
|
+
>;
|
|
115
126
|
$requiredOptions: TOptions;
|
|
116
127
|
},
|
|
117
128
|
routesOrFactories: TRoutesOrFactories,
|
|
118
|
-
options: CreateFragmentForTestOptions<
|
|
129
|
+
options: CreateFragmentForTestOptions<
|
|
130
|
+
TConfig,
|
|
131
|
+
TDeps,
|
|
132
|
+
TServices,
|
|
133
|
+
TAdditionalContext,
|
|
134
|
+
TOptions,
|
|
135
|
+
TRequiredInterfaces
|
|
136
|
+
>,
|
|
119
137
|
): FragmentForTest<
|
|
120
138
|
TConfig,
|
|
121
|
-
TDeps,
|
|
122
|
-
TServices,
|
|
139
|
+
TDeps & TRequiredInterfaces,
|
|
140
|
+
TServices & TProvidedInterfaces,
|
|
123
141
|
TAdditionalContext,
|
|
124
142
|
TOptions,
|
|
125
143
|
FlattenRouteFactories<TRoutesOrFactories>
|
|
@@ -130,6 +148,7 @@ export function createFragmentForTest<
|
|
|
130
148
|
deps: depsOverride,
|
|
131
149
|
services: servicesOverride,
|
|
132
150
|
additionalContext: additionalContextOverride,
|
|
151
|
+
interfaceImplementations,
|
|
133
152
|
} = options;
|
|
134
153
|
|
|
135
154
|
// Create deps from definition or use empty object
|
|
@@ -138,16 +157,30 @@ export function createFragmentForTest<
|
|
|
138
157
|
? definition.dependencies(config, fragmentOptions)
|
|
139
158
|
: ({} as TDeps);
|
|
140
159
|
|
|
141
|
-
// Merge deps with overrides
|
|
142
|
-
const deps = {
|
|
160
|
+
// Merge deps with overrides and interface implementations
|
|
161
|
+
const deps = {
|
|
162
|
+
...baseDeps,
|
|
163
|
+
...interfaceImplementations,
|
|
164
|
+
...depsOverride,
|
|
165
|
+
} as TDeps & TRequiredInterfaces;
|
|
143
166
|
|
|
144
167
|
// Create services from definition or use empty object
|
|
145
168
|
const baseServices = definition.services
|
|
146
169
|
? definition.services(config, fragmentOptions, deps)
|
|
147
170
|
: ({} as TServices);
|
|
148
171
|
|
|
149
|
-
//
|
|
150
|
-
const
|
|
172
|
+
// Handle providedServices - can be either a factory function or a direct object
|
|
173
|
+
const providedServicesResolved =
|
|
174
|
+
typeof definition.providedServices === "function"
|
|
175
|
+
? definition.providedServices(config, fragmentOptions, deps)
|
|
176
|
+
: definition.providedServices;
|
|
177
|
+
|
|
178
|
+
// Merge services with provided services and overrides
|
|
179
|
+
const services = {
|
|
180
|
+
...baseServices,
|
|
181
|
+
...providedServicesResolved,
|
|
182
|
+
...servicesOverride,
|
|
183
|
+
} as TServices & TProvidedInterfaces;
|
|
151
184
|
|
|
152
185
|
// Merge additional context with options
|
|
153
186
|
const additionalContext = {
|
|
@@ -157,7 +190,13 @@ export function createFragmentForTest<
|
|
|
157
190
|
} as TAdditionalContext & TOptions;
|
|
158
191
|
|
|
159
192
|
// Create the actual fragment using createFragment
|
|
160
|
-
const fragment = createFragment(
|
|
193
|
+
const fragment = createFragment(
|
|
194
|
+
fragmentBuilder,
|
|
195
|
+
config,
|
|
196
|
+
routesOrFactories,
|
|
197
|
+
fragmentOptions,
|
|
198
|
+
interfaceImplementations,
|
|
199
|
+
);
|
|
161
200
|
|
|
162
201
|
return {
|
|
163
202
|
config,
|
package/dist/api-BWN97TOr.d.ts
DELETED
|
@@ -1,377 +0,0 @@
|
|
|
1
|
-
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
2
|
-
|
|
3
|
-
//#region src/api/internal/path.d.ts
|
|
4
|
-
type SplitPath<T extends string> = T extends `${infer First}/${infer Rest}` ? First extends "" ? SplitPath<Rest> : [First, ...SplitPath<Rest>] : T extends "" ? [] : [T];
|
|
5
|
-
type ExtractParam<T extends string> = T extends `:${infer Name}` ? Name : T extends `**:${infer Name}` ? Name : T extends "**" ? "**" : never;
|
|
6
|
-
type ExtractParamsFromSegments<T extends readonly string[]> = T extends readonly [infer First, ...infer Rest] ? First extends string ? Rest extends readonly string[] ? ExtractParam<First> | ExtractParamsFromSegments<Rest> : ExtractParam<First> : never : never;
|
|
7
|
-
/**
|
|
8
|
-
* Type helper to extract path parameters from a const string path
|
|
9
|
-
*
|
|
10
|
-
* Supports:
|
|
11
|
-
* - Regular paths: "/path" -> never
|
|
12
|
-
* - Named parameters: "/path/:name" -> "name"
|
|
13
|
-
* - Wildcard paths: "/path/foo/**" -> "**"
|
|
14
|
-
* - Named wildcard paths: "/path/foo/**:name" -> "name"
|
|
15
|
-
* - String (narrows): string -> never
|
|
16
|
-
*/
|
|
17
|
-
type ExtractPathParams<T extends string, ValueType = string> = ExtractParamsFromSegments<SplitPath<T>> extends never ? Record<string, never> : Record<ExtractParamsFromSegments<SplitPath<T>>, ValueType>;
|
|
18
|
-
/**
|
|
19
|
-
* Same as @see ExtractPathParams, but returns `Record<string, ValueType>` when a string is
|
|
20
|
-
* passed in.
|
|
21
|
-
*/
|
|
22
|
-
type ExtractPathParamsOrWiden<T extends string, ValueType = string> = string extends T ? Record<string, ValueType> : ExtractPathParams<T, ValueType>;
|
|
23
|
-
/**
|
|
24
|
-
* Same as @see ExtractPathParamsOrWiden, but returns `undefined` when no path parameters in the
|
|
25
|
-
* const.
|
|
26
|
-
*/
|
|
27
|
-
type MaybeExtractPathParamsOrWiden<T extends string, ValueType = string> = HasPathParams<T> extends true ? ExtractPathParamsOrWiden<T, ValueType> : undefined;
|
|
28
|
-
type ExtractPathParamNames<T extends string> = ExtractParamsFromSegments<SplitPath<T>>;
|
|
29
|
-
type HasPathParams<T extends string> = ExtractPathParamNames<T> extends never ? false : true;
|
|
30
|
-
/**
|
|
31
|
-
* Creates a query parameters type where the specified keys are hints (optional)
|
|
32
|
-
* and additional string keys are also allowed.
|
|
33
|
-
*
|
|
34
|
-
* This allows for flexible query parameter typing where:
|
|
35
|
-
* - All hinted parameters are optional
|
|
36
|
-
* - Additional parameters beyond the hints are allowed
|
|
37
|
-
* - Values can be of any specified type (defaults to string)
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* ```ts
|
|
41
|
-
* type MyQuery = QueryParamsHint<"page" | "limit", string>;
|
|
42
|
-
* // Allows: { page?: string, limit?: string, [key: string]: string }
|
|
43
|
-
*
|
|
44
|
-
* const query1: MyQuery = {}; // Valid - no params required
|
|
45
|
-
* const query2: MyQuery = { page: "1" }; // Valid - hinted param
|
|
46
|
-
* const query3: MyQuery = { page: "1", sort: "asc" }; // Valid - additional param
|
|
47
|
-
* ```
|
|
48
|
-
*/
|
|
49
|
-
type QueryParamsHint<TQueryParameters extends string, ValueType = string> = Partial<Record<TQueryParameters, ValueType>> & Record<string, ValueType | undefined>;
|
|
50
|
-
//#endregion
|
|
51
|
-
//#region src/api/mutable-request-state.d.ts
|
|
52
|
-
/**
|
|
53
|
-
* Holds mutable request state that can be modified by middleware and consumed by handlers.
|
|
54
|
-
*
|
|
55
|
-
* This class provides a structural way for middleware to modify request data:
|
|
56
|
-
* - Path parameters can be modified
|
|
57
|
-
* - Query/search parameters can be modified
|
|
58
|
-
* - Request body can be overridden
|
|
59
|
-
* - Request headers can be modified
|
|
60
|
-
*
|
|
61
|
-
* @example
|
|
62
|
-
* ```typescript
|
|
63
|
-
* // In middleware
|
|
64
|
-
* const state = new MutableRequestState({
|
|
65
|
-
* pathParams: { id: "123" },
|
|
66
|
-
* searchParams: new URLSearchParams("?role=user"),
|
|
67
|
-
* body: { name: "John" },
|
|
68
|
-
* headers: new Headers()
|
|
69
|
-
* });
|
|
70
|
-
*
|
|
71
|
-
* // Modify query parameters
|
|
72
|
-
* state.searchParams.set("role", "admin");
|
|
73
|
-
*
|
|
74
|
-
* // Override body
|
|
75
|
-
* state.setBody({ name: "Jane" });
|
|
76
|
-
*
|
|
77
|
-
* // Modify headers
|
|
78
|
-
* state.headers.set("X-Custom", "value");
|
|
79
|
-
* ```
|
|
80
|
-
*/
|
|
81
|
-
declare class MutableRequestState {
|
|
82
|
-
#private;
|
|
83
|
-
constructor(config: {
|
|
84
|
-
pathParams: Record<string, string>;
|
|
85
|
-
searchParams: URLSearchParams;
|
|
86
|
-
body: RequestBodyType;
|
|
87
|
-
headers: Headers;
|
|
88
|
-
});
|
|
89
|
-
/**
|
|
90
|
-
* Path parameters extracted from the route.
|
|
91
|
-
* Can be modified directly (e.g., `state.pathParams.id = "456"`).
|
|
92
|
-
*/
|
|
93
|
-
get pathParams(): Record<string, string>;
|
|
94
|
-
/**
|
|
95
|
-
* URLSearchParams for query parameters.
|
|
96
|
-
* Can be modified using URLSearchParams API (e.g., `state.searchParams.set("key", "value")`).
|
|
97
|
-
*/
|
|
98
|
-
get searchParams(): URLSearchParams;
|
|
99
|
-
/**
|
|
100
|
-
* Request headers.
|
|
101
|
-
* Can be modified using Headers API (e.g., `state.headers.set("X-Custom", "value")`).
|
|
102
|
-
*/
|
|
103
|
-
get headers(): Headers;
|
|
104
|
-
/**
|
|
105
|
-
* Get the current body value.
|
|
106
|
-
* Returns the override if set, otherwise the initial body.
|
|
107
|
-
*/
|
|
108
|
-
get body(): RequestBodyType;
|
|
109
|
-
/**
|
|
110
|
-
* Override the request body.
|
|
111
|
-
* This allows middleware to replace the body that will be seen by the handler.
|
|
112
|
-
*
|
|
113
|
-
* @param body - The new body value
|
|
114
|
-
*
|
|
115
|
-
* @example
|
|
116
|
-
* ```typescript
|
|
117
|
-
* // In middleware
|
|
118
|
-
* state.setBody({ modifiedField: "new value" });
|
|
119
|
-
* ```
|
|
120
|
-
*/
|
|
121
|
-
setBody(body: RequestBodyType): void;
|
|
122
|
-
/**
|
|
123
|
-
* Check if the body has been overridden by middleware.
|
|
124
|
-
*/
|
|
125
|
-
get hasBodyOverride(): boolean;
|
|
126
|
-
}
|
|
127
|
-
//#endregion
|
|
128
|
-
//#region src/api/request-input-context.d.ts
|
|
129
|
-
type RequestBodyType = unknown | FormData | Blob | null | undefined;
|
|
130
|
-
declare class RequestInputContext<TPath extends string = string, TInputSchema extends StandardSchemaV1 | undefined = undefined> {
|
|
131
|
-
#private;
|
|
132
|
-
constructor(config: {
|
|
133
|
-
path: TPath;
|
|
134
|
-
method: string;
|
|
135
|
-
pathParams: ExtractPathParams<TPath>;
|
|
136
|
-
searchParams: URLSearchParams;
|
|
137
|
-
parsedBody: RequestBodyType;
|
|
138
|
-
rawBody?: string;
|
|
139
|
-
headers: Headers;
|
|
140
|
-
request?: Request;
|
|
141
|
-
inputSchema?: TInputSchema;
|
|
142
|
-
shouldValidateInput?: boolean;
|
|
143
|
-
});
|
|
144
|
-
/**
|
|
145
|
-
* Create a RequestContext from a Request object for server-side handling
|
|
146
|
-
*/
|
|
147
|
-
static fromRequest<TPath extends string, TInputSchema extends StandardSchemaV1 | undefined = undefined>(config: {
|
|
148
|
-
request: Request;
|
|
149
|
-
method: string;
|
|
150
|
-
path: TPath;
|
|
151
|
-
pathParams: ExtractPathParams<TPath>;
|
|
152
|
-
inputSchema?: TInputSchema;
|
|
153
|
-
shouldValidateInput?: boolean;
|
|
154
|
-
state: MutableRequestState;
|
|
155
|
-
rawBody?: string;
|
|
156
|
-
}): Promise<RequestInputContext<TPath, TInputSchema>>;
|
|
157
|
-
/**
|
|
158
|
-
* Create a RequestContext for server-side rendering contexts (no Request object)
|
|
159
|
-
*/
|
|
160
|
-
static fromSSRContext<TPath extends string, TInputSchema extends StandardSchemaV1 | undefined = undefined>(config: {
|
|
161
|
-
method: "GET";
|
|
162
|
-
path: TPath;
|
|
163
|
-
pathParams: ExtractPathParams<TPath>;
|
|
164
|
-
searchParams?: URLSearchParams;
|
|
165
|
-
headers?: Headers;
|
|
166
|
-
} | {
|
|
167
|
-
method: Exclude<HTTPMethod, "GET">;
|
|
168
|
-
path: TPath;
|
|
169
|
-
pathParams: ExtractPathParams<TPath>;
|
|
170
|
-
searchParams?: URLSearchParams;
|
|
171
|
-
headers?: Headers;
|
|
172
|
-
body: RequestBodyType;
|
|
173
|
-
inputSchema?: TInputSchema;
|
|
174
|
-
}): RequestInputContext<TPath, TInputSchema>;
|
|
175
|
-
/**
|
|
176
|
-
* The HTTP method as string (e.g., `GET`, `POST`)
|
|
177
|
-
*/
|
|
178
|
-
get method(): string;
|
|
179
|
-
/**
|
|
180
|
-
* The matched route path (e.g., `/users/:id`)
|
|
181
|
-
* @remarks `string`
|
|
182
|
-
*/
|
|
183
|
-
get path(): TPath;
|
|
184
|
-
/**
|
|
185
|
-
* Extracted path parameters as object (e.g., `{ id: '123' }`)
|
|
186
|
-
* @remarks `Record<string, string>`
|
|
187
|
-
*/
|
|
188
|
-
get pathParams(): ExtractPathParams<TPath>;
|
|
189
|
-
/**
|
|
190
|
-
* [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) object for query parameters
|
|
191
|
-
* @remarks `URLSearchParams`
|
|
192
|
-
*/
|
|
193
|
-
get query(): URLSearchParams;
|
|
194
|
-
/**
|
|
195
|
-
* [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) object for request headers
|
|
196
|
-
* @remarks `Headers`
|
|
197
|
-
*/
|
|
198
|
-
get headers(): Headers;
|
|
199
|
-
get rawBody(): string | undefined;
|
|
200
|
-
/**
|
|
201
|
-
* Input validation context (only if inputSchema is defined)
|
|
202
|
-
* @remarks `InputContext`
|
|
203
|
-
*/
|
|
204
|
-
get input(): TInputSchema extends undefined ? undefined : {
|
|
205
|
-
schema: TInputSchema;
|
|
206
|
-
valid: () => Promise<TInputSchema extends StandardSchemaV1 ? StandardSchemaV1.InferOutput<TInputSchema> : unknown>;
|
|
207
|
-
};
|
|
208
|
-
}
|
|
209
|
-
//#endregion
|
|
210
|
-
//#region src/http/http-status.d.ts
|
|
211
|
-
/**
|
|
212
|
-
* @module
|
|
213
|
-
* HTTP Status utility.
|
|
214
|
-
*
|
|
215
|
-
* Modified from honojs/hono
|
|
216
|
-
* Original source: https://github.com/honojs/hono/blob/0e3db674ad3f40be215a55a18062dd8e387ce525/src/utils/http-status.ts
|
|
217
|
-
* License: MIT
|
|
218
|
-
* Date obtained: August 28 2025
|
|
219
|
-
* Copyright (c) 2021-present Yusuke Wada and Hono contributors
|
|
220
|
-
*
|
|
221
|
-
*/
|
|
222
|
-
type InfoStatusCode = 100 | 101 | 102 | 103;
|
|
223
|
-
type SuccessStatusCode = 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226;
|
|
224
|
-
type DeprecatedStatusCode = 305 | 306;
|
|
225
|
-
type RedirectStatusCode = 300 | 301 | 302 | 303 | 304 | DeprecatedStatusCode | 307 | 308;
|
|
226
|
-
type ClientErrorStatusCode = 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451;
|
|
227
|
-
type ServerErrorStatusCode = 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511;
|
|
228
|
-
/**
|
|
229
|
-
* If you want to use an unofficial status, use `UnofficialStatusCode`.
|
|
230
|
-
*/
|
|
231
|
-
type StatusCode = InfoStatusCode | SuccessStatusCode | RedirectStatusCode | ClientErrorStatusCode | ServerErrorStatusCode;
|
|
232
|
-
type ContentlessStatusCode = 101 | 204 | 205 | 304;
|
|
233
|
-
//#endregion
|
|
234
|
-
//#region src/api/internal/response-stream.d.ts
|
|
235
|
-
/**
|
|
236
|
-
* @module
|
|
237
|
-
* Stream utility.
|
|
238
|
-
*
|
|
239
|
-
* Modified from honojs/hono
|
|
240
|
-
* Original source: https://github.com/honojs/hono/blob/0e3db674ad3f40be215a55a18062dd8e387ce525/src/utils/stream.ts
|
|
241
|
-
* License: MIT
|
|
242
|
-
* Date obtained: August 28 2025
|
|
243
|
-
* Copyright (c) 2021-present Yusuke Wada and Hono contributors
|
|
244
|
-
*/
|
|
245
|
-
type Error$1<Message extends string> = {
|
|
246
|
-
__errorMessage: Message;
|
|
247
|
-
};
|
|
248
|
-
declare class ResponseStream<TArray> {
|
|
249
|
-
#private;
|
|
250
|
-
/**
|
|
251
|
-
* Whether the stream has been aborted.
|
|
252
|
-
*/
|
|
253
|
-
get aborted(): boolean;
|
|
254
|
-
/**
|
|
255
|
-
* Whether the stream has been closed normally.
|
|
256
|
-
*/
|
|
257
|
-
get closed(): boolean;
|
|
258
|
-
/**
|
|
259
|
-
* The readable stream that the response is piped to.
|
|
260
|
-
*/
|
|
261
|
-
get responseReadable(): ReadableStream;
|
|
262
|
-
constructor(writable: WritableStream, readable: ReadableStream);
|
|
263
|
-
writeRaw(input: Uint8Array | string): Promise<void>;
|
|
264
|
-
write(input: TArray extends (infer U)[] ? U : Error$1<"To use a streaming response, outputSchema must be an array.">): Promise<void>;
|
|
265
|
-
sleep(ms: number): Promise<unknown>;
|
|
266
|
-
close(): Promise<void>;
|
|
267
|
-
onAbort(listener: () => void | Promise<void>): void;
|
|
268
|
-
/**
|
|
269
|
-
* Abort the stream.
|
|
270
|
-
* You can call this method when stream is aborted by external event.
|
|
271
|
-
*/
|
|
272
|
-
abort(): void;
|
|
273
|
-
}
|
|
274
|
-
//#endregion
|
|
275
|
-
//#region src/util/types-util.d.ts
|
|
276
|
-
type InferOr<T, U$1> = T extends NonNullable<StandardSchemaV1> ? StandardSchemaV1.InferOutput<T> : T extends undefined ? U$1 : U$1;
|
|
277
|
-
type InferOrUnknown<T> = InferOr<T, unknown>;
|
|
278
|
-
//#endregion
|
|
279
|
-
//#region src/api/request-output-context.d.ts
|
|
280
|
-
interface ResponseInit<T extends StatusCode = StatusCode> {
|
|
281
|
-
headers?: HeadersInit;
|
|
282
|
-
status?: T;
|
|
283
|
-
statusText?: string;
|
|
284
|
-
}
|
|
285
|
-
declare abstract class OutputContext<const TOutput, const TErrorCode extends string> {
|
|
286
|
-
/**
|
|
287
|
-
* Creates an error response.
|
|
288
|
-
*
|
|
289
|
-
* Shortcut for `throw new FragnoApiError(...)`
|
|
290
|
-
*/
|
|
291
|
-
error: ({
|
|
292
|
-
message,
|
|
293
|
-
code
|
|
294
|
-
}: {
|
|
295
|
-
message: string;
|
|
296
|
-
code: TErrorCode;
|
|
297
|
-
}, initOrStatus?: ResponseInit | StatusCode, headers?: HeadersInit) => Response;
|
|
298
|
-
empty: (initOrStatus?: ResponseInit<ContentlessStatusCode> | ContentlessStatusCode, headers?: HeadersInit) => Response;
|
|
299
|
-
json: (object: TOutput, initOrStatus?: ResponseInit | StatusCode, headers?: HeadersInit) => Response;
|
|
300
|
-
jsonStream: (cb: (stream: ResponseStream<TOutput>) => void | Promise<void>, {
|
|
301
|
-
onError,
|
|
302
|
-
headers
|
|
303
|
-
}?: {
|
|
304
|
-
onError?: (error: Error, stream: ResponseStream<TOutput>) => void | Promise<void>;
|
|
305
|
-
headers?: HeadersInit;
|
|
306
|
-
}) => Response;
|
|
307
|
-
}
|
|
308
|
-
declare class RequestOutputContext<const TOutputSchema extends StandardSchemaV1 | undefined = undefined, const TErrorCode extends string = string> extends OutputContext<InferOrUnknown<TOutputSchema>, TErrorCode> {
|
|
309
|
-
#private;
|
|
310
|
-
constructor(outputSchema?: TOutputSchema);
|
|
311
|
-
}
|
|
312
|
-
//#endregion
|
|
313
|
-
//#region src/api/error.d.ts
|
|
314
|
-
declare class FragnoApiError extends Error {
|
|
315
|
-
#private;
|
|
316
|
-
constructor({
|
|
317
|
-
message,
|
|
318
|
-
code
|
|
319
|
-
}: {
|
|
320
|
-
message: string;
|
|
321
|
-
code: string;
|
|
322
|
-
}, status: StatusCode);
|
|
323
|
-
get status(): StatusCode;
|
|
324
|
-
get code(): string;
|
|
325
|
-
toResponse(): Response;
|
|
326
|
-
}
|
|
327
|
-
declare class FragnoApiValidationError extends FragnoApiError {
|
|
328
|
-
#private;
|
|
329
|
-
constructor(message: string, issues: readonly StandardSchemaV1.Issue[]);
|
|
330
|
-
get issues(): readonly StandardSchemaV1.Issue[];
|
|
331
|
-
toResponse(): Response;
|
|
332
|
-
}
|
|
333
|
-
//#endregion
|
|
334
|
-
//#region src/api/route-handler-input-options.d.ts
|
|
335
|
-
/**
|
|
336
|
-
* Options for calling a route handler
|
|
337
|
-
*/
|
|
338
|
-
type RouteHandlerInputOptions<TPath extends string, TInputSchema extends StandardSchemaV1 | undefined> = {
|
|
339
|
-
pathParams?: ExtractPathParams<TPath>;
|
|
340
|
-
query?: URLSearchParams | Record<string, string>;
|
|
341
|
-
headers?: Headers | Record<string, string>;
|
|
342
|
-
} & (TInputSchema extends undefined ? {
|
|
343
|
-
body?: never;
|
|
344
|
-
} : {
|
|
345
|
-
body: InferOr<TInputSchema, unknown>;
|
|
346
|
-
});
|
|
347
|
-
//#endregion
|
|
348
|
-
//#region src/api/api.d.ts
|
|
349
|
-
type HTTPMethod = "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS";
|
|
350
|
-
type NonGetHTTPMethod = Exclude<HTTPMethod, "GET">;
|
|
351
|
-
type PathError<T extends string, TMessage extends string> = T & [`Error: ${TMessage}`];
|
|
352
|
-
/**
|
|
353
|
-
* A valid path string that:
|
|
354
|
-
* - Is non-empty
|
|
355
|
-
* - Starts with "/"
|
|
356
|
-
* - Is not just "/"
|
|
357
|
-
* - Does not end with "/"
|
|
358
|
-
*/
|
|
359
|
-
type ValidPath<T extends string = string> = T extends `/${infer Rest}` ? Rest extends "" ? PathError<T, "Path cannot be just '/'."> : T extends `${string}/` ? PathError<T, "Path cannot end with '/'."> : T : PathError<T, "Path must start with '/'.">;
|
|
360
|
-
interface FragnoRouteConfig<TMethod extends HTTPMethod, TPath extends string, TInputSchema extends StandardSchemaV1 | undefined, TOutputSchema extends StandardSchemaV1 | undefined, TErrorCode extends string = string, TQueryParameters extends string = string> {
|
|
361
|
-
method: TMethod;
|
|
362
|
-
path: TPath;
|
|
363
|
-
inputSchema?: TInputSchema;
|
|
364
|
-
outputSchema?: TOutputSchema;
|
|
365
|
-
errorCodes?: readonly TErrorCode[];
|
|
366
|
-
queryParameters?: readonly TQueryParameters[];
|
|
367
|
-
handler(inputCtx: RequestInputContext<TPath, TInputSchema>, outputCtx: RequestOutputContext<TOutputSchema, TErrorCode>): Promise<Response>;
|
|
368
|
-
}
|
|
369
|
-
declare function addRoute<TMethod extends HTTPMethod, TPath extends string, TOutputSchema extends StandardSchemaV1 | undefined, TErrorCode extends string = string, TQueryParameters extends string = string>(route: FragnoRouteConfig<TMethod, ValidPath<TPath>, undefined, TOutputSchema, TErrorCode, TQueryParameters> & {
|
|
370
|
-
inputSchema?: undefined;
|
|
371
|
-
}): FragnoRouteConfig<TMethod, TPath, undefined, TOutputSchema, TErrorCode, TQueryParameters>;
|
|
372
|
-
declare function addRoute<TMethod extends HTTPMethod, TPath extends string, TInputSchema extends StandardSchemaV1, TOutputSchema extends StandardSchemaV1 | undefined, TErrorCode extends string = string, TQueryParameters extends string = string>(route: FragnoRouteConfig<TMethod, ValidPath<TPath>, TInputSchema, TOutputSchema, TErrorCode, TQueryParameters> & {
|
|
373
|
-
inputSchema: TInputSchema;
|
|
374
|
-
}): FragnoRouteConfig<TMethod, TPath, TInputSchema, TOutputSchema, TErrorCode, TQueryParameters>;
|
|
375
|
-
//#endregion
|
|
376
|
-
export { QueryParamsHint as _, addRoute as a, FragnoApiValidationError as c, InferOrUnknown as d, StatusCode as f, MaybeExtractPathParamsOrWiden as g, HasPathParams as h, ValidPath as i, OutputContext as l, ExtractPathParamsOrWiden as m, HTTPMethod as n, RouteHandlerInputOptions as o, MutableRequestState as p, NonGetHTTPMethod as r, FragnoApiError as s, FragnoRouteConfig as t, InferOr as u };
|
|
377
|
-
//# sourceMappingURL=api-BWN97TOr.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api-BWN97TOr.d.ts","names":[],"sources":["../src/api/internal/path.ts","../src/api/mutable-request-state.ts","../src/api/request-input-context.ts","../src/http/http-status.ts","../src/api/internal/response-stream.ts","../src/util/types-util.ts","../src/api/request-output-context.ts","../src/api/error.ts","../src/api/route-handler-input-options.ts","../src/api/api.ts"],"sourcesContent":[],"mappings":";;;KACK,8BAA8B,2CAC/B,mBACE,UAAU,SACT,UAAU,UAAU,SACvB,qBAEG;KAGF,iCAAiC,6BAClC,OACA,+BACE,OACA;KAKD,yDAAyD,oBAlBzD,KAAA,MAAA,EAA8B,GAAA,KAAA,KAAA,CAC/B,GAqBA,KArBA,SAAA,MAAA,GAsBE,IAtBF,SAAA,SAAA,MAAA,EAAA,GAuBI,YAvBJ,CAuBiB,KAvBjB,CAAA,GAuB0B,yBAvB1B,CAuBoD,IAvBpD,CAAA,GAwBI,YAxBJ,CAwBiB,KAxBjB,CAAA,GAAA,KAAA,GAAA,KAAA;;;;;;;;;AAKI;;AAIJ,KA6BQ,iBA7BR,CAAA,UAAA,MAAA,EAAA,YAAA,MAAA,CAAA,GA8BF,yBA9BE,CA8BwB,SA9BxB,CA8BkC,CA9Bl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BA,ESgCA,SThCA,CSgCU,KThCV,CAAA,EAAA,SAAA,ESkCA,aTlCA,ESmCA,UTnCA,ESoCA,gBTpCA,CAAA,GAAA;EACE,WAAA,CAAA,EAAA,SAAA;CACe,CAAA,ESoClB,iBTpCkB,CSoCA,OTpCA,ESoCS,KTpCT,EAAA,SAAA,ESoC2B,aTpC3B,ESoC0C,UTpC1C,ESoCsD,gBTpCtD,CAAA;AAAb,iBSuCQ,QTvCR,CAAA,gBSwCU,UTxCV,EAAA,cAAA,MAAA,EAAA,qBS0Ce,gBT1Cf,EAAA,sBS2CgB,gBT3ChB,GAAA,SAAA,EAAA,mBAAA,MAAA,GAAA,MAAA,EAAA,yBAAA,MAAA,GAAA,MAAA,CAAA,CAAA,KAAA,ES+CC,iBT/CD,CSgDJ,OThDI,ESiDJ,STjDI,CSiDM,KTjDN,CAAA,ESkDJ,YTlDI,ESmDJ,aTnDI,ESoDJ,UTpDI,ESqDJ,gBTrDI,CAAA,GAAA;EAAgD,WAAA,ESuDvC,YTvDuC;CAA1B,CAAA,ESyD3B,iBTzD2B,CSyDT,OTzDS,ESyDA,KTzDA,ESyDO,YTzDP,ESyDqB,aTzDrB,ESyDoC,UTzDpC,ESyDgD,gBTzDhD,CAAA"}
|
package/dist/api-DngJDcmO.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
//#region src/api/error.ts
|
|
2
|
-
var FragnoApiError = class extends Error {
|
|
3
|
-
#status;
|
|
4
|
-
#code;
|
|
5
|
-
constructor({ message, code }, status) {
|
|
6
|
-
super(message);
|
|
7
|
-
this.name = "FragnoApiError";
|
|
8
|
-
this.#status = status;
|
|
9
|
-
this.#code = code;
|
|
10
|
-
}
|
|
11
|
-
get status() {
|
|
12
|
-
return this.#status;
|
|
13
|
-
}
|
|
14
|
-
get code() {
|
|
15
|
-
return this.#code;
|
|
16
|
-
}
|
|
17
|
-
toResponse() {
|
|
18
|
-
return Response.json({
|
|
19
|
-
message: this.message,
|
|
20
|
-
code: this.code
|
|
21
|
-
}, { status: this.status });
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
var FragnoApiValidationError = class extends FragnoApiError {
|
|
25
|
-
#issues;
|
|
26
|
-
constructor(message, issues) {
|
|
27
|
-
super({
|
|
28
|
-
message,
|
|
29
|
-
code: "FRAGNO_VALIDATION_ERROR"
|
|
30
|
-
}, 400);
|
|
31
|
-
this.name = "FragnoApiValidationError";
|
|
32
|
-
this.#issues = issues;
|
|
33
|
-
}
|
|
34
|
-
get issues() {
|
|
35
|
-
return this.#issues;
|
|
36
|
-
}
|
|
37
|
-
toResponse() {
|
|
38
|
-
return Response.json({
|
|
39
|
-
message: this.message,
|
|
40
|
-
issues: this.#issues,
|
|
41
|
-
code: this.code
|
|
42
|
-
}, { status: this.status });
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
//#endregion
|
|
47
|
-
//#region src/api/api.ts
|
|
48
|
-
function addRoute(route) {
|
|
49
|
-
return route;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
//#endregion
|
|
53
|
-
export { FragnoApiError as n, FragnoApiValidationError as r, addRoute as t };
|
|
54
|
-
//# sourceMappingURL=api-DngJDcmO.js.map
|
package/dist/api-DngJDcmO.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api-DngJDcmO.js","names":["#status","#code","#issues"],"sources":["../src/api/error.ts","../src/api/api.ts"],"sourcesContent":["import type { StandardSchemaV1 } from \"@standard-schema/spec\";\nimport type { StatusCode } from \"../http/http-status\";\n\nexport class FragnoApiError extends Error {\n readonly #status: StatusCode;\n readonly #code: string;\n\n constructor({ message, code }: { message: string; code: string }, status: StatusCode) {\n super(message);\n this.name = \"FragnoApiError\";\n this.#status = status;\n this.#code = code;\n }\n\n get status() {\n return this.#status;\n }\n\n get code() {\n return this.#code;\n }\n\n toResponse() {\n return Response.json({ message: this.message, code: this.code }, { status: this.status });\n }\n}\n\nexport class FragnoApiValidationError extends FragnoApiError {\n #issues: readonly StandardSchemaV1.Issue[];\n\n constructor(message: string, issues: readonly StandardSchemaV1.Issue[]) {\n super({ message, code: \"FRAGNO_VALIDATION_ERROR\" }, 400);\n this.name = \"FragnoApiValidationError\";\n this.#issues = issues;\n }\n\n get issues() {\n return this.#issues;\n }\n\n override toResponse() {\n return Response.json(\n { message: this.message, issues: this.#issues, code: this.code },\n { status: this.status },\n );\n }\n}\n","import type { StandardSchemaV1 } from \"@standard-schema/spec\";\nimport type { RequestInputContext } from \"./request-input-context\";\nimport type { RequestOutputContext } from \"./request-output-context\";\n\nexport type HTTPMethod = \"GET\" | \"POST\" | \"PUT\" | \"DELETE\" | \"PATCH\" | \"HEAD\" | \"OPTIONS\";\nexport type NonGetHTTPMethod = Exclude<HTTPMethod, \"GET\">;\n\n// Helper type to create branded error messages that are still assignable to string\ntype PathError<T extends string, TMessage extends string> = T & [`Error: ${TMessage}`];\n\n/**\n * A valid path string that:\n * - Is non-empty\n * - Starts with \"/\"\n * - Is not just \"/\"\n * - Does not end with \"/\"\n */\nexport type ValidPath<T extends string = string> = T extends `/${infer Rest}`\n ? Rest extends \"\"\n ? PathError<T, \"Path cannot be just '/'.\"> // Excludes \"/\"\n : T extends `${string}/`\n ? PathError<T, \"Path cannot end with '/'.\"> // Excludes paths ending with \"/\"\n : T\n : PathError<T, \"Path must start with '/'.\">; // Excludes paths not starting with \"/\"\n\nexport interface FragnoRouteConfig<\n TMethod extends HTTPMethod,\n TPath extends string,\n TInputSchema extends StandardSchemaV1 | undefined,\n TOutputSchema extends StandardSchemaV1 | undefined,\n TErrorCode extends string = string,\n TQueryParameters extends string = string,\n> {\n method: TMethod;\n path: TPath;\n inputSchema?: TInputSchema;\n outputSchema?: TOutputSchema;\n errorCodes?: readonly TErrorCode[];\n queryParameters?: readonly TQueryParameters[];\n handler(\n inputCtx: RequestInputContext<TPath, TInputSchema>,\n outputCtx: RequestOutputContext<TOutputSchema, TErrorCode>,\n ): Promise<Response>;\n}\n\n// Overload for routes without inputSchema\nexport function addRoute<\n TMethod extends HTTPMethod,\n TPath extends string,\n TOutputSchema extends StandardSchemaV1 | undefined,\n TErrorCode extends string = string,\n TQueryParameters extends string = string,\n>(\n route: FragnoRouteConfig<\n TMethod,\n ValidPath<TPath>,\n undefined,\n TOutputSchema,\n TErrorCode,\n TQueryParameters\n > & { inputSchema?: undefined },\n): FragnoRouteConfig<TMethod, TPath, undefined, TOutputSchema, TErrorCode, TQueryParameters>;\n\n// Overload for routes with inputSchema\nexport function addRoute<\n TMethod extends HTTPMethod,\n TPath extends string,\n TInputSchema extends StandardSchemaV1,\n TOutputSchema extends StandardSchemaV1 | undefined,\n TErrorCode extends string = string,\n TQueryParameters extends string = string,\n>(\n route: FragnoRouteConfig<\n TMethod,\n ValidPath<TPath>,\n TInputSchema,\n TOutputSchema,\n TErrorCode,\n TQueryParameters\n > & {\n inputSchema: TInputSchema;\n },\n): FragnoRouteConfig<TMethod, TPath, TInputSchema, TOutputSchema, TErrorCode, TQueryParameters>;\n\n// Implementation\nexport function addRoute<\n TMethod extends HTTPMethod,\n TPath extends string,\n TInputSchema extends StandardSchemaV1 | undefined,\n TOutputSchema extends StandardSchemaV1 | undefined,\n TErrorCode extends string = string,\n TQueryParameters extends string = string,\n>(\n route: FragnoRouteConfig<\n TMethod,\n ValidPath<TPath>,\n TInputSchema,\n TOutputSchema,\n TErrorCode,\n TQueryParameters\n >,\n): FragnoRouteConfig<TMethod, TPath, TInputSchema, TOutputSchema, TErrorCode, TQueryParameters> {\n return route;\n}\n\nexport { FragnoApiError, FragnoApiValidationError } from \"./error\";\nexport type { RouteHandlerInputOptions } from \"./route-handler-input-options\";\n"],"mappings":";AAGA,IAAa,iBAAb,cAAoC,MAAM;CACxC,CAASA;CACT,CAASC;CAET,YAAY,EAAE,SAAS,QAA2C,QAAoB;AACpF,QAAM,QAAQ;AACd,OAAK,OAAO;AACZ,QAAKD,SAAU;AACf,QAAKC,OAAQ;;CAGf,IAAI,SAAS;AACX,SAAO,MAAKD;;CAGd,IAAI,OAAO;AACT,SAAO,MAAKC;;CAGd,aAAa;AACX,SAAO,SAAS,KAAK;GAAE,SAAS,KAAK;GAAS,MAAM,KAAK;GAAM,EAAE,EAAE,QAAQ,KAAK,QAAQ,CAAC;;;AAI7F,IAAa,2BAAb,cAA8C,eAAe;CAC3D;CAEA,YAAY,SAAiB,QAA2C;AACtE,QAAM;GAAE;GAAS,MAAM;GAA2B,EAAE,IAAI;AACxD,OAAK,OAAO;AACZ,QAAKC,SAAU;;CAGjB,IAAI,SAAS;AACX,SAAO,MAAKA;;CAGd,AAAS,aAAa;AACpB,SAAO,SAAS,KACd;GAAE,SAAS,KAAK;GAAS,QAAQ,MAAKA;GAAS,MAAM,KAAK;GAAM,EAChE,EAAE,QAAQ,KAAK,QAAQ,CACxB;;;;;;ACyCL,SAAgB,SAQd,OAQ8F;AAC9F,QAAO"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
//#region src/api/fragment-builder.ts
|
|
2
|
-
var FragmentBuilder = class FragmentBuilder {
|
|
3
|
-
#definition;
|
|
4
|
-
constructor(definition) {
|
|
5
|
-
this.#definition = definition;
|
|
6
|
-
}
|
|
7
|
-
get definition() {
|
|
8
|
-
return this.#definition;
|
|
9
|
-
}
|
|
10
|
-
get $requiredOptions() {
|
|
11
|
-
throw new Error("Type only method. Do not call.");
|
|
12
|
-
}
|
|
13
|
-
withDependencies(fn) {
|
|
14
|
-
return new FragmentBuilder({
|
|
15
|
-
name: this.#definition.name,
|
|
16
|
-
dependencies: (config, options) => {
|
|
17
|
-
return fn({
|
|
18
|
-
config,
|
|
19
|
-
fragnoConfig: options
|
|
20
|
-
});
|
|
21
|
-
},
|
|
22
|
-
services: void 0,
|
|
23
|
-
additionalContext: this.#definition.additionalContext
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
withServices(fn) {
|
|
27
|
-
return new FragmentBuilder({
|
|
28
|
-
name: this.#definition.name,
|
|
29
|
-
dependencies: this.#definition.dependencies,
|
|
30
|
-
services: (config, options, deps) => {
|
|
31
|
-
return fn({
|
|
32
|
-
config,
|
|
33
|
-
fragnoConfig: options,
|
|
34
|
-
deps
|
|
35
|
-
});
|
|
36
|
-
},
|
|
37
|
-
additionalContext: this.#definition.additionalContext
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
function defineFragment(name) {
|
|
42
|
-
return new FragmentBuilder({ name });
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
//#endregion
|
|
46
|
-
export { defineFragment as n, FragmentBuilder as t };
|
|
47
|
-
//# sourceMappingURL=fragment-builder-DOnCVBqc.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fragment-builder-DOnCVBqc.js","names":["#definition"],"sources":["../src/api/fragment-builder.ts"],"sourcesContent":["import type { FragnoPublicConfig } from \"./fragment-instantiation\";\n\nexport interface FragmentDefinition<\n TConfig,\n TDeps = {},\n TServices extends Record<string, unknown> = {},\n TAdditionalContext extends Record<string, unknown> = {},\n> {\n name: string;\n dependencies?: (config: TConfig, options: FragnoPublicConfig) => TDeps;\n services?: (config: TConfig, options: FragnoPublicConfig, deps: TDeps) => TServices;\n additionalContext?: TAdditionalContext;\n}\n\nexport class FragmentBuilder<\n const TConfig,\n const TDeps = {},\n const TServices extends Record<string, unknown> = {},\n const TAdditionalContext extends Record<string, unknown> = {},\n> {\n #definition: FragmentDefinition<TConfig, TDeps, TServices, TAdditionalContext>;\n\n constructor(definition: FragmentDefinition<TConfig, TDeps, TServices, TAdditionalContext>) {\n this.#definition = definition;\n }\n\n get definition() {\n return this.#definition;\n }\n\n get $requiredOptions(): FragnoPublicConfig {\n throw new Error(\"Type only method. Do not call.\");\n }\n\n withDependencies<TNewDeps>(\n fn: (\n context: { config: TConfig; fragnoConfig: FragnoPublicConfig } & TAdditionalContext,\n ) => TNewDeps,\n ): FragmentBuilder<TConfig, TNewDeps, {}, TAdditionalContext> {\n return new FragmentBuilder<TConfig, TNewDeps, {}, TAdditionalContext>({\n name: this.#definition.name,\n dependencies: (config: TConfig, options: FragnoPublicConfig) => {\n return fn({ config, fragnoConfig: options } as {\n config: TConfig;\n fragnoConfig: FragnoPublicConfig;\n } & TAdditionalContext);\n },\n services: undefined,\n additionalContext: this.#definition.additionalContext,\n });\n }\n\n withServices<TNewServices extends Record<string, unknown>>(\n fn: (\n context: {\n config: TConfig;\n fragnoConfig: FragnoPublicConfig;\n deps: TDeps;\n } & TAdditionalContext,\n ) => TNewServices,\n ): FragmentBuilder<TConfig, TDeps, TNewServices, TAdditionalContext> {\n return new FragmentBuilder<TConfig, TDeps, TNewServices, TAdditionalContext>({\n name: this.#definition.name,\n dependencies: this.#definition.dependencies,\n services: (config: TConfig, options: FragnoPublicConfig, deps: TDeps) => {\n return fn({ config, fragnoConfig: options, deps } as {\n config: TConfig;\n fragnoConfig: FragnoPublicConfig;\n deps: TDeps;\n } & TAdditionalContext);\n },\n additionalContext: this.#definition.additionalContext,\n });\n }\n}\nexport function defineFragment<TConfig = {}>(name: string): FragmentBuilder<TConfig, {}, {}, {}> {\n return new FragmentBuilder({\n name,\n });\n}\n"],"mappings":";AAcA,IAAa,kBAAb,MAAa,gBAKX;CACA;CAEA,YAAY,YAA+E;AACzF,QAAKA,aAAc;;CAGrB,IAAI,aAAa;AACf,SAAO,MAAKA;;CAGd,IAAI,mBAAuC;AACzC,QAAM,IAAI,MAAM,iCAAiC;;CAGnD,iBACE,IAG4D;AAC5D,SAAO,IAAI,gBAA2D;GACpE,MAAM,MAAKA,WAAY;GACvB,eAAe,QAAiB,YAAgC;AAC9D,WAAO,GAAG;KAAE;KAAQ,cAAc;KAAS,CAGpB;;GAEzB,UAAU;GACV,mBAAmB,MAAKA,WAAY;GACrC,CAAC;;CAGJ,aACE,IAOmE;AACnE,SAAO,IAAI,gBAAkE;GAC3E,MAAM,MAAKA,WAAY;GACvB,cAAc,MAAKA,WAAY;GAC/B,WAAW,QAAiB,SAA6B,SAAgB;AACvE,WAAO,GAAG;KAAE;KAAQ,cAAc;KAAS;KAAM,CAI1B;;GAEzB,mBAAmB,MAAKA,WAAY;GACrC,CAAC;;;AAGN,SAAgB,eAA6B,MAAoD;AAC/F,QAAO,IAAI,gBAAgB,EACzB,MACD,CAAC"}
|