mobx-tanstack-query-api 0.11.0 → 0.13.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/README.md +2 -4
- 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 +62 -38
- package/codegen/index.d.ts.map +1 -1
- package/codegen/index.js +21 -33
- 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-endpoints-per-file.tmpl.js +29 -26
- 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/endpoint-per-file.tmpl.js +7 -3
- 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 +2 -1
- package/codegen/utils/remove-unused-types.d.ts.map +1 -1
- package/codegen/utils/remove-unused-types.js +7 -18
- package/codegen/utils/unpack-filter-option.d.ts +4 -0
- package/codegen/utils/unpack-filter-option.d.ts.map +1 -0
- package/codegen/utils/unpack-filter-option.js +16 -0
- package/package.json +51 -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
|
@@ -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;;;EAwH3B,CAAC"}
|
|
@@ -20,9 +20,13 @@ export const endpointPerFileTmpl = async ({ route, configuration, apiParams, for
|
|
|
20
20
|
dataContractNamesInThisFile.push(reservedDataContractName);
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
|
-
|
|
23
|
+
const extraImportLines = [];
|
|
24
24
|
if (metaInfo) {
|
|
25
|
-
|
|
25
|
+
extraImportLines.push(`import { ${[groupName && 'Group', metaInfo?.namespace && 'namespace', 'Tag'].filter(Boolean).join(',')} } from "../${groupName ? '../' : ''}meta-info";`);
|
|
26
|
+
}
|
|
27
|
+
const requestInfoMeta = apiParams.getEndpointMeta?.(route, utils);
|
|
28
|
+
if (requestInfoMeta?.typeNameImportPath && requestInfoMeta.typeName) {
|
|
29
|
+
extraImportLines.push(`import { ${requestInfoMeta.typeName} } from "${requestInfoMeta.typeNameImportPath}";`);
|
|
26
30
|
}
|
|
27
31
|
return {
|
|
28
32
|
reservedDataContractNames: dataContractNamesInThisFile,
|
|
@@ -35,7 +39,7 @@ export const endpointPerFileTmpl = async ({ route, configuration, apiParams, for
|
|
|
35
39
|
import { ${importFileParams.endpoint.exportName} } from "${importFileParams.endpoint.path}";
|
|
36
40
|
import { ${importFileParams.httpClient.exportName} } from "${importFileParams.httpClient.path}";
|
|
37
41
|
import { ${importFileParams.queryClient.exportName} } from "${importFileParams.queryClient.path}";
|
|
38
|
-
${
|
|
42
|
+
${extraImportLines.join('\n')}
|
|
39
43
|
|
|
40
44
|
${configuration.modelTypes.length > 0
|
|
41
45
|
? `
|
|
@@ -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,6 +1,7 @@
|
|
|
1
|
+
import type { FilterOption } from '../index.js';
|
|
1
2
|
export interface RemoveUnusedTypesParams {
|
|
2
3
|
directory: string;
|
|
3
|
-
keepTypes?:
|
|
4
|
+
keepTypes?: FilterOption<(typeName: string) => boolean>;
|
|
4
5
|
}
|
|
5
6
|
export declare const removeUnusedTypes: (params: RemoveUnusedTypesParams) => Promise<void>;
|
|
6
7
|
//# sourceMappingURL=remove-unused-types.d.ts.map
|
|
@@ -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":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,YAAY,CAAC,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;CACzD;AA4ID,eAAO,MAAM,iBAAiB,GAAU,QAAQ,uBAAuB,kBAKtE,CAAC"}
|
|
@@ -1,21 +1,9 @@
|
|
|
1
|
-
/* eslint-disable no-constant-condition */
|
|
2
|
-
import { Project, SyntaxKind, Node } from 'ts-morph';
|
|
3
1
|
import path from 'node:path';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return keepTypesArr.every((keepTypeCheck) => {
|
|
10
|
-
if (typeof keepTypeCheck === 'string') {
|
|
11
|
-
return typeName !== keepTypeCheck;
|
|
12
|
-
}
|
|
13
|
-
else {
|
|
14
|
-
return !keepTypeCheck.test(typeName);
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
const removeUnusedTypesItteration = async ({ directory, keepTypes, }) => {
|
|
2
|
+
import { Node, Project, SyntaxKind } from 'ts-morph';
|
|
3
|
+
import { unpackFilterOption } from './unpack-filter-option.js';
|
|
4
|
+
const removeUnusedTypesItteration = async ({ directory, keepTypes,
|
|
5
|
+
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: <explanation>
|
|
6
|
+
}) => {
|
|
19
7
|
const project = new Project();
|
|
20
8
|
project.addSourceFilesAtPaths([
|
|
21
9
|
path.join(directory, '**/*.ts'),
|
|
@@ -97,11 +85,12 @@ const removeUnusedTypesItteration = async ({ directory, keepTypes, }) => {
|
|
|
97
85
|
}
|
|
98
86
|
}
|
|
99
87
|
let removedCount = 0;
|
|
88
|
+
const isNeedToRemoveType = unpackFilterOption(keepTypes, (name) => name, false);
|
|
100
89
|
for (const [name, declarations] of candidateTypes) {
|
|
101
90
|
if (usedTypes.has(name))
|
|
102
91
|
continue;
|
|
103
92
|
for (const decl of declarations) {
|
|
104
|
-
if ('remove' in decl &&
|
|
93
|
+
if ('remove' in decl && isNeedToRemoveType(name)) {
|
|
105
94
|
decl.remove();
|
|
106
95
|
removedCount++;
|
|
107
96
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Maybe } from 'yummies/utils/types';
|
|
2
|
+
import type { FilterOption } from '../index.js';
|
|
3
|
+
export declare const unpackFilterOption: <TArgs extends any[]>(option: Maybe<FilterOption<(...args: TArgs) => boolean>>, argsToString: (...args: TArgs) => string, defaultReturnValue?: boolean) => ((...args: TArgs) => boolean);
|
|
4
|
+
//# sourceMappingURL=unpack-filter-option.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unpack-filter-option.d.ts","sourceRoot":"","sources":["../../../src/codegen/utils/unpack-filter-option.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,eAAO,MAAM,kBAAkB,GAAI,KAAK,SAAS,GAAG,EAAE,EACpD,QAAQ,KAAK,CAAC,YAAY,CAAC,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,OAAO,CAAC,CAAC,EACxD,cAAc,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,MAAM,EACxC,qBAAoB,OAAc,KACjC,CAAC,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,OAAO,CAqB9B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const unpackFilterOption = (option, argsToString, defaultReturnValue = true) => {
|
|
2
|
+
if (typeof option === 'function') {
|
|
3
|
+
return option;
|
|
4
|
+
}
|
|
5
|
+
if (option == null) {
|
|
6
|
+
return () => defaultReturnValue;
|
|
7
|
+
}
|
|
8
|
+
const inputs = Array.isArray(option) ? option : [option];
|
|
9
|
+
return (...args) => inputs.some((input) => {
|
|
10
|
+
const str = argsToString(...args);
|
|
11
|
+
if (typeof input === 'string') {
|
|
12
|
+
return input === str;
|
|
13
|
+
}
|
|
14
|
+
return input.test(str);
|
|
15
|
+
});
|
|
16
|
+
};
|
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.13.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",
|
|
34
|
+
"cac": "^6.7.14",
|
|
26
35
|
"mobx-tanstack-query": "^6.4.0",
|
|
27
|
-
"swagger-typescript-api": "13.2.
|
|
36
|
+
"swagger-typescript-api": "13.2.10",
|
|
28
37
|
"ts-morph": "^26.0.0",
|
|
29
38
|
"undici-types": "^7.11.0",
|
|
30
|
-
"yummies": "^
|
|
39
|
+
"yummies": "^5.2.0"
|
|
31
40
|
},
|
|
32
41
|
"devDependencies": {
|
|
42
|
+
"@biomejs/biome": "^2.2.4",
|
|
43
|
+
"@changesets/changelog-github": "^0.5.1",
|
|
44
|
+
"@changesets/cli": "^2.29.5",
|
|
33
45
|
"@testing-library/react": "^16.0.1",
|
|
34
46
|
"@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
47
|
"@vitejs/plugin-react-swc": "^3.7.2",
|
|
40
|
-
"@vitest/coverage-istanbul": "^2.
|
|
48
|
+
"@vitest/coverage-istanbul": "^3.2.4",
|
|
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",
|
|
@@ -127,6 +148,11 @@
|
|
|
127
148
|
"default": "./codegen/utils/remove-unused-types.js",
|
|
128
149
|
"types": "./codegen/utils/remove-unused-types.d.ts"
|
|
129
150
|
},
|
|
151
|
+
"./codegen/utils/unpack-filter-option": {
|
|
152
|
+
"import": "./codegen/utils/unpack-filter-option.js",
|
|
153
|
+
"default": "./codegen/utils/unpack-filter-option.js",
|
|
154
|
+
"types": "./codegen/utils/unpack-filter-option.d.ts"
|
|
155
|
+
},
|
|
130
156
|
".": {
|
|
131
157
|
"import": "./index.js",
|
|
132
158
|
"default": "./index.js",
|
|
@@ -176,7 +202,7 @@
|
|
|
176
202
|
"typings": "./index.d.ts",
|
|
177
203
|
"scripts": {
|
|
178
204
|
"clean": "rimraf dist",
|
|
179
|
-
"lint:check": "
|
|
205
|
+
"lint:check": "pnpm exec biome check --write --no-errors-on-unmatched --files-ignore-unknown=true",
|
|
180
206
|
"ts:check": "tsc --noEmit",
|
|
181
207
|
"check": "npm run lint:check && npm run ts:check",
|
|
182
208
|
"prebuild": "npm run clean && npm run check",
|
|
@@ -186,9 +212,13 @@
|
|
|
186
212
|
"pub:patch": "PUBLISH=true PUBLISH_VERSION=patch pnpm run build",
|
|
187
213
|
"pub:minor": "PUBLISH=true PUBLISH_VERSION=minor pnpm run build",
|
|
188
214
|
"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",
|
|
215
|
+
"test": "vitest run --config vitest.config.ts",
|
|
216
|
+
"test:watch": "vitest watch --config vitest.config.ts",
|
|
217
|
+
"test:coverage": "vitest run --config vitest.config.ts --coverage",
|
|
218
|
+
"docs": "pnpm build && cd docs && pnpm dev",
|
|
219
|
+
"docs:install": "cd docs && pnpm i",
|
|
220
|
+
"docs:build": "cd docs && pnpm build",
|
|
221
|
+
"docs:serve": "cd docs && pnpm preview",
|
|
192
222
|
"dev": "pnpm build && nodemon --delay 0.5 --watch src --ext ts,tsx --exec \"pnpm build && pnpm playground\"",
|
|
193
223
|
"playground": "node ./playground/index.mjs",
|
|
194
224
|
"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,mBAAmB,EACpB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAS,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EACV,mCAAmC,EACnC,4BAA4B,EAC5B,6CAA6C,EAC9C,MAAM,oCAAoC,CAAC;AAG5C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGtE,qBAAa,qBAAqB,CAChC,SAAS,SAAS,WAAW,EAC7B,YAAY,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,EAC9C,MAAM,GAAG,YAAY,EACrB,UAAU,GAAG,OAAO,EACpB,KAAK,GAAG,YAAY,CAAC,YAAY,EAAE,UAAU,CAAC,CAC9C,SAAQ,aAAa,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;IAenE,OAAO,CAAC,QAAQ;IAdlB,QAAQ,EAAE,SAAS,CAAC,YAAY,CAAC,GAAG,IAAI,CAAQ;IAChD,MAAM,EAAE,SAAS,CAAC,UAAU,CAAC,GAAG,IAAI,CAAQ;IAE5C,OAAO,CAAC,OAAO,CAAC,CAAuB;IAEvC,OAAO,CAAC,QAAQ,CAMJ;gBAGF,QAAQ,EAAE,WAAW,EAC7B,WAAW,EAAE,mBAAmB,EAEhC,iBAAiB,EACb,4BAA4B,CAC1B,SAAS,EACT,YAAY,EACZ,MAAM,EACN,UAAU,EACV,KAAK,CACN,GACD,CAAC,MAAM,mCAAmC,CACxC,SAAS,EACT,YAAY,EACZ,MAAM,EACN,UAAU,EACV,KAAK,CACN,CAAC;IAoGR,MAAM,CAAC,EACL,MAAM,EACN,GAAG,OAAO,EACX,EAAE,6CAA6C,CAC9C,SAAS,EACT,YAAY,EACZ,MAAM,EACN,UAAU,EACV,KAAK,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,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,KAAK,EACV,mBAAmB,EACnB,2BAA2B,EAC3B,oBAAoB,EACpB,0BAA0B,EAC3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAEnC,KAAK,wBAAwB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AC;IAE/B,MAAM,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;IAC9E;;OAEG;IACH,SAAS,CAAC,EAAE,CACV,QAAQ,EAAE,SAAS,CAAC,YAAY,CAAC,KAC9B,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CAC3C,CAAC;AAEF,KAAK,yBAAyB,CAC5B,SAAS,SAAS,WAAW,EAC7B,QAAQ,SAAS,SAAS,IACxB,IAAI,CAAC,QAAQ,EAAE,iBAAiB,CAAC,GAAG;IACtC,MAAM,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,6CAA6C,CACvD,SAAS,SAAS,WAAW,EAC7B,YAAY,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,EAC9C,MAAM,GAAG,YAAY,EACrB,UAAU,GAAG,OAAO,EACpB,KAAK,GAAG,YAAY,CAAC,YAAY,EAAE,UAAU,CAAC,IAE5C,yBAAyB,CACvB,SAAS,EACT,OAAO,CACL,oBAAoB,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CACrE,CACF,GACD,yBAAyB,CACvB,SAAS,EACT,0BAA0B,CAAC,YAAY,EAAE,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,gCA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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,CAAC;AACnC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAWtE,qBAAa,aAAa,CACxB,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,CACzB,SAAQ,KAAK,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC;IAIpD,OAAO,CAAC,QAAQ;IAHlB,OAAO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(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","sourceRoot":"","sources":["../../src/runtime/endpoint-query.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EACV,SAAS,EACT,KAAK,EACL,UAAU,EACV,OAAO,EACR,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,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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,EACvB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,KAAK,EACV,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EACV,mCAAmC,EACnC,4BAA4B,EAC7B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CA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AAE,iBAAiB;KAC5B,GACD;QACE,MAAM,EAAE,OAAO;QACf,OAAO,CAAC,EAAE,sBAAsB,GAAG;YAAE,OAAO,CAAC,EAAE,oBAAoB,CAAA;SAAE;QACrE,OAAO,CAAC,EAAE,iBAAiB;KAC5B;IAYP,UAAU,CACR,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC,EACzB,aAAa,SAAS,SAAS,GAAG,IAAI,GAAG,IAAI,EAC7C,QAAQ,GAAG,OAAO,EAElB,OAAO,EAAE,uBAAuB,CAC9B,IAAI,EACJ,KAAK,EACL,OAAO,EACP,aAAa,EACb,QAAQ,CACT;IAcH,OAAO,CACL,YAAY,GAAG,SAAS,CAAC,MAAM,CAAC,EAChC,MAAM,GAAG,YAAY,EACrB,KAAK,GAAG,YAAY,EACpB,UAAU,GAAG,YAAY,EAEzB,OAAO,EACH,oBAAoB,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,GACnE,CAAC,MAAM,2BAA2B,CAChC,IAAI,EACJ,YAAY,EACZ,MAAM,EACN,KAAK,EACL,UAAU,CACX,CAAC;IASR,eAAe,CACb,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC,EACzB,MAAM,GAAG,YAAY,EACrB,UAAU,GAAG,OAAO,EAEpB,OAAO,EACH,4BAA4B,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,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],
|