@ewyn/client 0.4.0 → 0.6.0

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
@@ -179,6 +179,7 @@ new Ewyn(options: EwynOptions)
179
179
  - `templates` (TemplateConfig, optional): Template configuration for name-based sending
180
180
  - `maxRetries` (number, optional): Maximum retries for retryable errors (default: 3)
181
181
  - `timeout` (number, optional): Request timeout in milliseconds (default: 30000)
182
+ - `debug` (boolean, optional): Log request/retry details to stderr. Also enabled when env `DEBUG` contains `ewyn`.
182
183
 
183
184
  #### Methods
184
185
 
@@ -211,6 +212,13 @@ Send an email using a template.
211
212
  - `EwynApiError`: If the API request fails
212
213
  - `Error`: If validation fails (missing template, missing variables, etc.)
213
214
 
215
+ ### Debug logging
216
+
217
+ To see which step is running (useful when something fails):
218
+
219
+ - **CLI:** The `fetch-config` command logs progress to stdout (`Using config: ...`, `Fetching template config from API...`, `Wrote ...`). For extra detail (config paths, timing), set `DEBUG=ewyn` before running. On errors, use `DEBUG=ewyn` to print the full stack.
220
+ - **SDK:** Pass `debug: true` in the client options, or set `DEBUG=ewyn` in the environment. Requests, retries, and timeouts are then logged to stderr.
221
+
214
222
  ### Error Handling
215
223
 
216
224
  The SDK throws `EwynApiError` for API errors:
@@ -65,4 +65,18 @@ describe('fetch-config CLI', () => {
65
65
  const content = fs.readFileSync(outputPath, 'utf-8');
66
66
  expect(content).toContain('"welcome"');
67
67
  });
68
+ it('loads ewyn.config.ts via tsx and writes ewynTemplates.ts', async () => {
69
+ const configPath = path.join(tempDir, 'ewyn.config.ts');
70
+ fs.writeFileSync(configPath, `export default {
71
+ apiKey: 'test-api-key-ts',
72
+ };
73
+ `, 'utf-8');
74
+ await runFetchConfig(tempDir);
75
+ const outputPath = path.join(tempDir, 'ewynTemplates.ts');
76
+ expect(fs.existsSync(outputPath)).toBe(true);
77
+ const content = fs.readFileSync(outputPath, 'utf-8');
78
+ expect(content).toContain('// Generated by @ewyn/client fetch-config');
79
+ expect(content).toContain('export const ewynTemplates = ');
80
+ expect(content).toContain('"welcome"');
81
+ });
68
82
  });
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AA0GA,4BAA4B;AAC5B,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAqB/D"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAwIA,4BAA4B;AAC5B,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAuC/D"}
package/dist/cli.js CHANGED
@@ -2,10 +2,16 @@
2
2
  import fs from 'node:fs';
3
3
  import { createRequire } from 'node:module';
4
4
  import path from 'node:path';
5
- import { pathToFileURL } from 'node:url';
5
+ import { fileURLToPath, pathToFileURL } from 'node:url';
6
6
  const EWYN_API_BASE_URL = 'https://www.ewyn.ai/api/v1';
7
7
  const CONFIG_NAMES = ['ewyn.config.ts', 'ewyn.config.mjs', 'ewyn.config.js'];
8
8
  const DEFAULT_OUTPUT_FILE = 'ewynTemplates.ts';
