@query-key-gen/used-generator 0.11.3 → 0.11.5
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/.ultra.cache.json +1 -1
- package/CHANGELOG.md +6 -0
- package/lib/index.cjs +5 -5
- package/lib/index.d.cts +9 -9
- package/lib/index.d.ts +9 -9
- package/lib/index.js +5 -5
- package/package.json +1 -1
- package/src/index.ts +2 -1
- package/src/types/config.ts +4 -4
package/.ultra.cache.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"files":{"lib":"
|
1
|
+
{"files":{"lib":"1744011230147.6404","node_modules":"1744011218164.712","CHANGELOG.md":"8cab61c5d8251f3c731a23c68537b6dc4d31f524","README.md":"c7a9a849c0ec55c1c2bab2288cdd9db59c19777d","package.json":"09e769fe38bb09982c0922e29e551d19aa6b5ca6","src/core/QueryKeyUsedInfoGenerator.ts":"8d8e3b1d3cf68275d75d9c67210a3f8e05c27c87","src/core/index.ts":"64830ff2a399328aba05be5df1b64acf3865b36b","src/index.ts":"1fd11458eaf29d4b21da26d83ba0bdbbb44b9ff6","src/queryFinder/QueryKeyUsedFinder.ts":"9dd9ef30b3993be5f6bc3867086fe58bfd657725","src/queryFinder/index.ts":"4af4bb7c48579683e1bbe6e341f1a5806e67563a","src/types/config.ts":"5faed7da8ecd6460f29066c8c7316c9ec2709fae","src/types/index.ts":"f03c2281a9140975800795ec2a68bf8c53273244","src/utils/index.ts":"0ada954b3e9c1d296418c15769351fd3d4f2b93a","tsconfig.json":"41db3a2a30dd2a76788252c579552e7049c2118d","tsup.config.ts":"99c48d132d7fa99eca2ea5d9f87c38ca955386bd"},"deps":{"@query-key-gen/generator-common":0}}
|
package/CHANGELOG.md
CHANGED
package/lib/index.cjs
CHANGED
@@ -325,10 +325,10 @@ var QueryKeyUsedInfoGenerator = class extends GenericRunner {
|
|
325
325
|
// src/types/config.ts
|
326
326
|
var import_zod = require("zod");
|
327
327
|
var configSchema = import_zod.z.object({
|
328
|
-
output: import_zod.z.string().
|
329
|
-
path: import_zod.z.string().
|
330
|
-
globalQueryKeyName: import_zod.z.string().
|
331
|
-
ignoreFiles: import_zod.z.array(import_zod.z.string()).
|
328
|
+
output: import_zod.z.string().optional().catch("src/query-key-used-info.ts"),
|
329
|
+
path: import_zod.z.string().optional().catch("./src/**/*.{jsx,tsx,ts}"),
|
330
|
+
globalQueryKeyName: import_zod.z.string().optional().catch("globalQueryKeys"),
|
331
|
+
ignoreFiles: import_zod.z.array(import_zod.z.string()).optional().catch([])
|
332
332
|
});
|
333
333
|
var defaultConfig = {
|
334
334
|
output: "./src/query-key-used-info.ts",
|
@@ -340,7 +340,7 @@ var defaultConfig = {
|
|
340
340
|
// src/index.ts
|
341
341
|
function QueryKeyUsedPlugin(_config) {
|
342
342
|
var _a;
|
343
|
-
const config = configSchema.parse(__spreadProps(__spreadValues({}, defaultConfig), {
|
343
|
+
const config = configSchema.parse(__spreadProps(__spreadValues(__spreadValues({}, defaultConfig), _config != null ? _config : {}), {
|
344
344
|
ignoreFiles: [...defaultConfig.ignoreFiles, ...(_a = _config == null ? void 0 : _config.ignoreFiles) != null ? _a : []]
|
345
345
|
}));
|
346
346
|
const rootDir = process.cwd();
|
package/lib/index.d.cts
CHANGED
@@ -2,20 +2,20 @@ import { Plugin } from 'vite';
|
|
2
2
|
import { z } from 'zod';
|
3
3
|
|
4
4
|
declare const configSchema: z.ZodObject<{
|
5
|
-
output: z.
|
6
|
-
path: z.
|
7
|
-
globalQueryKeyName: z.
|
8
|
-
ignoreFiles: z.
|
5
|
+
output: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
6
|
+
path: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
7
|
+
globalQueryKeyName: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
8
|
+
ignoreFiles: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
9
9
|
}, "strip", z.ZodTypeAny, {
|
10
|
-
output: string;
|
11
|
-
path: string;
|
12
|
-
globalQueryKeyName: string;
|
13
|
-
ignoreFiles: string[];
|
14
|
-
}, {
|
15
10
|
output?: string | undefined;
|
16
11
|
path?: string | undefined;
|
17
12
|
globalQueryKeyName?: string | undefined;
|
18
13
|
ignoreFiles?: string[] | undefined;
|
14
|
+
}, {
|
15
|
+
output?: unknown;
|
16
|
+
path?: unknown;
|
17
|
+
globalQueryKeyName?: unknown;
|
18
|
+
ignoreFiles?: unknown;
|
19
19
|
}>;
|
20
20
|
type ConfigOptions = z.infer<typeof configSchema>;
|
21
21
|
|
package/lib/index.d.ts
CHANGED
@@ -2,20 +2,20 @@ import { Plugin } from 'vite';
|
|
2
2
|
import { z } from 'zod';
|
3
3
|
|
4
4
|
declare const configSchema: z.ZodObject<{
|
5
|
-
output: z.
|
6
|
-
path: z.
|
7
|
-
globalQueryKeyName: z.
|
8
|
-
ignoreFiles: z.
|
5
|
+
output: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
6
|
+
path: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
7
|
+
globalQueryKeyName: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
8
|
+
ignoreFiles: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
9
9
|
}, "strip", z.ZodTypeAny, {
|
10
|
-
output: string;
|
11
|
-
path: string;
|
12
|
-
globalQueryKeyName: string;
|
13
|
-
ignoreFiles: string[];
|
14
|
-
}, {
|
15
10
|
output?: string | undefined;
|
16
11
|
path?: string | undefined;
|
17
12
|
globalQueryKeyName?: string | undefined;
|
18
13
|
ignoreFiles?: string[] | undefined;
|
14
|
+
}, {
|
15
|
+
output?: unknown;
|
16
|
+
path?: unknown;
|
17
|
+
globalQueryKeyName?: unknown;
|
18
|
+
ignoreFiles?: unknown;
|
19
19
|
}>;
|
20
20
|
type ConfigOptions = z.infer<typeof configSchema>;
|
21
21
|
|
package/lib/index.js
CHANGED
@@ -294,10 +294,10 @@ var QueryKeyUsedInfoGenerator = class extends GenericRunner {
|
|
294
294
|
// src/types/config.ts
|
295
295
|
import { z } from "zod";
|
296
296
|
var configSchema = z.object({
|
297
|
-
output: z.string().
|
298
|
-
path: z.string().
|
299
|
-
globalQueryKeyName: z.string().
|
300
|
-
ignoreFiles: z.array(z.string()).
|
297
|
+
output: z.string().optional().catch("src/query-key-used-info.ts"),
|
298
|
+
path: z.string().optional().catch("./src/**/*.{jsx,tsx,ts}"),
|
299
|
+
globalQueryKeyName: z.string().optional().catch("globalQueryKeys"),
|
300
|
+
ignoreFiles: z.array(z.string()).optional().catch([])
|
301
301
|
});
|
302
302
|
var defaultConfig = {
|
303
303
|
output: "./src/query-key-used-info.ts",
|
@@ -309,7 +309,7 @@ var defaultConfig = {
|
|
309
309
|
// src/index.ts
|
310
310
|
function QueryKeyUsedPlugin(_config) {
|
311
311
|
var _a;
|
312
|
-
const config = configSchema.parse(__spreadProps(__spreadValues({}, defaultConfig), {
|
312
|
+
const config = configSchema.parse(__spreadProps(__spreadValues(__spreadValues({}, defaultConfig), _config != null ? _config : {}), {
|
313
313
|
ignoreFiles: [...defaultConfig.ignoreFiles, ...(_a = _config == null ? void 0 : _config.ignoreFiles) != null ? _a : []]
|
314
314
|
}));
|
315
315
|
const rootDir = process.cwd();
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
@@ -9,8 +9,9 @@ import { ConfigOptions, configSchema, defaultConfig } from './types/config';
|
|
9
9
|
export default function QueryKeyUsedPlugin(_config?: Omit<ConfigOptions, 'path'>): Plugin {
|
10
10
|
const config = configSchema.parse({
|
11
11
|
...defaultConfig,
|
12
|
+
...(_config ?? {}),
|
12
13
|
ignoreFiles: [...defaultConfig.ignoreFiles, ...(_config?.ignoreFiles ?? [])]
|
13
|
-
})
|
14
|
+
}) as Required<ConfigOptions>;
|
14
15
|
const rootDir = process.cwd(); // 프로젝트 루트 경로
|
15
16
|
const ignoreFiles = config.ignoreFiles;
|
16
17
|
const program = new Programmer(config);
|
package/src/types/config.ts
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
import { z } from 'zod';
|
2
2
|
|
3
3
|
export const configSchema = z.object({
|
4
|
-
output: z.string().
|
5
|
-
path: z.string().
|
6
|
-
globalQueryKeyName: z.string().
|
7
|
-
ignoreFiles: z.array(z.string()).
|
4
|
+
output: z.string().optional().catch('src/query-key-used-info.ts'),
|
5
|
+
path: z.string().optional().catch('./src/**/*.{jsx,tsx,ts}'),
|
6
|
+
globalQueryKeyName: z.string().optional().catch('globalQueryKeys'),
|
7
|
+
ignoreFiles: z.array(z.string()).optional().catch([])
|
8
8
|
});
|
9
9
|
|
10
10
|
export type ConfigOptions = z.infer<typeof configSchema>;
|