@el-j/google-sheet-translations 1.1.0 → 1.2.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.
Files changed (41) hide show
  1. package/README.md +129 -1
  2. package/dist/getSpreadSheetData.d.ts.map +1 -1
  3. package/dist/getSpreadSheetData.js +101 -108
  4. package/dist/getSpreadSheetData.js.map +1 -1
  5. package/dist/index.d.ts +3 -0
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +8 -1
  8. package/dist/index.js.map +1 -1
  9. package/dist/utils/auth.js +1 -1
  10. package/dist/utils/auth.js.map +1 -1
  11. package/dist/utils/configurationHandler.d.ts +28 -0
  12. package/dist/utils/configurationHandler.d.ts.map +1 -1
  13. package/dist/utils/configurationHandler.js +6 -2
  14. package/dist/utils/configurationHandler.js.map +1 -1
  15. package/dist/utils/publicSheetReader.js +1 -1
  16. package/dist/utils/publicSheetReader.js.map +1 -1
  17. package/dist/utils/rateLimiter.d.ts +15 -0
  18. package/dist/utils/rateLimiter.d.ts.map +1 -0
  19. package/dist/utils/rateLimiter.js +55 -0
  20. package/dist/utils/rateLimiter.js.map +1 -0
  21. package/dist/utils/sheetProcessor.d.ts +10 -7
  22. package/dist/utils/sheetProcessor.d.ts.map +1 -1
  23. package/dist/utils/sheetProcessor.js +14 -12
  24. package/dist/utils/sheetProcessor.js.map +1 -1
  25. package/dist/utils/spreadsheetCreator.d.ts +23 -0
  26. package/dist/utils/spreadsheetCreator.d.ts.map +1 -0
  27. package/dist/utils/spreadsheetCreator.js +121 -0
  28. package/dist/utils/spreadsheetCreator.js.map +1 -0
  29. package/dist/utils/spreadsheetUpdater.d.ts +1 -1
  30. package/dist/utils/spreadsheetUpdater.d.ts.map +1 -1
  31. package/dist/utils/spreadsheetUpdater.js +8 -14
  32. package/dist/utils/spreadsheetUpdater.js.map +1 -1
  33. package/dist/utils/validateEnv.d.ts +7 -3
  34. package/dist/utils/validateEnv.d.ts.map +1 -1
  35. package/dist/utils/validateEnv.js +22 -10
  36. package/dist/utils/validateEnv.js.map +1 -1
  37. package/dist/utils/wait.d.ts +5 -2
  38. package/dist/utils/wait.d.ts.map +1 -1
  39. package/dist/utils/wait.js +8 -10
  40. package/dist/utils/wait.js.map +1 -1
  41. package/package.json +92 -91
package/README.md CHANGED
@@ -11,6 +11,7 @@ A Node.js package for managing translations stored in Google Sheets.
11
11
  - ✅ **Modular Architecture**: Well-tested, maintainable codebase with clear separation of concerns
12
12
  - ✅ **Next.js Integration**: Built-in support for Next.js static export workflows
13
13
  - ✅ **Flexible Configuration**: Customizable paths, wait times, and processing options
14
+ - ✅ **GitHub Action**: One-step CI integration via the bundled composite action
14
15
 
15
16
  ## Installation
16
17
 
@@ -94,7 +95,7 @@ Fetches and processes data from a Google Spreadsheet.
94
95
  - `sheetTitles`: (Optional) Array of sheet titles to process. If not provided, only the "i18n" sheet will be processed.
95
96
  - `options`: (Optional) Configuration object
96
97
  - `rowLimit`: Number - Maximum number of rows to fetch (default: 100)
97
- - `waitSeconds`: Number - Time to wait between API calls (default: 1)
98
+ - `waitSeconds`: Number - Base back-off delay in seconds for retrying rate-limited API calls (HTTP 429/503). Actual delay per retry is `waitSeconds × 2^attempt`, capped at 30 s. (default: 1)
98
99
  - `dataJsonPath`: String - Path for languageData.json file (default: 'src/lib/languageData.json')
99
100
  - `localesOutputPath`: String - Path for locales.ts file (default: 'src/i18n/locales.ts')
100
101
  - `translationsOutputDir`: String - Directory for translations output (default: 'translations')
@@ -187,6 +188,37 @@ console.log(validLocales); // ['en', 'de']
187
188
  const config = normalizeConfig({ waitSeconds: 2 });
