mobx-tanstack-query-api 0.11.0 → 0.12.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/assets/gh-repo-template.pxz +0 -0
- package/assets/logo.png +0 -0
- package/assets/logo.pxz +0 -0
- package/builtin/index.d.ts.map +1 -1
- package/cli/bin.d.ts +0 -1
- package/cli/bin.js +13 -25
- package/cli/bin.mjs +13 -25
- package/cli/index.d.ts +1 -1
- package/cli/index.d.ts.map +1 -1
- package/cli/index.js +1 -1
- package/cli/utils/define-config.d.ts +4 -0
- package/cli/utils/define-config.d.ts.map +1 -0
- package/cli/utils/exec-config-path.d.ts +2 -0
- package/cli/utils/exec-config-path.d.ts.map +1 -0
- package/cli/utils/exec-config-path.js +12 -0
- package/cli/utils/resolve-config-path.d.ts +3 -0
- package/cli/utils/resolve-config-path.d.ts.map +1 -0
- package/cli/utils/resolve-config-path.js +25 -0
- package/codegen/index.d.ts +8 -6
- package/codegen/index.d.ts.map +1 -1
- package/codegen/index.js +17 -9
- package/codegen/templates/all-endpoints-per-file.tmpl.d.ts +1 -1
- package/codegen/templates/all-endpoints-per-file.tmpl.d.ts.map +1 -1
- package/codegen/templates/all-exports.tmpl.d.ts +2 -2
- package/codegen/templates/all-exports.tmpl.d.ts.map +1 -1
- package/codegen/templates/data-contract.tmpl.d.ts +1 -1
- package/codegen/templates/data-contract.tmpl.d.ts.map +1 -1
- package/codegen/templates/data-contracts-file.tmpl.d.ts +1 -1
- package/codegen/templates/data-contracts-file.tmpl.d.ts.map +1 -1
- package/codegen/templates/endpoint-jsdoc.tmpl.d.ts +2 -2
- package/codegen/templates/endpoint-jsdoc.tmpl.d.ts.map +1 -1
- package/codegen/templates/endpoint-per-file.tmpl.d.ts +1 -1
- package/codegen/templates/endpoint-per-file.tmpl.d.ts.map +1 -1
- package/codegen/templates/index-ts-for-endpoint-per-file.tmpl.d.ts +2 -2
- package/codegen/templates/index-ts-for-endpoint-per-file.tmpl.d.ts.map +1 -1
- package/codegen/templates/meta-info.tmpl.d.ts +2 -2
- package/codegen/templates/meta-info.tmpl.d.ts.map +1 -1
- package/codegen/templates/new-endpoint.tmpl.d.ts +1 -1
- package/codegen/templates/new-endpoint.tmpl.d.ts.map +1 -1
- package/codegen/utils/remove-unused-types.d.ts.map +1 -1
- package/codegen/utils/remove-unused-types.js +4 -3
- package/package.json +46 -21
- package/runtime/endpoint-infinite-query.d.ts +5 -5
- package/runtime/endpoint-infinite-query.d.ts.map +1 -1
- package/runtime/endpoint-infinite-query.types.d.ts +5 -5
- package/runtime/endpoint-infinite-query.types.d.ts.map +1 -1
- package/runtime/endpoint-mutation.d.ts +4 -4
- package/runtime/endpoint-mutation.d.ts.map +1 -1
- package/runtime/endpoint-mutation.types.d.ts +4 -4
- package/runtime/endpoint-mutation.types.d.ts.map +1 -1
- package/runtime/endpoint-query-client.d.ts +3 -3
- package/runtime/endpoint-query-client.d.ts.map +1 -1
- package/runtime/endpoint-query-client.js +0 -2
- package/runtime/endpoint-query-client.types.d.ts +3 -3
- package/runtime/endpoint-query-client.types.d.ts.map +1 -1
- package/runtime/endpoint-query.d.ts +7 -6
- package/runtime/endpoint-query.d.ts.map +1 -1
- package/runtime/endpoint-query.js +1 -1
- package/runtime/endpoint-query.types.d.ts +4 -4
- package/runtime/endpoint-query.types.d.ts.map +1 -1
- package/runtime/endpoint.d.ts +8 -7
- package/runtime/endpoint.d.ts.map +1 -1
- package/runtime/endpoint.js +1 -1
- package/runtime/endpoint.types.d.ts +3 -3
- package/runtime/endpoint.types.d.ts.map +1 -1
- package/runtime/http-client.d.ts +2 -2
- package/runtime/http-client.d.ts.map +1 -1
- package/runtime/index.d.ts +5 -5
- package/runtime/index.d.ts.map +1 -1
- package/runtime/index.js +5 -5
- package/cli/define-config.d.ts +0 -4
- package/cli/define-config.d.ts.map +0 -1
- /package/cli/{define-config.js → utils/define-config.js} +0 -0
|
Binary file
|
package/assets/logo.png
ADDED
|
Binary file
|
package/assets/logo.pxz
ADDED
|
Binary file
|
package/builtin/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/builtin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAqB,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/builtin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAqB,MAAM,2BAA2B,CAAC;AAI1E,eAAO,MAAM,WAAW,qBAkBtB,CAAC;AAEH,eAAO,MAAM,IAAI,qBAAqB,CAAC"}
|
package/cli/bin.d.ts
CHANGED
package/cli/bin.js
CHANGED
|
@@ -1,27 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
import { existsSync } from 'node:fs';
|
|
3
|
-
import path from 'node:path';
|
|
1
|
+
import { cac } from 'cac';
|
|
4
2
|
import { generateApi } from '../codegen/index.js';
|
|
5
|
-
import { defineConfig } from './define-config.js';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
let
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
import { defineConfig } from './utils/define-config.js';
|
|
4
|
+
import { execConfigPath } from './utils/exec-config-path.js';
|
|
5
|
+
import { resolveConfigPath } from './utils/resolve-config-path.js';
|
|
6
|
+
let cli = cac('mobx-tanstack-query-api');
|
|
7
|
+
cli = cli.option('-c, --config <file>', `[string] use specified config file`);
|
|
8
|
+
cli.help();
|
|
9
|
+
const parsed = cli.parse();
|
|
10
|
+
if (!parsed.options.help) {
|
|
11
|
+
const configPath = resolveConfigPath(typeof parsed.options.config === 'string' ? parsed.options.config : null);
|
|
12
|
+
execConfigPath(configPath).then((generateApiParams) => {
|
|
13
|
+
defineConfig(generateApiParams).forEach(generateApi);
|
|
14
|
+
});
|
|
11
15
|
}
|
|
12
|
-
else if (existsSync(path.resolve(projectDir, 'api-codegen.config.mjs'))) {
|
|
13
|
-
module = await import(path.resolve(projectDir, 'api-codegen.config.mjs'));
|
|
14
|
-
}
|
|
15
|
-
else if (existsSync(path.resolve(projectDir, 'api-codegen.config.json'))) {
|
|
16
|
-
module = await import(path.resolve(projectDir, 'api-codegen.config.json'));
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
throw new Error('api-codegen.config.(js|mjs|json) not found');
|
|
20
|
-
}
|
|
21
|
-
if (module.default) {
|
|
22
|
-
generateApiParams = module.default;
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
throw new Error('api-codegen.config.(js|mjs|json) is not valid, This file should return object - result of the defineConfig function');
|
|
26
|
-
}
|
|
27
|
-
defineConfig(generateApiParams).forEach(generateApi);
|
package/cli/bin.mjs
CHANGED
|
@@ -1,27 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
import { existsSync } from 'node:fs';
|
|
3
|
-
import path from 'node:path';
|
|
1
|
+
import { cac } from 'cac';
|
|
4
2
|
import { generateApi } from '../codegen/index.js';
|
|
5
|
-
import { defineConfig } from './define-config.js';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
let
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
import { defineConfig } from './utils/define-config.js';
|
|
4
|
+
import { execConfigPath } from './utils/exec-config-path.js';
|
|
5
|
+
import { resolveConfigPath } from './utils/resolve-config-path.js';
|
|
6
|
+
let cli = cac('mobx-tanstack-query-api');
|
|
7
|
+
cli = cli.option('-c, --config <file>', `[string] use specified config file`);
|
|
8
|
+
cli.help();
|
|
9
|
+
const parsed = cli.parse();
|
|
10
|
+
if (!parsed.options.help) {
|
|
11
|
+
const configPath = resolveConfigPath(typeof parsed.options.config === 'string' ? parsed.options.config : null);
|
|
12
|
+
execConfigPath(configPath).then((generateApiParams) => {
|
|
13
|
+
defineConfig(generateApiParams).forEach(generateApi);
|
|
14
|
+
});
|
|
11
15
|
}
|
|
12
|
-
else if (existsSync(path.resolve(projectDir, 'api-codegen.config.mjs'))) {
|
|
13
|
-
module = await import(path.resolve(projectDir, 'api-codegen.config.mjs'));
|
|
14
|
-
}
|
|
15
|
-
else if (existsSync(path.resolve(projectDir, 'api-codegen.config.json'))) {
|
|
16
|
-
module = await import(path.resolve(projectDir, 'api-codegen.config.json'));
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
throw new Error('api-codegen.config.(js|mjs|json) not found');
|
|
20
|
-
}
|
|
21
|
-
if (module.default) {
|
|
22
|
-
generateApiParams = module.default;
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
throw new Error('api-codegen.config.(js|mjs|json) is not valid, This file should return object - result of the defineConfig function');
|
|
26
|
-
}
|
|
27
|
-
defineConfig(generateApiParams).forEach(generateApi);
|
package/cli/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './define-config.js';
|
|
1
|
+
export * from './utils/define-config.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/cli/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
|
package/cli/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './define-config.js';
|
|
1
|
+
export * from './utils/define-config.js';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Maybe } from 'yummies/utils/types';
|
|
2
|
+
import type { GenerateQueryApiParams } from '../../codegen/index.js';
|
|
3
|
+
export declare const defineConfig: (...configs: Maybe<GenerateQueryApiParams | GenerateQueryApiParams[]>[]) => GenerateQueryApiParams[];
|
|
4
|
+
//# sourceMappingURL=define-config.d.ts.map
|
|
@@ -0,0 +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,MAAM,wBAAwB,CAAC;AAErE,eAAO,MAAM,YAAY,GACvB,GAAG,SAAS,KAAK,CAAC,sBAAsB,GAAG,sBAAsB,EAAE,CAAC,EAAE,KACrE,sBAAsB,EAIxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exec-config-path.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/exec-config-path.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,GAAU,YAAY,MAAM,qBAatD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createJiti } from 'jiti';
|
|
2
|
+
export const execConfigPath = async (configPath) => {
|
|
3
|
+
const jiti = createJiti(import.meta.url);
|
|
4
|
+
try {
|
|
5
|
+
const config = await jiti.import(configPath, { default: true });
|
|
6
|
+
return config;
|
|
7
|
+
}
|
|
8
|
+
catch (error) {
|
|
9
|
+
console.error(error);
|
|
10
|
+
}
|
|
11
|
+
throw new Error(`${configPath} is not valid, This file should return object - result of the defineConfig function`);
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-config-path.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/resolve-config-path.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAIjD,eAAO,MAAM,iBAAiB,GAAI,kBAAkB,KAAK,CAAC,MAAM,CAAC,WAsBhE,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import fs, { existsSync } from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
const projectDir = process.cwd();
|
|
4
|
+
export const resolveConfigPath = (userSpefiedPath) => {
|
|
5
|
+
if (userSpefiedPath) {
|
|
6
|
+
const fullUserSpecifiedPath = path.resolve(projectDir, userSpefiedPath);
|
|
7
|
+
if (!fs.existsSync(fullUserSpecifiedPath)) {
|
|
8
|
+
throw `Config file not found by path - ${userSpefiedPath}`;
|
|
9
|
+
}
|
|
10
|
+
return path.resolve(projectDir, userSpefiedPath);
|
|
11
|
+
}
|
|
12
|
+
if (existsSync(path.resolve(projectDir, 'api-codegen.config.js'))) {
|
|
13
|
+
return path.resolve(projectDir, 'api-codegen.config.js');
|
|
14
|
+
}
|
|
15
|
+
else if (existsSync(path.resolve(projectDir, 'api-codegen.config.mjs'))) {
|
|
16
|
+
return path.resolve(projectDir, 'api-codegen.config.mjs');
|
|
17
|
+
}
|
|
18
|
+
else if (existsSync(path.resolve(projectDir, 'api-codegen.config.json'))) {
|
|
19
|
+
return path.resolve(projectDir, 'api-codegen.config.json');
|
|
20
|
+
}
|
|
21
|
+
else if (existsSync(path.resolve(projectDir, 'api-codegen.config.ts'))) {
|
|
22
|
+
return path.resolve(projectDir, 'api-codegen.config.ts');
|
|
23
|
+
}
|
|
24
|
+
throw new Error('api-codegen.config.(js|mjs|json|ts) not found');
|
|
25
|
+
};
|
package/codegen/index.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { LoDashStatic } from 'lodash';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type { LoDashStatic } from 'lodash';
|
|
2
|
+
import { type ParsedRoute } 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';
|
|
5
6
|
export type CodegenDataUtils = {
|
|
6
7
|
_: LoDashStatic;
|
|
7
8
|
getInlineParseContent: (requestParams: AnyObject) => string;
|
|
8
9
|
formatModelName: (modelName: string) => string;
|
|
9
10
|
};
|
|
10
|
-
type
|
|
11
|
+
export type EndpointData = ParsedRoute;
|
|
12
|
+
type FilterEndpointsFn = (endpoint: EndpointData) => boolean;
|
|
11
13
|
export type CodegenProcess = AnyObject;
|
|
12
14
|
export interface ImportFileParams {
|
|
13
15
|
path: string;
|
|
@@ -75,7 +77,7 @@ export interface GenerateQueryApiParams {
|
|
|
75
77
|
/**
|
|
76
78
|
* Group endpoints and collect it into object
|
|
77
79
|
*/
|
|
78
|
-
groupBy?: ((endpoint:
|
|
80
|
+
groupBy?: ((endpoint: EndpointData) => string) | `path-segment` | `path-segment-${number}` | `tag` | `tag-${number}`;
|
|
79
81
|
/**
|
|
80
82
|
* Collect all exports into single namespace
|
|
81
83
|
*
|
package/codegen/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/codegen/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;
|
|
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,EACjB,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,MAAM,gCAAgC,CAAC;AAOxC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,CAAC,EAAE,YAAY,CAAC;IAChB,qBAAqB,EAAE,CAAC,aAAa,EAAE,SAAS,KAAK,MAAM,CAAC;IAC5D,eAAe,EAAE,CAAC,SAAS,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AAM,EAAE,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC;KACnE,CAAC;CACH;AAED,MAAM,MAAM,mBAAmB,GAAG,MAAM,CACtC,YAAY,CAAC,QAAQ,CAAC,sBAAsB,CAAC,EAAE,SAAS,GAAG,gBAAgB,CAAC,EAC5E,gBAAgB,CACjB,CAAC;AAEF,eAAO,MAAM,WAAW,GACtB,QAAQ,sBAAsB,GAAG,sBAAsB,EAAE,KAExD,OAAO,CAAC,IAAI,CAsnBd,CAAC"}
|
package/codegen/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { generateApi as generateApiFromSwagger } from 'swagger-typescript-api';
|
|
2
1
|
import path from 'node:path';
|
|
3
2
|
import { fileURLToPath } from 'node:url';
|
|
3
|
+
import { generateApi as generateApiFromSwagger, } from 'swagger-typescript-api';
|
|
4
4
|
import { allEndpointPerFileTmpl } from './templates/all-endpoints-per-file.tmpl.js';
|
|
5
5
|
import { allExportsTmpl } from './templates/all-exports.tmpl.js';
|
|
6
6
|
import { LINTERS_IGNORE } from './templates/constants.js';
|
|
@@ -97,13 +97,13 @@ export const generateApi = async (params) => {
|
|
|
97
97
|
hooks: {
|
|
98
98
|
onInit: (configuration, codeGenProcessFromInit) => {
|
|
99
99
|
codegenProcess = codeGenProcessFromInit;
|
|
100
|
-
// @ts-
|
|
100
|
+
// @ts-expect-error
|
|
101
101
|
configuration.swaggerSchema.components =
|
|
102
|
-
// @ts-
|
|
102
|
+
// @ts-expect-error
|
|
103
103
|
configuration.swaggerSchema.components || {};
|
|
104
|
-
// @ts-
|
|
104
|
+
// @ts-expect-error
|
|
105
105
|
configuration.swaggerSchema.components.schemas =
|
|
106
|
-
// @ts-
|
|
106
|
+
// @ts-expect-error
|
|
107
107
|
configuration.swaggerSchema.components.schemas || {};
|
|
108
108
|
return codegenParams?.hooks?.onInit?.(configuration, codeGenProcessFromInit);
|
|
109
109
|
},
|
|
@@ -201,7 +201,9 @@ export const generateApi = async (params) => {
|
|
|
201
201
|
},
|
|
202
202
|
});
|
|
203
203
|
if (Array.isArray(route.raw.tags)) {
|
|
204
|
-
route.raw.tags.forEach((tag) =>
|
|
204
|
+
route.raw.tags.forEach((tag) => {
|
|
205
|
+
tagsSet.add(tag);
|
|
206
|
+
});
|
|
205
207
|
}
|
|
206
208
|
reservedDataContractNames.forEach((name) => {
|
|
207
209
|
reservedDataContractNamesMap.set(name, (reservedDataContractNamesMap.get(name) ?? 0) + 1);
|
|
@@ -255,7 +257,9 @@ export const generateApi = async (params) => {
|
|
|
255
257
|
if (hasFilteredRoutes) {
|
|
256
258
|
filteredRoutes.forEach((route) => {
|
|
257
259
|
if (Array.isArray(route.raw.tags)) {
|
|
258
|
-
route.raw.tags.forEach((tag) =>
|
|
260
|
+
route.raw.tags.forEach((tag) => {
|
|
261
|
+
tagsSet.add(tag);
|
|
262
|
+
});
|
|
259
263
|
}
|
|
260
264
|
});
|
|
261
265
|
const fileName = 'endpoints.ts';
|
|
@@ -330,7 +334,9 @@ export const generateApi = async (params) => {
|
|
|
330
334
|
}
|
|
331
335
|
hasFilteredRoutes = true;
|
|
332
336
|
if (Array.isArray(route.raw.tags)) {
|
|
333
|
-
route.raw.tags.forEach((tag) =>
|
|
337
|
+
route.raw.tags.forEach((tag) => {
|
|
338
|
+
tagsSet.add(tag);
|
|
339
|
+
});
|
|
334
340
|
}
|
|
335
341
|
const fileName = `${_.kebabCase(route.routeName.usage)}.ts`;
|
|
336
342
|
fileNamesWithRequestInfo.push(fileName);
|
|
@@ -367,7 +373,9 @@ export const generateApi = async (params) => {
|
|
|
367
373
|
if (hasFilteredRoutes) {
|
|
368
374
|
filteredRoutes.forEach((route) => {
|
|
369
375
|
if (Array.isArray(route.raw.tags)) {
|
|
370
|
-
route.raw.tags.forEach((tag) =>
|
|
376
|
+
route.raw.tags.forEach((tag) => {
|
|
377
|
+
tagsSet.add(tag);
|
|
378
|
+
});
|
|
371
379
|
}
|
|
372
380
|
});
|
|
373
381
|
const fileName = 'endpoints.ts';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyObject, Maybe } from 'yummies/utils/types';
|
|
1
|
+
import type { AnyObject, Maybe } from 'yummies/utils/types';
|
|
2
2
|
import type { AllImportFileParams, CodegenDataUtils, CodegenProcess, GenerateQueryApiParams, MetaInfo } from '../index.js';
|
|
3
3
|
export interface AllEndpointPerFileTmplParams extends AnyObject {
|
|
4
4
|
routes: AnyObject[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"all-endpoints-per-file.tmpl.d.ts","sourceRoot":"","sources":["../../../src/codegen/templates/all-endpoints-per-file.tmpl.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"all-endpoints-per-file.tmpl.d.ts","sourceRoot":"","sources":["../../../src/codegen/templates/all-endpoints-per-file.tmpl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,KAAK,EACV,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,sBAAsB,EACtB,QAAQ,EACT,MAAM,aAAa,CAAC;AAOrB,MAAM,WAAW,4BAA6B,SAAQ,SAAS;IAC7D,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,aAAa,EAAE,SAAS,CAAC;IACzB,SAAS,EAAE,sBAAsB,CAAC;IAClC,cAAc,EAAE,cAAc,CAAC;IAC/B,gBAAgB,EAAE,mBAAmB,CAAC;IACtC,KAAK,EAAE,gBAAgB,CAAC;IACxB,yBAAyB,EAAE,MAAM,CAAC;IAClC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;CAC3B;AAED,eAAO,MAAM,sBAAsB,GAAU,iIAU1C,4BAA4B;;;EA+H9B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Maybe } from 'yummies/utils/types';
|
|
2
|
-
import { CodegenDataUtils, MetaInfo } from '../index.js';
|
|
1
|
+
import type { Maybe } from 'yummies/utils/types';
|
|
2
|
+
import type { CodegenDataUtils, MetaInfo } from '../index.js';
|
|
3
3
|
export interface AllExportsTmplParams {
|
|
4
4
|
formatTSContent: (...args: any[]) => Promise<string>;
|
|
5
5
|
collectedExportFiles: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"all-exports.tmpl.d.ts","sourceRoot":"","sources":["../../../src/codegen/templates/all-exports.tmpl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"all-exports.tmpl.d.ts","sourceRoot":"","sources":["../../../src/codegen/templates/all-exports.tmpl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAI9D,MAAM,WAAW,oBAAoB;IACnC,eAAe,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,oBAAoB,EAAE,MAAM,EAAE,CAAC;IAC/B,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC1B,KAAK,EAAE,gBAAgB,CAAC;CACzB;AAED,eAAO,MAAM,sBAAsB,GACjC,WAAW,MAAM,EACjB,OAAO,gBAAgB,uBACgB,CAAC;AAE1C,eAAO,MAAM,cAAc,GAAU,sDAIlC,oBAAoB,oBAMtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-contract.tmpl.d.ts","sourceRoot":"","sources":["../../../src/codegen/templates/data-contract.tmpl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"data-contract.tmpl.d.ts","sourceRoot":"","sources":["../../../src/codegen/templates/data-contract.tmpl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,SAAS,CAAC;IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAuBD,eAAO,MAAM,gBAAgB,GAAU,gDAIpC,sBAAsB,oBAmCxB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyObject } from 'yummies/utils/types';
|
|
1
|
+
import type { AnyObject } from 'yummies/utils/types';
|
|
2
2
|
import type { CodegenProcess, GenerateQueryApiParams } from '../index.js';
|
|
3
3
|
export interface DataContractsTmplParams extends AnyObject {
|
|
4
4
|
configuration: AnyObject;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-contracts-file.tmpl.d.ts","sourceRoot":"","sources":["../../../src/codegen/templates/data-contracts-file.tmpl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"data-contracts-file.tmpl.d.ts","sourceRoot":"","sources":["../../../src/codegen/templates/data-contracts-file.tmpl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAK1E,MAAM,WAAW,uBAAwB,SAAQ,SAAS;IACxD,aAAa,EAAE,SAAS,CAAC;IACzB,SAAS,EAAE,sBAAsB,CAAC;IAClC,cAAc,EAAE,cAAc,CAAC;IAC/B,yBAAyB,CAAC,EAAE,MAAM,EAAE,CAAC;CACtC;AAED,eAAO,MAAM,qBAAqB,GAAU,gEAIzC,uBAAuB,iBA6BzB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AnyObject } from 'yummies/utils/types';
|
|
2
|
-
import { GenerateQueryApiParams } from '../index.js';
|
|
1
|
+
import type { AnyObject } from 'yummies/utils/types';
|
|
2
|
+
import type { GenerateQueryApiParams } from '../index.js';
|
|
3
3
|
export interface EndpointJSDocTmplParams {
|
|
4
4
|
route: AnyObject;
|
|
5
5
|
configuration: AnyObject;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoint-jsdoc.tmpl.d.ts","sourceRoot":"","sources":["../../../src/codegen/templates/endpoint-jsdoc.tmpl.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"endpoint-jsdoc.tmpl.d.ts","sourceRoot":"","sources":["../../../src/codegen/templates/endpoint-jsdoc.tmpl.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE1D,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,SAAS,CAAC;IACjB,aAAa,EAAE,SAAS,CAAC;IACzB,SAAS,EAAE,sBAAsB,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,iBAAiB,GAAI,mCAI/B,uBAAuB,WAgIzB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyObject, Maybe } from 'yummies/utils/types';
|
|
1
|
+
import type { AnyObject, Maybe } from 'yummies/utils/types';
|
|
2
2
|
import type { AllImportFileParams, CodegenDataUtils, CodegenProcess, GenerateQueryApiParams, MetaInfo } from '../index.js';
|
|
3
3
|
export interface EndpointPerFileTmplParams extends AnyObject {
|
|
4
4
|
route: AnyObject;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoint-per-file.tmpl.d.ts","sourceRoot":"","sources":["../../../src/codegen/templates/endpoint-per-file.tmpl.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"endpoint-per-file.tmpl.d.ts","sourceRoot":"","sources":["../../../src/codegen/templates/endpoint-per-file.tmpl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,KAAK,EACV,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,sBAAsB,EACtB,QAAQ,EACT,MAAM,aAAa,CAAC;AAOrB,MAAM,WAAW,yBAA0B,SAAQ,SAAS;IAC1D,KAAK,EAAE,SAAS,CAAC;IACjB,aAAa,EAAE,SAAS,CAAC;IACzB,SAAS,EAAE,sBAAsB,CAAC;IAClC,cAAc,EAAE,cAAc,CAAC;IAC/B,gBAAgB,EAAE,mBAAmB,CAAC;IACtC,KAAK,EAAE,gBAAgB,CAAC;IACxB,yBAAyB,EAAE,MAAM,CAAC;IAClC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;CAC3B;AAED,eAAO,MAAM,mBAAmB,GAAU,gIAUvC,yBAAyB;;;EA8G3B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AnyObject } from 'yummies/utils/types';
|
|
2
|
-
import { CodegenProcess, GenerateQueryApiParams } from '../index.js';
|
|
1
|
+
import type { AnyObject } from 'yummies/utils/types';
|
|
2
|
+
import type { CodegenProcess, GenerateQueryApiParams } from '../index.js';
|
|
3
3
|
export interface IndexTsForEndpointPerFileTmplParams extends AnyObject {
|
|
4
4
|
configuration: AnyObject;
|
|
5
5
|
apiParams: GenerateQueryApiParams;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-ts-for-endpoint-per-file.tmpl.d.ts","sourceRoot":"","sources":["../../../src/codegen/templates/index-ts-for-endpoint-per-file.tmpl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index-ts-for-endpoint-per-file.tmpl.d.ts","sourceRoot":"","sources":["../../../src/codegen/templates/index-ts-for-endpoint-per-file.tmpl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAI1E,MAAM,WAAW,mCAAoC,SAAQ,SAAS;IACpE,aAAa,EAAE,SAAS,CAAC;IACzB,SAAS,EAAE,sBAAsB,CAAC;IAClC,cAAc,EAAE,cAAc,CAAC;IAC/B,yBAAyB,EAAE,MAAM,EAAE,CAAC;CACrC;AAED,eAAO,MAAM,6BAA6B,GAAU,gCAEjD,mCAAmC,oBAIrC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Maybe } from 'yummies/utils/types';
|
|
2
|
-
import { CodegenDataUtils, GenerateQueryApiParams, MetaInfo } from '../index.js';
|
|
1
|
+
import type { Maybe } from 'yummies/utils/types';
|
|
2
|
+
import type { CodegenDataUtils, GenerateQueryApiParams, MetaInfo } from '../index.js';
|
|
3
3
|
export interface MetaInfoTmplParams {
|
|
4
4
|
formatTSContent: (...args: any[]) => Promise<string>;
|
|
5
5
|
codegenParams: GenerateQueryApiParams;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta-info.tmpl.d.ts","sourceRoot":"","sources":["../../../src/codegen/templates/meta-info.tmpl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"meta-info.tmpl.d.ts","sourceRoot":"","sources":["../../../src/codegen/templates/meta-info.tmpl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,KAAK,EACV,gBAAgB,EAChB,sBAAsB,EACtB,QAAQ,EACT,MAAM,aAAa,CAAC;AAIrB,MAAM,WAAW,kBAAkB;IACjC,eAAe,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,aAAa,EAAE,sBAAsB,CAAC;IACtC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC1B,KAAK,EAAE,gBAAgB,CAAC;CACzB;AAED,eAAO,MAAM,sBAAsB,GACjC,WAAW,MAAM,EACjB,OAAO,gBAAgB,uBACgB,CAAC;AAE1C,eAAO,MAAM,oBAAoB,GAC/B,SAAS,MAAM,EACf,OAAO,gBAAgB,uBACkB,CAAC;AAE5C,eAAO,MAAM,YAAY,GAAU,+DAMhC,kBAAkB,oBA4CpB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyObject, Maybe } from 'yummies/utils/types';
|
|
1
|
+
import type { AnyObject, Maybe } from 'yummies/utils/types';
|
|
2
2
|
import type { AllImportFileParams, CodegenDataUtils, GenerateQueryApiParams, MetaInfo } from '../index.js';
|
|
3
3
|
export interface NewEndpointTmplParams {
|
|
4
4
|
route: AnyObject;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"new-endpoint.tmpl.d.ts","sourceRoot":"","sources":["../../../src/codegen/templates/new-endpoint.tmpl.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"new-endpoint.tmpl.d.ts","sourceRoot":"","sources":["../../../src/codegen/templates/new-endpoint.tmpl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,KAAK,EACV,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACtB,QAAQ,EACT,MAAM,aAAa,CAAC;AAOrB,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,SAAS,CAAC;IACjB,aAAa,EAAE,SAAS,CAAC;IACzB,SAAS,EAAE,sBAAsB,CAAC;IAClC,gBAAgB,EAAE,mBAAmB,CAAC;IACtC,KAAK,EAAE,gBAAgB,CAAC;IACxB,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;CAC3B;AAiBD,eAAO,MAAM,eAAe,GAAI,qEAO7B,qBAAqB;;;;;;;;CA6MvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remove-unused-types.d.ts","sourceRoot":"","sources":["../../../src/codegen/utils/remove-unused-types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"remove-unused-types.d.ts","sourceRoot":"","sources":["../../../src/codegen/utils/remove-unused-types.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAC1C;AAyJD,eAAO,MAAM,iBAAiB,GAAU,QAAQ,uBAAuB,kBAKtE,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/* eslint-disable no-constant-condition */
|
|
2
|
-
import { Project, SyntaxKind, Node } from 'ts-morph';
|
|
3
1
|
import path from 'node:path';
|
|
2
|
+
import { Node, Project, SyntaxKind } from 'ts-morph';
|
|
4
3
|
const checkAbleToRemoveType = (typeName, keepTypes) => {
|
|
5
4
|
if (!keepTypes) {
|
|
6
5
|
return true;
|
|
@@ -15,7 +14,9 @@ const checkAbleToRemoveType = (typeName, keepTypes) => {
|
|
|
15
14
|
}
|
|
16
15
|
});
|
|
17
16
|
};
|
|
18
|
-
const removeUnusedTypesItteration = async ({ directory, keepTypes,
|
|
17
|
+
const removeUnusedTypesItteration = async ({ directory, keepTypes,
|
|
18
|
+
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: <explanation>
|
|
19
|
+
}) => {
|
|
19
20
|
const project = new Project();
|
|
20
21
|
project.addSourceFilesAtPaths([
|
|
21
22
|
path.join(directory, '**/*.ts'),
|
package/package.json
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mobx-tanstack-query-api",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"keywords": [
|
|
3
|
+
"version": "0.12.0",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"mobx",
|
|
6
|
+
"react-query",
|
|
7
|
+
"tanstack-query",
|
|
8
|
+
"openapi",
|
|
9
|
+
"swagger",
|
|
10
|
+
"codegen"
|
|
11
|
+
],
|
|
5
12
|
"author": "js2me",
|
|
6
13
|
"license": "MIT",
|
|
7
|
-
"description": "",
|
|
14
|
+
"description": "OpenAPI/Swagger client codegen + endpoints integration with mobx-tanstack-query",
|
|
8
15
|
"type": "module",
|
|
9
|
-
"bin": "cli/bin.
|
|
16
|
+
"bin": "cli/bin.js",
|
|
10
17
|
"bugs": {
|
|
11
18
|
"url": "https://github.com/js2me/mobx-tanstack-query-api/issues"
|
|
12
19
|
},
|
|
@@ -23,28 +30,32 @@
|
|
|
23
30
|
"@types/lodash": "^4.17.16",
|
|
24
31
|
"@types/lodash-es": "^4.17.12",
|
|
25
32
|
"http-status-code-types": "^0.0.2",
|
|
33
|
+
"jiti": "^2.5.1",
|
|
26
34
|
"mobx-tanstack-query": "^6.4.0",
|
|
27
|
-
"swagger-typescript-api": "13.2.
|
|
35
|
+
"swagger-typescript-api": "13.2.10",
|
|
28
36
|
"ts-morph": "^26.0.0",
|
|
29
37
|
"undici-types": "^7.11.0",
|
|
30
|
-
"yummies": "^
|
|
38
|
+
"yummies": "^5.2.0"
|
|
31
39
|
},
|
|
32
40
|
"devDependencies": {
|
|
41
|
+
"@biomejs/biome": "^2.2.4",
|
|
42
|
+
"@changesets/changelog-github": "^0.5.1",
|
|
43
|
+
"@changesets/cli": "^2.29.5",
|
|
33
44
|
"@testing-library/react": "^16.0.1",
|
|
34
45
|
"@types/node": "^20.17.11",
|
|
35
|
-
"commitfmt": "^1.0.0",
|
|
36
|
-
"eslint": "^8.57.1",
|
|
37
|
-
"js2me-eslint-config": "^1.0.7",
|
|
38
|
-
"js2me-exports-post-build-script": "^3.0.2",
|
|
39
46
|
"@vitejs/plugin-react-swc": "^3.7.2",
|
|
40
|
-
"@vitest/coverage-istanbul": "^2.
|
|
47
|
+
"@vitest/coverage-istanbul": "^3.2.4",
|
|
48
|
+
"cac": "^6.7.14",
|
|
49
|
+
"commitfmt": "^1.0.0",
|
|
50
|
+
"js2me-biome-config": "^1.0.5",
|
|
51
|
+
"js2me-exports-post-build-script": "^5.0.1",
|
|
41
52
|
"jsdom": "^26.0.0",
|
|
42
53
|
"lefthook": "^1.11.13",
|
|
43
54
|
"nodemon": "^3.1.9",
|
|
44
55
|
"rimraf": "^6.0.1",
|
|
45
56
|
"typescript": "^5.8.3",
|
|
46
57
|
"unplugin-swc": "^1.5.1",
|
|
47
|
-
"vitest": "^3.
|
|
58
|
+
"vitest": "^3.2.4"
|
|
48
59
|
},
|
|
49
60
|
"exports": {
|
|
50
61
|
"./builtin": {
|
|
@@ -57,16 +68,26 @@
|
|
|
57
68
|
"default": "./cli/bin.js",
|
|
58
69
|
"types": "./cli/bin.d.ts"
|
|
59
70
|
},
|
|
60
|
-
"./cli/define-config": {
|
|
61
|
-
"import": "./cli/define-config.js",
|
|
62
|
-
"default": "./cli/define-config.js",
|
|
63
|
-
"types": "./cli/define-config.d.ts"
|
|
64
|
-
},
|
|
65
71
|
"./cli": {
|
|
66
72
|
"import": "./cli/index.js",
|
|
67
73
|
"default": "./cli/index.js",
|
|
68
74
|
"types": "./cli/index.d.ts"
|
|
69
75
|
},
|
|
76
|
+
"./cli/utils/define-config": {
|
|
77
|
+
"import": "./cli/utils/define-config.js",
|
|
78
|
+
"default": "./cli/utils/define-config.js",
|
|
79
|
+
"types": "./cli/utils/define-config.d.ts"
|
|
80
|
+
},
|
|
81
|
+
"./cli/utils/exec-config-path": {
|
|
82
|
+
"import": "./cli/utils/exec-config-path.js",
|
|
83
|
+
"default": "./cli/utils/exec-config-path.js",
|
|
84
|
+
"types": "./cli/utils/exec-config-path.d.ts"
|
|
85
|
+
},
|
|
86
|
+
"./cli/utils/resolve-config-path": {
|
|
87
|
+
"import": "./cli/utils/resolve-config-path.js",
|
|
88
|
+
"default": "./cli/utils/resolve-config-path.js",
|
|
89
|
+
"types": "./cli/utils/resolve-config-path.d.ts"
|
|
90
|
+
},
|
|
70
91
|
"./codegen": {
|
|
71
92
|
"import": "./codegen/index.js",
|
|
72
93
|
"default": "./codegen/index.js",
|
|
@@ -176,7 +197,7 @@
|
|
|
176
197
|
"typings": "./index.d.ts",
|
|
177
198
|
"scripts": {
|
|
178
199
|
"clean": "rimraf dist",
|
|
179
|
-
"lint:check": "
|
|
200
|
+
"lint:check": "pnpm exec biome check --write --no-errors-on-unmatched --files-ignore-unknown=true",
|
|
180
201
|
"ts:check": "tsc --noEmit",
|
|
181
202
|
"check": "npm run lint:check && npm run ts:check",
|
|
182
203
|
"prebuild": "npm run clean && npm run check",
|
|
@@ -186,9 +207,13 @@
|
|
|
186
207
|
"pub:patch": "PUBLISH=true PUBLISH_VERSION=patch pnpm run build",
|
|
187
208
|
"pub:minor": "PUBLISH=true PUBLISH_VERSION=minor pnpm run build",
|
|
188
209
|
"pub:major": "PUBLISH=true PUBLISH_VERSION=major pnpm run build",
|
|
189
|
-
"test": "vitest run",
|
|
190
|
-
"test:watch": "vitest watch",
|
|
191
|
-
"test:coverage": "vitest run --coverage",
|
|
210
|
+
"test": "vitest run --config vitest.config.ts",
|
|
211
|
+
"test:watch": "vitest watch --config vitest.config.ts",
|
|
212
|
+
"test:coverage": "vitest run --config vitest.config.ts --coverage",
|
|
213
|
+
"docs": "pnpm build && cd docs && pnpm dev",
|
|
214
|
+
"docs:install": "cd docs && pnpm i",
|
|
215
|
+
"docs:build": "cd docs && pnpm build",
|
|
216
|
+
"docs:serve": "cd docs && pnpm preview",
|
|
192
217
|
"dev": "pnpm build && nodemon --delay 0.5 --watch src --ext ts,tsx --exec \"pnpm build && pnpm playground\"",
|
|
193
218
|
"playground": "node ./playground/index.mjs",
|
|
194
219
|
"dev:install-hooks": "if [ -z \"$CI\" ]; then lefthook install; fi"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { DefaultError, InfiniteData, QueryObserverResult } from '@tanstack/query-core';
|
|
1
|
+
import type { DefaultError, InfiniteData, QueryObserverResult } from '@tanstack/query-core';
|
|
2
2
|
import { InfiniteQuery } from 'mobx-tanstack-query';
|
|
3
|
-
import { MaybeFalsy } from 'yummies/utils/types';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import type { MaybeFalsy } from 'yummies/utils/types';
|
|
4
|
+
import type { AnyEndpoint } from './endpoint.types.js';
|
|
5
|
+
import type { EndpointInfiniteQueryFlattenOptions, EndpointInfiniteQueryOptions, EndpointInfiniteQueryUpdateOptionsAllVariants } from './endpoint-infinite-query.types.js';
|
|
6
|
+
import type { EndpointQueryClient } from './endpoint-query-client.js';
|
|
7
7
|
export declare class EndpointInfiniteQuery<TEndpoint extends AnyEndpoint, TQueryFnData = TEndpoint['__response']['data'], TError = DefaultError, TPageParam = unknown, TData = InfiniteData<TQueryFnData, TPageParam>> extends InfiniteQuery<TQueryFnData, TError, TPageParam, TData, any[]> {
|
|
8
8
|
private endpoint;
|
|
9
9
|
response: TEndpoint['__response'] | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoint-infinite-query.d.ts","sourceRoot":"","sources":["../../src/runtime/endpoint-infinite-query.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"endpoint-infinite-query.d.ts","sourceRoot":"","sources":["../../src/runtime/endpoint-infinite-query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,mBAA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K,CACN;IAOK,KAAK,CACT,MAAM,EAAE,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,GACxC,OAAO,CAAC,mBAAmB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;CAK/C"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { DefaultError, InfiniteData } from '@tanstack/query-core';
|
|
2
|
-
import { InfiniteQueryConfig, InfiniteQueryDynamicOptions, InfiniteQueryOptions, InfiniteQueryUpdateOptions } from 'mobx-tanstack-query';
|
|
3
|
-
import { AnyObject, MaybeFalsy } from 'yummies/utils/types';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import type { DefaultError, InfiniteData } from '@tanstack/query-core';
|
|
2
|
+
import type { InfiniteQueryConfig, InfiniteQueryDynamicOptions, InfiniteQueryOptions, InfiniteQueryUpdateOptions } from 'mobx-tanstack-query';
|
|
3
|
+
import type { AnyObject, MaybeFalsy } from 'yummies/utils/types';
|
|
4
|
+
import type { AnyEndpoint } from './endpoint.types.js';
|
|
5
|
+
import type { EndpointQueryUniqKey, ExcludedQueryKeys } from './endpoint-query.types.js';
|
|
6
6
|
type ShortInfiniteQueryConfig<TQueryFnData, TError = DefaultError, TPageParam = unknown, TData = InfiniteData<TQueryFnData, TPageParam>> = Omit<InfiniteQueryConfig<TQueryFnData, TError, TPageParam, TData, any[]>, ExcludedQueryKeys> & {
|
|
7
7
|
enabled?: boolean;
|
|
8
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoint-infinite-query.types.d.ts","sourceRoot":"","sources":["../../src/runtime/endpoint-infinite-query.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"endpoint-infinite-query.types.d.ts","sourceRoot":"","sources":["../../src/runtime/endpoint-infinite-query.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAA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E,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAC3E,GACD,yBAAyB,CACvB,SAAS,EACT,2BAA2B,CACzB,YAAY,EACZ,MAAM,EACN,UAAU,EACV,KAAK,EACL,GAAG,EAAE,CACN,CACF,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Mutation } from 'mobx-tanstack-query';
|
|
2
|
-
import { AnyObject } from 'yummies/utils/types';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import type { AnyObject } from 'yummies/utils/types';
|
|
3
|
+
import type { AnyEndpoint } from './endpoint.types.js';
|
|
4
|
+
import type { EndpointMutationOptions, EndpointMutationParams } from './endpoint-mutation.types.js';
|
|
5
|
+
import type { EndpointQueryClient } from './endpoint-query-client.js';
|
|
6
6
|
export declare class EndpointMutation<TEndpoint extends AnyEndpoint, TData = unknown, TParams extends AnyObject = AnyObject, TMutationMeta extends AnyObject | void = void, TContext = unknown> extends Mutation<TData, EndpointMutationParams<TParams, TMutationMeta>, TEndpoint['__response']['error'], TContext> {
|
|
7
7
|
private endpoint;
|
|
8
8
|
constructor(endpoint: AnyEndpoint, queryClient: EndpointQueryClient, { transform: transformResponse, invalidateEndpoints, ...mutationOptions }: EndpointMutationOptions<TEndpoint, TData, TParams, TMutationMeta, TContext>);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoint-mutation.d.ts","sourceRoot":"","sources":["../../src/runtime/endpoint-mutation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAS,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"endpoint-mutation.d.ts","sourceRoot":"","sources":["../../src/runtime/endpoint-mutation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAS,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EACV,uBAAuB,EACvB,sBAAsB,EACvB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGtE,qBAAa,gBAAgB,CAC3B,SAAS,SAAS,WAAW,EAC7B,KAAK,GAAG,OAAO,EACf,OAAO,SAAS,SAAS,GAAG,SAAS,EACrC,aAAa,SAAS,SAAS,GAAG,IAAI,GAAG,IAAI,EAC7C,QAAQ,GAAG,OAAO,CAClB,SAAQ,QAAQ,CAChB,KAAK,EACL,sBAAsB,CAAC,OAAO,EAAE,aAAa,CAAC,EAC9C,SAAS,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,EAChC,QAAQ,CACT;IAEG,OAAO,CAAC,QAAQ;gBAAR,QAAQ,EAAE,WAAW,EAC7B,WAAW,EAAE,mBAAmB,EAChC,EACE,SAAS,EAAE,iBAAiB,EAC5B,mBAAmB,EACnB,GAAG,eAAe,EACnB,EAAE,uBAAuB,CACxB,SAAS,EACT,KAAK,EACL,OAAO,EACP,aAAa,EACb,QAAQ,CACT;CAoDJ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MutationConfig, MutationInvalidateQueriesOptions } from 'mobx-tanstack-query';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type { MutationConfig, MutationInvalidateQueriesOptions } from 'mobx-tanstack-query';
|
|
2
|
+
import type { AnyObject, IsPartial, Maybe } from 'yummies/utils/types';
|
|
3
|
+
import type { AnyEndpoint } from './endpoint.types.js';
|
|
4
|
+
import type { InvalidateEndpointsFilters } from './endpoint-query-client.types.js';
|
|
5
5
|
export interface EndpointMutationInvalidateQueriesOptions extends MutationInvalidateQueriesOptions {
|
|
6
6
|
}
|
|
7
7
|
export type EndpointMutationParams<TParams extends AnyObject, TMutationMeta extends AnyObject | void = void> = TParams & (TMutationMeta extends void ? {} : IsPartial<TMutationMeta> extends true ? {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoint-mutation.types.d.ts","sourceRoot":"","sources":["../../src/runtime/endpoint-mutation.types.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"endpoint-mutation.types.d.ts","sourceRoot":"","sources":["../../src/runtime/endpoint-mutation.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,gCAAgC,EACjC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAEnF,MAAM,WAAW,wCACf,SAAQ,gCAAgC;CAAG;AAE7C,MAAM,MAAM,sBAAsB,CAChC,OAAO,SAAS,SAAS,EACzB,aAAa,SAAS,SAAS,GAAG,IAAI,GAAG,IAAI,IAC3C,OAAO,GACT,CAAC,aAAa,SAAS,IAAI,GACvB,EAAE,GACF,SAAS,CAAC,aAAa,CAAC,SAAS,IAAI,GACnC;IAAE,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,CAAA;CAAE,GAC/B;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,CAAC,CAAC;AAEjC,MAAM,MAAM,uBAAuB,CACjC,SAAS,SAAS,WAAW,EAC7B,KAAK,GAAG,OAAO,EACf,OAAO,SAAS,SAAS,GAAG,SAAS,EACrC,aAAa,SAAS,SAAS,GAAG,IAAI,GAAG,IAAI,EAC7C,QAAQ,GAAG,OAAO,IAChB;IACF;;;;;;;;;OASG;IACH,mBAAmB,CAAC,EAChB,IAAI,GACJ,UAAU,GACV,QAAQ,GACR,0BAA0B,CAAC;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,YAAY,CAAC,KAAK,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAC1E,iBAAiB,CAAC,EACd,wCAAwC,GACxC,CAAC,CACC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,EACpB,OAAO,EAAE,sBAAsB,CAC7B,OAAO,CAAC,OAAO,CAAC,EAChB,OAAO,CAAC,aAAa,CAAC,CACvB,KACE,wCAAwC,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;CACvE,GAAG,IAAI,CACN,cAAc,CACZ,OAAO,CAAC,KAAK,CAAC,EACd,sBAAsB,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC,EAChE,SAAS,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,EAChC,QAAQ,CACT,EACD,aAAa,GAAG,YAAY,GAAG,mBAAmB,CACnD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { InvalidateOptions } from '@tanstack/query-core';
|
|
2
|
-
import { QueryClient, QueryClientConfig } from 'mobx-tanstack-query';
|
|
3
|
-
import { InvalidateEndpointsFilters } from './endpoint-query-client.types.js';
|
|
1
|
+
import { type InvalidateOptions } from '@tanstack/query-core';
|
|
2
|
+
import { QueryClient, type QueryClientConfig } from 'mobx-tanstack-query';
|
|
3
|
+
import type { InvalidateEndpointsFilters } from './endpoint-query-client.types.js';
|
|
4
4
|
export declare class EndpointQueryClient extends QueryClient {
|
|
5
5
|
constructor(config?: QueryClientConfig);
|
|
6
6
|
invalidateEndpoints({ group, namespace, operationId, tag, predicate, endpoint, ...queryFilters }: InvalidateEndpointsFilters, options?: InvalidateOptions): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoint-query-client.d.ts","sourceRoot":"","sources":["../../src/runtime/endpoint-query-client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"endpoint-query-client.d.ts","sourceRoot":"","sources":["../../src/runtime/endpoint-query-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAG1E,OAAO,KAAK,EAEV,0BAA0B,EAC3B,MAAM,kCAAkC,CAAC;AAE1C,qBAAa,mBAAoB,SAAQ,WAAW;gBACtC,MAAM,CAAC,EAAE,iBAAiB;IActC,mBAAmB,CACjB,EACE,KAAK,EACL,SAAS,EACT,WAAW,EACX,GAAG,EACH,SAAS,EACT,QAAQ,EACR,GAAG,YAAY,EAChB,EAAE,0BAA0B,EAC7B,OAAO,CAAC,EAAE,iBAAiB;CAgE9B"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
2
1
|
import { hashKey } from '@tanstack/query-core';
|
|
3
2
|
import { QueryClient } from 'mobx-tanstack-query';
|
|
4
3
|
export class EndpointQueryClient extends QueryClient {
|
|
@@ -24,7 +23,6 @@ export class EndpointQueryClient extends QueryClient {
|
|
|
24
23
|
}
|
|
25
24
|
return this.invalidateQueries({
|
|
26
25
|
...queryFilters,
|
|
27
|
-
// eslint-disable-next-line sonarjs/no-invariant-returns
|
|
28
26
|
predicate: (query) => {
|
|
29
27
|
if (!query.meta?.endpointQuery) {
|
|
30
28
|
return false;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { InvalidateQueryFilters } from '@tanstack/query-core';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { InvalidateQueryFilters } from '@tanstack/query-core';
|
|
2
|
+
import type { AnyEndpoint } from './endpoint.types.js';
|
|
3
|
+
import type { EndpointQueryMeta } from './endpoint-query.types.js';
|
|
4
4
|
interface InvalidateEndpointQueryFilters extends Omit<InvalidateQueryFilters<any[]>, 'queryKey' | 'predicate'> {
|
|
5
5
|
}
|
|
6
6
|
export type EndpointStringFilter = string[] | string | RegExp;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoint-query-client.types.d.ts","sourceRoot":"","sources":["../../src/runtime/endpoint-query-client.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"endpoint-query-client.types.d.ts","sourceRoot":"","sources":["../../src/runtime/endpoint-query-client.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,UAAU,8BACR,SAAQ,IAAI,CAAC,sBAAsB,CAAC,GAAG,EAAE,CAAC,EAAE,UAAU,GAAG,WAAW,CAAC;CAAG;AAE1E,MAAM,MAAM,oBAAoB,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,CAAC;AAE9D,MAAM,WAAW,0BACf,SAAQ,8BAA8B;IACtC,SAAS,CAAC,EAAE,CACV,IAAI,EAAE,iBAAiB,EACvB,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,KAChE,OAAO,CAAC;IACb,QAAQ,CAAC,EAAE,WAAW,GAAG,WAAW,EAAE,CAAC;IACvC,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,KAAK,CAAC,EAAE,oBAAoB,CAAC;IAC7B,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC,GAAG,CAAC,EAAE,oBAAoB,CAAC;CAC5B"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
/** biome-ignore-all lint/correctness/noUnusedVariables: <explanation> */
|
|
2
|
+
import type { DefaultError, QueryFunctionContext, QueryObserverResult, RefetchOptions } from '@tanstack/query-core';
|
|
3
|
+
import { Query, type QueryUpdateOptionsAllVariants } from 'mobx-tanstack-query';
|
|
4
|
+
import type { AnyObject, Maybe, MaybeFalsy } from 'yummies/utils/types';
|
|
5
|
+
import type { AnyEndpoint } from './endpoint.types.js';
|
|
6
|
+
import type { EndpointQueryFlattenOptions, EndpointQueryOptions, EndpointQueryUniqKey, ExcludedQueryKeys } from './endpoint-query.types.js';
|
|
7
|
+
import type { EndpointQueryClient } from './endpoint-query-client.js';
|
|
7
8
|
export declare class EndpointQuery<TEndpoint extends AnyEndpoint, TQueryFnData = TEndpoint['__response']['data'], TError = DefaultError, TData = TQueryFnData, TQueryData = TQueryFnData> extends Query<TQueryFnData, TError, TData, TQueryData> {
|
|
8
9
|
private endpoint;
|
|
9
10
|
private _observableData;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoint-query.d.ts","sourceRoot":"","sources":["../../src/runtime/endpoint-query.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"endpoint-query.d.ts","sourceRoot":"","sources":["../../src/runtime/endpoint-query.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,OAAO,KAAK,EACV,YAAY,EACZ,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACf,MAAM,sBAAsB,CAAC;AAS9B,OAAO,EAAE,KAAK,EAAE,KAAK,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AAGhF,OAAO,KAAK,EACV,SAAS,EACT,KAAK,EACL,UAAU,EAEX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EACV,2BAA2B,EAC3B,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,2BAA2B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,WAAW,CAAC,UAAU,CAC7D,CAAC;AAEF,eAAO,MAAM,sBAAsB,GACjC,UAAU,WAAW,EACrB,QAAQ,UAAU,CAAC,SAAS,CAAC,EAC7B,SAAS,KAAK,CAAC,oBAAoB,CAAC,KACnC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,GAAG,EAAE,CAAA;CAerC,CAAC"}
|
|
@@ -35,7 +35,7 @@ export class EndpointQuery extends Query {
|
|
|
35
35
|
...queryOptions,
|
|
36
36
|
queryClient,
|
|
37
37
|
meta: endpoint.toQueryMeta(queryOptions.meta),
|
|
38
|
-
options: (
|
|
38
|
+
options: () => {
|
|
39
39
|
const builtOptions = buildOptionsFromParams(endpoint, _observableData.params, _observableData.uniqKey);
|
|
40
40
|
let isEnabled = !!_observableData.initialized && builtOptions.enabled;
|
|
41
41
|
if (typeof queryOptionsInput !== 'function' &&
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DefaultError } from '@tanstack/query-core';
|
|
2
|
-
import { QueryConfig } from 'mobx-tanstack-query';
|
|
3
|
-
import { AnyObject, Maybe, MaybeFalsy, MaybeFn } from 'yummies/utils/types';
|
|
4
|
-
import { AnyEndpoint } from './endpoint.types.js';
|
|
1
|
+
import type { DefaultError } from '@tanstack/query-core';
|
|
2
|
+
import type { QueryConfig } from 'mobx-tanstack-query';
|
|
3
|
+
import type { AnyObject, Maybe, MaybeFalsy, MaybeFn } from 'yummies/utils/types';
|
|
4
|
+
import type { AnyEndpoint } from './endpoint.types.js';
|
|
5
5
|
export interface EndpointQueryMeta {
|
|
6
6
|
endpointId: string;
|
|
7
7
|
endpointQuery: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoint-query.types.d.ts","sourceRoot":"","sources":["../../src/runtime/endpoint-query.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"endpoint-query.types.d.ts","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CAAC,CAAC,MAAM,CAAC,EAC9C,MAAM,GAAG,YAAY,EACrB,KAAK,GAAG,YAAY,EACpB,UAAU,GAAG,YAAY,IACvB,gBAAgB,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,GAAG;IACvE,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAE/B,MAAM,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;IAC3C;;OAEG;IACH,SAAS,CAAC,EAAE,CACV,QAAQ,EAAE,SAAS,CAAC,YAAY,CAAC,KAC9B,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CAC3C,CAAC;AAEF,MAAM,MAAM,oBAAoB,CAC9B,SAAS,SAAS,WAAW,EAC7B,YAAY,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,EAC9C,MAAM,GAAG,YAAY,EACrB,KAAK,GAAG,YAAY,EACpB,UAAU,GAAG,YAAY,IACvB,gBAAgB,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,GAAG;IACvE,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAE/B,MAAM,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACxD;;OAEG;IACH,SAAS,CAAC,EAAE,CACV,QAAQ,EAAE,SAAS,CAAC,YAAY,CAAC,KAC9B,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CAC3C,CAAC"}
|
package/runtime/endpoint.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
/** biome-ignore-all lint/style/useShorthandFunctionType: this is special trick to add typings for callable class instance */
|
|
2
|
+
import type { DefaultError, InvalidateOptions, InvalidateQueryFilters } from '@tanstack/query-core';
|
|
3
|
+
import type { AnyObject, IsPartial, Maybe } from 'yummies/utils/types';
|
|
4
|
+
import type { EndpointConfiguration, EndpointMutationPresets } from './endpoint.types.js';
|
|
3
5
|
import { EndpointInfiniteQuery } from './endpoint-infinite-query.js';
|
|
4
|
-
import { EndpointInfiniteQueryFlattenOptions, EndpointInfiniteQueryOptions } from './endpoint-infinite-query.types.js';
|
|
6
|
+
import type { EndpointInfiniteQueryFlattenOptions, EndpointInfiniteQueryOptions } from './endpoint-infinite-query.types.js';
|
|
5
7
|
import { EndpointMutation } from './endpoint-mutation.js';
|
|
6
|
-
import { EndpointMutationOptions } from './endpoint-mutation.types.js';
|
|
7
|
-
import { EndpointQueryClient } from './endpoint-query-client.js';
|
|
8
|
+
import type { EndpointMutationOptions } from './endpoint-mutation.types.js';
|
|
8
9
|
import { EndpointQuery } from './endpoint-query.js';
|
|
9
|
-
import { EndpointQueryFlattenOptions, EndpointQueryOptions, EndpointQueryUniqKey } from './endpoint-query.types.js';
|
|
10
|
-
import {
|
|
10
|
+
import type { EndpointQueryFlattenOptions, EndpointQueryOptions, EndpointQueryUniqKey } from './endpoint-query.types.js';
|
|
11
|
+
import type { EndpointQueryClient } from './endpoint-query-client.js';
|
|
11
12
|
import type { HttpClient, HttpResponse } from './http-client.js';
|
|
12
13
|
export interface Endpoint<TResponse extends HttpResponse<any, any>, TParams extends AnyObject, TMetaData extends AnyObject = AnyObject> {
|
|
13
14
|
(...args: IsPartial<TParams> extends true ? [params?: Maybe<TParams>] : [params: TParams]): ReturnType<Endpoint<TResponse, TParams, TMetaData>['request']>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoint.d.ts","sourceRoot":"","sources":["../../src/runtime/endpoint.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"endpoint.d.ts","sourceRoot":"","sources":["../../src/runtime/endpoint.ts"],"names":[],"mappings":"AAAA,6HAA6H;AAC7H,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,E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CAAC,GAC7D,CAAC,MAAM,mCAAmC,CACxC,IAAI,EACJ,KAAK,EACL,MAAM,EACN,UAAU,CACX,CAAC;CAQT"}
|
package/runtime/endpoint.js
CHANGED
|
@@ -38,6 +38,7 @@ export class Endpoint {
|
|
|
38
38
|
if (desc)
|
|
39
39
|
Object.defineProperty(callable, key, desc);
|
|
40
40
|
});
|
|
41
|
+
// biome-ignore lint/correctness/noConstructorReturn: this is special trick to add typings for callable class instance
|
|
41
42
|
return callable;
|
|
42
43
|
}
|
|
43
44
|
getFullUrl(...args) {
|
|
@@ -97,7 +98,6 @@ export class Endpoint {
|
|
|
97
98
|
}
|
|
98
99
|
invalidateQuery(...args) {
|
|
99
100
|
this.queryClient.invalidateQueries({
|
|
100
|
-
// @ts-ignore
|
|
101
101
|
queryKey: this.toQueryKey(args[0], args[1]?.uniqKey),
|
|
102
102
|
exact: true,
|
|
103
103
|
...args[1],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AnyObject } from 'yummies/utils/types';
|
|
2
|
-
import { InvalidateEndpointsFilters } from './endpoint-query-client.types.js';
|
|
1
|
+
import type { AnyObject } from 'yummies/utils/types';
|
|
3
2
|
import type { Endpoint } from './endpoint.js';
|
|
4
|
-
import {
|
|
3
|
+
import type { InvalidateEndpointsFilters } from './endpoint-query-client.types.js';
|
|
4
|
+
import type { FullRequestParams } from './http-client.js';
|
|
5
5
|
export interface EndpointConfiguration<TInput extends AnyObject, TMetaData extends AnyObject = AnyObject> {
|
|
6
6
|
group?: string;
|
|
7
7
|
namespace?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoint.types.d.ts","sourceRoot":"","sources":["../../src/runtime/endpoint.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"endpoint.types.d.ts","sourceRoot":"","sources":["../../src/runtime/endpoint.types.ts"],"names":[],"mappings":"AAAA,OAAO,KA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,WAAW,IAC7D,SAAS,SAAS,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAE5D,MAAM,WAAW,uBAAuB;IACtC,iBAAiB,CAAC,EAAE,0BAA0B,CAAC;CAChD"}
|
package/runtime/http-client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { HttpStatusCode, HttpSuccessStatusCode } from 'http-status-code-types';
|
|
2
|
-
import { ValueOf } from 'yummies/utils/types';
|
|
1
|
+
import type { HttpStatusCode, HttpSuccessStatusCode } from 'http-status-code-types';
|
|
2
|
+
import type { ValueOf } from 'yummies/utils/types';
|
|
3
3
|
export type QueryParamsType = Record<string | number, any>;
|
|
4
4
|
export type ResponseFormat = keyof Omit<Body, 'body' | 'bodyUsed'>;
|
|
5
5
|
export interface FullRequestParams extends Omit<RequestInit, 'body'> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-client.d.ts","sourceRoot":"","sources":["../../src/runtime/http-client.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"http-client.d.ts","sourceRoot":"","sources":["../../src/runtime/http-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACtB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,GAAG,CAAC,CAAC;AAC3D,MAAM,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC,CAAC;AAEnE,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC;IAClE,yEAAyE;IACzE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mBAAmB;IACnB,IAAI,EAAE,MAAM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EAAE,GAAG,EAAE,MAAM;IAKhE,SAAS,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE,eAAe,GAAG,MAAM;IAkB3D,OAAO,CAAC,iBAAiB,CA0BvB;IAEF,SAAS,CAAC,kBAAkB,CAC1B,OAAO,EAAE,aAAa,EACtB,OAAO,CAAC,EAAE,aAAa,GACtB,aAAa;cAaA,cAAc,CAC5B,cAAc,EAAE,iBAAiB,CAAC,QAAQ,CAAC,EAC3C,GAAG,EAAE,QAAQ,EACb,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,eAAe,CAAC;IAkCpB,QAAQ,GAAI,QAAQ,iBAAiB,YAgB1C;IAEK,OAAO,CAAC,CAAC,EAAE,CAAC,EACjB,UAAU,EAAE,iBAAiB,GAC5B,OAAO,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACvB,OAAO,CAAC,aAAa,SAAS,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,EACzD,UAAU,EAAE,iBAAiB,GAC5B,OAAO,CAAC,aAAa,CAAC;CAmE1B"}
|
package/runtime/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export * from './endpoint.js';
|
|
2
2
|
export * from './endpoint.types.js';
|
|
3
|
-
export * from './http-client.js';
|
|
4
|
-
export * from './endpoint-query-client.js';
|
|
5
|
-
export * from './endpoint-query-client.types.js';
|
|
6
|
-
export * from './endpoint-query.js';
|
|
7
|
-
export * from './endpoint-query.types.js';
|
|
8
3
|
export * from './endpoint-mutation.js';
|
|
9
4
|
export * from './endpoint-mutation.types.js';
|
|
5
|
+
export * from './endpoint-query.js';
|
|
6
|
+
export * from './endpoint-query.types.js';
|
|
7
|
+
export * from './endpoint-query-client.js';
|
|
8
|
+
export * from './endpoint-query-client.types.js';
|
|
9
|
+
export * from './http-client.js';
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
package/runtime/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,kBAAkB,CAAC"}
|
package/runtime/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export * from './endpoint.js';
|
|
2
2
|
export * from './endpoint.types.js';
|
|
3
|
-
export * from './http-client.js';
|
|
4
|
-
export * from './endpoint-query-client.js';
|
|
5
|
-
export * from './endpoint-query-client.types.js';
|
|
6
|
-
export * from './endpoint-query.js';
|
|
7
|
-
export * from './endpoint-query.types.js';
|
|
8
3
|
export * from './endpoint-mutation.js';
|
|
9
4
|
export * from './endpoint-mutation.types.js';
|
|
5
|
+
export * from './endpoint-query.js';
|
|
6
|
+
export * from './endpoint-query.types.js';
|
|
7
|
+
export * from './endpoint-query-client.js';
|
|
8
|
+
export * from './endpoint-query-client.types.js';
|
|
9
|
+
export * from './http-client.js';
|
package/cli/define-config.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Maybe } from 'yummies/utils/types';
|
|
2
|
-
import { GenerateQueryApiParams } from '../codegen/index.js';
|
|
3
|
-
export declare const defineConfig: (...configs: Maybe<GenerateQueryApiParams | GenerateQueryApiParams[]>[]) => GenerateQueryApiParams[];
|
|
4
|
-
//# sourceMappingURL=define-config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"define-config.d.ts","sourceRoot":"","sources":["../../src/cli/define-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,eAAO,MAAM,YAAY,GACvB,GAAG,SAAS,KAAK,CAAC,sBAAsB,GAAG,sBAAsB,EAAE,CAAC,EAAE,KACrE,sBAAsB,EAIxB,CAAC"}
|
|
File without changes
|