9
+ const FETCH_TIMEOUT_MS = 30_000;
10
+ const debug = (msg) => {
11
+ if (process.env.DEBUG?.includes('ewyn')) {
12
+ console.error(`[ewyn] ${msg}`);
13
+ }
14
+ };
9
15
  function printUsage() {
10
16
  console.error(`
11
17
  Usage: ewyn <command>
@@ -35,18 +41,25 @@ function findConfigPath(cwd) {
35
41
  async function loadConfig(configPath) {
36
42
  const ext = path.extname(configPath);
37
43
  if (ext === '.ts') {
38
- const require = createRequire(import.meta.url);
39
- const { register } = require('tsx/cjs');
40
- register();
41
- const mod = require(configPath);
42
- const config = mod?.default;
44
+ debug(`Loading TypeScript config: ${configPath}`);
45
+ const createRequireForUrl = createRequire(import.meta.url);
46
+ const { require: tsxRequire } = createRequireForUrl('tsx/cjs/api');
47
+ const mod = tsxRequire(configPath, fileURLToPath(import.meta.url));
48
+ let config = mod?.default;
49
+ if (config != null && typeof config?.then === 'function') {
50
+ config = await config;
51
+ }
43
52
  if (!config || typeof config !== 'object') {
44
53
  throw new Error(`${configPath}: expected default export to be a config object`);
45
54
  }
46
55
  return config;
47
56
  }
57
+ debug(`Loading JS config: ${configPath}`);
48
58
  const mod = await import(pathToFileURL(configPath).href);
49
- const config = mod?.default;
59
+ let config = mod?.default;
60
+ if (config != null && typeof config?.then === 'function') {
61
+ config = await config;
62
+ }
50
63
  if (!config || typeof config !== 'object') {
51
64
  throw new Error(`${configPath}: expected default export to be a config object`);
52
65
  }
@@ -60,12 +73,23 @@ function validateConfig(config, configPath) {
60
73
  }
61
74
  async function fetchTemplates(apiKey) {
62
75
  const url = `${EWYN_API_BASE_URL}/templates/config`;
63
- const response = await fetch(url, {
64
- method: 'GET',
65
- headers: {
66
- Authorization: `Bearer ${apiKey}`,
67
- },
68
- });
76
+ debug(`Fetching template config from API (timeout ${FETCH_TIMEOUT_MS}ms)...`);
77
+ let response;
78
+ try {
79
+ response = await fetch(url, {
80
+ method: 'GET',
81
+ headers: {
82
+ Authorization: `Bearer ${apiKey}`,
83
+ },
84
+ signal: AbortSignal.timeout(FETCH_TIMEOUT_MS),
85
+ });
86
+ }
87
+ catch (err) {
88
+ const isTimeout = err instanceof Error &&
89
+ (err.name === 'TimeoutError' || err.name === 'AbortError');
90
+ console.error(`Error: Failed to fetch template config${isTimeout ? ` (timeout after ${FETCH_TIMEOUT_MS}ms)` : ''}: ${err instanceof Error ? err.message : String(err)}`);
91
+ process.exit(1);
92
+ }
69
93
  if (!response.ok) {
70
94
  const body = await response.text();
71
95
  let details = body;
@@ -81,6 +105,7 @@ async function fetchTemplates(apiKey) {
81
105
  }
82
106
  const data = (await response.json());
83
107
  const templates = data.templates ?? {};
108
+ debug(`Fetched ${Object.keys(templates).length} template(s).`);
84
109
  return templates;
85
110
  }
86
111
  function serializeTemplates(templates) {
@@ -92,21 +117,40 @@ function serializeTemplates(templates) {
92
117
  }
93
118
  /** Exported for testing. */
94
119
  export async function runFetchConfig(cwd) {
120
+ console.log('Fetching Ewyn template config...');
121
+ debug(`CWD: ${cwd}`);
95
122
  const configPath = findConfigPath(cwd);
96
123
  if (!configPath) {
97
124
  console.error('Error: ewyn.config.ts (or ewyn.config.mjs / ewyn.config.js) not found in current directory.');
98
125
  process.exit(1);
99
126
  }
100
- const config = await loadConfig(configPath);
127
+ console.log(`Using config: ${path.relative(cwd, configPath) || configPath}`);
128
+ let config;
129
+ try {
130
+ config = await loadConfig(configPath);
131
+ }
132
+ catch (err) {
133
+ console.error(`Error: Loading config failed: ${err instanceof Error ? err.message : String(err)}`);
134
+ process.exit(1);
135
+ }
101
136
  validateConfig(config, configPath);
102
137
  const outputPath = config.configurationPath
103
138
  ? path.resolve(cwd, config.configurationPath)
104
139
  : path.join(cwd, DEFAULT_OUTPUT_FILE);
105
- const templates = await fetchTemplates(config.apiKey);
140
+ console.log('Fetching template config from API...');
141
+ let templates;
142
+ try {
143
+ templates = await fetchTemplates(config.apiKey);
144
+ }
145
+ catch (err) {
146
+ console.error(`Error: API request failed: ${err instanceof Error ? err.message : String(err)}`);
147
+ process.exit(1);
148
+ }
106
149
  const dir = path.dirname(outputPath);
150
+ debug(`Writing ${outputPath}`);
107
151
  fs.mkdirSync(dir, { recursive: true });
108
152
  fs.writeFileSync(outputPath, serializeTemplates(templates), 'utf-8');
109
- console.log(`Wrote ${outputPath}`);
153
+ console.log(`Wrote ${path.relative(cwd, outputPath) || outputPath}`);
110
154
  }
111
155
  async function main() {
112
156
  const args = process.argv.slice(2);
@@ -124,12 +168,26 @@ async function main() {
124
168
  printUsage();
125
169
  process.exit(1);
126
170
  }
127
- const isMain = typeof process !== 'undefined' &&
128
- process.argv[1] &&
129
- pathToFileURL(process.argv[1]).href === import.meta.url;
171
+ let isMain = false;
172
+ try {
173
+ const arg1 = typeof process !== 'undefined' ? process.argv[1] : undefined;
174
+ if (arg1 && (path.isAbsolute(arg1) || arg1.includes(path.sep) || arg1.endsWith('.js'))) {
175
+ const ourPath = fs.realpathSync(fileURLToPath(import.meta.url));
176
+ const entryPath = fs.realpathSync(path.resolve(arg1));
177
+ isMain = entryPath === ourPath;
178
+ }
179
+ }
180
+ catch {
181
+ isMain = false;
182
+ }
130
183
  if (isMain) {
131
184
  main().catch((err) => {
132
- console.error(err instanceof Error ? err.message : String(err));
185
+ if (process.env.DEBUG?.includes('ewyn')) {
186
+ console.error(err);
187
+ }
188
+ else {
189
+ console.error(err instanceof Error ? err.message : String(err));
190
+ }
133
191
  process.exit(1);
134
192
  });
135
193
  }
package/dist/index.d.ts CHANGED
@@ -4,7 +4,9 @@ export declare class Ewyn<TConfig extends TemplateConfig = TemplateConfig> {
4
4
  private readonly templates?;
5
5
  private readonly maxRetries;
6
6
  private readonly timeout;
7
+ private readonly debug;
7
8
  constructor(options: EwynOptions | EwynOptionsTyped<TConfig>);
9
+ private logDebug;
8
10
  /**
9
11
  * Send an email using a template
10
12
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACf,MAAM,YAAY,CAAC;AAiDpB,qBAAa,IAAI,CAAC,OAAO,SAAS,cAAc,GAAG,cAAc;IAC/D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAU;IACrC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;gBAErB,OAAO,EAAE,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC;IAO5D;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACG,IAAI,CACR,OAAO,EAAE,OA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iBAAiB;IA2BzB;;OAEG;YACW,gBAAgB;CA6E/B;AAED,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,YAAY,EACV,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -50,11 +50,18 @@ export class Ewyn {
50
50
  templates;
51
51
  maxRetries;
52
52
  timeout;
53
+ debug;
53
54
  constructor(options) {
54
55
  this.apiKey = options.apiKey;
55
56
  this.templates = options.templates;
56
57
  this.maxRetries = options.maxRetries ?? 3;
57
58
  this.timeout = options.timeout ?? 30000;
59
+ this.debug = !!(options.debug ?? (typeof process !== 'undefined' && process.env?.DEBUG?.includes('ewyn')));
60
+ }
61
+ logDebug(msg) {
62
+ if (this.debug) {
63
+ console.error(`[ewyn] ${msg}`);
64
+ }
58
65
  }
59
66
  /**
60
67
  * Send an email using a template
@@ -162,43 +169,49 @@ export class Ewyn {
162
169
  */
163
170
  async requestWithRetry(path, init, attempt = 1) {
164
171
  const url = `${EWYN_API_BASE_URL}${path}`;
165
- const controller = new AbortController();
166
- const timeoutId = setTimeout(() => controller.abort(), this.timeout);
172
+ this.logDebug(`Request ${init.method ?? 'GET'} ${path} (attempt ${attempt}/${this.maxRetries + 1})`);
173
+ const signal = typeof AbortSignal !== 'undefined' && 'timeout' in AbortSignal
174
+ ? AbortSignal.timeout(this.timeout)
175
+ : (() => {
176
+ const controller = new AbortController();
177
+ setTimeout(() => controller.abort(), this.timeout);
178
+ return controller.signal;
179
+ })();
167
180
  try {
168
181
  const response = await fetch(url, {
169
182
  ...init,
170
- signal: controller.signal,
183
+ signal,
171
184
  });
172
- clearTimeout(timeoutId);
173
185
  const data = await response.json().catch(() => ({}));
174
186
  if (!response.ok) {
175
187
  const error = new EwynApiError(response.status, data.code, data.details || data, data.error || data.message);
176
- // Retry on retryable errors
177
188
  if (error.isRetryable() && attempt < this.maxRetries) {
178
- // Exponential backoff: 1s, 2s, 4s
179
189
  const delay = Math.pow(2, attempt - 1) * 1000;
190
+ this.logDebug(`Retryable error ${response.status}, retrying in ${delay}ms...`);
180
191
  await new Promise((resolve) => setTimeout(resolve, delay));
181
192
  return this.requestWithRetry(path, init, attempt + 1);
182
193
  }
194
+ this.logDebug(`Request failed: ${response.status} ${data.error ?? data.message ?? ''}`);
183
195
  throw error;
184
196
  }
197
+ this.logDebug(`Request ${path} succeeded`);
185
198
  return data;
186
199
  }
187
200
  catch (error) {
188
- clearTimeout(timeoutId);
189
201
  if (error instanceof EwynApiError) {
190
202
  throw error;
191
203
  }
192
- // Handle network errors or timeouts
193
204
  if (error instanceof Error && error.name === 'AbortError') {
205
+ this.logDebug(`Request timed out after ${this.timeout}ms`);
194
206
  throw new EwynApiError(408, 'TIMEOUT', undefined, `Request timed out after ${this.timeout}ms`);
195
207
  }
196
- // Retry on network errors if we have attempts left
197
208
  if (attempt < this.maxRetries) {
198
209
  const delay = Math.pow(2, attempt - 1) * 1000;
210
+ this.logDebug(`Network error, retrying in ${delay}ms: ${error instanceof Error ? error.message : String(error)}`);
199
211
  await new Promise((resolve) => setTimeout(resolve, delay));
200
212
  return this.requestWithRetry(path, init, attempt + 1);
201
213
  }
214
+ this.logDebug(`Request failed after ${attempt} attempt(s): ${error instanceof Error ? error.message : String(error)}`);
202
215
  throw new EwynApiError(500, 'NETWORK_ERROR', undefined, error instanceof Error ? error.message : 'Unknown network error');
203
216
  }
204
217
  }
package/dist/types.d.ts CHANGED
@@ -106,6 +106,8 @@ export interface EwynOptionsBase {
106
106
  maxRetries?: number;
107
107
  /** Request timeout in milliseconds (default: 30000) */
108
108
  timeout?: number;
109
+ /** Enable debug logging (requests, retries) to stderr. Also enabled when DEBUG env includes "ewyn". */
110
+ debug?: boolean;
109
111
  }
110
112
  /**
111
113
  * Configuration options with typed template config
@@ -1 +1 @@
1
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AC,EAAE,cAAc,CAAC;CAC5B,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,qDAAqD;IACrD,MAAM,EAAE,MAAM,CAAC;IACf,yIAAyI;IACzI,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ewyn/client",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "Official TypeScript SDK for Ewyn email service with full type safety",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -38,8 +38,8 @@
38
38
  "@types/node": "^20.11.0",
39
39
  "typescript": "^5.7.3",
40
40
  "vitest": "^1.2.0",
41
- "@workspace/eslint-config": "0.0.0",
42
- "@workspace/typescript-config": "0.0.0"
41
+ "@workspace/typescript-config": "0.0.0",
42
+ "@workspace/eslint-config": "0.0.0"
43
43
  },
44
44
  "scripts": {
45
45
  "build": "tsc",