188
189
  ```
189
190
 
191
+ ## Auto-Creating a Spreadsheet
192
+
193
+ When no `GOOGLE_SPREADSHEET_ID` is set (and `autoCreate` is not `false`), the package automatically creates a new Google Spreadsheet on first run using your service-account credentials:
194
+
195
+ ```typescript
196
+ // No spreadsheetId needed — the package creates one for you
197
+ const translations = await getSpreadSheetData(['i18n'], {
198
+ spreadsheetTitle: 'MyProject Translations',
199
+ sourceLocale: 'en',
200
+ targetLocales: ['de', 'fr', 'es'],
201
+ });
202
+ ```
203
+
204
+ The created spreadsheet includes:
205
+ - A **`__welcome__`** sheet with setup instructions and your spreadsheet ID.
206
+ - An **`i18n`** starter sheet with common translation keys and `GOOGLETRANSLATE` formulas for each target locale.
207
+
208
+ The new spreadsheet ID is printed prominently to the console and, if a `.env` file exists in your working directory, is written to it automatically:
209
+
210
+ ```
211
+ ✅ New spreadsheet created!
212
+ Title : MyProject Translations
213
+ URL : https://docs.google.com/spreadsheets/d/...
214
+ ID : 1abc...xyz
215
+
216
+ Add this to your .env file (or environment):
217
+ GOOGLE_SPREADSHEET_ID=1abc...xyz
218
+ ```
219
+
220
+ Set `autoCreate: false` to disable this behaviour and require an explicit ID.
221
+
190
222
  ## Bidirectional Sync Feature
191
223
 
192
224
  This package supports bidirectional synchronization between local translation files and the Google Spreadsheet:
@@ -253,6 +285,102 @@ For more detailed examples, check out the [examples directory](examples) where y
253
285
  - Auto-translation
254
286
  - Next.js integration
255
287
 
288
+ ## GitHub Action
289
+
290
+ This repository ships a composite GitHub Action that lets you fetch translations
291
+ in any workflow **without writing any Node.js scripts yourself**.
292
+
293
+ ### Quick start
294
+
295
+ Add the following step to your workflow after checking out your repository:
296
+
297
+ ```yaml
298
+ - name: Fetch translations
299
+ uses: el-j/google-sheet-translations@v1 # pin to a specific release tag for stability
300
+ with:
301
+ google-client-email: ${{ secrets.GOOGLE_CLIENT_EMAIL }}
302
+ google-private-key: ${{ secrets.GOOGLE_PRIVATE_KEY }}
303
+ google-spreadsheet-id: ${{ secrets.GOOGLE_SPREADSHEET_ID }}
304
+ sheet-titles: 'landingPage,about' # comma-separated sheet tab names
305
+ ```
306
+
307
+ ### Inputs
308
+
309
+ | Input | Required | Default | Description |
310
+ |-------|----------|---------|-------------|
311
+ | `google-client-email` | ✅ | — | Service-account e-mail (`GOOGLE_CLIENT_EMAIL`) |
312
+ | `google-private-key` | ✅ | — | Service-account private key (`GOOGLE_PRIVATE_KEY`) |
313
+ | `google-spreadsheet-id` | ✅ | — | Spreadsheet ID from the sheet URL (`GOOGLE_SPREADSHEET_ID`) |
314
+ | `sheet-titles` | ✅ | — | Comma-separated list of sheet tab names to process |
315
+ | `row-limit` | ❌ | `100` | Maximum rows to read per sheet |
316
+ | `wait-seconds` | ❌ | `1` | Base back-off delay in seconds for retrying rate-limited API calls (HTTP 429/503) |
317
+ | `translations-output-dir` | ❌ | `translations` | Directory for per-locale JSON files |
318
+ | `locales-output-path` | ❌ | `src/i18n/locales.ts` | Path for the generated `locales.ts` |
319
+ | `data-json-path` | ❌ | `src/lib/languageData.json` | Path for the `languageData.json` snapshot |
320
+ | `sync-local-changes` | ❌ | `true` | Push local changes back to the sheet before fetching |
321
+ | `node-version` | ❌ | `20` | Node.js version used to run the fetch script |
322
+ | `package-version` | ❌ | `latest` | Version of `@el-j/google-sheet-translations` to install |
323
+
324
+ ### Outputs
325
+
326
+ | Output | Description |
327
+ |--------|-------------|
328
+ | `translations-dir` | Absolute path of the directory containing locale JSON files |
329
+ | `locales-file` | Absolute path of the generated `locales.ts` |
330
+ | `data-json-file` | Absolute path of the `languageData.json` snapshot |
331
+
332
+ ### Full workflow example
333
+
334
+ ```yaml
335
+ name: Update Translations
336
+
337
+ on:
338
+ schedule:
339
+ - cron: '0 6 * * 1' # every Monday at 06:00 UTC
340
+ workflow_dispatch:
341
+
342
+ jobs:
343
+ update-translations:
344
+ runs-on: ubuntu-latest
345
+ permissions:
346
+ contents: write
347
+
348
+ steps:
349
+ - name: Checkout
350
+ uses: actions/checkout@v4
351
+
352
+ - name: Fetch translations
353
+ id: translations
354
+ uses: el-j/google-sheet-translations@v1
355
+ with:
356
+ google-client-email: ${{ secrets.GOOGLE_CLIENT_EMAIL }}
357
+ google-private-key: ${{ secrets.GOOGLE_PRIVATE_KEY }}
358
+ google-spreadsheet-id: ${{ secrets.GOOGLE_SPREADSHEET_ID }}
359
+ sheet-titles: 'landingPage,about'
360
+ translations-output-dir: 'src/translations'
361
+ locales-output-path: 'src/i18n/locales.ts'
362
+ data-json-path: 'src/lib/languageData.json'
363
+
364
+ - name: Commit updated translations
365
+ uses: stefanzweifel/git-auto-commit-action@v5
366
+ with:
367
+ commit_message: 'chore(i18n): update translations from Google Sheets'
368
+ file_pattern: |
369
+ ${{ steps.translations.outputs.translations-dir }}/**
370
+ ${{ steps.translations.outputs.locales-file }}
371
+ ${{ steps.translations.outputs.data-json-file }}
372
+ ```
373
+
374
+ ### Required secrets
375
+
376
+ Store these as [encrypted repository secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets):
377
+
378
+ | Secret | Description |
379
+ |--------|-------------|
380
+ | `GOOGLE_CLIENT_EMAIL` | Service-account e-mail from your Google Cloud credentials JSON |
381
+ | `GOOGLE_PRIVATE_KEY` | Private key from your Google Cloud credentials JSON (include the full PEM block) |
382
+ | `GOOGLE_SPREADSHEET_ID` | The long ID found in the spreadsheet URL: `…/spreadsheets/d/<ID>/edit` |
383
+
256
384
  ## License
257
385
 
258
386
  MIT
@@ -1 +1 @@
1
- {"version":3,"file":"getSpreadSheetData.d.ts","sourceRoot":"","sources":["../src/getSpreadSheetData.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAI/C,OAAO,EAAmB,KAAK,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAKxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAUhC,wBAAsB,kBAAkB,CACvC,SAAS,CAAC,EAAE,MAAM,EAAE,EACpB,OAAO,GAAE,kBAAuB,EAChC,aAAa,SAAI,GACf,OAAO,CAAC,eAAe,CAAC,CA4M1B;AAED,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"getSpreadSheetData.d.ts","sourceRoot":"","sources":["../src/getSpreadSheetData.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,EAAmB,KAAK,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAOxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAsChC,wBAAsB,kBAAkB,CACvC,SAAS,CAAC,EAAE,MAAM,EAAE,EACpB,OAAO,GAAE,kBAAuB,EAChC,aAAa,SAAI,GACf,OAAO,CAAC,eAAe,CAAC,CAyJ1B;AAED,eAAe,kBAAkB,CAAC"}
@@ -1,174 +1,167 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.DEFAULT_WAIT_SECONDS = void 0;
4
7
  exports.getSpreadSheetData = getSpreadSheetData;
8
+ const node_fs_1 = __importDefault(require("node:fs"));
9
+ const node_path_1 = __importDefault(require("node:path"));
5
10
  const google_spreadsheet_1 = require("google-spreadsheet");
6
- const wait_1 = require("./utils/wait");
7
11
  const auth_1 = require("./utils/auth");
8
- const validateEnv_1 = require("./utils/validateEnv");
9
12
  const configurationHandler_1 = require("./utils/configurationHandler");
10
13
  const sheetProcessor_1 = require("./utils/sheetProcessor");
11
14
  const fileWriter_1 = require("./utils/fileWriter");
12
15
  const syncManager_1 = require("./utils/syncManager");
16
+ const rateLimiter_1 = require("./utils/rateLimiter");
13
17
  const publicSheetReader_1 = require("./utils/publicSheetReader");
18
+ const spreadsheetCreator_1 = require("./utils/spreadsheetCreator");
14
19
  const constants_1 = require("./constants");
15
20
  Object.defineProperty(exports, "DEFAULT_WAIT_SECONDS", { enumerable: true, get: function () { return constants_1.DEFAULT_WAIT_SECONDS; } });
16
21
  /**
17
- * Fetches and processes data from a Google Spreadsheet
18
- * @param _docTitle - Array of sheet titles to process
19
- * @param options - Additional options for fetching data
20
- * @returns Processed translation data
22
+ * Fetches and processes data from a Google Spreadsheet.
23
+ *
24
+ * Modes:
25
+ * - **Authenticated** (default): uses a Google Cloud service account.
26
+ * Supports bidirectional sync, auto-translate, and auto-create.
27
+ * - **Public** (`publicSheet: true`): reads via the Google Visualization API
28
+ * with no credentials. The spreadsheet must be shared publicly.
29
+ *
30
+ * **Auto-create**: when no spreadsheet ID is available and `autoCreate` is true
31
+ * (the default), a new spreadsheet is created automatically on first run.
21
32
  */
