@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 CHANGED
@@ -1 +1 @@
1
- {"files":{"lib":"1744002293724.955","node_modules":"1744002282369.8904","CHANGELOG.md":"110a80f29e8e5d66f8cb0d82427387a85f02510e","README.md":"c7a9a849c0ec55c1c2bab2288cdd9db59c19777d","package.json":"aef01ef92c8f6adf74a26db4878e5cead4e63b7c","src/core/QueryKeyUsedInfoGenerator.ts":"8d8e3b1d3cf68275d75d9c67210a3f8e05c27c87","src/core/index.ts":"64830ff2a399328aba05be5df1b64acf3865b36b","src/index.ts":"7fe960b4c559fd488bc6b5958c8422c02fe910b4","src/queryFinder/QueryKeyUsedFinder.ts":"9dd9ef30b3993be5f6bc3867086fe58bfd657725","src/queryFinder/index.ts":"4af4bb7c48579683e1bbe6e341f1a5806e67563a","src/types/config.ts":"1cde955b78ae7be37fd7f629ce7459560dd85cd2","src/types/index.ts":"f03c2281a9140975800795ec2a68bf8c53273244","src/utils/index.ts":"0ada954b3e9c1d296418c15769351fd3d4f2b93a","tsconfig.json":"41db3a2a30dd2a76788252c579552e7049c2118d","tsup.config.ts":"99c48d132d7fa99eca2ea5d9f87c38ca955386bd"},"deps":{"@query-key-gen/generator-common":0}}
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
@@ -1,5 +1,11 @@
1
1
  # @query-key-gen/used-generator
2
2
 
3
+ ## 0.11.5
4
+
5
+ ### Patch Changes
6
+
7
+ - c84d998: update config option
8
+
3
9
  ## 0.11.3
4
10
 
5
11
  ### Patch Changes
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().default("src/query-key-used-info.ts"),
329
- path: import_zod.z.string().default("./src/**/*.{jsx,tsx,ts}"),
330
- globalQueryKeyName: import_zod.z.string().default("globalQueryKeys"),
331
- ignoreFiles: import_zod.z.array(import_zod.z.string()).default([])
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.ZodDefault<z.ZodString>;
6
- path: z.ZodDefault<z.ZodString>;
7
- globalQueryKeyName: z.ZodDefault<z.ZodString>;
8
- ignoreFiles: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
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.ZodDefault<z.ZodString>;
6
- path: z.ZodDefault<z.ZodString>;
7
- globalQueryKeyName: z.ZodDefault<z.ZodString>;
8
- ignoreFiles: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
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().default("src/query-key-used-info.ts"),
298
- path: z.string().default("./src/**/*.{jsx,tsx,ts}"),
299
- globalQueryKeyName: z.string().default("globalQueryKeys"),
300
- ignoreFiles: z.array(z.string()).default([])
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@query-key-gen/used-generator",
3
- "version": "0.11.3",
3
+ "version": "0.11.5",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "repository": {
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);
@@ -1,10 +1,10 @@
1
1
  import { z } from 'zod';
2
2
 
3
3
  export const configSchema = z.object({
4
- output: z.string().default('src/query-key-used-info.ts'),
5
- path: z.string().default('./src/**/*.{jsx,tsx,ts}'),
6
- globalQueryKeyName: z.string().default('globalQueryKeys'),
7
- ignoreFiles: z.array(z.string()).default([])
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>;