@openapi-qraft/tanstack-query-react-plugin 1.12.0 → 1.12.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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # @openapi-qraft/tanstack-query-react-plugin
2
2
 
3
+ ## 1.12.1
4
+
5
+ ### Patch Changes
6
+
7
+ - eea0b30: Fixes the issue where enums were exported only as types, preventing their use as values.
8
+ - @openapi-qraft/plugin@1.12.1
9
+
10
+ ## 1.12.1-beta.0
11
+
12
+ ### Patch Changes
13
+
14
+ - eea0b30: Fixes the issue where enums were exported only as types, preventing their use as values.
15
+ - @openapi-qraft/plugin@1.12.1-beta.0
16
+
3
17
  ## 1.12.0
4
18
 
5
19
  ### Minor Changes
@@ -5,8 +5,8 @@ export declare const getIndexFactory: ({ openapiTypesImportPath, servicesDirName
5
5
  explicitImportExtensions: boolean;
6
6
  } & Partial<Pick<ServiceImportsFactoryOptions, "openapiTypesImportPath">>) => ts.ExportDeclaration[];
7
7
  /**
8
- * Resolve the import path if it's a relative path.
9
- * Normally,`openapiTypesImportPath` is a relative path to services directory.
8
+ * Prepend the import path if it's a relative path.
9
+ * Normally,`openapiTypesImportPath` is a relative path to the services' directory.
10
10
  */
11
11
  export declare function maybeResolveImport<T extends string | undefined>({ openapiTypesImportPath, servicesDirName, }: {
12
12
  openapiTypesImportPath: T;
@@ -5,7 +5,7 @@ export const getIndexFactory = ({ openapiTypesImportPath, servicesDirName, expli
5
5
  return [
6
6
  ...(openapiTypesImportPath
7
7
  ? [
8
- factory.createExportDeclaration(undefined, true, undefined, factory.createStringLiteral(maybeResolveImport({ openapiTypesImportPath, servicesDirName })), undefined),
8
+ factory.createExportDeclaration(undefined, openapiTypesImportPath.endsWith('.d.ts'), undefined, factory.createStringLiteral(maybeResolveImport({ openapiTypesImportPath, servicesDirName })), undefined),
9
9
  ]
10
10
  : []),
11
11
  factory.createExportDeclaration(undefined, false, factory.createNamedExports([
@@ -20,8 +20,8 @@ export const getIndexFactory = ({ openapiTypesImportPath, servicesDirName, expli
20
20
  ];
21
21
  };
22
22
  /**
23
- * Resolve the import path if it's a relative path.
24
- * Normally,`openapiTypesImportPath` is a relative path to services directory.
23
+ * Prepend the import path if it's a relative path.
24
+ * Normally,`openapiTypesImportPath` is a relative path to the services' directory.
25
25
  */
26
26
  export function maybeResolveImport({ openapiTypesImportPath, servicesDirName, }) {
27
27
  if (openapiTypesImportPath?.startsWith('../')) {
@@ -1 +1 @@
1
- {"version":3,"file":"getIndexFactory.js","sourceRoot":"","sources":["../../src/ts-factory/getIndexFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAI5B,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC9B,sBAAsB,EACtB,eAAe,EACf,wBAAwB,GAI+C,EAAE,EAAE;IAC3E,MAAM,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC;IAC3B,MAAM,eAAe,GAAG,wBAAwB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;IAE9D,OAAO;QACL,GAAG,CAAC,sBAAsB;YACxB,CAAC,CAAC;gBACE,OAAO,CAAC,uBAAuB,CAC7B,SAAS,EACT,IAAI,EACJ,SAAS,EACT,OAAO,CAAC,mBAAmB,CACzB,kBAAkB,CAAC,EAAE,sBAAsB,EAAE,eAAe,EAAE,CAAC,CAChE,EACD,SAAS,CACV;aACF;YACH,CAAC,CAAC,EAAE,CAAC;QACP,OAAO,CAAC,uBAAuB,CAC7B,SAAS,EACT,KAAK,EACL,OAAO,CAAC,kBAAkB,CAAC;YACzB,OAAO,CAAC,qBAAqB,CAC3B,KAAK,EACL,SAAS,EACT,OAAO,CAAC,gBAAgB,CAAC,UAAU,CAAC,CACrC;SACF,CAAC,EACF,OAAO,CAAC,mBAAmB,CACzB,KAAK,eAAe,SAAS,eAAe,EAAE,CAC/C,EACD,SAAS,CACV;QACD,OAA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F,CAAC;AACJ,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAA+B,EAC/D,sBAAsB,EACtB,eAAe,GAIhB;IACC,IAAI,sBAAsB,EAAE,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QAC9C,OAAO,KAAK,sBAAsB,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;IAChD,CAAC;SAAM,IAAI,sBAAsB,EAAE,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACpD,OAAO,KAAK,eAAe,IAAI,sBAAsB,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;IACnE,CAAC;IAED,OAAO,sBAAsB,CAAC;AAChC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openapi-qraft/tanstack-query-react-plugin",
3
- "version": "1.12.0",
3
+ "version": "1.12.1",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "tsc --project tsconfig.build.json",
@@ -26,7 +26,7 @@
26
26
  }
27
27
  },
28
28
  "dependencies": {
29
- "@openapi-qraft/plugin": "^1.12.0",
29
+ "@openapi-qraft/plugin": "^1.12.1",
30
30
  "typescript": "^5.3.3"
31
31
  },
32
32
  "devDependencies": {
@@ -18,7 +18,7 @@ export const getIndexFactory = ({
18
18
  ? [
19
19
  factory.createExportDeclaration(
20
20
  undefined,
21
- true,
21
+ openapiTypesImportPath.endsWith('.d.ts'),
22
22
  undefined,
23
23
  factory.createStringLiteral(
24
24
  maybeResolveImport({ openapiTypesImportPath, servicesDirName })
@@ -74,8 +74,8 @@ export const getIndexFactory = ({
74
74
  };
75
75
 
76
76
  /**
77
- * Resolve the import path if it's a relative path.
78
- * Normally,`openapiTypesImportPath` is a relative path to services directory.
77
+ * Prepend the import path if it's a relative path.
78
+ * Normally,`openapiTypesImportPath` is a relative path to the services' directory.
79
79
  */
80
80
  export function maybeResolveImport<T extends string | undefined>({
81
81
  openapiTypesImportPath,