@gringow/gringow 0.0.7 → 0.0.8

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.
Files changed (54) hide show
  1. package/dist/config.d.mts +23 -3
  2. package/dist/config.mjs +1 -1
  3. package/dist/config.test.d.mts +2 -0
  4. package/dist/config.test.mjs +18651 -0
  5. package/dist/{default-config.d.mts → constants/default-config.d.mts} +1 -1
  6. package/dist/{default-config.mjs → constants/default-config.mjs} +1 -1
  7. package/dist/data/check-cache.d.mts +1 -1
  8. package/dist/data/check-cache.mjs +37 -15
  9. package/dist/data/clear-cache.d.mts +9 -0
  10. package/dist/data/clear-cache.mjs +1 -1
  11. package/dist/data/create-cache-dir.mjs +1 -1
  12. package/dist/data/delete-cache-item.d.mts +1 -1
  13. package/dist/data/delete-cache-item.mjs +1 -1
  14. package/dist/data/get-cache.d.mts +10 -0
  15. package/dist/data/get-cache.mjs +1 -1
  16. package/dist/data/get-or-create-cache.d.mts +1 -1
  17. package/dist/data/get-or-create-cache.mjs +1 -1
  18. package/dist/data/save-cache.d.mts +7 -1
  19. package/dist/data/save-cache.mjs +1 -1
  20. package/dist/data/write-cache-to-disk.d.mts +1 -1
  21. package/dist/data/write-cache-to-disk.mjs +1 -1
  22. package/dist/flat-template-string.test.mjs +1 -1
  23. package/dist/gringow.d.mts +1 -1
  24. package/dist/gringow.mjs +42 -20
  25. package/dist/index.d.mts +25 -3
  26. package/dist/index.mjs +42 -20
  27. package/dist/io/anthropic/ask.d.mts +6 -0
  28. package/dist/io/anthropic/ask.mjs +1 -1
  29. package/dist/io/anthropic/commit-response.d.mts +7 -1
  30. package/dist/io/anthropic/index.d.mts +1 -1
  31. package/dist/io/anthropic/index.mjs +1 -1
  32. package/dist/io/anthropic/parse.d.mts +7 -1
  33. package/dist/io/ask-llm.d.mts +7 -1
  34. package/dist/io/ask-llm.mjs +6 -6
  35. package/dist/io/gemini/ask.d.mts +6 -0
  36. package/dist/io/gemini/ask.mjs +1 -1
  37. package/dist/io/gemini/commit-response.d.mts +6 -0
  38. package/dist/io/gemini/index.d.mts +1 -1
  39. package/dist/io/gemini/index.mjs +1 -1
  40. package/dist/io/gemini/parse.d.mts +7 -1
  41. package/dist/io/huggingface/ask.d.mts +1 -1
  42. package/dist/io/huggingface/ask.mjs +1 -1
  43. package/dist/io/huggingface/commit-response.d.mts +13 -1
  44. package/dist/io/huggingface/index.d.mts +1 -1
  45. package/dist/io/huggingface/index.mjs +1 -1
  46. package/dist/io/huggingface/languagesMap.d.mts +5 -0
  47. package/dist/io/huggingface/parse.d.mts +7 -1
  48. package/dist/logger.d.mts +6 -20
  49. package/dist/logger.mjs +36 -14
  50. package/dist/logger.test.d.mts +2 -0
  51. package/dist/logger.test.mjs +18683 -0
  52. package/dist/schemas/config.shcema.d.mts +12 -12
  53. package/dist/types/index.d.mts +1 -1
  54. package/package.json +9 -10
package/dist/config.d.mts CHANGED
@@ -1,10 +1,30 @@
1
- import { GringowConfig } from './default-config.mjs';
1
+ import { GringowConfig } from './constants/default-config.mjs';
2
2
  import 'zod';
3
3
  import './schemas/config.shcema.mjs';
4
4
 
5
+ /**
6
+ * Checks if a local config file is found.
7
+ *
8
+ * @returns True if a local config file is found, false otherwise.
9
+ */
5
10
  declare function isLocalConfigFound(): boolean;
11
+ /**
12
+ * Gets the source of the configuration.
13
+ *
14
+ * @returns The filepath of the config file if found, or 'default' if using default config
15
+ */
6
16
  declare function getConfigSource(): string;
17
+ /**
18
+ * Loads the user configuration.
19
+ *
20
+ * @returns The user configuration.
21
+ */
7
22
  declare function loadUserConfig(): Promise<GringowConfig>;
23
+ /**
24
+ * Waits for the user configuration to load.
25
+ *
26
+ * @returns The user configuration.
27
+ */
8
28
  declare const awaitedConfig: Promise<{
9
29
  keys: {
10
30
  anthropicApiKey?: string | undefined;
@@ -24,10 +44,10 @@ declare const awaitedConfig: Promise<{
24
44
  llm: {
25
45
  choice: "gemini" | "anthropic" | "huggingface";
26
46
  model: string | null;
27
- temperature?: number | undefined;
28
- sleep?: number | undefined;
29
47
  prePrompt?: string | undefined;
30
48
  postPrompt?: string | undefined;
49
+ temperature?: number | undefined;
50
+ sleep?: number | undefined;
31
51
  prePromptReplace?: string | undefined;
32
52
  postPromptReplace?: string | undefined;
33
53
  prePromptAppend?: string | undefined;
package/dist/config.mjs CHANGED
@@ -4,7 +4,7 @@ import { z } from 'zod';
4
4
 
5
5
  // src/config.ts
6
6
 
7
- // src/default-config.ts
7
+ // src/constants/default-config.ts
8
8
  var defaultConfig = {
9
9
  debug: false,
10
10
  log: {
@@ -0,0 +1,2 @@
1
+
2
+ export { }