mobx-tanstack-query-api 0.19.1 → 0.21.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.
Files changed (132) hide show
  1. package/builtin/index.cjs +4 -5
  2. package/builtin/index.d.cts +1 -2
  3. package/builtin/index.d.cts.map +1 -1
  4. package/builtin/index.d.ts +1 -2
  5. package/builtin/index.d.ts.map +1 -1
  6. package/builtin/index.js +1 -2
  7. package/cli/utils/define-config.d.cts +1 -1
  8. package/cli/utils/define-config.d.cts.map +1 -1
  9. package/cli/utils/define-config.d.ts +1 -1
  10. package/cli/utils/define-config.d.ts.map +1 -1
  11. package/codegen/index.cjs +28 -43
  12. package/codegen/index.d.cts +1 -165
  13. package/codegen/index.d.cts.map +1 -1
  14. package/codegen/index.d.ts +1 -165
  15. package/codegen/index.d.ts.map +1 -1
  16. package/codegen/index.js +29 -44
  17. package/codegen/templates/all-endpoints-per-file.tmpl.cjs +8 -13
  18. package/codegen/templates/all-endpoints-per-file.tmpl.d.cts +5 -10
  19. package/codegen/templates/all-endpoints-per-file.tmpl.d.cts.map +1 -1
  20. package/codegen/templates/all-endpoints-per-file.tmpl.d.ts +5 -10
  21. package/codegen/templates/all-endpoints-per-file.tmpl.d.ts.map +1 -1
  22. package/codegen/templates/all-endpoints-per-file.tmpl.js +8 -13
  23. package/codegen/templates/all-exports.tmpl.d.cts +2 -4
  24. package/codegen/templates/all-exports.tmpl.d.cts.map +1 -1
  25. package/codegen/templates/all-exports.tmpl.d.ts +2 -4
  26. package/codegen/templates/all-exports.tmpl.d.ts.map +1 -1
  27. package/codegen/templates/data-contract.tmpl.d.cts +2 -2
  28. package/codegen/templates/data-contract.tmpl.d.cts.map +1 -1
  29. package/codegen/templates/data-contract.tmpl.d.ts +2 -2
  30. package/codegen/templates/data-contract.tmpl.d.ts.map +1 -1
  31. package/codegen/templates/data-contracts-file.tmpl.cjs +5 -5
  32. package/codegen/templates/data-contracts-file.tmpl.d.cts +3 -7
  33. package/codegen/templates/data-contracts-file.tmpl.d.cts.map +1 -1
  34. package/codegen/templates/data-contracts-file.tmpl.d.ts +3 -7
  35. package/codegen/templates/data-contracts-file.tmpl.d.ts.map +1 -1
  36. package/codegen/templates/data-contracts-file.tmpl.js +5 -5
  37. package/codegen/templates/endpoint-jsdoc.tmpl.cjs +2 -1
  38. package/codegen/templates/endpoint-jsdoc.tmpl.d.cts +3 -5
  39. package/codegen/templates/endpoint-jsdoc.tmpl.d.cts.map +1 -1
  40. package/codegen/templates/endpoint-jsdoc.tmpl.d.ts +3 -5
  41. package/codegen/templates/endpoint-jsdoc.tmpl.d.ts.map +1 -1
  42. package/codegen/templates/endpoint-jsdoc.tmpl.js +2 -1
  43. package/codegen/templates/endpoint-per-file.tmpl.cjs +8 -11
  44. package/codegen/templates/endpoint-per-file.tmpl.d.cts +4 -9
  45. package/codegen/templates/endpoint-per-file.tmpl.d.cts.map +1 -1
  46. package/codegen/templates/endpoint-per-file.tmpl.d.ts +4 -9
  47. package/codegen/templates/endpoint-per-file.tmpl.d.ts.map +1 -1
  48. package/codegen/templates/endpoint-per-file.tmpl.js +8 -11
  49. package/codegen/templates/index-ts-for-endpoint-per-file.tmpl.d.cts +2 -6
  50. package/codegen/templates/index-ts-for-endpoint-per-file.tmpl.d.cts.map +1 -1
  51. package/codegen/templates/index-ts-for-endpoint-per-file.tmpl.d.ts +2 -6
  52. package/codegen/templates/index-ts-for-endpoint-per-file.tmpl.d.ts.map +1 -1
  53. package/codegen/templates/meta-info.tmpl.d.cts +2 -5
  54. package/codegen/templates/meta-info.tmpl.d.cts.map +1 -1
  55. package/codegen/templates/meta-info.tmpl.d.ts +2 -5
  56. package/codegen/templates/meta-info.tmpl.d.ts.map +1 -1
  57. package/codegen/templates/new-endpoint.tmpl.cjs +5 -5
  58. package/codegen/templates/new-endpoint.tmpl.d.cts +4 -7
  59. package/codegen/templates/new-endpoint.tmpl.d.cts.map +1 -1
  60. package/codegen/templates/new-endpoint.tmpl.d.ts +4 -7
  61. package/codegen/templates/new-endpoint.tmpl.d.ts.map +1 -1
  62. package/codegen/templates/new-endpoint.tmpl.js +5 -5
  63. package/codegen/types/all-import-file-params.cjs +2 -0
  64. package/codegen/types/all-import-file-params.d.cts +5 -0
  65. package/codegen/types/all-import-file-params.d.cts.map +1 -0
  66. package/codegen/types/all-import-file-params.d.ts +5 -0
  67. package/codegen/types/all-import-file-params.d.ts.map +1 -0
  68. package/codegen/types/all-import-file-params.js +1 -0
  69. package/codegen/types/base-tmpl-params.cjs +2 -0
  70. package/codegen/types/base-tmpl-params.d.cts +14 -0
  71. package/codegen/types/base-tmpl-params.d.cts.map +1 -0
  72. package/codegen/types/base-tmpl-params.d.ts +14 -0
  73. package/codegen/types/base-tmpl-params.d.ts.map +1 -0
  74. package/codegen/types/base-tmpl-params.js +1 -0
  75. package/codegen/types/codegen-data-utils.cjs +2 -0
  76. package/codegen/types/codegen-data-utils.d.cts +8 -0
  77. package/codegen/types/codegen-data-utils.d.cts.map +1 -0
  78. package/codegen/types/codegen-data-utils.d.ts +8 -0
  79. package/codegen/types/codegen-data-utils.d.ts.map +1 -0
  80. package/codegen/types/codegen-data-utils.js +1 -0
  81. package/codegen/types/endpoint-data.cjs +2 -0
  82. package/codegen/types/endpoint-data.d.cts +3 -0
  83. package/codegen/types/endpoint-data.d.cts.map +1 -0
  84. package/codegen/types/endpoint-data.d.ts +3 -0
  85. package/codegen/types/endpoint-data.d.ts.map +1 -0
  86. package/codegen/types/endpoint-data.js +1 -0
  87. package/codegen/types/generate-query-api-params.cjs +2 -0
  88. package/codegen/types/generate-query-api-params.d.cts +149 -0
  89. package/codegen/types/generate-query-api-params.d.cts.map +1 -0
  90. package/codegen/types/generate-query-api-params.d.ts +149 -0
  91. package/codegen/types/generate-query-api-params.d.ts.map +1 -0
  92. package/codegen/types/generate-query-api-params.js +1 -0
  93. package/codegen/types/import-file-params.cjs +2 -0
  94. package/codegen/types/import-file-params.d.cts +5 -0
  95. package/codegen/types/import-file-params.d.cts.map +1 -0
  96. package/codegen/types/import-file-params.d.ts +5 -0
  97. package/codegen/types/import-file-params.d.ts.map +1 -0
  98. package/codegen/types/import-file-params.js +1 -0
  99. package/codegen/types/index.cjs +23 -0
  100. package/codegen/types/index.d.cts +8 -0
  101. package/codegen/types/index.d.cts.map +1 -0
  102. package/codegen/types/index.d.ts +8 -0
  103. package/codegen/types/index.d.ts.map +1 -0
  104. package/codegen/types/index.js +7 -0
  105. package/codegen/types/meta-info.cjs +2 -0
  106. package/codegen/types/meta-info.d.cts +6 -0
  107. package/codegen/types/meta-info.d.cts.map +1 -0
  108. package/codegen/types/meta-info.d.ts +6 -0
  109. package/codegen/types/meta-info.d.ts.map +1 -0
  110. package/codegen/types/meta-info.js +1 -0
  111. package/codegen/utils/remove-unused-types.d.cts +1 -1
  112. package/codegen/utils/remove-unused-types.d.cts.map +1 -1
  113. package/codegen/utils/remove-unused-types.d.ts +1 -1
  114. package/codegen/utils/remove-unused-types.d.ts.map +1 -1
  115. package/codegen/utils/remove-unused-types.js +1 -1
  116. package/codegen/utils/unpack-filter-option.d.cts +1 -1
  117. package/codegen/utils/unpack-filter-option.d.cts.map +1 -1
  118. package/codegen/utils/unpack-filter-option.d.ts +1 -1
  119. package/codegen/utils/unpack-filter-option.d.ts.map +1 -1
  120. package/package.json +2 -2
  121. package/runtime/endpoint-mutation.d.cts +2 -0
  122. package/runtime/endpoint-mutation.d.cts.map +1 -1
  123. package/runtime/endpoint-mutation.d.ts +2 -0
  124. package/runtime/endpoint-mutation.d.ts.map +1 -1
  125. package/runtime/endpoint-query.types.d.cts +4 -1
  126. package/runtime/endpoint-query.types.d.cts.map +1 -1
  127. package/runtime/endpoint-query.types.d.ts +4 -1
  128. package/runtime/endpoint-query.types.d.ts.map +1 -1
  129. package/runtime/endpoint.types.d.cts +1 -0
  130. package/runtime/endpoint.types.d.cts.map +1 -1
  131. package/runtime/endpoint.types.d.ts +1 -0
  132. package/runtime/endpoint.types.d.ts.map +1 -1