22
33
  const MAX_SYNC_REFRESH_DEPTH = 1;
34
+ /** Appends (or updates) GOOGLE_SPREADSHEET_ID in .env when the file exists. */
35
+ async function persistSpreadsheetId(id) {
36
+ const envPath = node_path_1.default.join(process.cwd(), '.env');
37
+ try {
38
+ let content = '';
39
+ if (node_fs_1.default.existsSync(envPath)) {
40
+ content = node_fs_1.default.readFileSync(envPath, 'utf8');
41
+ if (/^GOOGLE_SPREADSHEET_ID=/m.test(content)) {
42
+ content = content.replace(/^GOOGLE_SPREADSHEET_ID=.*/m, `GOOGLE_SPREADSHEET_ID=${id}`);
43
+ }
44
+ else {
45
+ content = content.trimEnd() + `\nGOOGLE_SPREADSHEET_ID=${id}\n`;
46
+ }
47
+ }
48
+ else {
49
+ content = `GOOGLE_SPREADSHEET_ID=${id}\n`;
50
+ }
51
+ node_fs_1.default.writeFileSync(envPath, content, 'utf8');
52
+ console.log(` Saved GOOGLE_SPREADSHEET_ID to ${envPath}`);
53
+ }
54
+ catch (err) {
55
+ console.warn(` Could not write .env: ${err.message}`);
56
+ }
57
+ }
23
58
  async function getSpreadSheetData(_docTitle, options = {}, _refreshDepth = 0) {
24
- // Normalize configuration with defaults
25
59
  const config = (0, configurationHandler_1.normalizeConfig)(options);
26
- // Resolve spreadsheet ID: option takes precedence over env var
27
- const spreadsheetId = config.spreadsheetId ??
28
- (config.publicSheet
29
- ? process.env.GOOGLE_SPREADSHEET_ID
30
- : (0, validateEnv_1.validateEnv)().GOOGLE_SPREADSHEET_ID);
31
- if (!spreadsheetId) {
32
- throw new Error("No spreadsheet ID provided. Set the GOOGLE_SPREADSHEET_ID environment variable or pass spreadsheetId in options.");
33
- }
34
- // Prepare sheet titles to process
60
+ const baseDelayMs = config.waitSeconds * 1000;
35
61
  const docTitle = _docTitle ?? [];
36
62
  if (docTitle.length === 0) {
37
63
  console.warn("No sheet titles provided, cannot process spreadsheet data");
38
64
  return {};
39
65
  }
40
- // Always include i18n sheet if not already present
41
66
  if (!docTitle.includes("i18n")) {
42
67
  docTitle.push("i18n");
43
68
  }
44
- console.log(`Processing ${docTitle.length} sheets: ${docTitle.join(", ")}`);
45
- // Initialize result containers
46
69
  const finalTranslations = {};
47
70
  const allLocales = new Set();
48
- const localesWithContent = new Set(); // Track locales with actual translations in non-i18n sheets
49
- const globalLocaleMapping = {}; // normalized -> original header
50
- const globalOriginalMapping = {}; // original header -> normalized
71
+ const localesWithContent = new Set();
72
+ const globalLocaleMapping = {};
73
+ const globalOriginalMapping = {};
74
+ function mergeResult(result, title) {
75
+ if (!result.success)
76
+ return;
77
+ for (const [normalized, original] of Object.entries(result.localeMapping)) {
78
+ if (!globalLocaleMapping[normalized])
79
+ globalLocaleMapping[normalized] = original;
80
+ }
81
+ for (const [original, normalized] of Object.entries(result.originalMapping)) {
82
+ if (!globalOriginalMapping[original])
83
+ globalOriginalMapping[original] = normalized;
84
+ }
85
+ for (const locale of result.locales) {
86
+ if (finalTranslations[locale]) {
87
+ finalTranslations[locale] = { ...finalTranslations[locale], ...result.translations[locale] };
88
+ }
89
+ else {
90
+ finalTranslations[locale] = result.translations[locale];
91
+ }
92
+ allLocales.add(locale);
93
+ if (title !== "i18n" && result.translations[locale]) {
94
+ const hasActualTranslations = Object.values(result.translations[locale]).some((sheetTranslations) => Object.keys(sheetTranslations).length > 0);
95
+ if (hasActualTranslations)
96
+ localesWithContent.add(locale);
97
+ }
98
+ }
99
+ }
51
100
  if (config.publicSheet) {
52
- // ── Public (unauthenticated) path ─────────────────────────────────────
101
+ // ── Public (unauthenticated) path ──────────────────────────────────────
102
+ const spreadsheetId = config.spreadsheetId ?? process.env.GOOGLE_SPREADSHEET_ID;
103
+ if (!spreadsheetId) {
104
+ throw new Error("No spreadsheet ID provided. Set GOOGLE_SPREADSHEET_ID or pass spreadsheetId in options.");
105
+ }
106
+ console.log(`Processing ${docTitle.length} sheets: ${docTitle.join(", ")}`);
53
107
  await Promise.all(docTitle.map(async (title) => {
54
- await (0, wait_1.wait)(config.waitSeconds, `before get cells for sheet: ${title}`);
55
108
  let rows;
56
109
  try {
57
- rows = await (0, publicSheetReader_1.readPublicSheet)(spreadsheetId, title);
110
+ rows = await (0, rateLimiter_1.withRetry)(() => (0, publicSheetReader_1.readPublicSheet)(spreadsheetId, title), `readPublicSheet: ${title}`, baseDelayMs);
58
111
  }
59
112
  catch (err) {
60
113
  console.warn(`Sheet "${title}" could not be fetched: ${err.message}`);
61
114
  return;
62
115
  }
63
- const result = await (0, sheetProcessor_1.processRawRows)(rows, title, config.waitSeconds);
64
- if (result.success) {
65
- for (const [normalized, original] of Object.entries(result.localeMapping)) {
66
- if (!globalLocaleMapping[normalized]) {
67
- globalLocaleMapping[normalized] = original;
68
- }
69
- }
70
- for (const [original, normalized] of Object.entries(result.originalMapping)) {
71
- if (!globalOriginalMapping[original]) {
72
- globalOriginalMapping[original] = normalized;
73
- }
74
- }
75
- for (const locale of result.locales) {
76
- if (finalTranslations[locale]) {
77
- finalTranslations[locale] = {
78
- ...finalTranslations[locale],
79
- ...result.translations[locale],
80
- };
81
- }
82
- else {
83
- finalTranslations[locale] = result.translations[locale];
84
- }
85
- allLocales.add(locale);
86
- if (title !== "i18n" && result.translations[locale]) {
87
- const hasActualTranslations = Object.values(result.translations[locale]).some((sheetTranslations) => Object.keys(sheetTranslations).length > 0);
88
- if (hasActualTranslations) {
89
- localesWithContent.add(locale);
90
- }
91
- }
92
- }
93
- }
116
+ mergeResult(await (0, sheetProcessor_1.processRawRows)(rows, title), title);
94
117
  }));
95
118
  }
96
119
  else {
97
- // ── Authenticated path (service account / JWT) ────────────────────────
120
+ // ── Authenticated path ─────────────────────────────────────────────────
98
121
  const serviceAuthClient = (0, auth_1.createAuthClient)();
122
+ // Resolve spreadsheet ID: option > env var > auto-create
123
+ let spreadsheetId = config.spreadsheetId ?? process.env.GOOGLE_SPREADSHEET_ID;
124
+ if (!spreadsheetId) {
125
+ if (config.autoCreate) {
126
+ const created = await (0, spreadsheetCreator_1.createSpreadsheet)(serviceAuthClient, {
127
+ title: config.spreadsheetTitle,
128
+ sourceLocale: config.sourceLocale,
129
+ targetLocales: config.targetLocales,
130
+ });
131
+ spreadsheetId = created.spreadsheetId;
132
+ await persistSpreadsheetId(spreadsheetId);
133
+ }
134
+ else {
135
+ throw new Error("No spreadsheet ID provided. Set GOOGLE_SPREADSHEET_ID or pass spreadsheetId in options.");
136
+ }
137
+ }
138
+ console.log(`Processing ${docTitle.length} sheets: ${docTitle.join(", ")}`);
99
139
  const doc = new google_spreadsheet_1.GoogleSpreadsheet(spreadsheetId, serviceAuthClient);
100
140
  try {
101
- await doc.loadInfo(true);
141
+ await (0, rateLimiter_1.withRetry)(() => doc.loadInfo(true), "loadInfo", baseDelayMs);
102
142
  }
103
143
  catch (err) {
104
144
  throw new Error(`Failed to load spreadsheet "${spreadsheetId}"`, { cause: err });
105
145
  }
106
- // Process each sheet in parallel
107
146
  await Promise.all(docTitle.map(async (title) => {
108
- await (0, wait_1.wait)(config.waitSeconds, `before get cells for sheet: ${title}`);
109
147
  const sheet = doc.sheetsByTitle[title];
110
148
  if (!sheet) {
111
149
  console.warn(`Sheet "${title}" not found in the document`);
112
150
  return;
113
151
  }
114
- const result = await (0, sheetProcessor_1.processSheet)(sheet, title, config.rowLimit, config.waitSeconds);
115
- if (result.success) {
116
- // Merge locale mappings - prioritize first occurrence for consistency
117
- for (const [normalized, original] of Object.entries(result.localeMapping)) {
118
- if (!globalLocaleMapping[normalized]) {
119
- globalLocaleMapping[normalized] = original;
120
- }
121
- }
122
- for (const [original, normalized] of Object.entries(result.originalMapping)) {
123
- if (!globalOriginalMapping[original]) {
124
- globalOriginalMapping[original] = normalized;
125
- }
126
- }
127
- // Merge translations from this sheet into final result
128
- for (const locale of result.locales) {
129
- if (finalTranslations[locale]) {
130
- finalTranslations[locale] = {
131
- ...finalTranslations[locale],
132
- ...result.translations[locale],
133
- };
134
- }
135
- else {
136
- finalTranslations[locale] = result.translations[locale];
137
- }
138
- allLocales.add(locale);
139
- // Only track locales with content from non-i18n sheets
140
- if (title !== "i18n" &&
141
- result.translations[locale] &&
142
- Object.keys(result.translations[locale]).length > 0) {
143
- // Check if this locale actually has translation content (not just empty objects)
144
- const hasActualTranslations = Object.values(result.translations[locale]).some((sheetTranslations) => Object.keys(sheetTranslations).length > 0);
145
- if (hasActualTranslations) {
146
- localesWithContent.add(locale);
147
- }
148
- }
149
- }
150
- }
152
+ mergeResult(await (0, sheetProcessor_1.processSheet)(sheet, title, config.rowLimit, baseDelayMs), title);
151
153
  }));
152
- // Handle bidirectional sync if needed (only available for authenticated sheets)
153
154
  const syncResult = await (0, syncManager_1.handleBidirectionalSync)(doc, config.dataJsonPath, config.translationsOutputDir, config.syncLocalChanges, config.autoTranslate, finalTranslations, config.waitSeconds, globalLocaleMapping);
154
- // If sync requested a refresh, recursively call with updated data (depth-limited)
155
155
  if (syncResult.shouldRefresh && _refreshDepth < MAX_SYNC_REFRESH_DEPTH) {
156
- return getSpreadSheetData(_docTitle, {
157
- ...options,
158
- syncLocalChanges: false,
159
- }, _refreshDepth + 1);
156
+ return getSpreadSheetData(_docTitle, { ...options, syncLocalChanges: false }, _refreshDepth + 1);
160
157
  }
161
158
  }
162
- // Use locales with actual content for the locales file, fall back to all locales if none found
163
159
  const localesForOutput = localesWithContent.size > 0 ? Array.from(localesWithContent) : Array.from(allLocales);
164
160
  const allLocalesArray = Array.from(allLocales);
165
- // Write output files - use all locales for translation files but filtered locales for locales.ts
166
161
  (0, fileWriter_1.writeTranslationFiles)(finalTranslations, allLocalesArray, config.translationsOutputDir);
167
162
  (0, fileWriter_1.writeLocalesFile)(localesForOutput, globalLocaleMapping, config.localesOutputPath);
168
163
  console.log(`Writing locales file with ${localesForOutput.length} locales that have actual translations:`, localesForOutput);
169
- // Write languageData.json if we have fresh data or it doesn't exist
170
- const hasData = Object.keys(finalTranslations).length > 0;
171
- if (hasData) {
164
+ if (Object.keys(finalTranslations).length > 0) {
172
165
  (0, fileWriter_1.writeLanguageDataFile)(finalTranslations, allLocalesArray, config.dataJsonPath);
173
166
  }
174
167
  return finalTranslations;
@@ -1 +1 @@
1
- {"version":3,"file":"getSpreadSheetData.js","sourceRoot":"","sources":["../src/getSpreadSheetData.ts"],"names":[],"mappings":";;;AAqBA,gDAgNC;AArOD,2DAAuD;AAEvD,uCAAoC;AACpC,uCAAgD;AAChD,qDAAkD;AAClD,uEAAwF;AACxF,2DAAsE;AACtE,mDAAoG;AACpG,qDAA8D;AAC9D,iEAA4D;AAC5D,2CAAmD;AAC1C,qGADA,gCAAoB,OACA;AAE7B;;;;;GAKG;AACH,MAAM,sBAAsB,GAAG,CAAC,CAAC;AAE1B,KAAK,UAAU,kBAAkB,CACvC,SAAoB,EACpB,UAA8B,EAAE,EAChC,aAAa,GAAG,CAAC;IAEjB,wCAAwC;IACxC,MAAM,MAAM,GAAG,IAAA,sCAAe,EAAC,OAAO,CAAC,CAAC;IAExC,+DAA+D;IAC/D,MAAM,aAAa,GAClB,MAAM,CAAC,aAAa;QACpB,CAAC,MAAM,CAAC,WAAW;YAClB,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB;YACnC,CAAC,CAAC,IAAA,yBAAW,GAAE,CAAC,qBAAqB,CAAC,CAAC;IAEzC,IAAI,CAAC,aAAa,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CACd,kHAAkH,CAClH,CAAC;IACH,CAAC;IAED,kCAAkC;IAClC,MAAM,QAAQ,GAAa,SAAS,IAAI,EAAE,CAAC;IAE3C,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAA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AE,MAAM,CAAC,YAAY,CAAC,CAAC;IAChF,CAAC;IAED,OAAO,iBAAiB,CAAC;AAC1B,CAAC;AAED,kBAAe,kBAAkB,CAAC"}
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@
5
5
  export { getSpreadSheetData, DEFAULT_WAIT_SECONDS } from './getSpreadSheetData';
6
6
  export type { SpreadsheetOptions } from './utils/configurationHandler';
7
7
  export { wait } from './utils/wait';
8
+ export { withRetry } from './utils/rateLimiter';
8
9
  export { validateEnv } from './utils/validateEnv';
9
10
  export { createAuthClient } from './utils/auth';
10
11
  export { convertToDataJsonFormat } from './utils/dataConverter/convertToDataJsonFormat';
@@ -12,6 +13,8 @@ export { convertFromDataJsonFormat } from './utils/dataConverter/convertFromData
12
13
  export { findLocalChanges } from './utils/dataConverter/findLocalChanges';
13
14
  export { updateSpreadsheetWithLocalChanges } from './utils/spreadsheetUpdater';
14
15
  export { readPublicSheet } from './utils/publicSheetReader';
16
+ export { createSpreadsheet } from './utils/spreadsheetCreator';
17
+ export { validateCredentials } from './utils/validateEnv';
15
18
  export { isValidLocale, filterValidLocales } from './utils/localeFilter';
16
19
  export type { TranslationData, TranslationValue, SheetRow, GoogleEnvVars, } from './types';
17
20
  import { getSpreadSheetData } from './getSpreadSheetData';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAGhF,YAAY,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAGvE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,yBAA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kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAGzE,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,QAAQ,EACR,aAAa,GACd,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,eAAe,kBAAkB,CAAC"}
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * v2.0.0 – public API surface
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.filterValidLocales = exports.isValidLocale = exports.readPublicSheet = exports.updateSpreadsheetWithLocalChanges = exports.findLocalChanges = exports.convertFromDataJsonFormat = exports.convertToDataJsonFormat = exports.createAuthClient = exports.validateEnv = exports.wait = exports.DEFAULT_WAIT_SECONDS = exports.getSpreadSheetData = void 0;
7
+ exports.filterValidLocales = exports.isValidLocale = exports.validateCredentials = exports.createSpreadsheet = exports.readPublicSheet = exports.updateSpreadsheetWithLocalChanges = exports.findLocalChanges = exports.convertFromDataJsonFormat = exports.convertToDataJsonFormat = exports.createAuthClient = exports.validateEnv = exports.withRetry = exports.wait = exports.DEFAULT_WAIT_SECONDS = exports.getSpreadSheetData = void 0;
8
8
  // Main entry point
9
9
  var getSpreadSheetData_1 = require("./getSpreadSheetData");
10
10
  Object.defineProperty(exports, "getSpreadSheetData", { enumerable: true, get: function () { return getSpreadSheetData_1.getSpreadSheetData; } });
@@ -12,6 +12,8 @@ Object.defineProperty(exports, "DEFAULT_WAIT_SECONDS", { enumerable: true, get:
12
12
  // Utility functions required by dependents
13
13
  var wait_1 = require("./utils/wait");
14
14
  Object.defineProperty(exports, "wait", { enumerable: true, get: function () { return wait_1.wait; } });
15
+ var rateLimiter_1 = require("./utils/rateLimiter");
16
+ Object.defineProperty(exports, "withRetry", { enumerable: true, get: function () { return rateLimiter_1.withRetry; } });
15
17
  var validateEnv_1 = require("./utils/validateEnv");
16
18
  Object.defineProperty(exports, "validateEnv", { enumerable: true, get: function () { return validateEnv_1.validateEnv; } });
17
19
  var auth_1 = require("./utils/auth");
@@ -27,6 +29,11 @@ Object.defineProperty(exports, "updateSpreadsheetWithLocalChanges", { enumerable
27
29
  // Public (unauthenticated) sheet reader
28
30
  var publicSheetReader_1 = require("./utils/publicSheetReader");
29
31
  Object.defineProperty(exports, "readPublicSheet", { enumerable: true, get: function () { return publicSheetReader_1.readPublicSheet; } });
32
+ // Auto-create spreadsheet utility
33
+ var spreadsheetCreator_1 = require("./utils/spreadsheetCreator");
34
+ Object.defineProperty(exports, "createSpreadsheet", { enumerable: true, get: function () { return spreadsheetCreator_1.createSpreadsheet; } });
35
+ var validateEnv_2 = require("./utils/validateEnv");
36
+ Object.defineProperty(exports, "validateCredentials", { enumerable: true, get: function () { return validateEnv_2.validateCredentials; } });
30
37
  // Locale validation utilities (useful standalone)
31
38
  var localeFilter_1 = require("./utils/localeFilter");
32
39
  Object.defineProperty(exports, "isValidLocale", { enumerable: true, get: function () { return localeFilter_1.isValidLocale; } });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,mBAAmB;AACnB,2DAAgF;AAAvE,wHAAA,kBAAkB,OAAA;AAAE,0HAAA,oBAAoB,OAAA;AAKjD,2CAA2C;AAC3C,qCAAoC;AAA3B,4FAAA,IAAI,OAAA;AACb,mDAAkD;AAAzC,0GAAA,WAAW,OAAA;AACpB,qCAAgD;AAAvC,wGAAA,gBAAgB,OAAA;AACzB,yFAAwF;AAA/E,kIAAA,uBAAuB,OAAA;AAChC,6FAA4F;AAAnF,sIAAA,yBAAyB,OAAA;AAClC,2EAA0E;AAAjE,oHAAA,gBAAgB,OAAA;AACzB,iEAA+E;AAAtE,uIAAA,iCAAiC,OAAA;AAE1C,wCAAwC;AACxC,+DAA4D;AAAnD,oHAAA,eAAe,OAAA;AAExB,kDAAkD;AAClD,qDAAyE;AAAhE,6GAAA,aAAa,OAAA;AAAE,kHAAA,kBAAkB,OAAA;AAU1C,iBAAiB;AACjB,6DAA0D;AAC1D,kBAAe,uCAAkB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,mBAAmB;AACnB,2DAAgF;AAAvE,wHAAA,kBAAkB,OAAA;AAAE,0HAAA,oBAAoB,OAAA;AAKjD,2CAA2C;AAC3C,qCAAoC;AAA3B,4FAAA,IAAI,OAAA;AACb,mDAAgD;AAAvC,wGAAA,SAAS,OAAA;AAClB,mDAAkD;AAAzC,0GAAA,WAAW,OAAA;AACpB,qCAAgD;AAAvC,wGAAA,gBAAgB,OAAA;AACzB,yFAAwF;AAA/E,kIAAA,uBAAuB,OAAA;AAChC,6FAA4F;AAAnF,sIAAA,yBAAyB,OAAA;AAClC,2EAA0E;AAAjE,oHAAA,gBAAgB,OAAA;AACzB,iEAA+E;AAAtE,uIAAA,iCAAiC,OAAA;AAE1C,wCAAwC;AACxC,+DAA4D;AAAnD,oHAAA,eAAe,OAAA;AAExB,kCAAkC;AAClC,iEAA+D;AAAtD,uHAAA,iBAAiB,OAAA;AAC1B,mDAA0D;AAAjD,kHAAA,mBAAmB,OAAA;AAE5B,kDAAkD;AAClD,qDAAyE;AAAhE,6GAAA,aAAa,OAAA;AAAE,kHAAA,kBAAkB,OAAA;AAU1C,iBAAiB;AACjB,6DAA0D;AAC1D,kBAAe,uCAAkB,CAAC"}
@@ -8,7 +8,7 @@ const validateEnv_1 = require("./validateEnv");
8
8
  * @returns JWT authentication client
9
9
  */
10
10
  function createAuthClient() {
11
- const { GOOGLE_CLIENT_EMAIL, GOOGLE_PRIVATE_KEY } = (0, validateEnv_1.validateEnv)();
11
+ const { GOOGLE_CLIENT_EMAIL, GOOGLE_PRIVATE_KEY } = (0, validateEnv_1.validateCredentials)();
12
12
  // GitHub Actions (and many CI systems) store secrets with literal `\n`
13
13
  // instead of real newlines. The PEM key must have actual newlines for
14
14
  // OpenSSL to parse it; replace any escaped sequences before use.
@@ -1 +1 @@
1
- {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/utils/auth.ts"],"names":[],"mappings":";;AAOA,4CAaC;AApBD,6DAA0C;AAC1C,+CAA4C;AAE5C;;;GAGG;AACH,SAAgB,gBAAgB;IAC/B,MAAM,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,GAAG,IAAA,yBAAW,GAAE,CAAC;IAElE,uEAAuE;IACvE,sEAAsE;IACtE,iEAAiE;IACjE,MAAM,aAAa,GAAG,kBAAkB,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAE/D,OAAO,IAAI,yBAAG,CAAC;QACd,KAAK,EAAE,mBAAmB;QAC1B,GAAG,EAAE,aAAa;QAClB,MAAM,EAAE,CAAC,8CAA8C,CAAC;KACxD,CAAC,CAAC;AACJ,CAAC;AAED,kBAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/utils/auth.ts"],"names":[],"mappings":";;AAOA,4CAaC;AApBD,6DAA0C;AAC1C,+CAAoD;AAEpD;;;GAGG;AACH,SAAgB,gBAAgB;IAC/B,MAAM,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,GAAG,IAAA,iCAAmB,GAAE,CAAC;IAE1E,uEAAuE;IACvE,sEAAsE;IACtE,iEAAiE;IACjE,MAAM,aAAa,GAAG,kBAAkB,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAE/D,OAAO,IAAI,yBAAG,CAAC;QACd,KAAK,EAAE,mBAAmB;QAC1B,GAAG,EAAE,aAAa;QAClB,MAAM,EAAE,CAAC,8CAA8C,CAAC;KACxD,CAAC,CAAC;AACJ,CAAC;AAED,kBAAe,gBAAgB,CAAC"}
@@ -3,6 +3,12 @@
3
3
  */
4
4
  export interface SpreadsheetOptions {
5
5
  rowLimit?: number;
6
+ /**
7
+ * Base back-off delay in seconds used when retrying Google Sheets API
8
+ * calls that fail with a rate-limit response (HTTP 429 / 503).
9
+ * The actual delay for each retry attempt is `waitSeconds * 2^attempt`,
10
+ * capped at 30 seconds. Defaults to 1.
11
+ */
6
12
  waitSeconds?: number;
7
13
  dataJsonPath?: string;
8
14
  localesOutputPath?: string;
@@ -23,6 +29,24 @@ export interface SpreadsheetOptions {
23
29
  * this mode because they require write access.
24
30
  */
25
31
  publicSheet?: boolean;
32
+ /**
33
+ * Automatically create a new Google Spreadsheet when no spreadsheetId is
34
+ * available and the caller is in authenticated mode.
35
+ * Default: `true` (creation happens on the first run when no ID is set).
36
+ */
37
+ autoCreate?: boolean;
38
+ /** Title for the auto-created spreadsheet (default: "google-sheet-translations"). */
39
+ spreadsheetTitle?: string;
40
+ /**
41
+ * Source locale used when seeding the auto-created spreadsheet with
42
+ * GOOGLETRANSLATE formulas (default: "en").
43
+ */
44
+ sourceLocale?: string;
45
+ /**
46
+ * Target locales for GOOGLETRANSLATE formulas in the auto-created spreadsheet.
47
+ * Default: ['de', 'fr', 'es', 'it', 'pt', 'ja', 'zh'].
48
+ */
49
+ targetLocales?: string[];
26
50
  }
27
51
  /**
28
52
  * Normalized configuration with all defaults applied
@@ -37,6 +61,10 @@ export interface NormalizedConfig {
37
61
  autoTranslate: boolean;
38
62
  spreadsheetId: string | undefined;
39
63
  publicSheet: boolean;
64
+ autoCreate: boolean;
65
+ spreadsheetTitle: string;
66
+ sourceLocale: string;
67
+ targetLocales: string[];
40
68
  }
41
69
  /**
42
70
  * Normalizes configuration options by applying defaults
@@ -1 +1 @@
1
- {"version":3,"file":"configurationHandler.d.ts","sourceRoot":"","sources":["../../src/utils/configurationHandler.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,aAAa,EAAE,OAAO,CAAC;IACvB,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,WAAW,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,GAAE,kBAAuB,GAAG,gBAAgB,CAYlF"}
1
+ {"version":3,"file":"configurationHandler.d.ts","sourceRoot":"","sources":["../../src/utils/configurationHandler.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qFAAqF;IACrF,gBAAgB,CAAC,EAAE,MAAM,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