@contractspec/lib.contracts-transformers 0.0.0-canary-20260113162409
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/LICENSE +21 -0
- package/README.md +95 -0
- package/dist/common/index.d.ts +3 -0
- package/dist/common/index.js +3 -0
- package/dist/common/types.d.ts +159 -0
- package/dist/common/types.d.ts.map +1 -0
- package/dist/common/utils.d.ts +52 -0
- package/dist/common/utils.d.ts.map +1 -0
- package/dist/common/utils.js +103 -0
- package/dist/common/utils.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +18 -0
- package/dist/openapi/differ.d.ts +42 -0
- package/dist/openapi/differ.d.ts.map +1 -0
- package/dist/openapi/differ.js +222 -0
- package/dist/openapi/differ.js.map +1 -0
- package/dist/openapi/exporter/data-views.d.ts +38 -0
- package/dist/openapi/exporter/data-views.d.ts.map +1 -0
- package/dist/openapi/exporter/data-views.js +47 -0
- package/dist/openapi/exporter/data-views.js.map +1 -0
- package/dist/openapi/exporter/events.d.ts +28 -0
- package/dist/openapi/exporter/events.d.ts.map +1 -0
- package/dist/openapi/exporter/events.js +39 -0
- package/dist/openapi/exporter/events.js.map +1 -0
- package/dist/openapi/exporter/features.d.ts +37 -0
- package/dist/openapi/exporter/features.d.ts.map +1 -0
- package/dist/openapi/exporter/features.js +46 -0
- package/dist/openapi/exporter/features.js.map +1 -0
- package/dist/openapi/exporter/forms.d.ts +30 -0
- package/dist/openapi/exporter/forms.d.ts.map +1 -0
- package/dist/openapi/exporter/forms.js +49 -0
- package/dist/openapi/exporter/forms.js.map +1 -0
- package/dist/openapi/exporter/index.js +8 -0
- package/dist/openapi/exporter/operations.d.ts +65 -0
- package/dist/openapi/exporter/operations.d.ts.map +1 -0
- package/dist/openapi/exporter/operations.js +143 -0
- package/dist/openapi/exporter/operations.js.map +1 -0
- package/dist/openapi/exporter/presentations.d.ts +32 -0
- package/dist/openapi/exporter/presentations.d.ts.map +1 -0
- package/dist/openapi/exporter/presentations.js +60 -0
- package/dist/openapi/exporter/presentations.js.map +1 -0
- package/dist/openapi/exporter/registries.d.ts +23 -0
- package/dist/openapi/exporter/registries.d.ts.map +1 -0
- package/dist/openapi/exporter/registries.js +29 -0
- package/dist/openapi/exporter/registries.js.map +1 -0
- package/dist/openapi/exporter/workflows.d.ts +36 -0
- package/dist/openapi/exporter/workflows.d.ts.map +1 -0
- package/dist/openapi/exporter/workflows.js +54 -0
- package/dist/openapi/exporter/workflows.js.map +1 -0
- package/dist/openapi/exporter.d.ts +48 -0
- package/dist/openapi/exporter.d.ts.map +1 -0
- package/dist/openapi/exporter.js +122 -0
- package/dist/openapi/exporter.js.map +1 -0
- package/dist/openapi/importer/analyzer.js +28 -0
- package/dist/openapi/importer/analyzer.js.map +1 -0
- package/dist/openapi/importer/events.js +40 -0
- package/dist/openapi/importer/events.js.map +1 -0
- package/dist/openapi/importer/generator.js +105 -0
- package/dist/openapi/importer/generator.js.map +1 -0
- package/dist/openapi/importer/grouping.js +73 -0
- package/dist/openapi/importer/grouping.js.map +1 -0
- package/dist/openapi/importer/index.d.ts +17 -0
- package/dist/openapi/importer/index.d.ts.map +1 -0
- package/dist/openapi/importer/index.js +175 -0
- package/dist/openapi/importer/index.js.map +1 -0
- package/dist/openapi/importer/models.js +22 -0
- package/dist/openapi/importer/models.js.map +1 -0
- package/dist/openapi/importer/schemas.js +60 -0
- package/dist/openapi/importer/schemas.js.map +1 -0
- package/dist/openapi/index.d.ts +16 -0
- package/dist/openapi/index.js +18 -0
- package/dist/openapi/parser/document.d.ts +20 -0
- package/dist/openapi/parser/document.d.ts.map +1 -0
- package/dist/openapi/parser/document.js +95 -0
- package/dist/openapi/parser/document.js.map +1 -0
- package/dist/openapi/parser/index.js +5 -0
- package/dist/openapi/parser/operation.js +59 -0
- package/dist/openapi/parser/operation.js.map +1 -0
- package/dist/openapi/parser/parameters.js +37 -0
- package/dist/openapi/parser/parameters.js.map +1 -0
- package/dist/openapi/parser/resolvers.js +63 -0
- package/dist/openapi/parser/resolvers.js.map +1 -0
- package/dist/openapi/parser/utils.d.ts +19 -0
- package/dist/openapi/parser/utils.d.ts.map +1 -0
- package/dist/openapi/parser/utils.js +48 -0
- package/dist/openapi/parser/utils.js.map +1 -0
- package/dist/openapi/parser.js +6 -0
- package/dist/openapi/schema-converter.d.ts +71 -0
- package/dist/openapi/schema-converter.d.ts.map +1 -0
- package/dist/openapi/schema-converter.js +161 -0
- package/dist/openapi/schema-converter.js.map +1 -0
- package/dist/openapi/schema-generators/index.js +462 -0
- package/dist/openapi/schema-generators/index.js.map +1 -0
- package/dist/openapi/types.d.ts +277 -0
- package/dist/openapi/types.d.ts.map +1 -0
- package/package.json +69 -0
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { SpecSource, TransportHints } from "../common/types.js";
|
|
2
|
+
import { OpenAPIV3, OpenAPIV3_1 } from "openapi-types";
|
|
3
|
+
|
|
4
|
+
//#region src/openapi/types.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Supported OpenAPI versions.
|
|
8
|
+
*/
|
|
9
|
+
type OpenApiVersion = '3.0' | '3.1';
|
|
10
|
+
/**
|
|
11
|
+
* OpenAPI document (union of supported versions).
|
|
12
|
+
*/
|
|
13
|
+
type OpenApiDocument = OpenAPIV3.Document | OpenAPIV3_1.Document;
|
|
14
|
+
/**
|
|
15
|
+
* OpenAPI operation object.
|
|
16
|
+
*/
|
|
17
|
+
type OpenApiOperation = OpenAPIV3.OperationObject | OpenAPIV3_1.OperationObject;
|
|
18
|
+
/**
|
|
19
|
+
* OpenAPI schema object.
|
|
20
|
+
*/
|
|
21
|
+
type OpenApiSchema = OpenAPIV3.SchemaObject | OpenAPIV3_1.SchemaObject | OpenAPIV3.ReferenceObject | OpenAPIV3_1.ReferenceObject;
|
|
22
|
+
/**
|
|
23
|
+
* OpenAPI parameter object.
|
|
24
|
+
*/
|
|
25
|
+
type OpenApiParameter = OpenAPIV3.ParameterObject | OpenAPIV3_1.ParameterObject | OpenAPIV3.ReferenceObject | OpenAPIV3_1.ReferenceObject;
|
|
26
|
+
/**
|
|
27
|
+
* HTTP methods supported by OpenAPI.
|
|
28
|
+
*/
|
|
29
|
+
type HttpMethod = 'get' | 'post' | 'put' | 'delete' | 'patch' | 'head' | 'options' | 'trace';
|
|
30
|
+
/**
|
|
31
|
+
* Parameter location in OpenAPI.
|
|
32
|
+
*/
|
|
33
|
+
type ParameterLocation = 'path' | 'query' | 'header' | 'cookie';
|
|
34
|
+
/**
|
|
35
|
+
* Server configuration for OpenAPI export.
|
|
36
|
+
*/
|
|
37
|
+
interface OpenApiServer {
|
|
38
|
+
url: string;
|
|
39
|
+
description?: string;
|
|
40
|
+
variables?: Record<string, {
|
|
41
|
+
default: string;
|
|
42
|
+
enum?: string[];
|
|
43
|
+
description?: string;
|
|
44
|
+
}>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Options for exporting to OpenAPI.
|
|
48
|
+
*/
|
|
49
|
+
interface OpenApiExportOptions {
|
|
50
|
+
/** API title */
|
|
51
|
+
title?: string;
|
|
52
|
+
/** API version */
|
|
53
|
+
version?: string;
|
|
54
|
+
/** API description */
|
|
55
|
+
description?: string;
|
|
56
|
+
/** Server configurations */
|
|
57
|
+
servers?: OpenApiServer[];
|
|
58
|
+
/** Additional OpenAPI extensions */
|
|
59
|
+
extensions?: Record<string, unknown>;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Options for parsing OpenAPI documents.
|
|
63
|
+
*/
|
|
64
|
+
interface OpenApiParseOptions {
|
|
65
|
+
/** Base URL for resolving relative references */
|
|
66
|
+
baseUrl?: string;
|
|
67
|
+
/** Whether to resolve $ref references */
|
|
68
|
+
resolveRefs?: boolean;
|
|
69
|
+
/** Timeout for HTTP requests (ms) */
|
|
70
|
+
timeout?: number;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Parsed operation with resolved metadata.
|
|
74
|
+
*/
|
|
75
|
+
interface ParsedOperation {
|
|
76
|
+
/** Operation ID (generated if not present) */
|
|
77
|
+
operationId: string;
|
|
78
|
+
/** HTTP method */
|
|
79
|
+
method: HttpMethod;
|
|
80
|
+
/** Path template */
|
|
81
|
+
path: string;
|
|
82
|
+
/** Operation summary */
|
|
83
|
+
summary?: string;
|
|
84
|
+
/** Operation description */
|
|
85
|
+
description?: string;
|
|
86
|
+
/** Operation tags */
|
|
87
|
+
tags: string[];
|
|
88
|
+
/** Path parameters */
|
|
89
|
+
pathParams: ParsedParameter[];
|
|
90
|
+
/** Query parameters */
|
|
91
|
+
queryParams: ParsedParameter[];
|
|
92
|
+
/** Header parameters */
|
|
93
|
+
headerParams: ParsedParameter[];
|
|
94
|
+
/** Cookie parameters */
|
|
95
|
+
cookieParams: ParsedParameter[];
|
|
96
|
+
/** Request body schema */
|
|
97
|
+
requestBody?: {
|
|
98
|
+
required: boolean;
|
|
99
|
+
schema: OpenApiSchema;
|
|
100
|
+
contentType: string;
|
|
101
|
+
};
|
|
102
|
+
/** Response schemas by status code */
|
|
103
|
+
responses: Record<string, {
|
|
104
|
+
description: string;
|
|
105
|
+
schema?: OpenApiSchema;
|
|
106
|
+
contentType?: string;
|
|
107
|
+
}>;
|
|
108
|
+
/** Whether the operation is deprecated */
|
|
109
|
+
deprecated: boolean;
|
|
110
|
+
/** Security requirements */
|
|
111
|
+
security?: Record<string, string[]>[];
|
|
112
|
+
/** ContractSpec extension data if present */
|
|
113
|
+
contractSpecMeta?: {
|
|
114
|
+
name: string;
|
|
115
|
+
version: string;
|
|
116
|
+
kind: 'command' | 'query';
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Parsed parameter with resolved schema.
|
|
121
|
+
*/
|
|
122
|
+
interface ParsedParameter {
|
|
123
|
+
/** Parameter name */
|
|
124
|
+
name: string;
|
|
125
|
+
/** Parameter location */
|
|
126
|
+
in: ParameterLocation;
|
|
127
|
+
/** Whether the parameter is required */
|
|
128
|
+
required: boolean;
|
|
129
|
+
/** Parameter description */
|
|
130
|
+
description?: string;
|
|
131
|
+
/** Parameter schema */
|
|
132
|
+
schema: OpenApiSchema;
|
|
133
|
+
/** Whether the parameter is deprecated */
|
|
134
|
+
deprecated: boolean;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Result of parsing an OpenAPI document.
|
|
138
|
+
*/
|
|
139
|
+
interface ParseResult {
|
|
140
|
+
/** Original document */
|
|
141
|
+
document: OpenApiDocument;
|
|
142
|
+
/** Detected OpenAPI version */
|
|
143
|
+
version: OpenApiVersion;
|
|
144
|
+
/** API info */
|
|
145
|
+
info: {
|
|
146
|
+
title: string;
|
|
147
|
+
version: string;
|
|
148
|
+
description?: string;
|
|
149
|
+
};
|
|
150
|
+
/** Parsed operations */
|
|
151
|
+
operations: ParsedOperation[];
|
|
152
|
+
/** Component schemas (resolved) */
|
|
153
|
+
schemas: Record<string, OpenApiSchema>;
|
|
154
|
+
/** Servers */
|
|
155
|
+
servers: OpenApiServer[];
|
|
156
|
+
/** Parse warnings */
|
|
157
|
+
warnings: string[];
|
|
158
|
+
/** Parsed events (webhooks) */
|
|
159
|
+
events: ParsedEvent[];
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Parsed event (webhook).
|
|
163
|
+
*/
|
|
164
|
+
interface ParsedEvent {
|
|
165
|
+
/** Event name */
|
|
166
|
+
name: string;
|
|
167
|
+
/** Event description */
|
|
168
|
+
description?: string;
|
|
169
|
+
/** Event payload schema */
|
|
170
|
+
payload: OpenApiSchema;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* OpenAPI-specific transport hints.
|
|
174
|
+
*/
|
|
175
|
+
interface OpenApiTransportHints extends TransportHints {
|
|
176
|
+
rest: {
|
|
177
|
+
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
178
|
+
path: string;
|
|
179
|
+
params?: {
|
|
180
|
+
path?: string[];
|
|
181
|
+
query?: string[];
|
|
182
|
+
header?: string[];
|
|
183
|
+
cookie?: string[];
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* OpenAPI-specific source information.
|
|
189
|
+
*/
|
|
190
|
+
interface OpenApiSource extends SpecSource {
|
|
191
|
+
type: 'openapi';
|
|
192
|
+
/** OpenAPI version of source document */
|
|
193
|
+
openApiVersion: OpenApiVersion;
|
|
194
|
+
/** Original operationId from OpenAPI */
|
|
195
|
+
operationId: string;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* ContractSpec-compatible OpenAPI document structure.
|
|
199
|
+
* Used for export to maintain compatibility with existing code.
|
|
200
|
+
*/
|
|
201
|
+
interface ContractSpecOpenApiDocument {
|
|
202
|
+
openapi: '3.1.0';
|
|
203
|
+
info: {
|
|
204
|
+
title: string;
|
|
205
|
+
version: string;
|
|
206
|
+
description?: string;
|
|
207
|
+
};
|
|
208
|
+
servers?: OpenApiServer[];
|
|
209
|
+
paths: Record<string, Record<string, unknown>>;
|
|
210
|
+
components: {
|
|
211
|
+
schemas: Record<string, Record<string, unknown>>;
|
|
212
|
+
};
|
|
213
|
+
/** ContractSpec extensions for features */
|
|
214
|
+
'x-contractspec-features'?: unknown[];
|
|
215
|
+
/** ContractSpec extensions for events */
|
|
216
|
+
'x-contractspec-events'?: unknown[];
|
|
217
|
+
/** ContractSpec extensions for presentations */
|
|
218
|
+
'x-contractspec-presentations'?: unknown[];
|
|
219
|
+
/** ContractSpec extensions for forms */
|
|
220
|
+
'x-contractspec-forms'?: unknown[];
|
|
221
|
+
/** ContractSpec extensions for data views */
|
|
222
|
+
'x-contractspec-dataviews'?: unknown[];
|
|
223
|
+
/** ContractSpec extensions for workflows */
|
|
224
|
+
'x-contractspec-workflows'?: unknown[];
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Unified export options for all ContractSpec surfaces.
|
|
228
|
+
*/
|
|
229
|
+
interface ContractSpecExportOptions extends OpenApiExportOptions {
|
|
230
|
+
/** Include operations in export (default: true) */
|
|
231
|
+
operations?: boolean;
|
|
232
|
+
/** Include events in export (default: true) */
|
|
233
|
+
events?: boolean;
|
|
234
|
+
/** Include features in export (default: true) */
|
|
235
|
+
features?: boolean;
|
|
236
|
+
/** Include presentations (V1 and V2) in export (default: true) */
|
|
237
|
+
presentations?: boolean;
|
|
238
|
+
/** Include forms in export (default: true) */
|
|
239
|
+
forms?: boolean;
|
|
240
|
+
/** Include data views in export (default: true) */
|
|
241
|
+
dataViews?: boolean;
|
|
242
|
+
/** Include workflows in export (default: true) */
|
|
243
|
+
workflows?: boolean;
|
|
244
|
+
/** Generate TypeScript registry code (default: true) */
|
|
245
|
+
generateRegistries?: boolean;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Generated registry code for a specific surface.
|
|
249
|
+
*/
|
|
250
|
+
interface GeneratedRegistryCode {
|
|
251
|
+
/** The generated TypeScript code */
|
|
252
|
+
code: string;
|
|
253
|
+
/** Suggested filename for the registry */
|
|
254
|
+
fileName: string;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Result of unified ContractSpec export.
|
|
258
|
+
*/
|
|
259
|
+
interface ContractSpecExportResult {
|
|
260
|
+
/** OpenAPI document with ContractSpec extensions */
|
|
261
|
+
openApi: ContractSpecOpenApiDocument;
|
|
262
|
+
/** Generated TypeScript code for registries */
|
|
263
|
+
registries?: {
|
|
264
|
+
operations?: GeneratedRegistryCode;
|
|
265
|
+
events?: GeneratedRegistryCode;
|
|
266
|
+
features?: GeneratedRegistryCode;
|
|
267
|
+
presentations?: GeneratedRegistryCode;
|
|
268
|
+
forms?: GeneratedRegistryCode;
|
|
269
|
+
dataViews?: GeneratedRegistryCode;
|
|
270
|
+
workflows?: GeneratedRegistryCode;
|
|
271
|
+
/** Index file that re-exports all registries */
|
|
272
|
+
index?: GeneratedRegistryCode;
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
//#endregion
|
|
276
|
+
export { ContractSpecExportOptions, ContractSpecExportResult, ContractSpecOpenApiDocument, GeneratedRegistryCode, HttpMethod, OpenApiDocument, OpenApiExportOptions, OpenApiOperation, OpenApiParameter, OpenApiParseOptions, OpenApiSchema, OpenApiServer, OpenApiSource, OpenApiTransportHints, OpenApiVersion, ParameterLocation, ParseResult, ParsedOperation, ParsedParameter };
|
|
277
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../src/openapi/types.ts"],"sourcesContent":[],"mappings":";;;;;AAcA;AAKA;AAOA;AACI,KAlBQ,cAAA,GAkBE,KAAA,GAAA,KAAA;;;;AAGiB,KAhBnB,eAAA,GAAkB,SAAA,CAAU,QAgBT,GAhBoB,WAAA,CAAY,QAgBhC;AAK/B;;;AAGI,KAnBQ,gBAAA,GACR,SAAA,CAAU,eAkBA,GAjBV,WAAA,CAAY,eAiBF;;;AAMd;AAaY,KA/BA,aAAA,GACR,SAAA,CAAU,YA8Be,GA7BzB,WAAA,CAAY,YA6Ba,GA5BzB,SAAA,CAAU,eA4Be,GA3BzB,WAAA,CAAY,eA2Ba;AAK7B;AAgBA;AAgBA;AAYiB,KAvEL,gBAAA,GACR,SAAA,CAAU,eAsEkB,GArE5B,WAAA,CAAY,eAqEgB,GApE5B,SAAA,CAAU,eAoEkB,GAnE5B,WAAA,CAAY,eAmEgB;;;;AAkBhB,KAhFJ,UAAA,GAgFI,KAAA,GAAA,MAAA,GAAA,KAAA,GAAA,QAAA,GAAA,OAAA,GAAA,MAAA,GAAA,SAAA,GAAA,OAAA;;;;AAUH,KA7ED,iBAAA,GA6EC,MAAA,GAAA,OAAA,GAAA,QAAA,GAAA,QAAA;;;AAuBb;AAkBiB,UAjHA,aAAA,CAiHW;EAEhB,GAAA,EAAA,MAAA;EAED,WAAA,CAAA,EAAA,MAAA;EAQG,SAAA,CAAA,EA1HA,MA0HA,CAAA,MAAA,EAAA;IAEY,OAAA,EAAA,MAAA;IAAf,IAAA,CAAA,EAAA,MAAA,EAAA;IAEA,WAAA,CAAA,EAAA,MAAA;EAID,CAAA,CAAA;;AAMV;AAYA;AAgBA;AAYiB,UAnKA,oBAAA,CAmK2B;EAOhC;EACY,KAAA,CAAA,EAAA,MAAA;EAAf;EAEmB,OAAA,CAAA,EAAA,MAAA;EAAf;EAAM,WAAA,CAAA,EAAA,MAAA;EAmBF;EAsBA,OAAA,CAAA,EA9ML,aA8MK,EAAqB;EAUrB;EAEN,UAAA,CAAA,EAxNI,MAwNJ,CAAA,MAAA,EAAA,OAAA,CAAA;;;;;AAOC,UAzNK,mBAAA,CAyNL;EACI;EACA,OAAA,CAAA,EAAA,MAAA;EAEJ;EAAqB,WAAA,CAAA,EAAA,OAAA;;;;;;;UAjNhB,eAAA;;;;UAIP;;;;;;;;;;cAUI;;eAEC;;gBAEC;;gBAEA;;;;YAIJ;;;;aAIC;;aAIE;;;;;;aAOF;;;;;;;;;;;UAYI,eAAA;;;;MAIX;;;;;;UAMI;;;;;;;UAQO,WAAA;;YAEL;;WAED;;;;;;;;cAQG;;WAEH,eAAe;;WAEf;;;;UAID;;;;;UAMO,WAAA;;;;;;WAMN;;;;;UAMM,qBAAA,SAA8B;;;;;;;;;;;;;;;UAgB9B,aAAA,SAAsB;;;kBAGrB;;;;;;;;UASD,2BAAA;;;;;;;YAOL;SACH,eAAe;;aAEX,eAAe;;;;;;;;;;;;;;;;;;UAmBX,yBAAA,SAAkC;;;;;;;;;;;;;;;;;;;;;UAsBlC,qBAAA;;;;;;;;;UAUA,wBAAA;;WAEN;;;iBAGM;aACJ;eACE;oBACK;YACR;gBACI;gBACA;;YAEJ"}
|
package/package.json
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@contractspec/lib.contracts-transformers",
|
|
3
|
+
"version": "0.0.0-canary-20260113162409",
|
|
4
|
+
"description": "Contract format transformations: import/export between ContractSpec and external formats (OpenAPI, AsyncAPI, etc.)",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"contractspec",
|
|
7
|
+
"openapi",
|
|
8
|
+
"asyncapi",
|
|
9
|
+
"transformers",
|
|
10
|
+
"code-generation",
|
|
11
|
+
"typescript"
|
|
12
|
+
],
|
|
13
|
+
"type": "module",
|
|
14
|
+
"scripts": {
|
|
15
|
+
"publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
|
|
16
|
+
"publish:pkg:canary": "bun publish:pkg --tag canary",
|
|
17
|
+
"build": "bun build:types && bun build:bundle",
|
|
18
|
+
"build:bundle": "tsdown",
|
|
19
|
+
"build:types": "tsc --noEmit",
|
|
20
|
+
"dev": "bun build:bundle --watch",
|
|
21
|
+
"clean": "rimraf dist .turbo",
|
|
22
|
+
"lint": "bun lint:fix",
|
|
23
|
+
"lint:fix": "eslint src --fix",
|
|
24
|
+
"lint:check": "eslint src",
|
|
25
|
+
"test": "bun test"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@contractspec/lib.contracts": "0.0.0-canary-20260113162409",
|
|
29
|
+
"@contractspec/lib.schema": "0.0.0-canary-20260113162409",
|
|
30
|
+
"compare-versions": "^6.1.1",
|
|
31
|
+
"openapi-types": "^12.1.3",
|
|
32
|
+
"yaml": "^2.7.1",
|
|
33
|
+
"zod": "^4.3.5"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@contractspec/tool.tsdown": "0.0.0-canary-20260113162409",
|
|
37
|
+
"@contractspec/tool.typescript": "0.0.0-canary-20260113162409",
|
|
38
|
+
"tsdown": "^0.19.0",
|
|
39
|
+
"typescript": "^5.9.3"
|
|
40
|
+
},
|
|
41
|
+
"types": "./dist/index.d.ts",
|
|
42
|
+
"files": [
|
|
43
|
+
"dist",
|
|
44
|
+
"README.md"
|
|
45
|
+
],
|
|
46
|
+
"exports": {
|
|
47
|
+
".": "./dist/index.js",
|
|
48
|
+
"./common": "./dist/common/index.js",
|
|
49
|
+
"./openapi": "./dist/openapi/index.js",
|
|
50
|
+
"./*": "./*"
|
|
51
|
+
},
|
|
52
|
+
"publishConfig": {
|
|
53
|
+
"access": "public",
|
|
54
|
+
"exports": {
|
|
55
|
+
".": "./dist/index.js",
|
|
56
|
+
"./common": "./dist/common/index.js",
|
|
57
|
+
"./openapi": "./dist/openapi/index.js",
|
|
58
|
+
"./*": "./*"
|
|
59
|
+
},
|
|
60
|
+
"registry": "https://registry.npmjs.org/"
|
|
61
|
+
},
|
|
62
|
+
"license": "MIT",
|
|
63
|
+
"repository": {
|
|
64
|
+
"type": "git",
|
|
65
|
+
"url": "https://github.com/lssm-tech/contractspec.git",
|
|
66
|
+
"directory": "packages/libs/contracts-transformers"
|
|
67
|
+
},
|
|
68
|
+
"homepage": "https://contractspec.io"
|
|
69
|
+
}
|