stitchkit 0.8.0 → 0.9.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/dist/browser/client.d.ts.map +1 -1
- package/dist/browser/socket-io.d.ts +11 -2
- package/dist/browser/socket-io.d.ts.map +1 -1
- package/dist/cli.js +3 -7
- package/dist/contract/define.d.ts +44 -2
- package/dist/contract/define.d.ts.map +1 -1
- package/dist/contract/index.d.ts +1 -1
- package/dist/contract/index.d.ts.map +1 -1
- package/dist/contract/index.js +0 -1
- package/dist/{index-za2p453b.js → index-031q8xmx.js} +1 -1
- package/dist/{index-tr7r1530.js → index-13psnhhe.js} +5 -9
- package/dist/{index-5qe31283.js → index-9zrq8x5z.js} +9 -6
- package/dist/index-jgpsd7dy.js +105 -0
- package/dist/{index-mwmpw6j1.js → index-p9m9c0jw.js} +2 -4
- package/dist/index-tm7dqzxc.js +20 -0
- package/dist/{index-5789sbt8.js → index-zshrc6kx.js} +9 -16
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +480 -13
- package/dist/node.js +4 -8
- package/dist/observability/index.js +4 -7
- package/dist/react.js +0 -2
- package/dist/retained.d.ts +30 -0
- package/dist/retained.d.ts.map +1 -0
- package/dist/server/implement.d.ts.map +1 -1
- package/dist/server/index.js +89 -34
- package/dist/server/types.d.ts +7 -0
- package/dist/server/types.d.ts.map +1 -1
- package/dist/tools/dispatch.d.ts +65 -0
- package/dist/tools/dispatch.d.ts.map +1 -0
- package/dist/tools/mcp-app.d.ts.map +1 -1
- package/dist/tools/remote.d.ts.map +1 -1
- package/dist/tools.d.ts +1 -0
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +290 -21
- package/llms-full.txt +111 -3
- package/package.json +5 -3
- package/dist/index-37x76zdn.js +0 -4
- package/dist/index-48ffdxgk.js +0 -6
- package/dist/index-809wc1tt.js +0 -18
- package/dist/index-a1702zj4.js +0 -72
- package/dist/index-kdkvp26v.js +0 -380
- package/dist/index-kzfs85xp.js +0 -9
- package/dist/index-wjwj5bz2.js +0 -37
- package/dist/index-x3fcszf8.js +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/browser/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/browser/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EAGX,gBAAgB,EAChB,eAAe,EAChB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAEL,KAAK,UAAU,IAAI,WAAW,EAG/B,MAAM,QAAQ,CAAC;AA8ChB,kFAAkF;AAClF,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAClE,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACnD;AAED;;;GAGG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GAC1D,OAAO,GACP;KAAG,CAAC,IAAI,CAAC,GAAG,MAAM;CAAE,CAAC;AAEzB;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS,MAAM,GAAG,KAAK;IAC5D,UAAU,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC,CAAC;IAClE,eAAe,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC;CAChC;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,EACrC,KAAK,CAAC,CAAC,SAAS,MAAM,GAAG,KAAK,EAE9B,QAAQ,EAAE,WAAW,CAAC,CAAC,EAAE,MAAM,CAAC,EAChC,cAAc,EAAE,YAAY,GAAG,WAAW,EAC1C,cAAc,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC,GACvC,gBAAgB,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAepC;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC,EAC1E,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;CAAE,CAKzF"}
|
|
@@ -29,7 +29,7 @@ import type { EventsMap } from '@socket.io/component-emitter';
|
|
|
29
29
|
* public `on` / `emit` signatures.
|
|
30
30
|
*/
|
|
31
31
|
export type SocketEventMap = EventsMap;
|
|
32
|
-
export interface SocketIOClientConfig {
|
|
32
|
+
export interface SocketIOClientConfig<TServerEvents extends SocketEventMap = SocketEventMap> {
|
|
33
33
|
/** Server origin, e.g. `https://api.example.com`. */
|
|
34
34
|
url: string;
|
|
35
35
|
/** Socket.IO endpoint path. Default `/socket.io/`. */
|
|
@@ -63,6 +63,15 @@ export interface SocketIOClientConfig {
|
|
|
63
63
|
reconnectionDelayMax?: number;
|
|
64
64
|
/** Connection timeout (ms). Default `20000`. */
|
|
65
65
|
timeout?: number;
|
|
66
|
+
/**
|
|
67
|
+
* Server → client events to **retain** ("sticky events"). The client keeps the
|
|
68
|
+
* last payload of each listed event and replays it to any handler subscribed
|
|
69
|
+
* afterwards (and on the next subscribe after a re-render), so a late
|
|
70
|
+
* subscriber catches up to the current state at once instead of waiting for the
|
|
71
|
+
* next emission. The retained value survives a `disconnect()` / `connect()`
|
|
72
|
+
* cycle. Only the first emitted argument of an event is retained.
|
|
73
|
+
*/
|
|
74
|
+
retain?: Array<keyof TServerEvents & string>;
|
|
66
75
|
}
|
|
67
76
|
export interface SocketIOClient<TServerEvents extends SocketEventMap, TClientEvents extends SocketEventMap> {
|
|
68
77
|
/** Create the socket (if absent) and connect. Idempotent. */
|
|
@@ -82,5 +91,5 @@ export interface SocketIOClient<TServerEvents extends SocketEventMap, TClientEve
|
|
|
82
91
|
/** Subscribe to connection up/down changes. Returns an unsubscribe. */
|
|
83
92
|
onConnectionChange(listener: (connected: boolean) => void): () => void;
|
|
84
93
|
}
|
|
85
|
-
export declare function createSocketIOClient<TServerEvents extends SocketEventMap, TClientEvents extends SocketEventMap>(config: SocketIOClientConfig): SocketIOClient<TServerEvents, TClientEvents>;
|
|
94
|
+
export declare function createSocketIOClient<TServerEvents extends SocketEventMap, TClientEvents extends SocketEventMap>(config: SocketIOClientConfig<TServerEvents>): SocketIOClient<TServerEvents, TClientEvents>;
|
|
86
95
|
//# sourceMappingURL=socket-io.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"socket-io.d.ts","sourceRoot":"","sources":["../../src/browser/socket-io.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"socket-io.d.ts","sourceRoot":"","sources":["../../src/browser/socket-io.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AA2B9D;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,CAAC;AAEvC,MAAM,WAAW,oBAAoB,CAAC,aAAa,SA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AG,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,CAAC;IAC5F,8DAA8D;IAC9D,IAAI,CAAC,CAAC,SAAS,MAAM,aAAa,GAAG,MAAM,EACzC,KAAK,EAAE,CAAC,EACR,GAAG,IAAI,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,GACpC,IAAI,CAAC;IACR,uEAAuE;IACvE,kBAAkB,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;CACxE;AAED,wBAAgB,oBAAoB,CAClC,aAAa,SAAS,cAAc,EACpC,aAAa,SAAS,cAAc,EACpC,MAAM,EAAE,oBAAoB,CAAC,aAAa,CAAC,GAAG,cAAc,CAAC,aAAa,EAAE,aAAa,CAAC,CA8G3F"}
|
package/dist/cli.js
CHANGED
|
@@ -4,14 +4,10 @@ import {
|
|
|
4
4
|
emitResult,
|
|
5
5
|
parseCliArgs,
|
|
6
6
|
pollUntilDone
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-13psnhhe.js";
|
|
8
8
|
import"./index-0ed3bx43.js";
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-eq29zkrx.js";
|
|
12
|
-
import"./index-kzfs85xp.js";
|
|
13
|
-
import"./index-809wc1tt.js";
|
|
14
|
-
import"./index-37x76zdn.js";
|
|
9
|
+
import"./index-jgpsd7dy.js";
|
|
10
|
+
import"./index-tm7dqzxc.js";
|
|
15
11
|
export {
|
|
16
12
|
pollUntilDone,
|
|
17
13
|
parseCliArgs,
|
|
@@ -2,7 +2,14 @@ import type { ZodType, z } from 'zod';
|
|
|
2
2
|
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
3
3
|
export declare const ALL_TRANSPORTS: readonly ["HTTP", "MCP", "AGENT", "CLI"];
|
|
4
4
|
export type Transport = (typeof ALL_TRANSPORTS)[number];
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* The transport tag on `ctx.source`. The four built-ins keep autocomplete, but
|
|
7
|
+
* the union is **open** (`string & {}`) so a bring-your-own transport — e.g. a
|
|
8
|
+
* raw-WebSocket lane driving a contract through `createContractDispatcher` — can
|
|
9
|
+
* tag its own calls (`source: 'local-ws'`). `source` is transport-only and
|
|
10
|
+
* carries no framework behaviour (→ ADR 0002 / ADR 0027).
|
|
11
|
+
*/
|
|
12
|
+
export type TransportSource = 'http' | 'mcp' | 'agent' | 'cli' | (string & {});
|
|
6
13
|
interface EndpointDefBase {
|
|
7
14
|
method: HttpMethod;
|
|
8
15
|
path: string;
|
|
@@ -25,6 +32,20 @@ interface EndpointDefBase {
|
|
|
25
32
|
* property of the endpoint — declared once, the typed client applies it.
|
|
26
33
|
*/
|
|
27
34
|
timeout?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Whether calling this operation twice with the same input is safe (the
|
|
37
|
+
* second call yields the same result and no extra side effect) — a
|
|
38
|
+
* transport-neutral property of the operation, like HTTP `PUT`/`DELETE`.
|
|
39
|
+
*
|
|
40
|
+
* The core attaches **no** behaviour to it (it stays generic — ADR 0002): it
|
|
41
|
+
* rides through to `MethodDef.idempotent`, where a transport that can retry
|
|
42
|
+
* reads it. A reliable bring-your-own-transport lane (e.g. a raw-WebSocket
|
|
43
|
+
* client over `createContractDispatcher`) replays an `idempotent` call after a
|
|
44
|
+
* reconnect — that is the durability guarantee — while a non-idempotent one is
|
|
45
|
+
* rejected rather than re-sent (a duplicate would be a second side effect).
|
|
46
|
+
* Unset means "unknown" — a careful transport treats it as non-idempotent.
|
|
47
|
+
*/
|
|
48
|
+
idempotent?: boolean;
|
|
28
49
|
/**
|
|
29
50
|
* Opaque, app-defined per-endpoint metadata. The core attaches **no** meaning
|
|
30
51
|
* to it (like `scope`, it is a free escape-hatch — ADR 0002/0021): it rides
|
|
@@ -127,10 +148,31 @@ export interface HandlerContext<TParams = undefined, TInput = undefined> {
|
|
|
127
148
|
}
|
|
128
149
|
type Prop<T, K extends string> = K extends keyof T ? T[K] : undefined;
|
|
129
150
|
type InferInput<S> = S extends ZodType ? z.input<S> : unknown;
|
|
151
|
+
/**
|
|
152
|
+
* A platform file descriptor accepted by the typed client's multipart methods
|
|
153
|
+
* where a file is not a `Blob`. React Native / Expo represent a file as
|
|
154
|
+
* `{ uri, name, type }` and their `FormData.append` streams it from disk by
|
|
155
|
+
* `uri`; reading it into a `Blob` first (`fetch(uri).blob()`) would load the
|
|
156
|
+
* whole media into memory. The web / Bun path still uses `Blob`.
|
|
157
|
+
*/
|
|
158
|
+
export interface FileDescriptor {
|
|
159
|
+
/** Local file URI the platform streams from (e.g. `file:///…`). */
|
|
160
|
+
uri: string;
|
|
161
|
+
/** File name for the multipart part. */
|
|
162
|
+
name: string;
|
|
163
|
+
/** MIME type for the multipart part. */
|
|
164
|
+
type: string;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* What a `multipart` endpoint's file field accepts on the typed client — a
|
|
168
|
+
* `Blob` (web / Bun) or a platform {@link FileDescriptor} (React Native / Expo).
|
|
169
|
+
* Exported so a consumer can type its own upload helpers without a cast.
|
|
170
|
+
*/
|
|
171
|
+
export type MultipartFile = Blob | FileDescriptor;
|
|
130
172
|
type MultipartArgs<E> = E extends {
|
|
131
173
|
multipart: infer K extends string;
|
|
132
174
|
} ? {
|
|
133
|
-
[P in K]:
|
|
175
|
+
[P in K]: MultipartFile;
|
|
134
176
|
} : unknown;
|
|
135
177
|
type EndpointArgs<E> = InferInput<Prop<E, 'params'>> & InferInput<Prop<E, 'input'>> & MultipartArgs<E>;
|
|
136
178
|
type EndpointOutput<E> = Prop<E, 'output'> extends ZodType<infer O> ? O : undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define.d.ts","sourceRoot":"","sources":["../../src/contract/define.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OA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C,GAAG,KAAK,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC;CAC5F,CAAC;AAIF,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,IAAI,gBAAgB,CACnF,CAAC,EACD,OAAO,CACR,CAAC"}
|
package/dist/contract/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ALL_TRANSPORTS, type ContractDef, type ContractMeta, defineContract, type EndpointDef, type EndpointFn, type EndpointToolAnnotations, type EndpointUiMeta, type HandlerContext, type HttpMethod, type RuntimeContext, type ScopedEndpointFn, type ScopedHttpClient, type Transport, type TransportSource, type TypedClient, type TypedHttpClient, } from './define';
|
|
1
|
+
export { ALL_TRANSPORTS, type ContractDef, type ContractMeta, defineContract, type EndpointDef, type EndpointFn, type EndpointToolAnnotations, type EndpointUiMeta, type FileDescriptor, type HandlerContext, type HttpMethod, type MultipartFile, type RuntimeContext, type ScopedEndpointFn, type ScopedHttpClient, type Transport, type TransportSource, type TypedClient, type TypedHttpClient, } from './define';
|
|
2
2
|
export { AppError, appError, badRequest, conflict, type ErrorEnvelope, forbidden, isStitchErrorCode, notFound, rateLimited, STITCH_ERROR_STATUS, type StitchErrorCode, unauthorized, } from './errors';
|
|
3
3
|
export { decodeCursor, encodeCursor, type Paginated, paginatedSchema, } from './pagination';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contract/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,cAAc,EACd,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,uBAAuB,EAC5B,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,eAAe,GACrB,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,KAAK,aAAa,EAClB,SAAS,EACT,iBAAiB,EACjB,QAAQ,EACR,WAAW,EACX,mBAAmB,EACnB,KAAK,eAAe,EACpB,YAAY,GACb,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,KAAK,SAAS,EACd,eAAe,GAChB,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contract/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,cAAc,EACd,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,uBAAuB,EAC5B,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,eAAe,GACrB,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,KAAK,aAAa,EAClB,SAAS,EACT,iBAAiB,EACjB,QAAQ,EACR,WAAW,EACX,mBAAmB,EACnB,KAAK,eAAe,EACpB,YAAY,GACb,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,KAAK,SAAS,EACd,eAAe,GAChB,MAAM,cAAc,CAAC"}
|
package/dist/contract/index.js
CHANGED
|
@@ -2,21 +2,17 @@ import {
|
|
|
2
2
|
jsonSchemaFields,
|
|
3
3
|
toJsonSchema
|
|
4
4
|
} from "./index-0ed3bx43.js";
|
|
5
|
-
import {
|
|
6
|
-
isWithinDir
|
|
7
|
-
} from "./index-x3fcszf8.js";
|
|
8
5
|
import {
|
|
9
6
|
formatZodError,
|
|
7
|
+
isWithinDir,
|
|
10
8
|
normalizeError,
|
|
11
9
|
validateHandlerOutput
|
|
12
|
-
} from "./index-
|
|
10
|
+
} from "./index-jgpsd7dy.js";
|
|
13
11
|
import {
|
|
12
|
+
isRecord,
|
|
14
13
|
isUnsafeKey,
|
|
15
14
|
safeJsonParse
|
|
16
|
-
} from "./index-
|
|
17
|
-
import {
|
|
18
|
-
isRecord
|
|
19
|
-
} from "./index-809wc1tt.js";
|
|
15
|
+
} from "./index-tm7dqzxc.js";
|
|
20
16
|
|
|
21
17
|
// src/tools/coerce.ts
|
|
22
18
|
import { z } from "zod";
|
|
@@ -1004,4 +1000,4 @@ function safeInputSchema(tool) {
|
|
|
1004
1000
|
}
|
|
1005
1001
|
}
|
|
1006
1002
|
|
|
1007
|
-
export { coerceJsonArgs, toolResultFromError, flattenDiscriminatedUnion, collectTools, createToolRunner, formatToolError, fetchGuarded, readCapped, parseCliArgs, DEFAULT_EXIT_CODES, emitResult, pollUntil, pollUntilDone, createCli };
|
|
1003
|
+
export { coerceJsonArgs, toolResultFromError, executeToolMethod, flattenDiscriminatedUnion, collectTools, createToolRunner, formatToolError, fetchGuarded, readCapped, parseCliArgs, DEFAULT_EXIT_CODES, emitResult, pollUntil, pollUntilDone, createCli };
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
forbidden,
|
|
3
3
|
unauthorized
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-jgpsd7dy.js";
|
|
5
5
|
import {
|
|
6
|
+
isRecord,
|
|
6
7
|
isUnsafeKey,
|
|
7
8
|
safeJsonParse
|
|
8
|
-
} from "./index-
|
|
9
|
-
import {
|
|
10
|
-
isRecord
|
|
11
|
-
} from "./index-809wc1tt.js";
|
|
9
|
+
} from "./index-tm7dqzxc.js";
|
|
12
10
|
|
|
13
11
|
// src/server/middleware/cookies.ts
|
|
14
12
|
function parseCookies(header) {
|
|
@@ -216,4 +214,9 @@ async function verifyPkce(verifier, challenge) {
|
|
|
216
214
|
return derived === challenge;
|
|
217
215
|
}
|
|
218
216
|
|
|
219
|
-
|
|
217
|
+
// src/internal/http-input.ts
|
|
218
|
+
function inputIsQuery(method) {
|
|
219
|
+
return method === "GET" || method === "DELETE";
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export { parseCookies, serializeCookie, defineCookie, verifyJwt, signJwt, extractToken, createAuthHook, createBearerResolver, deriveCodeChallenge, verifyPkce, inputIsQuery };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
// src/contract/errors.ts
|
|
2
|
+
class AppError extends Error {
|
|
3
|
+
code;
|
|
4
|
+
status;
|
|
5
|
+
details;
|
|
6
|
+
hint;
|
|
7
|
+
constructor(code, message, status = 500, details, hint) {
|
|
8
|
+
super(message ?? code);
|
|
9
|
+
this.code = code;
|
|
10
|
+
this.status = status;
|
|
11
|
+
this.details = details;
|
|
12
|
+
this.hint = hint;
|
|
13
|
+
this.name = "AppError";
|
|
14
|
+
}
|
|
15
|
+
static is(err) {
|
|
16
|
+
return err instanceof AppError;
|
|
17
|
+
}
|
|
18
|
+
toJSON() {
|
|
19
|
+
return {
|
|
20
|
+
error: {
|
|
21
|
+
code: this.code,
|
|
22
|
+
message: this.message,
|
|
23
|
+
...this.details && { details: this.details },
|
|
24
|
+
...this.hint && { hint: this.hint }
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function notFound(message = "Not found") {
|
|
30
|
+
throw new AppError("NOT_FOUND", message, 404);
|
|
31
|
+
}
|
|
32
|
+
function badRequest(message, details) {
|
|
33
|
+
throw new AppError("BAD_REQUEST", message, 400, details);
|
|
34
|
+
}
|
|
35
|
+
function unauthorized(message = "Unauthorized") {
|
|
36
|
+
throw new AppError("UNAUTHORIZED", message, 401);
|
|
37
|
+
}
|
|
38
|
+
function forbidden(message = "Forbidden") {
|
|
39
|
+
throw new AppError("FORBIDDEN", message, 403);
|
|
40
|
+
}
|
|
41
|
+
function conflict(message = "Conflict", details) {
|
|
42
|
+
throw new AppError("CONFLICT", message, 409, details);
|
|
43
|
+
}
|
|
44
|
+
function rateLimited(message = "Too many requests") {
|
|
45
|
+
throw new AppError("RATE_LIMITED", message, 429);
|
|
46
|
+
}
|
|
47
|
+
var STITCH_ERROR_STATUS = {
|
|
48
|
+
BAD_REQUEST: 400,
|
|
49
|
+
UNAUTHORIZED: 401,
|
|
50
|
+
FORBIDDEN: 403,
|
|
51
|
+
NOT_FOUND: 404,
|
|
52
|
+
METHOD_NOT_ALLOWED: 405,
|
|
53
|
+
CONFLICT: 409,
|
|
54
|
+
RATE_LIMITED: 429,
|
|
55
|
+
VALIDATION_ERROR: 400,
|
|
56
|
+
INTERNAL_SERVER_ERROR: 500
|
|
57
|
+
};
|
|
58
|
+
function isStitchErrorCode(code) {
|
|
59
|
+
return code in STITCH_ERROR_STATUS;
|
|
60
|
+
}
|
|
61
|
+
function appError(code, message, details) {
|
|
62
|
+
throw new AppError(code, message, isStitchErrorCode(code) ? STITCH_ERROR_STATUS[code] : 500, details);
|
|
63
|
+
}
|
|
64
|
+
// src/contract/pagination.ts
|
|
65
|
+
import { z } from "zod";
|
|
66
|
+
// src/internal/errors.ts
|
|
67
|
+
import { z as z2 } from "zod";
|
|
68
|
+
function formatZodError(error) {
|
|
69
|
+
const issues = error.issues.slice(0, 5);
|
|
70
|
+
const lines = issues.map((issue) => {
|
|
71
|
+
const path = issue.path.length > 0 ? issue.path.join(".") : "(root)";
|
|
72
|
+
return `${path}: ${issue.message}`;
|
|
73
|
+
});
|
|
74
|
+
const suffix = error.issues.length > 5 ? `
|
|
75
|
+
...and ${error.issues.length - 5} more issues` : "";
|
|
76
|
+
return lines.join(`
|
|
77
|
+
`) + suffix;
|
|
78
|
+
}
|
|
79
|
+
function normalizeError(err) {
|
|
80
|
+
if (AppError.is(err))
|
|
81
|
+
return err;
|
|
82
|
+
if (err instanceof z2.ZodError) {
|
|
83
|
+
return new AppError("VALIDATION_ERROR", formatZodError(err), 400);
|
|
84
|
+
}
|
|
85
|
+
console.error("[stitchkit] unhandled error:", err);
|
|
86
|
+
return new AppError("INTERNAL_SERVER_ERROR", "Internal server error", 500);
|
|
87
|
+
}
|
|
88
|
+
function validateHandlerOutput(schema, data) {
|
|
89
|
+
const parsed = schema.safeParse(data);
|
|
90
|
+
if (parsed.success)
|
|
91
|
+
return { ok: true, data: parsed.data };
|
|
92
|
+
return {
|
|
93
|
+
ok: false,
|
|
94
|
+
message: `Handler output does not match the contract: ${formatZodError(parsed.error)}`
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// src/internal/within-dir.ts
|
|
99
|
+
import { sep } from "node:path";
|
|
100
|
+
function isWithinDir(root, target) {
|
|
101
|
+
const base = root.endsWith(sep) ? root.slice(0, -sep.length) : root;
|
|
102
|
+
return target === root || target === base || target.startsWith(base + sep);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export { AppError, notFound, badRequest, unauthorized, forbidden, conflict, rateLimited, STITCH_ERROR_STATUS, isStitchErrorCode, appError, formatZodError, normalizeError, validateHandlerOutput, isWithinDir };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
3
|
+
|
|
4
|
+
// src/internal/safe-json.ts
|
|
5
|
+
function isUnsafeKey(key) {
|
|
6
|
+
return key === "__proto__";
|
|
7
|
+
}
|
|
8
|
+
function safeJsonParse(text) {
|
|
9
|
+
return JSON.parse(text, (key, value) => isUnsafeKey(key) ? undefined : value);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// src/internal/typed.ts
|
|
13
|
+
function typedEntries(value) {
|
|
14
|
+
return Object.entries(value);
|
|
15
|
+
}
|
|
16
|
+
function isRecord(value) {
|
|
17
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { __require, isUnsafeKey, safeJsonParse, typedEntries, isRecord };
|
|
@@ -1,31 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
AppError,
|
|
3
|
+
badRequest,
|
|
4
|
+
isWithinDir,
|
|
5
5
|
normalizeError,
|
|
6
6
|
validateHandlerOutput
|
|
7
|
-
} from "./index-
|
|
8
|
-
import {
|
|
9
|
-
AppError,
|
|
10
|
-
badRequest
|
|
11
|
-
} from "./index-eq29zkrx.js";
|
|
7
|
+
} from "./index-jgpsd7dy.js";
|
|
12
8
|
import {
|
|
13
9
|
extractIp,
|
|
14
10
|
getClientInfo,
|
|
15
11
|
parseQueryParams,
|
|
16
12
|
resolveSocketIp,
|
|
17
13
|
resolveTraceId
|
|
18
|
-
} from "./index-
|
|
14
|
+
} from "./index-p9m9c0jw.js";
|
|
19
15
|
import {
|
|
16
|
+
__require,
|
|
20
17
|
isUnsafeKey,
|
|
21
|
-
safeJsonParse
|
|
22
|
-
} from "./index-kzfs85xp.js";
|
|
23
|
-
import {
|
|
18
|
+
safeJsonParse,
|
|
24
19
|
typedEntries
|
|
25
|
-
} from "./index-
|
|
26
|
-
import {
|
|
27
|
-
__require
|
|
28
|
-
} from "./index-37x76zdn.js";
|
|
20
|
+
} from "./index-tm7dqzxc.js";
|
|
29
21
|
|
|
30
22
|
// src/server/multipart.ts
|
|
31
23
|
var DEFAULT_MAX_UPLOAD_BYTES = 25 * 1024 * 1024;
|
|
@@ -737,6 +729,7 @@ function implement(contract, handlers) {
|
|
|
737
729
|
outputSchema: endpoint.output,
|
|
738
730
|
multipart: endpoint.multipart,
|
|
739
731
|
maxUploadBytes: endpoint.maxUploadBytes,
|
|
732
|
+
idempotent: endpoint.idempotent,
|
|
740
733
|
ui: "ui" in endpoint ? endpoint.ui : undefined,
|
|
741
734
|
annotations: "annotations" in endpoint ? endpoint.annotations : undefined,
|
|
742
735
|
meta: endpoint.meta,
|
package/dist/index.d.ts
CHANGED
|
@@ -4,4 +4,5 @@ export type { SocketEventMap, SocketIOClient, SocketIOClientConfig, } from './br
|
|
|
4
4
|
export { createSocketIOClient } from './browser/socket-io';
|
|
5
5
|
export { type ParseSSEOptions, parseSSE } from './browser/stream';
|
|
6
6
|
export * from './contract';
|
|
7
|
+
export { createRetainedTopics, type RetainedTopics } from './retained';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,YAAY,EACZ,aAAa,GACd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,QAAQ,EACR,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,gBAAgB,EAChB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,cAAc,GACpB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,cAAc,EACd,cAAc,EACd,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,KAAK,eAAe,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAClE,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,YAAY,EACZ,aAAa,GACd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,QAAQ,EACR,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,gBAAgB,EAChB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,cAAc,GACpB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,cAAc,EACd,cAAc,EACd,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,KAAK,eAAe,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAClE,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,oBAAoB,EAAE,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC"}
|