@uiwwsw/react-query-helper 0.1.2 → 0.1.4

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.
@@ -0,0 +1,9 @@
1
+ import type { MutationFunction, UseInfiniteQueryOptions, UseMutationOptions, UseQueryOptions } from "@tanstack/react-query";
2
+ type QueryOptionType = <T extends unknown[], J>(key: string[], fn: (...payload: T) => Promise<J>) => (...payload: T) => UseQueryOptions<J>;
3
+ type MutationOptionType = <T, K>(key: string[], fn: MutationFunction<T, K>) => () => UseMutationOptions<T, unknown, K>;
4
+ type InfiniteOptionType = <T extends unknown[], K>(key: string[], fn: (...payload: T) => Promise<K>) => (...payload: T) => UseInfiniteQueryOptions<K, unknown, K>;
5
+ export declare const queryOption: QueryOptionType;
6
+ export declare const mutationOption: MutationOptionType;
7
+ export declare const infiniteOption: InfiniteOptionType;
8
+ export {};
9
+ //# sourceMappingURL=query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/utils/query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,eAAe,EAChB,MAAM,uBAAuB,CAAC;AAE/B,KAAK,eAAe,GAAG,CAAC,CAAC,SAAS,OAAO,EAAE,EAAE,CAAC,EAC5C,GAAG,EAAE,MAAM,EAAE,EACb,EAAE,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,KAC9B,CAAC,GAAG,OAAO,EAAE,CAAC,KAAK,eAAe,CAAC,CAAC,CAAC,CAAC;AAC3C,KAAK,kBAAkB,GAAG,CAAC,CAAC,EAAE,CAAC,EAC7B,GAAG,EAAE,MAAM,EAAE,EACb,EAAE,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,KACvB,MAAM,kBAAkB,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;AAC7C,KAAK,kBAAkB,GAAG,CAAC,CAAC,SAAS,OAAO,EAAE,EAAE,CAAC,EAC/C,GAAG,EAAE,MAAM,EAAE,EACb,EAAE,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,KAC9B,CAAC,GAAG,OAAO,EAAE,CAAC,KAAK,uBAAuB,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;AAE/D,eAAO,MAAM,WAAW,EAAE,eAYzB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,kBAS5B,CAAC;AACF,eAAO,MAAM,cAAc,EAAE,kBAwB5B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uiwwsw/react-query-helper",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "module": "dist/index.js",
5
5
  "type": "module",
6
6
  "types": "dist/index.d.ts",
@@ -23,21 +23,21 @@
23
23
  },
24
24
  "scripts": {
25
25
  "start": "bun run src/index.ts",
26
- "build": "tsc && bun build src/cli.ts --outdir dist --target bun && bun build src/index.ts --outdir dist --target bun && rm -rf dist/core dist/utils dist/config.d.ts dist/config.d.ts.map dist/config.js && node scripts/prepend-shebang.cjs dist/cli.js",
26
+ "build": "tsc && bun build src/cli.ts --outdir dist --target bun --external typescript --external prettier && bun build src/index.ts --outdir dist --target bun --external typescript --external prettier && node scripts/prepend-shebang.cjs dist/cli.js",
27
27
  "dev": "bun run src/cli.ts --watch",
28
28
  "generate": "bun run src/cli.ts --generate"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/bun": "latest",
32
32
  "@types/node": "^24.1.0",
33
- "chokidar": "^4.0.3",
34
- "prettier": "^3.6.2",
35
- "typescript": "^5.8.3"
33
+ "chokidar": "^4.0.3"
36
34
  },
37
35
  "peerDependencies": {
38
36
  "@tanstack/react-query": "^5.83.0"
39
37
  },
40
38
  "dependencies": {
41
- "fs": "^0.0.1-security"
39
+ "fs": "^0.0.1-security",
40
+ "prettier": "^3.6.2",
41
+ "typescript": "^5.8.3"
42
42
  }
43
43
  }