@openapi-qraft/tanstack-query-react-plugin 2.3.2 → 2.4.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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @openapi-qraft/tanstack-query-react-plugin
2
2
 
3
+ ## 2.4.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [cc314c3]
8
+ - @openapi-qraft/plugin@2.4.0
9
+
3
10
  ## 2.3.2
4
11
 
5
12
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAIlF,eAAO,MAAM,MAAM,EAAE,kBAgDpB,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAIlF,eAAO,MAAM,MAAM,EAAE,kBAkDpB,CAAC"}
package/dist/plugin.js CHANGED
@@ -5,12 +5,12 @@ import { generateCode } from './generateCode.js';
5
5
  export const plugin = {
6
6
  setupCommand(command) {
7
7
  command
8
- .description('Generate TanStack Query React client from OpenAPI Schema')
9
- .requiredOption('--openapi-types-import-path <path>', 'Path to schema types file (.d.ts), eg: "../schema.d.ts"')
8
+ .description('Generate a TanStack Query React client from OpenAPI Document')
9
+ .requiredOption('--openapi-types-import-path <path>', 'Path to schema types file (.d.ts), e.g.: "../schema.d.ts"')
10
10
  .addOption(new Option('--explicit-import-extensions [extension]', 'All import statements will contain an explicit file extension. Ideal for projects using ECMAScript modules.')
11
11
  .preset('.js')
12
12
  .choices(['.js', '.ts']))
13
- .option('--export-openapi-types [bool]', 'Export the OpenAPI schema types from the generated `./index.ts` file', (arg) => {
13
+ .option('--export-openapi-types [bool]', "Add an export statement of the generated OpenAPI document types from the `./index.ts' file. Useful for sharing types within your project.", (arg) => {
14
14
  return arg?.toLowerCase() !== 'false';
15
15
  })
16
16
  .action(async ({ spinner, output, args, services, schema }, resolve) => {
@@ -28,7 +28,7 @@ export const plugin = {
28
28
  exportSchemaTypes: args.exportOpenapiTypes,
29
29
  operationPredefinedParameters: args.operationPredefinedParameters
30
30
  ? createPredefinedParametersGlobs(schema, parseOperationPredefinedParametersOption(...args.operationPredefinedParameters))
31
- : undefined, // inherited from `--operation-predefined-parameters` option
31
+ : undefined, // This value is inherited from the `--operation-predefined-parameters` option
32
32
  },
33
33
  }).then(resolve));
34
34
  });
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EACL,+BAA+B,EAC/B,wCAAwC,GACzC,MAAM,qDAAqD,CAAC;AAG7D,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,CAAC,MAAM,MAAM,GAAuB;IACxC,YAAY,CAAC,OAAqB;QAChC,OAAO;aACJ,WAAW,CAAC,0DAA0D,CAAC;aACvE,cAAc,CACb,oCAAoC,EACpC,yDAAyD,CAC1D;aACA,SAAS,CACR,IAAI,MAAM,CACR,0CAA0C,EAC1C,6GAA6G,CAC9G;aACE,MAAM,CAAC,KAAK,CAAC;aACb,OAAO,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAC3B;aACA,MAAM,CACL,+BAA+B,EAC/B,sEAAsE,EACtE,CAAC,GAAG,EAAE,EAAE;YACN,OAAO,GAAG,EAAE,WAAW,EAAE,KAAK,OAAO,CAAC;QACxC,CAAC,CACF;aACA,MAAM,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EA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CAC3B;aACA,MAAM,CACL,+BAA+B,EAC/B,2IAA2I,EAC3I,CAAC,GAAG,EAAE,EAAE;YACN,OAAO,GAAG,EAAE,WAAW,EAAE,KAAK,OAAO,CAAC;QACxC,CAAC,CACF;aACA,MAAM,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE;YACrE,OAAO,KAAK,CAAC,MAAM,YAAY,CAAC;gBAC9B,OAAO;gBACP,QAAQ;gBACR,cAAc,EAAE;oBACd,sBAAsB,EAAE,IAAI,CAAC,sBAAsB;iBACpD;gBACD,MAAM,EAAE;oBACN,GAAG,MAAM;oBACT,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,UAAU;oBACzC,wBAAwB,EAAE,IAAI,CAAC,wBAAwB;oBACvD,eAAe,EAAE,UAAU;oBAC3B,iBAAiB,EAAE,IAAI,CAAC,kBAAkB;oBAC1C,6BAA6B,EAAE,IAAI,CAAC,6BAA6B;wBAC/D,CAAC,CAAC,+BAA+B,CAC7B,MAAM,EACN,wCAAwC,CACtC,GAAG,IAAI,CAAC,6BAA6B,CACtC,CACF;wBACH,CAAC,CAAC,SAAS,EAAE,8EAA8E;iBAC9F;aACF,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QACpB,CAAC,CAAC,CAAC;IACP,CAAC;CACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openapi-qraft/tanstack-query-react-plugin",
3
- "version": "2.3.2",
3
+ "version": "2.4.0",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "tsc --project tsconfig.build.json",
@@ -35,12 +35,12 @@
35
35
  }
36
36
  },
37
37
  "dependencies": {
38
- "@openapi-qraft/plugin": "^2.3.2",
38
+ "@openapi-qraft/plugin": "^2.4.0",
39
39
  "typescript": "^5.6.2"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@openapi-qraft/eslint-config": "1.0.1",
43
- "@openapi-qraft/tanstack-query-react-types": "2.3.2",
43
+ "@openapi-qraft/tanstack-query-react-types": "2.4.0",
44
44
  "@openapi-qraft/test-fixtures": "1.0.1",
45
45
  "@openapi-qraft/ts-factory-code-generator": "1.0.2",
46
46
  "camelcase": "^8.0.0",
package/src/plugin.ts CHANGED
@@ -11,10 +11,12 @@ import { generateCode } from './generateCode.js';
11
11
  export const plugin: QraftCommandPlugin = {
12
12
  setupCommand(command: QraftCommand) {
13
13
  command
14
- .description('Generate TanStack Query React client from OpenAPI Schema')
14
+ .description(
15
+ 'Generate a TanStack Query React client from OpenAPI Document'
16
+ )
15
17
  .requiredOption(
16
18
  '--openapi-types-import-path <path>',
17
- 'Path to schema types file (.d.ts), eg: "../schema.d.ts"'
19
+ 'Path to schema types file (.d.ts), e.g.: "../schema.d.ts"'
18
20
  )
19
21
  .addOption(
20
22
  new Option(
@@ -26,7 +28,7 @@ export const plugin: QraftCommandPlugin = {
26
28
  )
27
29
  .option(
28
30
  '--export-openapi-types [bool]',
29
- 'Export the OpenAPI schema types from the generated `./index.ts` file',
31
+ "Add an export statement of the generated OpenAPI document types from the `./index.ts' file. Useful for sharing types within your project.",
30
32
  (arg) => {
31
33
  return arg?.toLowerCase() !== 'false';
32
34
  }
@@ -51,7 +53,7 @@ export const plugin: QraftCommandPlugin = {
51
53
  ...args.operationPredefinedParameters
52
54
  )
53
55
  )
54
- : undefined, // inherited from `--operation-predefined-parameters` option
56
+ : undefined, // This value is inherited from the `--operation-predefined-parameters` option
55
57
  },
56
58
  }).then(resolve));
57
59
  });