@haddowg/json-api-codegen 1.0.0 → 1.1.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/cli.d.mts +8 -2
- package/dist/cli.d.mts.map +1 -1
- package/dist/cli.mjs +20 -5
- package/dist/cli.mjs.map +1 -1
- package/dist/{index-C0becRSc.d.mts → index-JD2FpQHX.d.mts} +71 -9
- package/dist/index-JD2FpQHX.d.mts.map +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{src-B24cYyjM.mjs → src-CDV4z7In.mjs} +303 -42
- package/dist/src-CDV4z7In.mjs.map +1 -0
- package/package.json +2 -2
- package/dist/index-C0becRSc.d.mts.map +0 -1
- package/dist/src-B24cYyjM.mjs.map +0 -1
package/dist/cli.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as CodegenConfig } from "./index-
|
|
1
|
+
import { r as CodegenConfig } from "./index-JD2FpQHX.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/cli.d.ts
|
|
4
4
|
declare const USAGE = "Usage: json-api-codegen --input <url|file> --output <file> [--server <name>] [--schemas <url|file>] [--check]";
|
|
@@ -9,6 +9,12 @@ declare const USAGE = "Usage: json-api-codegen --input <url|file> --output <file
|
|
|
9
9
|
*/
|
|
10
10
|
declare function parseArgs(argv: string[]): Partial<CodegenConfig>;
|
|
11
11
|
declare function run(argv: string[]): Promise<number>;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the module at `moduleUrl` is the script node was asked to run (`argv1`). Compares real
|
|
14
|
+
* paths, because a package manager installs the bin as a symlink (`node_modules/.bin/...`) and
|
|
15
|
+
* node reports the symlink in `process.argv[1]` but the resolved file in `import.meta.url`.
|
|
16
|
+
*/
|
|
17
|
+
declare function isEntry(moduleUrl: string, argv1: string | undefined): boolean;
|
|
12
18
|
//#endregion
|
|
13
|
-
export { USAGE, parseArgs, run };
|
|
19
|
+
export { USAGE, isEntry, parseArgs, run };
|
|
14
20
|
//# sourceMappingURL=cli.d.mts.map
|
package/dist/cli.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.mts","names":[],"sources":["../src/cli.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"cli.d.mts","names":[],"sources":["../src/cli.ts"],"mappings":";;;cAKa,KAAA;AAAb;;;;AAAkB;AAAlB,iBAQgB,SAAA,CAAU,IAAA,aAAiB,OAAO,CAAC,aAAA;AAAA,iBA6B7B,GAAA,CAAI,IAAA,aAAiB,OAAO;;;;;;iBAgClC,OAAA,CAAQ,SAAA,UAAmB,KAAyB"}
|
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { n as generate, t as check } from "./src-
|
|
3
|
-
import {
|
|
2
|
+
import { n as generate, r as schemasOutputPath, t as check } from "./src-CDV4z7In.mjs";
|
|
3
|
+
import { realpathSync } from "node:fs";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
4
5
|
//#region src/cli.ts
|
|
5
6
|
const USAGE = "Usage: json-api-codegen --input <url|file> --output <file> [--server <name>] [--schemas <url|file>] [--check]";
|
|
6
7
|
/**
|
|
@@ -50,17 +51,31 @@ async function run(argv) {
|
|
|
50
51
|
return 0;
|
|
51
52
|
}
|
|
52
53
|
await generate(config);
|
|
54
|
+
console.error(`wrote ${config.output}`);
|
|
55
|
+
if (config.schemas !== void 0) console.error(`wrote ${schemasOutputPath(config.output)}`);
|
|
53
56
|
return 0;
|
|
54
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Whether the module at `moduleUrl` is the script node was asked to run (`argv1`). Compares real
|
|
60
|
+
* paths, because a package manager installs the bin as a symlink (`node_modules/.bin/...`) and
|
|
61
|
+
* node reports the symlink in `process.argv[1]` but the resolved file in `import.meta.url`.
|
|
62
|
+
*/
|
|
63
|
+
function isEntry(moduleUrl, argv1) {
|
|
64
|
+
if (argv1 === void 0) return false;
|
|
65
|
+
try {
|
|
66
|
+
return realpathSync(fileURLToPath(moduleUrl)) === realpathSync(argv1);
|
|
67
|
+
} catch {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
55
71
|
async function main() {
|
|
56
72
|
process.exitCode = await run(process.argv.slice(2));
|
|
57
73
|
}
|
|
58
|
-
|
|
59
|
-
if (entry !== void 0 && import.meta.url === pathToFileURL(entry).href) main().catch((error) => {
|
|
74
|
+
if (isEntry(import.meta.url, process.argv[1])) main().catch((error) => {
|
|
60
75
|
console.error(error instanceof Error ? error.message : error);
|
|
61
76
|
process.exitCode = 1;
|
|
62
77
|
});
|
|
63
78
|
//#endregion
|
|
64
|
-
export { USAGE, parseArgs, run };
|
|
79
|
+
export { USAGE, isEntry, parseArgs, run };
|
|
65
80
|
|
|
66
81
|
//# sourceMappingURL=cli.mjs.map
|
package/dist/cli.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.mjs","names":[],"sources":["../src/cli.ts"],"sourcesContent":["#!/usr/bin/env node\nimport {
|
|
1
|
+
{"version":3,"file":"cli.mjs","names":[],"sources":["../src/cli.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { realpathSync } from 'node:fs'\nimport { fileURLToPath } from 'node:url'\nimport { check, generate, schemasOutputPath, type CodegenConfig } from './index'\n\nexport const USAGE =\n 'Usage: json-api-codegen --input <url|file> --output <file> [--server <name>] [--schemas <url|file>] [--check]'\n\n/**\n * Thin CLI wrapper. Real arg parsing + `japi.config.ts` discovery land with the\n * generator itself; this stub establishes the bin entry and the shape of invocation.\n * `--check` is a boolean flag (drift gate) with no value.\n */\nexport function parseArgs(argv: string[]): Partial<CodegenConfig> {\n const config: Partial<CodegenConfig> = {}\n for (let i = 0; i < argv.length; i++) {\n const arg = argv[i]\n if (arg === '--check') {\n config.check = true\n continue\n }\n const next = argv[i + 1]\n if (next === undefined) {\n continue\n }\n if (arg === '--input') {\n config.input = next\n i++\n } else if (arg === '--output') {\n config.output = next\n i++\n } else if (arg === '--server') {\n config.server = next\n i++\n } else if (arg === '--schemas') {\n config.schemas = next\n i++\n }\n }\n return config\n}\n\nexport async function run(argv: string[]): Promise<number> {\n const config = parseArgs(argv)\n if (!config.input || !config.output) {\n console.error(USAGE)\n return 1\n }\n if (config.check) {\n const result = await check(config as CodegenConfig)\n for (const { path, upToDate } of result.artifacts) {\n console.error(`${upToDate ? 'ok ' : 'DRIFT'} ${path}`)\n }\n if (!result.ok) {\n console.error(\n 'Generated client is out of date with the source spec. Regenerate (drop --check) and commit the result.',\n )\n return 1\n }\n return 0\n }\n await generate(config as CodegenConfig)\n console.error(`wrote ${config.output}`)\n if (config.schemas !== undefined) {\n console.error(`wrote ${schemasOutputPath(config.output)}`)\n }\n return 0\n}\n\n/**\n * Whether the module at `moduleUrl` is the script node was asked to run (`argv1`). Compares real\n * paths, because a package manager installs the bin as a symlink (`node_modules/.bin/...`) and\n * node reports the symlink in `process.argv[1]` but the resolved file in `import.meta.url`.\n */\nexport function isEntry(moduleUrl: string, argv1: string | undefined): boolean {\n if (argv1 === undefined) {\n return false\n }\n try {\n return realpathSync(fileURLToPath(moduleUrl)) === realpathSync(argv1)\n } catch {\n return false\n }\n}\n\nasync function main(): Promise<void> {\n process.exitCode = await run(process.argv.slice(2))\n}\n\n// Only run when invoked as the bin, not when imported (e.g. by tests).\nif (isEntry(import.meta.url, process.argv[1])) {\n main().catch((error: unknown) => {\n console.error(error instanceof Error ? error.message : error)\n process.exitCode = 1\n })\n}\n"],"mappings":";;;;;AAKA,MAAa,QACX;;;;;;AAOF,SAAgB,UAAU,MAAwC;CAChE,MAAM,SAAiC,CAAC;CACxC,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;EACpC,MAAM,MAAM,KAAK;EACjB,IAAI,QAAQ,WAAW;GACrB,OAAO,QAAQ;GACf;EACF;EACA,MAAM,OAAO,KAAK,IAAI;EACtB,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AC5D,QAAQ,WAAW;AACrB,CAAC"}
|
|
@@ -42,6 +42,8 @@ interface ParameterObject {
|
|
|
42
42
|
in?: string;
|
|
43
43
|
$ref?: string;
|
|
44
44
|
schema?: SchemaObject;
|
|
45
|
+
style?: string;
|
|
46
|
+
explode?: boolean;
|
|
45
47
|
/** The negotiation profile a client must opt into to use this parameter (e.g. `withCount`). */
|
|
46
48
|
'x-profile'?: string;
|
|
47
49
|
}
|
|
@@ -55,6 +57,10 @@ type PathItemObject = Partial<Record<HttpMethod, OperationObject>>;
|
|
|
55
57
|
interface InfoObject {
|
|
56
58
|
title?: string;
|
|
57
59
|
version?: string;
|
|
60
|
+
/** The projector's generator contract, bumped whenever the emitted structure changes. */
|
|
61
|
+
'x-generator'?: {
|
|
62
|
+
contract?: number;
|
|
63
|
+
};
|
|
58
64
|
}
|
|
59
65
|
interface OpenApiDocument {
|
|
60
66
|
openapi?: string;
|
|
@@ -160,15 +166,24 @@ declare class DescriptorBuilder {
|
|
|
160
166
|
/** Any `P/{id}/<rel>` related path (excludes relationships/ and custom `-actions`). */
|
|
161
167
|
private hasRelatedPath;
|
|
162
168
|
private hasRelationshipPath;
|
|
163
|
-
/** Detect the paginator
|
|
169
|
+
/** Detect the paginator from the fetchMany operation's page parameters. */
|
|
164
170
|
private paginator;
|
|
165
171
|
/**
|
|
166
|
-
* Detect the paginator
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
* `label` (a path
|
|
172
|
+
* Detect the paginator an operation advertises. A page schema stamped with `x-paginator`
|
|
173
|
+
* (contract 3) names its strategy and the wire key for each role, so it decides both. Without
|
|
174
|
+
* the stamp, the strategy is inferred from canonical member names (see {@link kindOfMembers}).
|
|
175
|
+
* Anything unrecognised warns and generates as unpaginated. `label` (a path) names the endpoint
|
|
176
|
+
* in the warning; without it nothing is logged.
|
|
177
|
+
*/
|
|
178
|
+
private paginatorOf;
|
|
179
|
+
/**
|
|
180
|
+
* The `page` members an operation accepts, from either wire form: one `page` parameter
|
|
181
|
+
* (`style: deepObject`) whose schema `properties` name the members, as `haddowg/json-api` v1
|
|
182
|
+
* projects it, or the older flattened `page[number]`/`page[size]` parameters. A `oneOf` page
|
|
183
|
+
* schema (a MultiPaginator menu) yields each arm's members in `menu` instead, minus the
|
|
184
|
+
* `kind` discriminator.
|
|
170
185
|
*/
|
|
171
|
-
private
|
|
186
|
+
private pageMembers;
|
|
172
187
|
/**
|
|
173
188
|
* The `withCount` capability (Countable profile) for a type's COLLECTION read (`list`): the
|
|
174
189
|
* count tokens (`schema.items.enum`) + the negotiation profile (`x-profile`) carried by the
|
|
@@ -206,7 +221,6 @@ declare class DescriptorBuilder {
|
|
|
206
221
|
* deliberately not captured — `filter` values stay `unknown` (out of scope for v0.1).
|
|
207
222
|
*/
|
|
208
223
|
private filterable;
|
|
209
|
-
private queryParamNames;
|
|
210
224
|
private operation;
|
|
211
225
|
private requestBodyRef;
|
|
212
226
|
private okResponseRef;
|
|
@@ -216,6 +230,19 @@ declare function buildDescriptor(doc: OpenApiDocument): ApiDescriptor;
|
|
|
216
230
|
/** Detect the server-level Atomic Operations capability (`null` when none). */
|
|
217
231
|
declare function buildAtomic(doc: OpenApiDocument): AtomicDescriptor | null;
|
|
218
232
|
//#endregion
|
|
233
|
+
//#region src/contract.d.ts
|
|
234
|
+
/** Below this the document predates the structures this codegen reads. */
|
|
235
|
+
declare const MINIMUM_CONTRACT = 1;
|
|
236
|
+
/** Above this the document carries structures this codegen does not read. */
|
|
237
|
+
declare const MAXIMUM_CONTRACT = 4;
|
|
238
|
+
/**
|
|
239
|
+
* Check the document's `info.x-generator.contract` against the range this codegen reads. A
|
|
240
|
+
* document older than the range throws; a newer one returns a warning, because its new
|
|
241
|
+
* structures would go unread and the client would silently miss what the server offers. A
|
|
242
|
+
* document with no contract (json-api before 1.1.0) passes.
|
|
243
|
+
*/
|
|
244
|
+
declare function checkContract(doc: OpenApiDocument): string | undefined;
|
|
245
|
+
//#endregion
|
|
219
246
|
//#region src/emit.d.ts
|
|
220
247
|
/** A relation name that will later collide with a fluent-surface verb. */
|
|
221
248
|
interface VerbCollision {
|
|
@@ -347,6 +374,41 @@ declare class Emitter {
|
|
|
347
374
|
*/
|
|
348
375
|
declare function emit(doc: OpenApiDocument, descriptor: ApiDescriptor, atomic?: AtomicDescriptor | null): string;
|
|
349
376
|
//#endregion
|
|
377
|
+
//#region src/error-codes.d.ts
|
|
378
|
+
/** One documented error code, with whatever the document says about it. */
|
|
379
|
+
interface DocumentedErrorCode {
|
|
380
|
+
code: string;
|
|
381
|
+
/** The `<Code>Error` component's `description`, when the document has one (contract 4). */
|
|
382
|
+
description?: string;
|
|
383
|
+
/** Example `detail` values, from the component's `detail` property (`example` / `examples`). */
|
|
384
|
+
examples: unknown[];
|
|
385
|
+
}
|
|
386
|
+
/** The server's error catalogue as the codegen reads it. */
|
|
387
|
+
interface ErrorCatalogue {
|
|
388
|
+
/** Every code any error document offers, sorted by code. */
|
|
389
|
+
codes: DocumentedErrorCode[];
|
|
390
|
+
/**
|
|
391
|
+
* Per status, the codes its `ErrorDocument<NNN>` offers, sorted by code. A status whose
|
|
392
|
+
* document offers only the generic `Error` maps to an empty list.
|
|
393
|
+
*/
|
|
394
|
+
byStatus: Map<number, string[]>;
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Read the documented error codes off a document's error documents. `ErrorDocument` and each
|
|
398
|
+
* `ErrorDocument<NNN>` offer their codes as `errors.items.anyOf` branches that `$ref` a
|
|
399
|
+
* `<Code>Error` component; a branch with a `code` const names a code, and the generic `Error`
|
|
400
|
+
* branch (no const) names none.
|
|
401
|
+
*/
|
|
402
|
+
declare function readErrorCatalogue(doc: OpenApiDocument): ErrorCatalogue;
|
|
403
|
+
/**
|
|
404
|
+
* Emit `ErrorCodes`, a const object keyed by every documented code with its TSDoc on the key
|
|
405
|
+
* (editors show TSDoc on an object key, not on a string-literal union member), the `ErrorCode`
|
|
406
|
+
* union derived from it, and `ErrorCodeByStatus`, the codes each status's error document offers.
|
|
407
|
+
* A document with no code catalogue gets an empty `ErrorCodes` and `ErrorCode = string`, so the
|
|
408
|
+
* bound guard still takes any code.
|
|
409
|
+
*/
|
|
410
|
+
declare function emitErrorCodes(catalogue: ErrorCatalogue): string;
|
|
411
|
+
//#endregion
|
|
350
412
|
//#region src/reader.d.ts
|
|
351
413
|
/** A self-contained JSON Schema document, keyed by JSON:API type, as served at `GET /schemas.json`. */
|
|
352
414
|
type SchemaBundle = Record<string, SchemaObject>;
|
|
@@ -467,5 +529,5 @@ declare function generate(config: CodegenConfig): Promise<string>;
|
|
|
467
529
|
*/
|
|
468
530
|
declare function check(config: CodegenConfig): Promise<CheckResult>;
|
|
469
531
|
//#endregion
|
|
470
|
-
export {
|
|
471
|
-
//# sourceMappingURL=index-
|
|
532
|
+
export { InfoObject as A, MAXIMUM_CONTRACT as C, buildAtomic as D, DescriptorBuilder as E, PathItemObject as F, RequestBodyObject as I, ResponseObject as L, OpenApiDocument as M, OperationObject as N, buildDescriptor as O, ParameterObject as P, SchemaObject as R, emit as S, checkContract as T, emitErrorCodes as _, generate as a, VerbCollision as b, deriveProvenance as c, emitSchemas as d, SchemaBundle as f, ErrorCatalogue as g, DocumentedErrorCode as h, check as i, MediaTypeObject as j, HttpMethod as k, hashJson as l, readSchemas as m, CheckResult as n, schemasOutputPath as o, readDocument as p, CodegenConfig as r, Provenance as s, ArtifactDrift as t, provenanceLines as u, readErrorCatalogue as v, MINIMUM_CONTRACT as w, detectVerbCollisions as x, Emitter as y, SchemaOrBool as z };
|
|
533
|
+
//# sourceMappingURL=index-JD2FpQHX.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-JD2FpQHX.d.mts","names":[],"sources":["../src/openapi.ts","../src/build-descriptor.ts","../src/contract.ts","../src/emit.ts","../src/error-codes.ts","../src/reader.ts","../src/emit-schemas.ts","../src/provenance.ts","../src/index.ts"],"mappings":";;;;;;AAQA;;;;UAAiB,YAAA;EACf,IAAA;EACA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type HttpMethod, type InfoObject, type MediaTypeObject, type OpenApiDocument, type OperationObject, type ParameterObject, type PathItemObject, type Provenance, type RequestBodyObject, type ResponseObject, type SchemaBundle, type SchemaObject, type SchemaOrBool, type VerbCollision, buildAtomic, buildDescriptor, check, deriveProvenance, detectVerbCollisions, emit, emitSchemas, generate, hashJson, provenanceLines, readDocument, readSchemas, schemasOutputPath };
|
|
1
|
+
import { A as InfoObject, C as MAXIMUM_CONTRACT, D as buildAtomic, E as DescriptorBuilder, F as PathItemObject, I as RequestBodyObject, L as ResponseObject, M as OpenApiDocument, N as OperationObject, O as buildDescriptor, P as ParameterObject, R as SchemaObject, S as emit, T as checkContract, _ as emitErrorCodes, a as generate, b as VerbCollision, c as deriveProvenance, d as emitSchemas, f as SchemaBundle, g as ErrorCatalogue, h as DocumentedErrorCode, i as check, j as MediaTypeObject, k as HttpMethod, l as hashJson, m as readSchemas, n as CheckResult, o as schemasOutputPath, p as readDocument, r as CodegenConfig, s as Provenance, t as ArtifactDrift, u as provenanceLines, v as readErrorCatalogue, w as MINIMUM_CONTRACT, x as detectVerbCollisions, y as Emitter, z as SchemaOrBool } from "./index-JD2FpQHX.mjs";
|
|
2
|
+
export { ArtifactDrift, CheckResult, CodegenConfig, DescriptorBuilder, type DocumentedErrorCode, Emitter, type ErrorCatalogue, type HttpMethod, type InfoObject, MAXIMUM_CONTRACT, MINIMUM_CONTRACT, type MediaTypeObject, type OpenApiDocument, type OperationObject, type ParameterObject, type PathItemObject, type Provenance, type RequestBodyObject, type ResponseObject, type SchemaBundle, type SchemaObject, type SchemaOrBool, type VerbCollision, buildAtomic, buildDescriptor, check, checkContract, deriveProvenance, detectVerbCollisions, emit, emitErrorCodes, emitSchemas, generate, hashJson, provenanceLines, readDocument, readErrorCatalogue, readSchemas, schemasOutputPath };
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as readSchemas, c as detectVerbCollisions, d as hashJson, f as provenanceLines, h as
|
|
2
|
-
export { DescriptorBuilder, Emitter, buildAtomic, buildDescriptor, check, deriveProvenance, detectVerbCollisions, emit, emitSchemas, generate, hashJson, provenanceLines, readDocument, readSchemas, schemasOutputPath };
|
|
1
|
+
import { _ as checkContract, a as readSchemas, b as buildDescriptor, c as detectVerbCollisions, d as hashJson, f as provenanceLines, g as MINIMUM_CONTRACT, h as MAXIMUM_CONTRACT, i as readDocument, l as emit, m as readErrorCatalogue, n as generate, o as emitSchemas, p as emitErrorCodes, r as schemasOutputPath, s as Emitter, t as check, u as deriveProvenance, v as DescriptorBuilder, y as buildAtomic } from "./src-CDV4z7In.mjs";
|
|
2
|
+
export { DescriptorBuilder, Emitter, MAXIMUM_CONTRACT, MINIMUM_CONTRACT, buildAtomic, buildDescriptor, check, checkContract, deriveProvenance, detectVerbCollisions, emit, emitErrorCodes, emitSchemas, generate, hashJson, provenanceLines, readDocument, readErrorCatalogue, readSchemas, schemasOutputPath };
|