@gringow/gringow 0.2.0 → 0.2.2

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/README.md CHANGED
@@ -3,15 +3,15 @@
3
3
  [![npm version](https://img.shields.io/npm/v/@gringow/gringow)](https://www.npmjs.com/package/@gringow/gringow)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
5
5
 
6
- AI-powered translation library for template strings using multiple LLM providers (Hugging Face, Anthropic, Gemini). Gringow provides smart caching, deterministic content hashing, and seamless integration for modern JavaScript/TypeScript projects.
6
+ AI-powered translation library for template strings using multiple LLM providers via `multi-llm-ts`. Gringow provides smart caching, deterministic content hashing, and seamless integration for modern JavaScript/TypeScript projects.
7
7
 
8
8
  ## Features
9
9
 
10
10
  - 🌍 **Multi-language translation** using LLM providers
11
11
  - 🏷️ **Tagged template literal** syntax for inline translations
12
12
  - 💾 **Smart caching** with content-based hashing
13
- - 🔌 **Three LLM providers**: Hugging Face (local), Anthropic, Gemini
14
- - 🚀 **Zero configuration** - works out of the box with Hugging Face
13
+ - 🔌 **Multiple LLM providers** (OpenAI default, Anthropic, Gemini, Groq, Mistral, Ollama, and more)
14
+ - ⚙️ **Config-driven behavior** through `gringow.config.*`
15
15
  - 📦 **Optimized builds** via Vite/Next.js plugins
16
16
 
17
17
  ## Installation
@@ -87,8 +87,8 @@ For client-side interpolation without Node.js dependencies:
87
87
  ```typescript
88
88
  import { interpolateTemplate } from '@gringow/gringow/browser'
89
89
 
90
- const template = 'Hello {name}, you have {count} messages'
91
- const result = interpolateTemplate(template, { name: 'Alice', count: 5 })
90
+ const template = 'Hello ${name}, you have ${count} messages'
91
+ const result = interpolateTemplate(template, ['Alice', 5])
92
92
  console.log(result) // "Hello Alice, you have 5 messages"
93
93
  ```
94
94
 
@@ -109,15 +109,13 @@ export default {
109
109
  prefix: 'grw',
110
110
  write: true,
111
111
  },
112
- keys: {
113
- anthropicApiKey: process.env.ANTHROPIC_API_KEY,
114
- geminiApiKey: process.env.GEMINI_API_KEY,
115
- },
116
112
  sourceLanguage: 'en-US',
113
+ defaultLanguage: 'pt-BR',
117
114
  languages: ['pt-BR', 'fr-CA'],
118
115
  llm: {
119
- choice: 'huggingface', // 'huggingface' | 'anthropic' | 'gemini'
120
- model: 'Xenova/nllb-200-distilled-600M',
116
+ provider: 'openai',
117
+ apiKey: process.env.OPENAI_API_KEY,
118
+ model: 'gpt-4o-mini',
121
119
  temperature: 1.0,
122
120
  sleep: 0,
123
121
  },
@@ -130,11 +128,9 @@ export default {
130
128
  ```js
131
129
  // gringow.config.js
132
130
  export default {
133
- keys: {
134
- geminiApiKey: process.env.GEMINI_API_KEY,
135
- },
136
131
  llm: {
137
- choice: 'gemini',
132
+ provider: 'gemini',
133
+ apiKey: process.env.GEMINI_API_KEY,
138
134
  model: 'gemini-2.0-flash',
139
135
  prePromptAppend: 'Please respond in a friendly tone.',
140
136
  },
@@ -147,11 +143,9 @@ export default {
147
143
  ```js
148
144
  // gringow.config.js
149
145
  export default {
150
- keys: {
151
- anthropicApiKey: process.env.ANTHROPIC_API_KEY,
152
- },
153
146
  llm: {
154
- choice: 'anthropic',
147
+ provider: 'anthropic',
148
+ apiKey: process.env.ANTHROPIC_API_KEY,
155
149
  model: 'claude-3-5-sonnet-20241022',
156
150
  temperature: 0.7,
157
151
  },
@@ -165,7 +159,8 @@ Fine-tune LLM behavior with prompt options:
165
159
  ```js
166
160
  export default {
167
161
  llm: {
168
- choice: 'huggingface',
162
+ provider: 'openai',
163
+ apiKey: process.env.OPENAI_API_KEY,
169
164
  prePrompt: 'Translate the following text:', // Default prompt prefix
170
165
  postPrompt: 'Ensure translations are natural.', // Additional context
171
166
  prePromptAppend: 'Use formal language.', // Appended to pre-prompt
@@ -177,22 +172,23 @@ export default {
177
172
 
178
173
  ## LLM Providers
179
174
 
180
- ### Hugging Face (Default)
175
+ ### OpenAI (Default)
181
176
 
182
- Runs local models via `@huggingface/transformers`. **No API key required.**
177
+ Uses OpenAI through `multi-llm-ts`. **Requires API key.**
183
178
 
184
179
  ```js
185
180
  // gringow.config.js
186
181
  export default {
187
182
  llm: {
188
- choice: 'huggingface',
189
- model: 'Xenova/nllb-200-distilled-600M', // Multilingual translation model
183
+ provider: 'openai',
184
+ apiKey: process.env.OPENAI_API_KEY,
185
+ model: 'gpt-4o-mini',
190
186
  },
191
187
  }
192
188
  ```
193
189
 
194
- **Pros**: Free, private, offline-capable
195
- **Cons**: Slower first run (model download), higher memory usage
190
+ **Pros**: Broad model availability, simple default setup
191
+ **Cons**: API costs, requires internet
196
192
 
197
193
  ### Anthropic
198
194
 
@@ -201,11 +197,9 @@ Uses Claude models via Anthropic API. **Requires API key.**
201
197
  ```js
202
198
  // gringow.config.js
203
199
  export default {
204
- keys: {
205
- anthropicApiKey: process.env.ANTHROPIC_API_KEY,
206
- },
207
200
  llm: {
208
- choice: 'anthropic',
201
+ provider: 'anthropic',
202
+ apiKey: process.env.ANTHROPIC_API_KEY,
209
203
  model: 'claude-3-5-sonnet-20241022',
210
204
  },
211
205
  }
@@ -221,11 +215,9 @@ Uses Google's Gemini models. **Requires API key.**
221
215
  ```js
222
216
  // gringow.config.js
223
217
  export default {
224
- keys: {
225
- geminiApiKey: process.env.GEMINI_API_KEY,
226
- },
227
218
  llm: {
228
- choice: 'gemini',
219
+ provider: 'gemini',
220
+ apiKey: process.env.GEMINI_API_KEY,
229
221
  model: 'gemini-2.0-flash',
230
222
  },
231
223
  }
@@ -275,13 +267,16 @@ import {
275
267
  import {
276
268
  createCacheId, // Generate cache ID from string
277
269
  flatTemplateString, // Flatten template literal to string
278
- interpolateTemplate, // Browser-safe interpolation (from /browser export)
279
270
  awaitedConfig, // Access resolved configuration
280
271
  isLocalConfigFound, // Check if local config exists
281
272
  getConfigSource, // Get config file path
282
273
  } from '@gringow/gringow'
283
274
  ```
284
275
 
276
+ ```typescript
277
+ import { interpolateTemplate } from '@gringow/gringow/browser'
278
+ ```
279
+
285
280
  ### Type Definitions
286
281
 
287
282
  ```typescript
@@ -340,14 +335,15 @@ pnpm run test
340
335
  pnpm run test:watch
341
336
  ```
342
337
 
343
- ## Integrations
338
+ ## Related Packages
344
339
 
345
- Gringow has official integrations for modern web frameworks:
340
+ Gringow provides a complete ecosystem for AI-powered translation:
346
341
 
347
- - **[@gringow/cli](https://www.npmjs.com/package/@gringow/gringow-cli)** - Command-line interface for cache management and translations
348
- - **[@gringow/gringow-vite](https://www.npmjs.com/package/@gringow/gringow-vite)** - Vite plugin for build-time translation extraction
342
+ - **[@gringow/gringow](https://www.npmjs.com/package/@gringow/gringow)** - Core translation library
343
+ - **[@gringow/gringow-vite](https://www.npmjs.com/package/@gringow/gringow-vite)** - Vite plugin for build-time extraction
349
344
  - **[@gringow/gringow-react](https://www.npmjs.com/package/@gringow/gringow-react)** - React hooks and components
350
- - **[@gringow/gringow-shadow](https://www.npmjs.com/package/@gringow/gringow-shadow)** - Web Component layer (vanilla JS)
345
+ - **[@gringow/gringow-shadow](https://www.npmjs.com/package/@gringow/gringow-shadow)** - Web Component layer
346
+ - **[@gringow/gringow-cli](https://www.npmjs.com/package/@gringow/gringow-cli)** - CLI tool
351
347
  - **[@gringow/gringow-nextjs](https://www.npmjs.com/package/@gringow/gringow-nextjs)** - Next.js plugin (experimental)
352
348
 
353
349
  ## Related Resources
package/dist/config.d.mts CHANGED
@@ -41,12 +41,12 @@ declare const awaitedConfig: Promise<{
41
41
  llm: {
42
42
  provider: "anthropic" | "gemini" | "openai" | "groq" | "mistral" | "ollama" | "xai" | "deepseek" | "openrouter" | "cerebras" | "lmstudio" | "azure" | "meta";
43
43
  model: string | null;
44
- prePrompt?: string | undefined;
45
- postPrompt?: string | undefined;
46
44
  apiKey?: string | undefined;
47
45
  baseURL?: string | undefined;
48
46
  temperature?: number | undefined;
49
47
  sleep?: number | undefined;
48
+ prePrompt?: string | undefined;
49
+ postPrompt?: string | undefined;
50
50
  prePromptReplace?: string | undefined;
51
51
  postPromptReplace?: string | undefined;
52
52
  prePromptAppend?: string | undefined;
@@ -13239,7 +13239,7 @@ function findTestFileStackTrace(error, each) {
13239
13239
  globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now;
13240
13240
  globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now;
13241
13241
 
13242
- // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_terser@5.44.1/node_modules/vitest/dist/chunks/utils.C8RiOc4B.js
13242
+ // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_msw@2.12.8_@types+node@22.16.4_typescript@5.7.3__terser@5.44.1/node_modules/vitest/dist/chunks/utils.C8RiOc4B.js
13243
13243
  var NAME_WORKER_STATE = "__vitest_worker__";
13244
13244
  function getWorkerState() {
13245
13245
  const workerState = globalThis[NAME_WORKER_STATE];
@@ -13299,7 +13299,7 @@ async function waitForImportsToResolve() {
13299
13299
  await waitForImportsToResolve();
13300
13300
  }
13301
13301
 
13302
- // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_terser@5.44.1/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js
13302
+ // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_msw@2.12.8_@types+node@22.16.4_typescript@5.7.3__terser@5.44.1/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js
13303
13303
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
13304
13304
  function getDefaultExportFromCjs2(x2) {
13305
13305
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
@@ -15333,7 +15333,7 @@ var SnapshotClient = class {
15333
15333
  }
15334
15334
  };
15335
15335
 
15336
- // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_terser@5.44.1/node_modules/vitest/dist/chunks/date.W2xKR2qe.js
15336
+ // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_msw@2.12.8_@types+node@22.16.4_typescript@5.7.3__terser@5.44.1/node_modules/vitest/dist/chunks/date.W2xKR2qe.js
15337
15337
  var RealDate = Date;
15338
15338
  var now2 = null;
15339
15339
  var MockDate = class _MockDate extends RealDate {
@@ -15386,7 +15386,7 @@ function resetDate() {
15386
15386
  globalThis.Date = RealDate;
15387
15387
  }
15388
15388
 
15389
- // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_terser@5.44.1/node_modules/vitest/dist/chunks/vi.DgezovHB.js
15389
+ // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_msw@2.12.8_@types+node@22.16.4_typescript@5.7.3__terser@5.44.1/node_modules/vitest/dist/chunks/vi.DgezovHB.js
15390
15390
  var unsupported = [
15391
15391
  // .poll is meant to retry matchers until they succeed, and
15392
15392
  // snapshots will always succeed as long as the poll method doesn't thow an error
@@ -18118,7 +18118,7 @@ function getImporter(name) {
18118
18118
  return stack?.file || "";
18119
18119
  }
18120
18120
 
18121
- // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_terser@5.44.1/node_modules/vitest/dist/index.js
18121
+ // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_msw@2.12.8_@types+node@22.16.4_typescript@5.7.3__terser@5.44.1/node_modules/vitest/dist/index.js
18122
18122
  __toESM(require_dist(), 1);
18123
18123
 
18124
18124
  // src/constants/default-config.ts
@@ -13236,7 +13236,7 @@ function findTestFileStackTrace(error, each) {
13236
13236
  globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now;
13237
13237
  globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now;
13238
13238
 
13239
- // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_terser@5.44.1/node_modules/vitest/dist/chunks/utils.C8RiOc4B.js
13239
+ // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_msw@2.12.8_@types+node@22.16.4_typescript@5.7.3__terser@5.44.1/node_modules/vitest/dist/chunks/utils.C8RiOc4B.js
13240
13240
  var NAME_WORKER_STATE = "__vitest_worker__";
13241
13241
  function getWorkerState() {
13242
13242
  const workerState = globalThis[NAME_WORKER_STATE];
@@ -13296,7 +13296,7 @@ async function waitForImportsToResolve() {
13296
13296
  await waitForImportsToResolve();
13297
13297
  }
13298
13298
 
13299
- // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_terser@5.44.1/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js
13299
+ // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_msw@2.12.8_@types+node@22.16.4_typescript@5.7.3__terser@5.44.1/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js
13300
13300
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
13301
13301
  function getDefaultExportFromCjs2(x2) {
13302
13302
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
@@ -15330,7 +15330,7 @@ var SnapshotClient = class {
15330
15330
  }
15331
15331
  };
15332
15332
 
15333
- // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_terser@5.44.1/node_modules/vitest/dist/chunks/date.W2xKR2qe.js
15333
+ // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_msw@2.12.8_@types+node@22.16.4_typescript@5.7.3__terser@5.44.1/node_modules/vitest/dist/chunks/date.W2xKR2qe.js
15334
15334
  var RealDate = Date;
15335
15335
  var now2 = null;
15336
15336
  var MockDate = class _MockDate extends RealDate {
@@ -15383,7 +15383,7 @@ function resetDate() {
15383
15383
  globalThis.Date = RealDate;
15384
15384
  }
15385
15385
 
15386
- // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_terser@5.44.1/node_modules/vitest/dist/chunks/vi.DgezovHB.js
15386
+ // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_msw@2.12.8_@types+node@22.16.4_typescript@5.7.3__terser@5.44.1/node_modules/vitest/dist/chunks/vi.DgezovHB.js
15387
15387
  var unsupported = [
15388
15388
  // .poll is meant to retry matchers until they succeed, and
15389
15389
  // snapshots will always succeed as long as the poll method doesn't thow an error
@@ -18115,7 +18115,7 @@ function getImporter(name) {
18115
18115
  return stack?.file || "";
18116
18116
  }
18117
18117
 
18118
- // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_terser@5.44.1/node_modules/vitest/dist/index.js
18118
+ // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_msw@2.12.8_@types+node@22.16.4_typescript@5.7.3__terser@5.44.1/node_modules/vitest/dist/index.js
18119
18119
  __toESM(require_dist(), 1);
18120
18120
 
18121
18121
  // src/data/md5.ts
@@ -13236,7 +13236,7 @@ function findTestFileStackTrace(error, each) {
13236
13236
  globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now;
13237
13237
  globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now;
13238
13238
 
13239
- // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_terser@5.44.1/node_modules/vitest/dist/chunks/utils.C8RiOc4B.js
13239
+ // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_msw@2.12.8_@types+node@22.16.4_typescript@5.7.3__terser@5.44.1/node_modules/vitest/dist/chunks/utils.C8RiOc4B.js
13240
13240
  var NAME_WORKER_STATE = "__vitest_worker__";
13241
13241
  function getWorkerState() {
13242
13242
  const workerState = globalThis[NAME_WORKER_STATE];
@@ -13296,7 +13296,7 @@ async function waitForImportsToResolve() {
13296
13296
  await waitForImportsToResolve();
13297
13297
  }
13298
13298
 
13299
- // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_terser@5.44.1/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js
13299
+ // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_msw@2.12.8_@types+node@22.16.4_typescript@5.7.3__terser@5.44.1/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js
13300
13300
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
13301
13301
  function getDefaultExportFromCjs2(x2) {
13302
13302
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
@@ -15330,7 +15330,7 @@ var SnapshotClient = class {
15330
15330
  }
15331
15331
  };
15332
15332
 
15333
- // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_terser@5.44.1/node_modules/vitest/dist/chunks/date.W2xKR2qe.js
15333
+ // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_msw@2.12.8_@types+node@22.16.4_typescript@5.7.3__terser@5.44.1/node_modules/vitest/dist/chunks/date.W2xKR2qe.js
15334
15334
  var RealDate = Date;
15335
15335
  var now2 = null;
15336
15336
  var MockDate = class _MockDate extends RealDate {
@@ -15383,7 +15383,7 @@ function resetDate() {
15383
15383
  globalThis.Date = RealDate;
15384
15384
  }
15385
15385
 
15386
- // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_terser@5.44.1/node_modules/vitest/dist/chunks/vi.DgezovHB.js
15386
+ // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_msw@2.12.8_@types+node@22.16.4_typescript@5.7.3__terser@5.44.1/node_modules/vitest/dist/chunks/vi.DgezovHB.js
15387
15387
  var unsupported = [
15388
15388
  // .poll is meant to retry matchers until they succeed, and
15389
15389
  // snapshots will always succeed as long as the poll method doesn't thow an error
@@ -18115,7 +18115,7 @@ function getImporter(name) {
18115
18115
  return stack?.file || "";
18116
18116
  }
18117
18117
 
18118
- // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_terser@5.44.1/node_modules/vitest/dist/index.js
18118
+ // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_msw@2.12.8_@types+node@22.16.4_typescript@5.7.3__terser@5.44.1/node_modules/vitest/dist/index.js
18119
18119
  __toESM(require_dist(), 1);
18120
18120
 
18121
18121
  // src/data/md5.ts
@@ -13236,7 +13236,7 @@ function findTestFileStackTrace(error, each) {
13236
13236
  globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now;
13237
13237
  globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now;
13238
13238
 
13239
- // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_terser@5.44.1/node_modules/vitest/dist/chunks/utils.C8RiOc4B.js
13239
+ // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_msw@2.12.8_@types+node@22.16.4_typescript@5.7.3__terser@5.44.1/node_modules/vitest/dist/chunks/utils.C8RiOc4B.js
13240
13240
  var NAME_WORKER_STATE = "__vitest_worker__";
13241
13241
  function getWorkerState() {
13242
13242
  const workerState = globalThis[NAME_WORKER_STATE];
@@ -13296,7 +13296,7 @@ async function waitForImportsToResolve() {
13296
13296
  await waitForImportsToResolve();
13297
13297
  }
13298
13298
 
13299
- // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_terser@5.44.1/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js
13299
+ // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_msw@2.12.8_@types+node@22.16.4_typescript@5.7.3__terser@5.44.1/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js
13300
13300
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
13301
13301
  function getDefaultExportFromCjs2(x2) {
13302
13302
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
@@ -15330,7 +15330,7 @@ var SnapshotClient = class {
15330
15330
  }
15331
15331
  };
15332
15332
 
15333
- // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_terser@5.44.1/node_modules/vitest/dist/chunks/date.W2xKR2qe.js
15333
+ // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_msw@2.12.8_@types+node@22.16.4_typescript@5.7.3__terser@5.44.1/node_modules/vitest/dist/chunks/date.W2xKR2qe.js
15334
15334
  var RealDate = Date;
15335
15335
  var now2 = null;
15336
15336
  var MockDate = class _MockDate extends RealDate {
@@ -15383,7 +15383,7 @@ function resetDate() {
15383
15383
  globalThis.Date = RealDate;
15384
15384
  }
15385
15385
 
15386
- // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_terser@5.44.1/node_modules/vitest/dist/chunks/vi.DgezovHB.js
15386
+ // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_msw@2.12.8_@types+node@22.16.4_typescript@5.7.3__terser@5.44.1/node_modules/vitest/dist/chunks/vi.DgezovHB.js
15387
15387
  var unsupported = [
15388
15388
  // .poll is meant to retry matchers until they succeed, and
15389
15389
  // snapshots will always succeed as long as the poll method doesn't thow an error
@@ -18115,7 +18115,7 @@ function getImporter(name) {
18115
18115
  return stack?.file || "";
18116
18116
  }
18117
18117
 
18118
- // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_terser@5.44.1/node_modules/vitest/dist/index.js
18118
+ // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_msw@2.12.8_@types+node@22.16.4_typescript@5.7.3__terser@5.44.1/node_modules/vitest/dist/index.js
18119
18119
  __toESM(require_dist(), 1);
18120
18120
 
18121
18121
  // src/flat-template-string.ts
@@ -13257,7 +13257,7 @@ function afterEach(fn2, timeout) {
13257
13257
  globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now;
13258
13258
  globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now;
13259
13259
 
13260
- // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_terser@5.44.1/node_modules/vitest/dist/chunks/utils.C8RiOc4B.js
13260
+ // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_msw@2.12.8_@types+node@22.16.4_typescript@5.7.3__terser@5.44.1/node_modules/vitest/dist/chunks/utils.C8RiOc4B.js
13261
13261
  var NAME_WORKER_STATE = "__vitest_worker__";
13262
13262
  function getWorkerState() {
13263
13263
  const workerState = globalThis[NAME_WORKER_STATE];
@@ -13317,7 +13317,7 @@ async function waitForImportsToResolve() {
13317
13317
  await waitForImportsToResolve();
13318
13318
  }
13319
13319
 
13320
- // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_terser@5.44.1/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js
13320
+ // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_msw@2.12.8_@types+node@22.16.4_typescript@5.7.3__terser@5.44.1/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js
13321
13321
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
13322
13322
  function getDefaultExportFromCjs2(x2) {
13323
13323
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
@@ -15351,7 +15351,7 @@ var SnapshotClient = class {
15351
15351
  }
15352
15352
  };
15353
15353
 
15354
- // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_terser@5.44.1/node_modules/vitest/dist/chunks/date.W2xKR2qe.js
15354
+ // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_msw@2.12.8_@types+node@22.16.4_typescript@5.7.3__terser@5.44.1/node_modules/vitest/dist/chunks/date.W2xKR2qe.js
15355
15355
  var RealDate = Date;
15356
15356
  var now2 = null;
15357
15357
  var MockDate = class _MockDate extends RealDate {
@@ -15404,7 +15404,7 @@ function resetDate() {
15404
15404
  globalThis.Date = RealDate;
15405
15405
  }
15406
15406
 
15407
- // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_terser@5.44.1/node_modules/vitest/dist/chunks/vi.DgezovHB.js
15407
+ // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_msw@2.12.8_@types+node@22.16.4_typescript@5.7.3__terser@5.44.1/node_modules/vitest/dist/chunks/vi.DgezovHB.js
15408
15408
  var unsupported = [
15409
15409
  // .poll is meant to retry matchers until they succeed, and
15410
15410
  // snapshots will always succeed as long as the poll method doesn't thow an error
@@ -18136,7 +18136,7 @@ function getImporter(name) {
18136
18136
  return stack?.file || "";
18137
18137
  }
18138
18138
 
18139
- // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_terser@5.44.1/node_modules/vitest/dist/index.js
18139
+ // ../node_modules/.pnpm/vitest@2.1.9_@types+node@22.16.4_lightningcss@1.30.2_msw@2.12.8_@types+node@22.16.4_typescript@5.7.3__terser@5.44.1/node_modules/vitest/dist/index.js
18140
18140
  __toESM(require_dist(), 1);
18141
18141
 
18142
18142
  // src/logger.ts
@@ -46,12 +46,12 @@ declare const configSchema: z.ZodEffects<z.ZodObject<{
46
46
  }, "strip", z.ZodTypeAny, {
47
47
  provider: "anthropic" | "gemini" | "openai" | "groq" | "mistral" | "ollama" | "xai" | "deepseek" | "openrouter" | "cerebras" | "lmstudio" | "azure" | "meta";
48
48
  model: string | null;
49
- prePrompt?: string | undefined;
50
- postPrompt?: string | undefined;
51
49
  apiKey?: string | undefined;
52
50
  baseURL?: string | undefined;
53
51
  temperature?: number | undefined;
54
52
  sleep?: number | undefined;
53
+ prePrompt?: string | undefined;
54
+ postPrompt?: string | undefined;
55
55
  prePromptReplace?: string | undefined;
56
56
  postPromptReplace?: string | undefined;
57
57
  prePromptAppend?: string | undefined;
@@ -59,12 +59,12 @@ declare const configSchema: z.ZodEffects<z.ZodObject<{
59
59
  }, {
60
60
  provider: "anthropic" | "gemini" | "openai" | "groq" | "mistral" | "ollama" | "xai" | "deepseek" | "openrouter" | "cerebras" | "lmstudio" | "azure" | "meta";
61
61
  model: string | null;
62
- prePrompt?: string | undefined;
63
- postPrompt?: string | undefined;
64
62
  apiKey?: string | undefined;
65
63
  baseURL?: string | undefined;
66
64
  temperature?: number | undefined;
67
65
  sleep?: number | undefined;
66
+ prePrompt?: string | undefined;
67
+ postPrompt?: string | undefined;
68
68
  prePromptReplace?: string | undefined;
69
69
  postPromptReplace?: string | undefined;
70
70
  prePromptAppend?: string | undefined;
@@ -87,12 +87,12 @@ declare const configSchema: z.ZodEffects<z.ZodObject<{
87
87
  llm: {
88
88
  provider: "anthropic" | "gemini" | "openai" | "groq" | "mistral" | "ollama" | "xai" | "deepseek" | "openrouter" | "cerebras" | "lmstudio" | "azure" | "meta";
89
89
  model: string | null;
90
- prePrompt?: string | undefined;
91
- postPrompt?: string | undefined;
92
90
  apiKey?: string | undefined;
93
91
  baseURL?: string | undefined;
94
92
  temperature?: number | undefined;
95
93
  sleep?: number | undefined;
94
+ prePrompt?: string | undefined;
95
+ postPrompt?: string | undefined;
96
96
  prePromptReplace?: string | undefined;
97
97
  postPromptReplace?: string | undefined;
98
98
  prePromptAppend?: string | undefined;
@@ -116,12 +116,12 @@ declare const configSchema: z.ZodEffects<z.ZodObject<{
116
116
  llm: {
117
117
  provider: "anthropic" | "gemini" | "openai" | "groq" | "mistral" | "ollama" | "xai" | "deepseek" | "openrouter" | "cerebras" | "lmstudio" | "azure" | "meta";
118
118
  model: string | null;
119
- prePrompt?: string | undefined;
120
- postPrompt?: string | undefined;
121
119
  apiKey?: string | undefined;
122
120
  baseURL?: string | undefined;
123
121
  temperature?: number | undefined;
124
122
  sleep?: number | undefined;
123
+ prePrompt?: string | undefined;
124
+ postPrompt?: string | undefined;
125
125
  prePromptReplace?: string | undefined;
126
126
  postPromptReplace?: string | undefined;
127
127
  prePromptAppend?: string | undefined;
@@ -145,12 +145,12 @@ declare const configSchema: z.ZodEffects<z.ZodObject<{
145
145
  llm: {
146
146
  provider: "anthropic" | "gemini" | "openai" | "groq" | "mistral" | "ollama" | "xai" | "deepseek" | "openrouter" | "cerebras" | "lmstudio" | "azure" | "meta";
147
147
  model: string | null;
148
- prePrompt?: string | undefined;
149
- postPrompt?: string | undefined;
150
148
  apiKey?: string | undefined;
151
149
  baseURL?: string | undefined;
152
150
  temperature?: number | undefined;
153
151
  sleep?: number | undefined;
152
+ prePrompt?: string | undefined;
153
+ postPrompt?: string | undefined;
154
154
  prePromptReplace?: string | undefined;
155
155
  postPromptReplace?: string | undefined;
156
156
  prePromptAppend?: string | undefined;
@@ -174,12 +174,12 @@ declare const configSchema: z.ZodEffects<z.ZodObject<{
174
174
  llm: {
175
175
  provider: "anthropic" | "gemini" | "openai" | "groq" | "mistral" | "ollama" | "xai" | "deepseek" | "openrouter" | "cerebras" | "lmstudio" | "azure" | "meta";
176
176
  model: string | null;
177
- prePrompt?: string | undefined;
178
- postPrompt?: string | undefined;
179
177
  apiKey?: string | undefined;
180
178
  baseURL?: string | undefined;
181
179
  temperature?: number | undefined;
182
180
  sleep?: number | undefined;
181
+ prePrompt?: string | undefined;
182
+ postPrompt?: string | undefined;
183
183
  prePromptReplace?: string | undefined;
184
184
  postPromptReplace?: string | undefined;
185
185
  prePromptAppend?: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gringow/gringow",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "main": "./dist/index.mjs",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.mts",