@openapi-qraft/openapi-typescript-plugin 1.0.1

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/CHANGELOG.md ADDED
@@ -0,0 +1,21 @@
1
+ # @openapi-qraft/openapi-typescript
2
+
3
+ ## 1.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [943a9d3]
8
+ - Updated dependencies [3a75364]
9
+ - @openapi-qraft/plugin@1.9.0
10
+
11
+ ## 1.0.0
12
+
13
+ ### Major Changes
14
+
15
+ - c545cb2: chore: First release of the `@openapi-qraft/*` packages.
16
+
17
+ ## 1.0.0-beta.1
18
+
19
+ ### Major Changes
20
+
21
+ - 2034eba: First release of the `@openapi-qraft/*` packages.
@@ -0,0 +1,12 @@
1
+ /// <reference types="node" resolution-mode="require"/>
2
+ /// <reference types="node" resolution-mode="require"/>
3
+ /// <reference types="node" resolution-mode="require"/>
4
+ import type { Readable } from 'node:stream';
5
+ import { type OpenAPI3, type OpenAPITSOptions } from 'openapi-typescript';
6
+ export declare function generateSchemaTypes(schema: string | URL | OpenAPI3 | Readable | Buffer, { silent, args, }: {
7
+ silent: boolean;
8
+ args: Pick<OpenAPITSOptions, 'additionalProperties' | 'alphabetize' | 'arrayLength' | 'defaultNonNullable' | 'emptyObjectsUnknown' | 'enum' | 'excludeDeprecated' | 'exportType' | 'immutable' | 'pathParamsAsTypes' | 'propertiesRequiredByDefault'> & {
9
+ blobFromBinary?: boolean;
10
+ };
11
+ }): Promise<string>;
12
+ //# sourceMappingURL=generateSchemaTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateSchemaTypes.d.ts","sourceRoot":"","sources":["../src/generateSchemaTypes.ts"],"names":[],"mappings":";;;AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAkB,EAEhB,KAAK,QAAQ,EACb,KAAK,gBAAgB,EAEtB,MAAM,oBAAoB,CAAC;AAG5B,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,MAAM,GAAG,GAAG,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,EACnD,EACE,MAAM,EACN,IAAI,GACL,EAAE;IACD,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,IAAI,CACR,gBAAgB,EACd,sBAAsB,GACtB,aAAa,GACb,aAAa,GACb,oBAAoB,GACpB,qBAAqB,GACrB,MAAM,GACN,mBAAmB,GACnB,YAAY,GACZ,WAAW,GACX,mBAAmB,GACnB,6BAA6B,CAChC,GAAG;QACF,cAAc,CAAC,EAAE,OAAO,CAAC;KAC1B,CAAC;CACH,mBAqBF"}
@@ -0,0 +1,37 @@
1
+ import { createConfig } from '@redocly/openapi-core';
2
+ import openapiTS, { astToString, } from 'openapi-typescript';
3
+ import ts from 'typescript';
4
+ export async function generateSchemaTypes(schema, { silent, args, }) {
5
+ return astToString(await openapiTS(schema, {
6
+ transform: args.blobFromBinary ? transformFormatBinary : undefined,
7
+ additionalProperties: args.additionalProperties,
8
+ alphabetize: args.alphabetize,
9
+ arrayLength: args.arrayLength,
10
+ // contentNever: args.contentNever, // todo::add `contentNever` in new version
11
+ defaultNonNullable: args.defaultNonNullable,
12
+ emptyObjectsUnknown: args.emptyObjectsUnknown,
13
+ enum: args.enum,
14
+ excludeDeprecated: args.excludeDeprecated,
15
+ exportType: args.exportType,
16
+ immutable: args.immutable,
17
+ pathParamsAsTypes: args.pathParamsAsTypes,
18
+ redocly: await createConfig({}, { extends: ['minimal'] }),
19
+ propertiesRequiredByDefault: args.propertiesRequiredByDefault,
20
+ silent,
21
+ }));
22
+ }
23
+ function transformFormatBinary(schemaObject) {
24
+ if (schemaObject.format !== 'binary')
25
+ return;
26
+ return {
27
+ schema: schemaObject.nullable
28
+ ? ts.factory.createUnionTypeNode([
29
+ ts.factory.createTypeReferenceNode(ts.factory.createIdentifier('Blob'), undefined),
30
+ ts.factory.createLiteralTypeNode(ts.factory.createNull()),
31
+ ])
32
+ : ts.factory.createTypeReferenceNode(ts.factory.createIdentifier('Blob'), undefined),
33
+ // questionToken will be inferred by `openapiTS`, if true, it will force `?` for parameter
34
+ questionToken: false,
35
+ };
36
+ }
37
+ //# sourceMappingURL=generateSchemaTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateSchemaTypes.js","sourceRoot":"","sources":["../src/generateSchemaTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGrD,OAAO,SAAS,EAAE,EAChB,WAAW,GAIZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,MAAmD,EACnD,EACE,MAAM,EACN,IAAI,GAmBL;IAED,OAAO,WAAW,CAChB,MAAM,SAAS,CAAC,MAAM,EAAE;QACtB,SAAS,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS;QAClE,oBAAoB,EAAE,IAAI,CAAC,oBAAoB;QAC/C,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,8EAA8E;QAC9E,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;QAC3C,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;QAC7C,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;QACzC,UAAU,EAAE,IAAI,CAAC,UAAU;QAC3B,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;QACzC,OAAO,EAAE,MAAM,YAAY,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC;QACzD,2BAA2B,EAAE,IAAI,CAAC,2BAA2B;QAC7D,MAAM;KACP,CAAC,CACH,CAAC;AACJ,CAAC;AAED,SAAS,qBAAqB,CAAC,YAA0B;IACvD,IAAI,YAAY,CAAC,MAAM,KAAK,QAAQ;QAAE,OAAO;IAE7C,OAAO;QACL,MAAM,EAAE,YAAY,CAAC,QAAQ;YAC3B,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,mBAAmB,CAAC;gBAC7B,EAAE,CAAC,OAAO,CAAC,uBAAuB,CAChC,EAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,EACnC,SAAS,CACV;gBACD,EAAE,CAAC,OAAO,CAAC,qBAAqB,CAAC,EAAE,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;aAC1D,CAAC;YACJ,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,uBAAuB,CAChC,EAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,EACnC,SAAS,CACV;QACL,0FAA0F;QAC1F,aAAa,EAAE,KAAK;KACrB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { plugin } from './plugin.js';
2
+ export default plugin;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,eAAe,MAAM,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ import { plugin } from './plugin.js';
2
+ export default plugin;
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,eAAe,MAAM,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Create the import path for the OpenAPI types file.
3
+ * @param openapiTypesFileName The file name of the OpenAPI types file. Eg: `schema.d.ts`
4
+ * @param explicitImportExtensions Whether to include explicit `.js` extensions in the import path.
5
+ */
6
+ export declare function createOpenapiTypesImportPath(openapiTypesFileName: string, explicitImportExtensions: boolean): string;
7
+ /**
8
+ * Check if the file name is a valid TypeScript file name.
9
+ * Eg: `schema.d.ts`, `schema.ts`
10
+ */
11
+ export declare function isValidTypeScriptFileName(fileName: string): boolean;
12
+ //# sourceMappingURL=createOpenapiTypesImportPath.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createOpenapiTypesImportPath.d.ts","sourceRoot":"","sources":["../../src/lib/createOpenapiTypesImportPath.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,oBAAoB,EAAE,MAAM,EAC5B,wBAAwB,EAAE,OAAO,UAKlC;AAUD;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,WAEzD"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Create the import path for the OpenAPI types file.
3
+ * @param openapiTypesFileName The file name of the OpenAPI types file. Eg: `schema.d.ts`
4
+ * @param explicitImportExtensions Whether to include explicit `.js` extensions in the import path.
5
+ */
6
+ export function createOpenapiTypesImportPath(openapiTypesFileName, explicitImportExtensions) {
7
+ return explicitImportExtensions
8
+ ? `../${getTypeScriptFileBaseName(openapiTypesFileName)}.js`
9
+ : `../${openapiTypesFileName}`;
10
+ }
11
+ /**
12
+ * Get the base name of the TypeScript file without the extension.
13
+ * Removes `.d.ts` or `.ts` from the file name.
14
+ */
15
+ function getTypeScriptFileBaseName(openapiTypesFileName) {
16
+ return openapiTypesFileName.replace(getTsExtensionRegexp(), '');
17
+ }
18
+ /**
19
+ * Check if the file name is a valid TypeScript file name.
20
+ * Eg: `schema.d.ts`, `schema.ts`
21
+ */
22
+ export function isValidTypeScriptFileName(fileName) {
23
+ return getTsExtensionRegexp().test(fileName);
24
+ }
25
+ function getTsExtensionRegexp() {
26
+ return /\.(d\.)?ts$/;
27
+ }
28
+ //# sourceMappingURL=createOpenapiTypesImportPath.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createOpenapiTypesImportPath.js","sourceRoot":"","sources":["../../src/lib/createOpenapiTypesImportPath.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,4BAA4B,CAC1C,oBAA4B,EAC5B,wBAAiC;IAEjC,OAAO,wBAAwB;QAC7B,CAAC,CAAC,MAAM,yBAAyB,CAAC,oBAAoB,CAAC,KAAK;QAC5D,CAAC,CAAC,MAAM,oBAAoB,EAAE,CAAC;AACnC,CAAC;AAED;;;GAGG;AACH,SAAS,yBAAyB,CAAC,oBAA4B;IAC7D,OAAO,oBAAoB,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,EAAE,CAAC,CAAC;AAClE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,yBAAyB,CAAC,QAAgB;IACxD,OAAO,oBAAoB,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,oBAAoB;IAC3B,OAAO,aAAa,CAAC;AACvB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { QraftCommandPlugin } from '@openapi-qraft/plugin/lib/QraftCommandPlugin';
2
+ export declare const plugin: QraftCommandPlugin;
3
+ export declare function openapiTypesFileNameOptionParser(value: string): string;
4
+ //# sourceMappingURL=plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAUlF,eAAO,MAAM,MAAM,EAAE,kBAmGpB,CAAC;AAEF,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,MAAM,UA0B7D"}
package/dist/plugin.js ADDED
@@ -0,0 +1,75 @@
1
+ import { fileHeader } from '@openapi-qraft/plugin/lib/fileHeader';
2
+ import { formatFileHeader } from '@openapi-qraft/plugin/lib/formatFileHeader';
3
+ import { CommanderError } from 'commander';
4
+ import { generateSchemaTypes } from './generateSchemaTypes.js';
5
+ import { createOpenapiTypesImportPath, isValidTypeScriptFileName, } from './lib/createOpenapiTypesImportPath.js';
6
+ export const plugin = {
7
+ setupCommand(command) {
8
+ command
9
+ .description('Generate TypeScript types from OpenAPI 3.x Document. Based on "openapi-typescript" (https://github.com/drwpow/openapi-typescript/)')
10
+ .option('--openapi-types-file-name <path>', 'OpenAPI Schema types file name, eg: "schema.d.ts"', openapiTypesFileNameOptionParser, 'schema.ts')
11
+ .option('--enum', 'Export true TS enums instead of unions')
12
+ .option('-t, --export-type', 'Export top-level `type` instead of `interface`')
13
+ .option('--immutable', 'Generate readonly types')
14
+ .option('--additional-properties', 'Treat schema objects as if `additionalProperties: true` is set')
15
+ .option('--empty-objects-unknown', 'Generate `unknown` instead of `Record<string, never>` for empty objects')
16
+ .option('--default-non-nullable', 'Set to `false` to ignore default values when generating non-nullable types')
17
+ .option('--properties-required-by-default', 'Treat schema objects as if `required` is set to all properties by default')
18
+ .option('--array-length', 'Generate tuples using array minItems / maxItems')
19
+ .option('--path-params-as-types', 'Convert paths to template literal types')
20
+ .option('--alphabetize', 'Sort object keys alphabetically')
21
+ .option('--exclude-deprecated', 'Exclude deprecated types')
22
+ .option('--no-blob-from-binary', 'If this option is enabled, binary format fields will not be converted to Blob types, preserving the native representation')
23
+ .action(async ({ output, args, spinner, schema }, resolve) => {
24
+ spinner.text = 'Generating OpenAPI Document Types';
25
+ const code = await generateSchemaTypes(schema, {
26
+ args,
27
+ silent: true,
28
+ });
29
+ spinner.succeed('OpenAPI Document types generated');
30
+ resolve([
31
+ {
32
+ file: new URL(args.openapiTypesFileName, output.dir),
33
+ code: formatFileHeader(args.fileHeader ?? fileHeader) + code,
34
+ },
35
+ ]);
36
+ });
37
+ },
38
+ postSetupCommand(command, plugins) {
39
+ if (!plugins.includes('tanstack-query-react'))
40
+ return;
41
+ // Makes `--openapi-types-import-path` option to be optional
42
+ command.options
43
+ .find((option) => option.attributeName() === 'openapiTypesImportPath')
44
+ ?.makeOptionMandatory(false);
45
+ // Highlight the `--export-openapi-types` option default value
46
+ command.options
47
+ .find((option) => {
48
+ return option.attributeName() === 'exportOpenapiTypes';
49
+ })
50
+ ?.default(true);
51
+ command.hook('preAction', (thisCommand) => {
52
+ // Do not override if a custom value already exists
53
+ if (!command.getOptionValue('openapiTypesImportPath')) {
54
+ thisCommand.setOptionValue('openapiTypesImportPath', createOpenapiTypesImportPath(thisCommand.getOptionValue('openapiTypesFileName'), thisCommand.getOptionValue('explicitImportExtensions')));
55
+ }
56
+ // If the option is not set, set it to true
57
+ if (command.getOptionValue('exportOpenapiTypes') === undefined) {
58
+ thisCommand.setOptionValue('exportOpenapiTypes', true);
59
+ }
60
+ });
61
+ },
62
+ };
63
+ export function openapiTypesFileNameOptionParser(value) {
64
+ if (!isValidTypeScriptFileName(value)) {
65
+ throw new CommanderError(1, 'ERR_INVALID_SCHEMA_FILE_NAME', 'OpenAPI Schema types file name must end with ".ts" or ".d.ts"');
66
+ }
67
+ if (value.includes('/') || value.includes('\\')) {
68
+ throw new CommanderError(1, 'ERR_INVALID_SCHEMA_FILE_NAME', 'OpenAPI Schema types file name must not include path');
69
+ }
70
+ if (value.startsWith('.')) {
71
+ throw new CommanderError(1, 'ERR_INVALID_SCHEMA_FILE_NAME', 'OpenAPI Schema types file name must not start with "."');
72
+ }
73
+ return value;
74
+ }
75
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAG9E,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EACL,4BAA4B,EAC5B,yBAAyB,GAC1B,MAAM,uCAAuC,CAAC;AAE/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+D,CAChE,CAAC;IACJ,CAAC;IAED,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QAChD,MAAM,IAAI,cAAc,CACtB,CAAC,EACD,8BAA8B,EAC9B,sDAAsD,CACvD,CAAC;IACJ,CAAC;IAED,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,cAAc,CACtB,CAAC,EACD,8BAA8B,EAC9B,wDAAwD,CACzD,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@openapi-qraft/openapi-typescript-plugin",
3
+ "version": "1.0.1",
4
+ "type": "module",
5
+ "scripts": {
6
+ "build": "rimraf dist/ && tsc --project tsconfig.build.json",
7
+ "dev": "yarn build --watch",
8
+ "test": "vitest run",
9
+ "typecheck": "tsc --noEmit",
10
+ "lint": "eslint"
11
+ },
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "exports": {
16
+ "./package.json": "./package.json",
17
+ ".": "./dist/index.js",
18
+ "./*": "./dist/*.js"
19
+ },
20
+ "typesVersions": {
21
+ "*": {
22
+ "*": [
23
+ "dist/*"
24
+ ]
25
+ }
26
+ },
27
+ "dependencies": {
28
+ "@openapi-qraft/plugin": "^1.9.0",
29
+ "openapi-typescript": "7.0.0-next.11",
30
+ "typescript": "^5.3.3"
31
+ },
32
+ "devDependencies": {
33
+ "@openapi-qraft/eslint-config": "~1.0.0",
34
+ "@openapi-qraft/test-fixtures": "~1.0.0",
35
+ "@types/node": "^18.19.4",
36
+ "eslint": "^9.0.0",
37
+ "memfs": "^4.9.2",
38
+ "rimraf": "^5.0.5",
39
+ "vitest": "^1.4.0"
40
+ },
41
+ "files": [
42
+ "dist",
43
+ "src",
44
+ "!dist/**/*.test.*",
45
+ "!dist/**/*.spec.*",
46
+ "!src/**/*.test.*",
47
+ "!src/**/*.spec.*"
48
+ ],
49
+ "packageManager": "yarn@4.0.2"
50
+ }