micro-contracts 0.20.2 → 0.20.3

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/README.md CHANGED
@@ -447,10 +447,11 @@ An operation's success response is its lowest 2xx status code, else its `2XX` ra
447
447
  `default`: the service returns that response's body and the generated route answers with
448
448
  that status (200 for `2XX` and `default`). An operation that declares none of them is an
449
449
  error: declare the response a successful call returns. Its request body must be
450
- `application/json`, and its success response `application/json` or a stream —
451
- `text/event-stream`, `application/x-ndjson` or `application/jsonl` — since a body in any other
452
- media type would be dropped from every generated artifact; one declared otherwise is an
453
- error: remove that media type, and declare the body in one of them. A stream declares the
450
+ `application/json` or a form (`multipart/form-data`, see [Form Bodies](#form-bodies)), and its
451
+ success response `application/json` or a stream — `text/event-stream`, `application/x-ndjson`
452
+ or `application/jsonl` — since a body in any other media type would be dropped from every
453
+ generated artifact; one declared otherwise is an error: remove that media type, and declare
454
+ the body in one of them. A stream declares the
454
455
  schema of one event under `x-stream-event`, as a `oneOf` with `discriminator.propertyName`:
455
456
  a stream without `x-stream-event`, or whose events have no discriminator, is an error. A
456
457
  response of any other status, which documents an error, may use any media type; generated
@@ -671,6 +672,65 @@ the client goes away, the service's iterator is closed at its next yield: a serv
671
672
  between events keeps running until it yields again. The starter fetch client returns the
672
673
  events as an `AsyncIterable` to read with `for await`.
673
674
 
675
+ ### Form Bodies
676
+
677
+ An operation whose request body is `multipart/form-data` takes a form. Its schema is an
678
+ object whose properties are its parts: a property that is a binary string — `format: binary`,
679
+ `contentEncoding: binary`, or a `contentMediaType` without `contentEncoding` — is a file, and
680
+ any other is a field, a string, number, integer or boolean (by its `type`, or by the values of
681
+ its `enum` or `const`). An array of either is a list, one part per item. A form schema that is
682
+ not an object of properties, or a property that is neither a field nor a file (an object, or a
683
+ nullable value), is an error.
684
+
685
+ ```yaml
686
+ requestBody:
687
+ required: true
688
+ content:
689
+ multipart/form-data:
690
+ schema:
691
+ type: object
692
+ required: [caption, photo]
693
+ properties:
694
+ caption: { type: string }
695
+ photo: { type: string, contentMediaType: image/jpeg, maxLength: 2097152 }
696
+ ```
697
+
698
+ The schema keeps its own type in `schemas/types.ts` and among the validators, a file being a
699
+ string there. The service receives the form as `<Service>_<method>Form`, the same properties
700
+ with each file as its bytes (`Uint8Array`, or `Uint8Array[]` for a list); a form without files
701
+ is received as its schema's type.
702
+
703
+ ```typescript
704
+ export interface Photo_uploadForm {
705
+ caption: string;
706
+ photo: Uint8Array;
707
+ }
708
+ export type Photo_uploadInput = { data: Photo_uploadForm };
709
+ ```
710
+
711
+ The contract package of a module with a form carries `forms/index.ts`: routes read a form's
712
+ parts with `readForm`. It validates the form against its schema with each file as a binary
713
+ string — one character per byte, so `maxLength` bounds a file's size — and gives the service
714
+ each file as its bytes. A file under a property that is not a file, a field under one that is,
715
+ or a second file for a property that takes one, is answered with 400 before the service runs,
716
+ as is a form its schema refuses.
717
+
718
+ The starter Fastify routes read a form with [`@fastify/multipart`](https://github.com/fastify/fastify-multipart):
719
+ register it, without `attachFieldsToBody`, before the routes, which refuse to register
720
+ otherwise. Its limits apply: a file or field it cuts at a limit is answered with 413. The
721
+ route reads the form once the operation's overlays admit the request, and validates it with
722
+ the validator Fastify validates the rest with (`request.compileValidationSchema`).
723
+
724
+ ```typescript
725
+ import multipart from '@fastify/multipart';
726
+
727
+ await fastify.register(multipart, { limits: { fileSize: 2 * 1024 * 1024 } });
728
+ await registerRoutes(fastify);
729
+ ```
730
+
731
+ The starter fetch client sends each property as a part — a list as one part per item, a file's
732
+ bytes as a file — in a `FormData` body.
733
+
674
734
  ### Validators
675
735
 
676
736
  `schemas/validators.ts` holds every schema as the JSON Schema Fastify validates requests and
@@ -787,8 +847,10 @@ The handler answers as the starter Fastify routes do:
787
847
  `removeAdditional: false` (see [Validators](#validators)), and words a refusal (400) as
788
848
  Fastify does (`querystring/limit must be integer`). The query is read from
789
849
  `rawQueryString`, a key given more than once being an array; headers in lower case; cookies
790
- from the event's `cookies`. A body is JSON — decoded first when `isBase64Encoded` — and
791
- another content type is answered with 415.
850
+ from the event's `cookies`. A body is JSON, or for an operation taking a
851
+ [form](#form-bodies), `multipart/form-data` read as the Fetch API reads one — decoded first
852
+ when `isBase64Encoded` — and another content type is answered with 415. A form is read once
853
+ the operation's overlays admit the request, as the Fastify route reads it.
792
854
  - It runs the operation's overlays (`overlayAdapter.generated.ts`), then the service, and
793
855
  answers with the success status and the body serialized by the schema declared for it.
794
856
 
package/cli-contract.yaml CHANGED
@@ -3,7 +3,7 @@ cli_contracts: 0.1.0
3
3
 
4
4
  info:
5
5
  title: micro-contracts CLI
6
- version: 0.20.2
6
+ version: 0.20.3
7
7
  description: >-
8
8
  Contract-first OpenAPI toolchain for TypeScript Web/API systems.
9
9
  Generates contract packages, server routes, and frontend clients
@@ -1 +1 @@
1
- {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/cli/templates.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAk8BH;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAQ5D;AAED;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAIlE;AAED;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAKlE"}
1
+ {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/cli/templates.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAmjCH;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAQ5D;AAED;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAIlE;AAED;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAKlE"}
@@ -23,9 +23,35 @@ import { runOverlays, type HttpRequest } from './overlayAdapter.generated.js';
23
23
  import { Readable } from 'node:stream';
24
24
  import { encodeStream } from '{{contractPackage}}/streams/index.js';
25
25
  {{/if}}
26
+ {{#if forms}}
27
+ import type { Multipart } from '@fastify/multipart';
28
+ import { readForm, type FormPart } from '{{contractPackage}}/forms/index.js';
29
+ {{/if}}
26
30
  {{#if readsCookies}}
27
31
  import { parseCookies } from '{{contractPackage}}/http/index.js';
28
32
  {{/if}}
33
+ {{#if forms}}
34
+
35
+ /** An error answered with 413 */
36
+ function tooLarge(message: string): Error {
37
+ return Object.assign(new Error(message), { statusCode: 413 });
38
+ }
39
+
40
+ /** A form's parts as readForm reads them: a field's value, a file's bytes in full */
41
+ async function* formParts(parts: AsyncIterable<Multipart>): AsyncGenerator<FormPart> {
42
+ for await (const part of parts) {
43
+ if (part.type === 'file') {
44
+ const file = await part.toBuffer();
45
+ {{!-- With throwFileSizeLimit off, @fastify/multipart cuts a file at its limit instead of refusing it --}}
46
+ if (part.file.truncated) throw tooLarge(\`body/\${part.fieldname} exceeds the file size limit\`);
47
+ yield { name: part.fieldname, file };
48
+ } else {
49
+ if (part.fieldnameTruncated || part.valueTruncated) throw tooLarge(\`body/\${part.fieldname} exceeds the field size limit\`);
50
+ yield { name: part.fieldname, value: part.value };
51
+ }
52
+ }
53
+ }
54
+ {{/if}}
29
55
  {{#if extensionInfo.length}}
30
56
 
31
57
  /** The request as the overlays read it */
@@ -46,6 +72,12 @@ function sendError(reply: FastifyReply, error: types.ProblemDetails): FastifyRep
46
72
  {{/if}}
47
73
 
48
74
  export async function registerRoutes(fastify: FastifyInstance): Promise<void> {
75
+ {{#if forms}}
76
+ if (!fastify.hasContentTypeParser('multipart/form-data')) {
77
+ throw new Error('These routes read multipart/form-data bodies with @fastify/multipart: register it before them');
78
+ }
79
+
80
+ {{/if}}
49
81
  // A component referenced from a shared file is a schema of every module that
50
82
  // references it: the first module registers it, and a module defining a
51
83
  // different schema under the same id is an error.
@@ -72,6 +104,10 @@ export async function registerRoutes(fastify: FastifyInstance): Promise<void> {
72
104
  {{#if stream}}
73
105
  {{!-- Events are serialized as a JSON response is: by the schema of one event --}}
74
106
  const {{typeNameBase}}EventSchema = { $ref: '{{stream.eventType}}#' };
107
+ {{/if}}
108
+ {{#if form}}
109
+ {{!-- Fastify parses no form: the route reads it, and validates it with the validator Fastify validates the rest with --}}
110
+ const {{typeNameBase}}FormSchema = { $ref: '{{form.schemaName}}#' };
75
111
  {{/if}}
76
112
  fastify.{{method}}('{{fastifyPath}}', {
77
113
  schema: {
@@ -113,6 +149,17 @@ export async function registerRoutes(fastify: FastifyInstance): Promise<void> {
113
149
  {{#if extensions.length}}
114
150
  const result = await runOverlays('{{operationId}}', handlers, toHttpRequest(req, cookies));
115
151
  if (!result.success) return sendError(reply, result.error);
152
+ {{/if}}
153
+ {{#if form}}
154
+ const validateForm = req.compileValidationSchema({{typeNameBase}}FormSchema);
155
+ const form = await readForm(formParts(req.parts()), [{{#each form.files}}{ name: {{{json name}}}, many: {{many}} }, {{/each~}} ], body => {
156
+ if (!validateForm(body)) {
157
+ throw Object.assign(
158
+ new Error((validateForm.errors ?? []).map(e => \`body\${e.instancePath} \${e.message}\`).join(', ')),
159
+ { statusCode: 400, code: 'FST_ERR_VALIDATION', validation: validateForm.errors, validationContext: 'body' },
160
+ );
161
+ }
162
+ });
116
163
  {{/if}}
117
164
  // Build input object (always required, even if empty)
118
165
  const input: types.{{inputType}} = {
@@ -127,6 +174,9 @@ export async function registerRoutes(fastify: FastifyInstance): Promise<void> {
127
174
  {{/if}}
128
175
  {{#if requestBody}}
129
176
  data: req.body as types.{{requestBody.schemaName}},
177
+ {{/if}}
178
+ {{#if form}}
179
+ data: form as types.{{form.type}},
130
180
  {{/if}}
131
181
  };
132
182
  {{!-- The success status is set once the service has returned: an error it throws keeps its own status. --}}
@@ -217,6 +267,22 @@ async function* bodyText(res: Response): AsyncGenerator<string> {
217
267
  }
218
268
  }
219
269
  {{/if}}
270
+ {{#if forms}}
271
+
272
+ /** A form as a multipart/form-data body: each property a part, a list one part per item, a file's bytes a file */
273
+ function formBody(data: object): FormData {
274
+ const body = new FormData();
275
+ const entries: Array<[string, unknown]> = Object.entries(data);
276
+ for (const [name, value] of entries) {
277
+ for (const item of Array.isArray(value) ? value : [value]) {
278
+ if (item === undefined) continue;
279
+ if (item instanceof Uint8Array) body.append(name, new Blob([new Uint8Array(item)]), name);
280
+ else body.append(name, String(item));
281
+ }
282
+ }
283
+ return body;
284
+ }
285
+ {{/if}}
220
286
 
221
287
  {{#each services}}
222
288
  // ==========================================================================
@@ -244,6 +310,8 @@ export const {{key}}Api = {
244
310
  {{/if}}
245
311
  {{#if (eq httpMethod "GET")}}
246
312
  const res = await fetch(url);
313
+ {{else if form}}
314
+ const res = await fetch(url, { method: '{{httpMethod}}', body: formBody(input.data) });
247
315
  {{else if requestType}}
248
316
  const res = await fetch(url, {
249
317
  method: '{{httpMethod}}',
@@ -499,6 +567,9 @@ import { Readable, type Writable } from 'node:stream';
499
567
  import { pipeline } from 'node:stream/promises';
500
568
  import { encodeStream } from '{{contractPackage}}/streams/index.js';
501
569
  {{/if}}
570
+ {{#if forms}}
571
+ import { readForm, type FormPart } from '{{contractPackage}}/forms/index.js';
572
+ {{/if}}
502
573
 
503
574
  // ==========================================================================
504
575
  // Events
@@ -546,6 +617,10 @@ interface RouteRequest {
546
617
  /** The route's cookie parameters, by name */
547
618
  cookieParams: Record<string, string>;
548
619
  body: unknown;
620
+ {{#if forms}}
621
+ /** The parts of a form body (multipart/form-data) */
622
+ parts(): Promise<FormPart[]>;
623
+ {{/if}}
549
624
  }
550
625
 
551
626
  /** A response: its body whole, or (a stream operation's) as the service yields it */
@@ -692,6 +767,29 @@ function parseBody(event: HttpApiEvent, contentType: string | undefined): unknow
692
767
  if (forbidden) throw httpError(400, 'Object contains forbidden prototype property');
693
768
  return body;
694
769
  }
770
+ {{#if forms}}
771
+
772
+ /** The parts of an event's form body (multipart/form-data), parsed as the Fetch API parses one */
773
+ async function formParts(event: HttpApiEvent, contentType: string | undefined): Promise<FormPart[]> {
774
+ if (contentType === undefined || contentType.split(';')[0].trim().toLowerCase() !== 'multipart/form-data') {
775
+ throw httpError(415, 'Unsupported Media Type');
776
+ }
777
+ const body = Buffer.from(event.body ?? '', event.isBase64Encoded ? 'base64' : 'utf-8');
778
+ let form: FormData;
779
+ try {
780
+ form = await new Response(body, { headers: { 'content-type': contentType } }).formData();
781
+ } catch {
782
+ throw httpError(400, 'Body is not valid multipart/form-data');
783
+ }
784
+ const parts: Array<Promise<FormPart>> = [];
785
+ form.forEach((value, name) => {
786
+ parts.push(typeof value === 'string'
787
+ ? Promise.resolve({ name, value })
788
+ : value.arrayBuffer().then(buffer => ({ name, file: new Uint8Array(buffer) })));
789
+ });
790
+ return Promise.all(parts);
791
+ }
792
+ {{/if}}
695
793
 
696
794
  /** Validate a part of the request, coercing it to its schema in place: one that fails is answered with 400 */
697
795
  function check(validate: ValidateFunction | undefined, data: unknown, part: string): void {
@@ -718,6 +816,9 @@ async function answer(route: Route, values: string[], event: HttpApiEvent): Prom
718
816
  }),
719
817
  ),
720
818
  body: route.body ? parseBody(event, headers['content-type']) : undefined,
819
+ {{#if forms}}
820
+ parts: () => formParts(event, headers['content-type']),
821
+ {{/if}}
721
822
  };
722
823
  check(route.params, request.params, 'params');
723
824
  check(route.body, request.body, 'body');
@@ -756,6 +857,11 @@ function createDispatcher(options: HandlerOptions): (event: HttpApiEvent) => Pro
756
857
  const { overlays } = options;
757
858
  {{/if}}
758
859
 
860
+ {{#each routes}}
861
+ {{#if form}}
862
+ const {{typeNameBase}}FormValidator = ajv.compile({ $ref: '{{form.schemaName}}#' });
863
+ {{/if}}
864
+ {{/each}}
759
865
  const routes: Route[] = [
760
866
  {{#each routes}}
761
867
  // {{httpMethod}} {{path}}{{#if isPublished}} [PUBLISHED]{{/if}}
@@ -783,6 +889,10 @@ function createDispatcher(options: HandlerOptions): (event: HttpApiEvent) => Pro
783
889
  {{#if extensions.length}}
784
890
  const result = await runOverlays('{{operationId}}', overlays, request);
785
891
  if (!result.success) return reply.send(result.error.status, result.error);
892
+ {{/if}}
893
+ {{#if form}}
894
+ {{!-- The form is read once the overlays admit the request, as the Fastify route reads it --}}
895
+ const form = await readForm(await request.parts(), [{{#each form.files}}{ name: {{{json name}}}, many: {{many}} }, {{/each~}} ], body => check({{typeNameBase}}FormValidator, body, 'body'));
786
896
  {{/if}}
787
897
  const input: types.{{inputType}} = {
788
898
  {{#if pathParams.length}}
@@ -796,6 +906,9 @@ function createDispatcher(options: HandlerOptions): (event: HttpApiEvent) => Pro
796
906
  {{/if}}
797
907
  {{#if requestBody}}
798
908
  data: request.body as types.{{requestBody.schemaName}},
909
+ {{/if}}
910
+ {{#if form}}
911
+ data: form as types.{{form.type}},
799
912
  {{/if}}
800
913
  };
801
914
  {{#if stream}}
@@ -1 +1 @@
1
- {"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/cli/templates.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,+BAA+B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+IvC,CAAC;AAEF,MAAM,6BAA6B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuHrC,CAAC;AAEF,MAAM,8BAA8B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BtC,CAAC;AAEF,MAAM,gCAAgC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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