package/builtin/index.cjs CHANGED
@@ -1,10 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.http = exports.queryClient = void 0;
4
- const endpoint_query_client_js_1 = require("../runtime/endpoint-query-client.cjs");
5
- const http_client_js_1 = require("../runtime/http-client.cjs");
4
+ const index_js_1 = require("../runtime/index.cjs");
6
5
  const MAX_FAILURE_COUNT = 3;
7
- exports.queryClient = new endpoint_query_client_js_1.EndpointQueryClient({
6
+ exports.queryClient = new index_js_1.EndpointQueryClient({
8
7
  defaultOptions: {
9
8
  queries: {
10
9
  throwOnError: true,
@@ -12,7 +11,7 @@ exports.queryClient = new endpoint_query_client_js_1.EndpointQueryClient({
12
11
  refetchOnReconnect: true,
13
12
  staleTime: 5 * 60 * 1000,
14
13
  retry: (failureCount, error) => {
15
- if ((0, http_client_js_1.isHttpBadResponse)(error) && error.status >= 500) {
14
+ if ((0, index_js_1.isHttpBadResponse)(error) && error.status >= 500) {
16
15
  return MAX_FAILURE_COUNT - failureCount > 0;
17
16
  }
18
17
  return false;
@@ -23,4 +22,4 @@ exports.queryClient = new endpoint_query_client_js_1.EndpointQueryClient({
23
22
  },
24
23
  },
25
24
  });
26
- exports.http = new http_client_js_1.HttpClient({});
25
+ exports.http = new index_js_1.HttpClient({});
@@ -1,5 +1,4 @@
1
- import { EndpointQueryClient } from "../runtime/endpoint-query-client.cjs";
2
- import { HttpClient } from "../runtime/http-client.cjs";
1
+ import { EndpointQueryClient, HttpClient } from "../runtime/index.cjs";
3
2
  export declare const queryClient: EndpointQueryClient;
4
3
  export declare const http: HttpClient<unknown>;
5
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/builtin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,6CAA4C;AAC1E,OAAO,EAAE,UAAU,EAAqB,mCAAkC;AAI1E,eAAO,MAAM,WAAW,qBAkBtB,CAAC;AAEH,eAAO,MAAM,IAAI,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/builtin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,UAAU,EAEX,6BAA4B;AAI7B,eAAO,MAAM,WAAW,qBAkBtB,CAAC;AAEH,eAAO,MAAM,IAAI,qBAAqB,CAAC"}
@@ -1,5 +1,4 @@
1
- import { EndpointQueryClient } from "../runtime/endpoint-query-client.js";
2
- import { HttpClient } from "../runtime/http-client.js";
1
+ import { EndpointQueryClient, HttpClient } from "../runtime/index.js";
3
2
  export declare const queryClient: EndpointQueryClient;
4
3
  export declare const http: HttpClient<unknown>;
5
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/builtin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,4CAA4C;AAC1E,OAAO,EAAE,UAAU,EAAqB,kCAAkC;AAI1E,eAAO,MAAM,WAAW,qBAkBtB,CAAC;AAEH,eAAO,MAAM,IAAI,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/builtin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,UAAU,EAEX,4BAA4B;AAI7B,eAAO,MAAM,WAAW,qBAkBtB,CAAC;AAEH,eAAO,MAAM,IAAI,qBAAqB,CAAC"}
package/builtin/index.js CHANGED
@@ -1,5 +1,4 @@
1
- import { EndpointQueryClient } from "../runtime/endpoint-query-client.js";
2
- import { HttpClient, isHttpBadResponse } from "../runtime/http-client.js";
1
+ import { EndpointQueryClient, HttpClient, isHttpBadResponse, } from "../runtime/index.js";
3
2
  const MAX_FAILURE_COUNT = 3;
4
3
  export const queryClient = new EndpointQueryClient({
5
4
  defaultOptions: {
@@ -1,4 +1,4 @@
1
1
  import type { Maybe } from 'yummies/utils/types';
2
- import type { GenerateQueryApiParams } from "../../codegen/index.cjs";
2
+ import type { GenerateQueryApiParams } from "../../codegen/types/index.cjs";
3
3
  export declare const defineConfig: (...configs: Maybe<GenerateQueryApiParams | GenerateQueryApiParams[]>[]) => GenerateQueryApiParams[];
4
4
  //# sourceMappingURL=define-config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"define-config.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/define-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,gCAA+B;AAErE,eAAO,MAAM,YAAY,GACvB,GAAG,SAAS,KAAK,CAAC,sBAAsB,GAAG,sBAAsB,EAAE,CAAC,EAAE,KACrE,sBAAsB,EAIxB,CAAC"}
1
+ {"version":3,"file":"define-config.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/define-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,sCAAqC;AAE3E,eAAO,MAAM,YAAY,GACvB,GAAG,SAAS,KAAK,CAAC,sBAAsB,GAAG,sBAAsB,EAAE,CAAC,EAAE,KACrE,sBAAsB,EAIxB,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import type { Maybe } from 'yummies/utils/types';
2
- import type { GenerateQueryApiParams } from "../../codegen/index.js";
2
+ import type { GenerateQueryApiParams } from "../../codegen/types/index.js";
3
3
  export declare const defineConfig: (...configs: Maybe<GenerateQueryApiParams | GenerateQueryApiParams[]>[]) => GenerateQueryApiParams[];
4
4
  //# sourceMappingURL=define-config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"define-config.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/define-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,+BAA+B;AAErE,eAAO,MAAM,YAAY,GACvB,GAAG,SAAS,KAAK,CAAC,sBAAsB,GAAG,sBAAsB,EAAE,CAAC,EAAE,KACrE,sBAAsB,EAIxB,CAAC"}
1
+ {"version":3,"file":"define-config.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/define-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,qCAAqC;AAE3E,eAAO,MAAM,YAAY,GACvB,GAAG,SAAS,KAAK,CAAC,sBAAsB,GAAG,sBAAsB,EAAE,CAAC,EAAE,KACrE,sBAAsB,EAIxB,CAAC"}
package/codegen/index.cjs CHANGED
@@ -21,7 +21,9 @@ const __dirname = node_path_1.default.dirname(__filename);
21
21
  const __execdirname = process.cwd();
22
22
  const generateApi = async (params) => {
23
23
  if (Array.isArray(params)) {
24
- await Promise.all(params.map((param) => (0, exports.generateApi)(param)));
24
+ for await (const param of params) {
25
+ await (0, exports.generateApi)(param);
26
+ }
25
27
  return;
26
28
  }
27
29
  const tsconfigPath = params.tsconfigPath
@@ -56,9 +58,9 @@ const generateApi = async (params) => {
56
58
  outputDir: node_path_1.default.resolve(process.cwd(), params.output),
57
59
  };
58
60
  //#region swagger-typescript-api
59
- const codegenParams = {
61
+ const swaggerTypescriptApiCodegenBaseParams = {
60
62
  httpClientType: 'fetch',
61
- cleanOutput: true,
63
+ cleanOutput: params.cleanOutput ?? true,
62
64
  modular: true,
63
65
  patch: true,
64
66
  typeSuffix: 'DC',
@@ -99,7 +101,7 @@ const generateApi = async (params) => {
99
101
  inputData.spec = params.input;
100
102
  }
101
103
  const generated = await (0, swagger_typescript_api_1.generateApi)({
102
- ...codegenParams,
104
+ ...swaggerTypescriptApiCodegenBaseParams,
103
105
  ...inputData,
104
106
  hooks: {
105
107
  onInit: (configuration, codeGenProcessFromInit) => {
@@ -112,13 +114,13 @@ const generateApi = async (params) => {
112
114
  configuration.swaggerSchema.components.schemas =
113
115
  // @ts-expect-error
114
116
  configuration.swaggerSchema.components.schemas || {};
115
- return codegenParams?.hooks?.onInit?.(configuration, codeGenProcessFromInit);
117
+ return swaggerTypescriptApiCodegenBaseParams?.hooks?.onInit?.(configuration, codeGenProcessFromInit);
116
118
  },
117
119
  onPrepareConfig: (config) => {
118
120
  config.routes.combined?.forEach((routeInfo) => {
119
121
  routeInfo.routes.sort((routeA, routeB) => routeA.routeName.usage.localeCompare(routeB.routeName.usage));
120
122
  });
121
- return codegenParams?.hooks?.onPrepareConfig?.(config);
123
+ return swaggerTypescriptApiCodegenBaseParams?.hooks?.onPrepareConfig?.(config);
122
124
  },
123
125
  onFormatRouteName: (routeInfo, usageRouteName) => {
124
126
  let formattedRouteName = usageRouteName;
@@ -134,7 +136,7 @@ const generateApi = async (params) => {
134
136
  }
135
137
  const endpointName = formattedRouteName;
136
138
  return (params?.formatEndpointName?.(endpointName, routeInfo) ??
137
- codegenParams?.hooks?.onFormatRouteName?.(routeInfo, endpointName) ??
139
+ swaggerTypescriptApiCodegenBaseParams?.hooks?.onFormatRouteName?.(routeInfo, endpointName) ??
138
140
  endpointName);
139
141
  },
140
142
  },
@@ -142,6 +144,15 @@ const generateApi = async (params) => {
142
144
  //#endregion
143
145
  const utils = codegenProcess.getRenderTemplateData()
144
146
  .utils;
147
+ const baseTmplParams = {
148
+ ...generated,
149
+ codegenParams: params,
150
+ configuration: generated.configuration,
151
+ formatTSContent: generated.formatTSContent,
152
+ codegenProcess,
153
+ importFileParams,
154
+ utils,
155
+ };
145
156
  const { _ } = utils;
146
157
  let namespace = null;
147
158
  if (params.namespace) {
@@ -172,12 +183,8 @@ const generateApi = async (params) => {
172
183
  const fileNamesWithRequestInfo = [];
173
184
  for await (const route of allRoutes) {
174
185
  const { content: requestInfoPerFileContent, reservedDataContractNames, } = await (0, endpoint_per_file_tmpl_js_1.endpointPerFileTmpl)({
175
- ...generated,
186
+ ...baseTmplParams,
176
187
  route,
177
- apiParams: params,
178
- codegenProcess,
179
- importFileParams,
180
- utils,
181
188
  relativePathDataContracts: '../data-contracts',
182
189
  groupName: null,
183
190
  metaInfo: {
@@ -210,9 +217,7 @@ const generateApi = async (params) => {
210
217
  fileName: 'index.ts',
211
218
  withPrefix: false,
212
219
  content: await (0, index_ts_for_endpoint_per_file_tmpl_js_1.indexTsForEndpointPerFileTmpl)({
213
- ...generated,
214
- apiParams: params,
215
- codegenProcess,
220
+ ...baseTmplParams,
216
221
  generatedRequestFileNames: fileNamesWithRequestInfo,
217
222
  }),
218
223
  });
@@ -221,12 +226,8 @@ const generateApi = async (params) => {
221
226
  else {
222
227
  // #region кодогенерация несколько эндпоинтов в 1 файле без группировки
223
228
  const { content: requestInfoPerFileContent, reservedDataContractNames } = await (0, all_endpoints_per_file_tmpl_js_1.allEndpointPerFileTmpl)({
224
- ...generated,
229
+ ...baseTmplParams,
225
230
  routes: allRoutes,
226
- apiParams: params,
227
- codegenProcess,
228
- importFileParams,
229
- utils,
230
231
  relativePathDataContracts: './data-contracts',
231
232
  groupName: null,
232
233
  metaInfo: {
@@ -299,12 +300,8 @@ const generateApi = async (params) => {
299
300
  codegenFs.createDir(node_path_1.default.resolve(groupDirectory, 'endpoints'));
300
301
  for await (const route of routes) {
301
302
  const { content: requestInfoPerFileContent, reservedDataContractNames, } = await (0, endpoint_per_file_tmpl_js_1.endpointPerFileTmpl)({
302
- ...generated,
303
+ ...baseTmplParams,
303
304
  route,
304
- apiParams: params,
305
- codegenProcess,
306
- importFileParams,
307
- utils,
308
305
  relativePathDataContracts: '../../data-contracts',
309
306
  groupName,
310
307
  metaInfo: {
@@ -338,12 +335,8 @@ const generateApi = async (params) => {
338
335
  else {
339
336
  // #region Генерация нескольких эндпоинтов на 1 файл
340
337
  const { content: requestInfoPerFileContent, reservedDataContractNames, } = await (0, all_endpoints_per_file_tmpl_js_1.allEndpointPerFileTmpl)({
341
- ...generated,
338
+ ...baseTmplParams,
342
339
  routes,
343
- apiParams: params,
344
- codegenProcess,
345
- importFileParams,
346
- utils,
347
340
  relativePathDataContracts: '../data-contracts',
348
341
  groupName,
349
342
  metaInfo: {
@@ -394,9 +387,7 @@ export * as ${exportGroupName} from './endpoints';
394
387
  fileName: 'index.ts',
395
388
  withPrefix: false,
396
389
  content: await (0, index_ts_for_endpoint_per_file_tmpl_js_1.indexTsForEndpointPerFileTmpl)({
397
- ...generated,
398
- apiParams: params,
399
- codegenProcess,
390
+ ...baseTmplParams,
400
391
  generatedRequestFileNames: fileNamesWithRequestInfo,
401
392
  }),
402
393
  });
@@ -420,9 +411,7 @@ export * as ${exportGroupName} from './endpoints';
420
411
  .filter(([_, count]) => count === 1)
421
412
  .map(([name]) => name);
422
413
  const dataContractsContent = await (0, data_contracts_file_tmpl_js_1.dataContractsFileTmpl)({
423
- ...generated,
424
- apiParams: params,
425
- codegenProcess,
414
+ ...baseTmplParams,
426
415
  excludedDataContractNames,
427
416
  });
428
417
  codegenFs.createFile({
@@ -436,10 +425,8 @@ export * as ${exportGroupName} from './endpoints';
436
425
  fileName: 'meta-info.ts',
437
426
  withPrefix: false,
438
427
  content: await (0, meta_info_tmpl_js_1.metaInfoTmpl)({
439
- ...generated,
428
+ ...baseTmplParams,
440
429
  metaInfo,
441
- utils,
442
- codegenParams: params,
443
430
  }),
444
431
  });
445
432
  if (namespace) {
@@ -448,10 +435,9 @@ export * as ${exportGroupName} from './endpoints';
448
435
  fileName: '__exports.ts',
449
436
  withPrefix: false,
450
437
  content: await (0, all_exports_tmpl_js_1.allExportsTmpl)({
451
- ...generated,
438
+ ...baseTmplParams,
452
439
  collectedExportFiles: collectedExportFilesFromIndexFile,
453
440
  metaInfo,
454
- utils,
455
441
  }),
456
442
  });
457
443
  codegenFs.createFile({
@@ -469,10 +455,9 @@ export * as ${namespace} from './__exports';
469
455
  fileName: 'index.ts',
470
456
  withPrefix: false,
471
457
  content: await (0, all_exports_tmpl_js_1.allExportsTmpl)({
472
- ...generated,
458
+ ...baseTmplParams,
473
459
  collectedExportFiles: collectedExportFilesFromIndexFile,
474
460
  metaInfo,
475
- utils,
476
461
  }),
477
462
  });
478
463
  }
@@ -1,167 +1,3 @@
1
- import type { LoDashStatic } from 'lodash';
2
- import { type ParsedRoute, type RawRouteInfo } from 'swagger-typescript-api';
3
- import type { RequestInit } from 'undici-types';
4
- import type { AnyObject, KeyOfByValue, Maybe } from 'yummies/utils/types';
5
- import { type RemoveUnusedTypesParams } from "./utils/remove-unused-types.cjs";
6
- export type CodegenDataUtils = {
7
- _: LoDashStatic;
8
- getInlineParseContent: (requestParams: AnyObject) => string;
9
- formatModelName: (modelName: string) => string;
10
- };
11
- export type EndpointData = ParsedRoute;
12
- export type FilterOption<T extends (...args: any[]) => boolean> = T | string | RegExp | (RegExp | string)[];
13
- type FilterEndpointsOption = FilterOption<(endpoint: EndpointData) => boolean>;
14
- type FilterGroupsOption = FilterOption<(groupName: string) => boolean>;
15
- export type CodegenProcess = AnyObject;
16
- export interface ImportFileParams {
17
- path: string;
18
- exportName: string;
19
- }
20
- export interface MetaInfo {
21
- namespace: string | null;
22
- groupNames: string[];
23
- tags?: string[];
24
- }
25
- export interface GenerateQueryApiParams {
26
- /**
27
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#output)
28
- */
29
- output: string;
30
- /**
31
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#input)
32
- */
33
- input: string | AnyObject;
34
- /**
35
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#requestpathprefix)
36
- */
37
- requestPathPrefix?: string;
38
- /**
39
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#requestpathsuffix)
40
- */
41
- requestPathSuffix?: string;
42
- /**
43
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#removeunusedtypes)
44
- */
45
- removeUnusedTypes?: true | {
46
- keepTypes?: RemoveUnusedTypesParams['keepTypes'];
47
- };
48
- /**
49
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#formatendpointname)
50
- */
51
- formatEndpointName?: (endpointName: string, endpointData: RawRouteInfo) => Maybe<string>;
52
- /**
53
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#formatexportgroupname)
54
- */
55
- formatExportGroupName?: (groupName: string, utils: CodegenDataUtils) => string;
56
- /**
57
- * Various generation output types
58
- *
59
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#outputtype)
60
- *
61
- * `one-endpoint-per-file`
62
- * @example
63
- * ```
64
- * outputdir
65
- * groupname
66
- * index.ts
67
- * endpoints
68
- * index.ts
69
- * get-endpoint-1.ts
70
- * get-endpoint-n.ts
71
- * ```
72
- * @example
73
- * ```
74
- * outputdir
75
- * index.ts
76
- * endpoints
77
- * index.ts
78
- * get-endpoint-1.ts
79
- * get-endpoint-n.ts
80
- * ```
81
- *
82
- * `endpoints-per-file`
83
- * @example
84
- * ```
85
- * outputdir
86
- * groupname
87
- * index.ts
88
- * endpoints.ts
89
- * ```
90
- * @example
91
- * ```
92
- * outputdir
93
- * index.ts
94
- * endpoints.ts
95
- * ```
96
- */
97
- outputType?: 'one-endpoint-per-file' | 'endpoints-per-file';
98
- /**
99
- * Group endpoints and collect it into object
100
- *
101
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#groupby)
102
- */
103
- groupBy?: ((endpoint: EndpointData) => string) | `path-segment` | `path-segment-${number}` | `tag` | `tag-${number}`;
104
- /**
105
- * Collect all exports into single namespace
106
- *
107
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#namespace)
108
- */
109
- namespace?: string | ((utils: AnyObject) => string);
110
- /**
111
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#addpathsegmenttoroutename)
112
- */
113
- addPathSegmentToRouteName?: boolean | number;
114
- /**
115
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#queryclient)
116
- */
117
- queryClient?: 'builtin' | ImportFileParams;
118
- /**
119
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#endpoint)
120
- */
121
- endpoint?: 'builtin' | ImportFileParams;
122
- /**
123
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#httpclient)
124
- */
125
- httpClient?: 'builtin' | ImportFileParams;
126
- /**
127
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#getendpointmeta)
128
- */
129
- getEndpointMeta?: (route: AnyObject, utils: AnyObject) => {
130
- typeName?: string;
131
- typeNameImportPath?: string;
132
- tmplData: string;
133
- };
134
- /**
135
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#getrequestmeta)
136
- */
137
- getRequestMeta?: (route: AnyObject, utils: AnyObject) => {
138
- tmplData: string;
139
- };
140
- /**
141
- * Additional parameters used to fetch your OpenAPI schema
142
- *
143
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#fetchschemarequestoptions)
144
- */
145
- fetchSchemaRequestOptions?: RequestInit;
146
- otherCodegenParams?: AnyObject;
147
- /**
148
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#filterendpoints)
149
- */
150
- filterEndpoints?: FilterEndpointsOption;
151
- /**
152
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#filtergroups)
153
- */
154
- filterGroups?: FilterGroupsOption;
155
- libImports?: {
156
- 'mobx-tanstack-query-api'?: string;
157
- };
158
- tsconfigPath?: string;
159
- transforms?: {
160
- groupEnumValue?: (group: string, namespace?: Maybe<string>) => string;
161
- tagEnumValue?: (tag: string, namespace?: Maybe<string>) => string;
162
- };
163
- }
164
- export type AllImportFileParams = Record<KeyOfByValue<Required<GenerateQueryApiParams>, 'builtin' | ImportFileParams>, ImportFileParams>;
1
+ import type { GenerateQueryApiParams } from "./types/index.cjs";
165
2
  export declare const generateApi: (params: GenerateQueryApiParams | GenerateQueryApiParams[]) => Promise<void>;
166
- export {};
167
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/codegen/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAS1E,OAAO,EACL,KAAK,uBAAuB,EAE7B,wCAAuC;AAQxC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,CAAC,EAAE,YAAY,CAAC;IAChB,qBAAqB,EAAE,CAAC,aAAa,EAAE,SAAS,KAAK,MAAM,CAAC;IAC5D,eAAe,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC;AAEvC,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,IAC1D,CAAC,GACD,MAAM,GACN,MAAM,GACN,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;AAExB,KAAK,qBAAqB,GAAG,YAAY,CAAC,CAAC,QAAQ,EAAE,YAAY,KAAK,OAAO,CAAC,CAAC;AAE/E,KAAK,kBAAkB,GAAG,YAAY,CAAC,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;AAEvE,MAAM,MAAM,cAAc,GAAG,SAAS,CAAC;AAEvC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,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AsB,EAAE,KAExD,OAAO,CAAC,IAAI,CAomBd,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/codegen/index.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAIV,sBAAsB,EAEvB,0BAAyB;AAS1B,eAAO,MAAM,WAAW,GACtB,QAAQ,sBAAsB,GAAG,sBAAsB,EAAE,KAExD,OAAO,CAAC,IAAI,CA8lBd,CAAC"}
@@ -1,167 +1,3 @@
1
- import type { LoDashStatic } from 'lodash';
2
- import { type ParsedRoute, type RawRouteInfo } from 'swagger-typescript-api';
3
- import type { RequestInit } from 'undici-types';
4
- import type { AnyObject, KeyOfByValue, Maybe } from 'yummies/utils/types';
5
- import { type RemoveUnusedTypesParams } from "./utils/remove-unused-types.js";
6
- export type CodegenDataUtils = {
7
- _: LoDashStatic;
8
- getInlineParseContent: (requestParams: AnyObject) => string;
9
- formatModelName: (modelName: string) => string;
10
- };
11
- export type EndpointData = ParsedRoute;
12
- export type FilterOption<T extends (...args: any[]) => boolean> = T | string | RegExp | (RegExp | string)[];
13
- type FilterEndpointsOption = FilterOption<(endpoint: EndpointData) => boolean>;
14
- type FilterGroupsOption = FilterOption<(groupName: string) => boolean>;
15
- export type CodegenProcess = AnyObject;
16
- export interface ImportFileParams {
17
- path: string;
18
- exportName: string;
19
- }
20
- export interface MetaInfo {
21
- namespace: string | null;
22
- groupNames: string[];
23
- tags?: string[];
24
- }
25
- export interface GenerateQueryApiParams {
26
- /**
27
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#output)
28
- */
29
- output: string;
30
- /**
31
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#input)
32
- */
33
- input: string | AnyObject;
34
- /**
35
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#requestpathprefix)
36
- */
37
- requestPathPrefix?: string;
38
- /**
39
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#requestpathsuffix)
40
- */
41
- requestPathSuffix?: string;
42
- /**
43
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#removeunusedtypes)
44
- */
45
- removeUnusedTypes?: true | {
46
- keepTypes?: RemoveUnusedTypesParams['keepTypes'];
47
- };
48
- /**
49
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#formatendpointname)
50
- */
51
- formatEndpointName?: (endpointName: string, endpointData: RawRouteInfo) => Maybe<string>;
52
- /**
53
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#formatexportgroupname)
54
- */
55
- formatExportGroupName?: (groupName: string, utils: CodegenDataUtils) => string;
56
- /**
57
- * Various generation output types
58
- *
59
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#outputtype)
60
- *
61
- * `one-endpoint-per-file`
62
- * @example
63
- * ```
64
- * outputdir
65
- * groupname
66
- * index.ts
67
- * endpoints
68
- * index.ts
69
- * get-endpoint-1.ts
70
- * get-endpoint-n.ts
71
- * ```
72
- * @example
73
- * ```
74
- * outputdir
75
- * index.ts
76
- * endpoints
77
- * index.ts
78
- * get-endpoint-1.ts
79
- * get-endpoint-n.ts
80
- * ```
81
- *
82
- * `endpoints-per-file`
83
- * @example
84
- * ```
85
- * outputdir
86
- * groupname
87
- * index.ts
88
- * endpoints.ts
89
- * ```
90
- * @example
91
- * ```
92
- * outputdir
93
- * index.ts
94
- * endpoints.ts
95
- * ```
96
- */
97
- outputType?: 'one-endpoint-per-file' | 'endpoints-per-file';
98
- /**
99
- * Group endpoints and collect it into object
100
- *
101
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#groupby)
102
- */
103
- groupBy?: ((endpoint: EndpointData) => string) | `path-segment` | `path-segment-${number}` | `tag` | `tag-${number}`;
104
- /**
105
- * Collect all exports into single namespace
106
- *
107
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#namespace)
108
- */
109
- namespace?: string | ((utils: AnyObject) => string);
110
- /**
111
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#addpathsegmenttoroutename)
112
- */
113
- addPathSegmentToRouteName?: boolean | number;
114
- /**
115
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#queryclient)
116
- */
117
- queryClient?: 'builtin' | ImportFileParams;
118
- /**
119
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#endpoint)
120
- */
121
- endpoint?: 'builtin' | ImportFileParams;
122
- /**
123
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#httpclient)
124
- */
125
- httpClient?: 'builtin' | ImportFileParams;
126
- /**
127
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#getendpointmeta)
128
- */
129
- getEndpointMeta?: (route: AnyObject, utils: AnyObject) => {
130
- typeName?: string;
131
- typeNameImportPath?: string;
132
- tmplData: string;
133
- };
134
- /**
135
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#getrequestmeta)
136
- */
137
- getRequestMeta?: (route: AnyObject, utils: AnyObject) => {
138
- tmplData: string;
139
- };
140
- /**
141
- * Additional parameters used to fetch your OpenAPI schema
142
- *
143
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#fetchschemarequestoptions)
144
- */
145
- fetchSchemaRequestOptions?: RequestInit;
146
- otherCodegenParams?: AnyObject;
147
- /**
148
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#filterendpoints)
149
- */
150
- filterEndpoints?: FilterEndpointsOption;
151
- /**
152
- * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#filtergroups)
153
- */
154
- filterGroups?: FilterGroupsOption;
155
- libImports?: {
156
- 'mobx-tanstack-query-api'?: string;
157
- };
158
- tsconfigPath?: string;
159
- transforms?: {
160
- groupEnumValue?: (group: string, namespace?: Maybe<string>) => string;
161
- tagEnumValue?: (tag: string, namespace?: Maybe<string>) => string;
162
- };
163
- }
164
- export type AllImportFileParams = Record<KeyOfByValue<Required<GenerateQueryApiParams>, 'builtin' | ImportFileParams>, ImportFileParams>;
1
+ import type { GenerateQueryApiParams } from "./types/index.js";
165
2
  export declare const generateApi: (params: GenerateQueryApiParams | GenerateQueryApiParams[]) => Promise<void>;
166
- export {};
167
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/codegen/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAS1E,OAAO,EACL,KAAK,uBAAuB,EAE7B,uCAAuC;AAQxC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,CAAC,EAAE,YAAY,CAAC;IAChB,qBAAqB,EAAE,CAAC,aAAa,EAAE,SAAS,KAAK,MAAM,CAAC;IAC5D,eAAe,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC;AAEvC,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,IAC1D,CAAC,GACD,MAAM,GACN,MAAM,GACN,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;AAExB,KAAK,qBAAqB,GAAG,YAAY,CAAC,CAAC,QAAQ,EAAE,YAAY,KAAK,OAAO,CAAC,CAAC;AAE/E,KAAK,kBAAkB,GAAG,YAAY,CAAC,CAAC,SAAS,EAAE,MAAM,KAAK,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