@gringow/gringow 0.0.1 → 0.0.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.
- package/.nvmrc +1 -0
- package/README.md +86 -2
- package/gringow.config.js.example +16 -0
- package/gringow.config.json.example +11 -0
- package/gringow.json +12 -0
- package/package.json +68 -4
- package/src/browser.ts +4 -0
- package/src/config.ts +93 -0
- package/src/data/check-cache.ts +15 -0
- package/src/data/clear-cache.ts +5 -0
- package/src/data/create-cache-dir.ts +7 -0
- package/src/data/create-cache-id.ts +17 -0
- package/src/data/delete-cache-item.ts +20 -0
- package/src/data/get-cache.ts +17 -0
- package/src/data/get-or-create-cache.ts +21 -0
- package/src/data/save-cache.ts +17 -0
- package/src/data/write-cache-to-disk.ts +20 -0
- package/src/default-config.ts +27 -0
- package/src/flat-template-string.test.ts +109 -0
- package/src/flat-template-string.ts +27 -0
- package/src/gringow.ts +49 -0
- package/src/index.ts +37 -0
- package/src/io/anthropic/ask.ts +31 -0
- package/src/io/anthropic/commit-response.ts +11 -0
- package/src/io/anthropic/index.ts +3 -0
- package/src/io/anthropic/parse.ts +11 -0
- package/src/io/ask-llm.ts +44 -0
- package/src/io/gemini/ask.ts +65 -0
- package/src/io/gemini/commit-response.ts +6 -0
- package/src/io/gemini/index.ts +3 -0
- package/src/io/gemini/parse.ts +12 -0
- package/src/io/huggingface/ask.ts +82 -0
- package/src/io/huggingface/commit-response.ts +16 -0
- package/src/io/huggingface/index.ts +16 -0
- package/src/io/huggingface/languagesMap.ts +189 -0
- package/src/io/huggingface/parse.ts +10 -0
- package/src/logger.ts +25 -0
- package/src/schemas/config.shcema.ts +58 -0
- package/src/types/index.ts +22 -0
- package/tsconfig.json +29 -0
- package/tsup.config.ts +21 -0
- package/vitest.config.ts +8 -0
package/tsconfig.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"lib": ["esnext", "DOM"],
|
|
4
|
+
"allowJs": false,
|
|
5
|
+
"skipLibCheck": true,
|
|
6
|
+
"strict": true,
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"module": "ESNext",
|
|
9
|
+
"target": "ESNext",
|
|
10
|
+
"moduleResolution": "bundler",
|
|
11
|
+
"resolveJsonModule": true,
|
|
12
|
+
"isolatedModules": true,
|
|
13
|
+
"downlevelIteration": true,
|
|
14
|
+
"outDir": "./dist",
|
|
15
|
+
"rootDir": "./src",
|
|
16
|
+
"forceConsistentCasingInFileNames": true,
|
|
17
|
+
"declaration": true,
|
|
18
|
+
"paths": {
|
|
19
|
+
"@/*": ["./src/*"]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"include": ["src/**/*.ts"],
|
|
23
|
+
"exclude": ["node_modules", "dist"],
|
|
24
|
+
"tsc-alias": {
|
|
25
|
+
"resolveFullPaths": true,
|
|
26
|
+
"resolveFullExtension": true,
|
|
27
|
+
"rootDir": "./src"
|
|
28
|
+
}
|
|
29
|
+
}
|
package/tsup.config.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineConfig } from 'tsup'
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
entry: ['src/**/*.ts'],
|
|
5
|
+
// format: ["cjs", "esm"],
|
|
6
|
+
format: ['esm'],
|
|
7
|
+
dts: true,
|
|
8
|
+
splitting: false,
|
|
9
|
+
sourcemap: false,
|
|
10
|
+
clean: true,
|
|
11
|
+
treeshake: 'safest',
|
|
12
|
+
minify: false,
|
|
13
|
+
outDir: 'dist',
|
|
14
|
+
target: 'esnext',
|
|
15
|
+
outExtension({ format }) {
|
|
16
|
+
return {
|
|
17
|
+
js: format === 'cjs' ? '.js' : '.mjs',
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
onSuccess: 'tsc-alias --verbose',
|
|
21
|
+
})
|