@translation-cms/sync 1.2.81 → 1.2.83
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 +104 -46
- package/dist/commands/init.d.ts +5 -4
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +382 -75
- package/dist/commands/init.js.map +1 -1
- package/dist/core/api-internals/sync.d.ts.map +1 -1
- package/dist/core/api-internals/sync.js +5 -1
- package/dist/core/api-internals/sync.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,26 +15,62 @@ Choose the approach that fits your workflow:
|
|
|
15
15
|
|
|
16
16
|
### Method 1: Next.js Plugin (Automatic)
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
The `init` command automatically generates your `next.config.ts`. It looks like
|
|
19
|
+
this:
|
|
19
20
|
|
|
20
21
|
```ts
|
|
21
|
-
import
|
|
22
|
+
import type { NextConfig } from 'next';
|
|
23
|
+
import {
|
|
24
|
+
PHASE_DEVELOPMENT_SERVER,
|
|
25
|
+
PHASE_PRODUCTION_BUILD,
|
|
26
|
+
} from 'next/constants';
|
|
27
|
+
import {
|
|
28
|
+
syncTranslations,
|
|
29
|
+
pullTranslations,
|
|
30
|
+
watchTranslations,
|
|
31
|
+
} from '@translation-cms/sync/api';
|
|
22
32
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
33
|
+
// Mirror your tsconfig.json paths so the scanner can resolve @/ alias imports
|
|
34
|
+
const pathMappings: Record<string, string[]> = {
|
|
35
|
+
'@/*': ['src/*'],
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const pluralSuffixes = ['_zero', '_one', '_two', '_few', '_many', '_other'];
|
|
39
|
+
|
|
40
|
+
export default async function config(phase: string): Promise<NextConfig> {
|
|
41
|
+
if (phase === PHASE_DEVELOPMENT_SERVER) {
|
|
42
|
+
await syncTranslations({
|
|
43
|
+
projectRoot: '.',
|
|
44
|
+
pathMappings,
|
|
45
|
+
verbose: true,
|
|
46
|
+
pluralSuffixes,
|
|
47
|
+
});
|
|
48
|
+
await pullTranslations({ projectRoot: '.', verbose: true });
|
|
49
|
+
watchTranslations({ projectRoot: '.', interval: 300000 });
|
|
31
50
|
}
|
|
32
|
-
|
|
51
|
+
|
|
52
|
+
if (phase === PHASE_PRODUCTION_BUILD) {
|
|
53
|
+
await syncTranslations({
|
|
54
|
+
projectRoot: '.',
|
|
55
|
+
pathMappings,
|
|
56
|
+
pluralSuffixes,
|
|
57
|
+
});
|
|
58
|
+
await pullTranslations({ projectRoot: '.' });
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
// Your Next.js configuration goes here
|
|
63
|
+
// Example:
|
|
64
|
+
// images: { remotePatterns: [...] },
|
|
65
|
+
// redirects: async () => [...],
|
|
66
|
+
// rewrites: async () => [...],
|
|
67
|
+
};
|
|
68
|
+
}
|
|
33
69
|
```
|
|
34
70
|
|
|
35
|
-
Your translations sync automatically
|
|
36
|
-
re-pulled automatically whenever you publish new translations in the
|
|
37
|
-
|
|
71
|
+
Your translations sync automatically during development and build — and the JSON
|
|
72
|
+
files are re-pulled automatically whenever you publish new translations in the
|
|
73
|
+
CMS.
|
|
38
74
|
|
|
39
75
|
### Method 2: CLI (Manual)
|
|
40
76
|
|
|
@@ -54,7 +90,8 @@ pnpm sync-translations init
|
|
|
54
90
|
|
|
55
91
|
### Method 3: Programmatic API
|
|
56
92
|
|
|
57
|
-
Use in scripts, build tools, or a custom `next.config.ts
|
|
93
|
+
Use in scripts, build tools, or a custom `next.config.ts`. This is the full API
|
|
94
|
+
— all functions available:
|
|
58
95
|
|
|
59
96
|
```ts
|
|
60
97
|
import type { NextConfig } from 'next';
|
|
@@ -66,30 +103,47 @@ import {
|
|
|
66
103
|
syncTranslations,
|
|
67
104
|
pullTranslations,
|
|
68
105
|
watchTranslations,
|
|
106
|
+
syncAndPull,
|
|
69
107
|
} from '@translation-cms/sync/api';
|
|
70
108
|
|
|
71
|
-
|
|
109
|
+
// Extract from tsconfig.json to resolve alias imports (@/*, @tellr/*, etc.)
|
|
110
|
+
const pathMappings: Record<string, string[]> = {
|
|
111
|
+
'@/*': ['src/*'],
|
|
112
|
+
'@components': ['src/components'],
|
|
113
|
+
// Add more as needed from your tsconfig.json
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
// Register plural forms for keys like t('ns:key_one'), t('ns:key_other')
|
|
117
|
+
const pluralSuffixes = ['_zero', '_one', '_two', '_few', '_many', '_other'];
|
|
72
118
|
|
|
73
119
|
export default async function config(phase: string): Promise<NextConfig> {
|
|
74
120
|
if (phase === PHASE_DEVELOPMENT_SERVER) {
|
|
75
|
-
// Scan
|
|
121
|
+
// Scan code and upload new/changed keys
|
|
76
122
|
await syncTranslations({
|
|
77
123
|
projectRoot: '.',
|
|
78
124
|
pathMappings,
|
|
125
|
+
pluralSuffixes,
|
|
79
126
|
verbose: true,
|
|
80
127
|
});
|
|
128
|
+
// Download translations from CMS
|
|
81
129
|
await pullTranslations({ projectRoot: '.', verbose: true });
|
|
82
|
-
// Poll
|
|
83
|
-
watchTranslations({ projectRoot: '.' });
|
|
130
|
+
// Poll CMS every 5min for new translations (non-blocking)
|
|
131
|
+
watchTranslations({ projectRoot: '.', interval: 300000 });
|
|
84
132
|
}
|
|
85
133
|
|
|
86
134
|
if (phase === PHASE_PRODUCTION_BUILD) {
|
|
87
|
-
|
|
88
|
-
await
|
|
135
|
+
// One-shot: sync + pull (no watch in production)
|
|
136
|
+
await syncAndPull({
|
|
137
|
+
projectRoot: '.',
|
|
138
|
+
pathMappings,
|
|
139
|
+
pluralSuffixes,
|
|
140
|
+
});
|
|
89
141
|
}
|
|
90
142
|
|
|
91
143
|
return {
|
|
92
|
-
//
|
|
144
|
+
// Your Next.js configuration
|
|
145
|
+
// images: { remotePatterns: [...] },
|
|
146
|
+
// redirects: async () => [...],
|
|
93
147
|
};
|
|
94
148
|
}
|
|
95
149
|
```
|
|
@@ -231,33 +285,38 @@ Plus the peer dependencies:
|
|
|
231
285
|
pnpm add i18next react-i18next i18next-resources-to-backend
|
|
232
286
|
```
|
|
233
287
|
|
|
234
|
-
## Step 3:
|
|
288
|
+
## Step 3: Automatic Setup (Recommended)
|
|
235
289
|
|
|
236
|
-
|
|
290
|
+
Run the interactive setup wizard:
|
|
237
291
|
|
|
238
292
|
```bash
|
|
239
|
-
|
|
240
|
-
NEXT_PUBLIC_CMS_PROJECT_ID=your-project-id
|
|
241
|
-
CMS_SYNC_API_KEY=your-jwt-api-key
|
|
293
|
+
pnpm sync-translations init
|
|
242
294
|
```
|
|
243
295
|
|
|
244
|
-
|
|
245
|
-
**Project Settings → Environments → your environment → API Key**. If the key
|
|
246
|
-
there still looks like a UUID, use "Regenerate" to generate a JWT.
|
|
296
|
+
This will ask for your CMS credentials and automatically:
|
|
247
297
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
298
|
+
- Create/update `.env.local` with your CMS settings:
|
|
299
|
+
```
|
|
300
|
+
NEXT_PUBLIC_CMS_URL=https://cms.example.com
|
|
301
|
+
NEXT_PUBLIC_CMS_PROJECT_ID=your-project-id
|
|
302
|
+
CMS_SYNC_API_KEY=your-jwt-api-key
|
|
303
|
+
```
|
|
304
|
+
- Generate `.translationsrc.json` with output directory and settings
|
|
305
|
+
- Create the i18n directory structure
|
|
251
306
|
|
|
252
|
-
|
|
307
|
+
### Getting Your API Key
|
|
253
308
|
|
|
254
|
-
|
|
309
|
+
The `CMS_SYNC_API_KEY` is a **JWT token**. Find it in the CMS under: **Project
|
|
310
|
+
Settings → Environments → your environment → API Key**
|
|
255
311
|
|
|
256
|
-
|
|
257
|
-
pnpm sync-translations init
|
|
258
|
-
```
|
|
312
|
+
If it still looks like a UUID, use "Regenerate" to generate a JWT.
|
|
259
313
|
|
|
260
|
-
|
|
314
|
+
> **Note:** The key is stored in `.env.local` (not committed to git) for
|
|
315
|
+
> security.
|
|
316
|
+
|
|
317
|
+
### Generated Files
|
|
318
|
+
|
|
319
|
+
The init command creates:
|
|
261
320
|
|
|
262
321
|
```
|
|
263
322
|
src/lib/i18n/
|
|
@@ -271,21 +330,20 @@ src/lib/i18n/
|
|
|
271
330
|
└── nl.json # Dutch (empty, filled by pull)
|
|
272
331
|
```
|
|
273
332
|
|
|
274
|
-
|
|
333
|
+
And `.translationsrc.json`:
|
|
275
334
|
|
|
276
335
|
```json
|
|
277
336
|
{
|
|
278
337
|
"outputDir": "./src/lib/i18n/dictionaries",
|
|
279
338
|
"pullTtlMs": 300000,
|
|
280
|
-
"excludedDirs": ["e2e", "node_modules", "fixtures"]
|
|
281
|
-
"routeParams": {}
|
|
339
|
+
"excludedDirs": ["e2e", "node_modules", "fixtures"]
|
|
282
340
|
}
|
|
283
341
|
```
|
|
284
342
|
|
|
285
343
|
**Note:** `routeParams` can stay empty! The scanner automatically generates
|
|
286
344
|
sensible defaults for all dynamic routes.
|
|
287
345
|
|
|
288
|
-
## Step
|
|
346
|
+
## Step 4: First Sync — Upload Keys
|
|
289
347
|
|
|
290
348
|
Scan your code and upload detected keys to the CMS:
|
|
291
349
|
|
|
@@ -306,7 +364,7 @@ Check in the CMS if your keys appeared.
|
|
|
306
364
|
— this is normal! The keys were just uploaded but don't have translations yet.
|
|
307
365
|
Go to your CMS, fill in translations, then run `pull` again.
|
|
308
366
|
|
|
309
|
-
## Step
|
|
367
|
+
## Step 5: Add Translations in CMS
|
|
310
368
|
|
|
311
369
|
1. Open your Translations CMS project
|
|
312
370
|
2. Your keys are now listed (without translations)
|
|
@@ -394,7 +452,7 @@ t('auth:login.email');
|
|
|
394
452
|
t('payments:amount'); // namespace not added
|
|
395
453
|
```
|
|
396
454
|
|
|
397
|
-
## Step
|
|
455
|
+
## Step 7: Automatic Sync in Your Workflow
|
|
398
456
|
|
|
399
457
|
Add this to `package.json`:
|
|
400
458
|
|
|
@@ -409,7 +467,7 @@ Add this to `package.json`:
|
|
|
409
467
|
|
|
410
468
|
Now you automatically pull the latest translations on startup.
|
|
411
469
|
|
|
412
|
-
## Step
|
|
470
|
+
## Step 8 (Optional): Set Up Preview Mode
|
|
413
471
|
|
|
414
472
|
Enable live in-context preview — editors can live see how their text looks in
|
|
415
473
|
your app.
|
package/dist/commands/init.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Interactive `init` command.
|
|
3
3
|
*
|
|
4
|
-
* Walks the user through a series of prompts and
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Walks the user through a series of prompts and generates:
|
|
5
|
+
* - .env.local (CMS credentials)
|
|
6
|
+
* - .translationsrc.json (scanner + pull config)
|
|
7
|
+
* - next.config.ts (or updates existing)
|
|
8
|
+
* - i18n directory structure
|
|
8
9
|
*/
|
|
9
10
|
export declare function runInit(root: string): Promise<void>;
|
|
10
11
|
//# sourceMappingURL=init.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAiRA;;;;;;;;GAQG;AACH,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAkPzD"}
|
package/dist/commands/init.js
CHANGED
|
@@ -1,13 +1,226 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
import fs from 'fs';
|
|
3
3
|
import { scaffoldI18n } from '../scaffold/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* Detect if next.config.ts already has withTranslationSync wrapper
|
|
6
|
+
*/
|
|
7
|
+
function hasTranslationSyncWrapper(configContent) {
|
|
8
|
+
return (configContent.includes('withTranslationSync') ||
|
|
9
|
+
configContent.includes('@translation-cms/sync'));
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Detect the export pattern in next.config.ts
|
|
13
|
+
*/
|
|
14
|
+
function detectExportPattern(configContent) {
|
|
15
|
+
const varExportMatch = configContent.match(/export\s+default\s+(\w+)\s*;/);
|
|
16
|
+
if (varExportMatch) {
|
|
17
|
+
return {
|
|
18
|
+
pattern: varExportMatch[0],
|
|
19
|
+
type: 'default-variable',
|
|
20
|
+
varName: varExportMatch[1],
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
const objectExportMatch = configContent.match(/export\s+default\s+\{[\s\S]*?\};/);
|
|
24
|
+
if (objectExportMatch) {
|
|
25
|
+
return {
|
|
26
|
+
pattern: objectExportMatch[0],
|
|
27
|
+
type: 'default-object',
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
const wrappedExportMatch = configContent.match(/export\s+default\s+\w+\([^)]*\)\s*;/);
|
|
31
|
+
if (wrappedExportMatch) {
|
|
32
|
+
return {
|
|
33
|
+
pattern: wrappedExportMatch[0],
|
|
34
|
+
type: 'default-wrapped',
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Merge sync-translations config into existing next.config.ts
|
|
41
|
+
*/
|
|
42
|
+
function mergeTranslationSyncConfig(existingContent) {
|
|
43
|
+
if (hasTranslationSyncWrapper(existingContent)) {
|
|
44
|
+
return {
|
|
45
|
+
merged: existingContent,
|
|
46
|
+
alreadyMerged: true,
|
|
47
|
+
detectFailed: false,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
const exportMatch = detectExportPattern(existingContent);
|
|
51
|
+
if (!exportMatch) {
|
|
52
|
+
return {
|
|
53
|
+
merged: existingContent,
|
|
54
|
+
alreadyMerged: false,
|
|
55
|
+
detectFailed: true,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
let merged = existingContent;
|
|
59
|
+
if (!merged.includes('withTranslationSync')) {
|
|
60
|
+
const importLine = "import { withTranslationSync } from '@translation-cms/sync/next';\n";
|
|
61
|
+
const lastImportMatch = [...merged.matchAll(/^import\s.+;$/gm)].pop();
|
|
62
|
+
if (lastImportMatch?.index !== undefined) {
|
|
63
|
+
const insertPos = lastImportMatch.index + lastImportMatch[0].length;
|
|
64
|
+
merged = merged.slice(0, insertPos) + '\n' + importLine;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
merged = importLine + merged;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
if (exportMatch.type === 'default-variable') {
|
|
71
|
+
const oldExport = exportMatch.pattern;
|
|
72
|
+
const newExport = `export default withTranslationSync(${exportMatch.varName});`;
|
|
73
|
+
merged = merged.replace(oldExport, newExport);
|
|
74
|
+
}
|
|
75
|
+
else if (exportMatch.type === 'default-object') {
|
|
76
|
+
const oldExport = exportMatch.pattern;
|
|
77
|
+
const configBody = oldExport
|
|
78
|
+
.replace(/^export\s+default\s+/, '')
|
|
79
|
+
.replace(/;$/, '');
|
|
80
|
+
const newCode = `const nextConfig = ${configBody};\n\nexport default withTranslationSync(nextConfig);`;
|
|
81
|
+
merged = merged.replace(oldExport, newCode);
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
merged,
|
|
85
|
+
alreadyMerged: false,
|
|
86
|
+
detectFailed: false,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Generate or update next.config.ts with sync-translations configuration.
|
|
91
|
+
*/
|
|
92
|
+
function generateNextConfig(root, options) {
|
|
93
|
+
const configPath = path.join(root, 'next.config.ts');
|
|
94
|
+
const tsconfigPath = path.join(root, 'tsconfig.json');
|
|
95
|
+
// Parse tsconfig.json to extract path mappings
|
|
96
|
+
let pathMappingsCode = "'@/*': ['src/*']";
|
|
97
|
+
try {
|
|
98
|
+
if (fs.existsSync(tsconfigPath)) {
|
|
99
|
+
const tsconfigContent = fs.readFileSync(tsconfigPath, 'utf-8');
|
|
100
|
+
// Try to find all path mappings, not just @/*
|
|
101
|
+
const pathsMatch = tsconfigContent.match(/"paths":\s*\{([^}]+)\}/);
|
|
102
|
+
if (pathsMatch) {
|
|
103
|
+
const pathsContent = pathsMatch[1];
|
|
104
|
+
// Extract all path mappings as key: [values]
|
|
105
|
+
const mappings = [];
|
|
106
|
+
const pathRegex = /"([^"]+)":\s*\[\s*"([^"]+)"\s*\]/g;
|
|
107
|
+
let match;
|
|
108
|
+
while ((match = pathRegex.exec(pathsContent)) !== null) {
|
|
109
|
+
mappings.push(`'${match[1]}': ['${match[2]}']`);
|
|
110
|
+
}
|
|
111
|
+
if (mappings.length > 0) {
|
|
112
|
+
pathMappingsCode = mappings.join(',\n ');
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
catch {
|
|
118
|
+
// Use default if tsconfig parsing fails
|
|
119
|
+
}
|
|
120
|
+
const pluralLine = options.pluralSuffixes
|
|
121
|
+
? "const pluralSuffixes = ['_zero', '_one', '_two', '_few', '_many', '_other'];\n\n"
|
|
122
|
+
: '';
|
|
123
|
+
const verboseArg = options.syncOnDev || options.syncOnBuild ? ', verbose: true' : '';
|
|
124
|
+
const syncOnDevBlock = options.syncOnDev
|
|
125
|
+
? ` await syncTranslations({\n projectRoot: '.',\n pathMappings,${verboseArg}\n pluralSuffixes,\n });\n`
|
|
126
|
+
: '';
|
|
127
|
+
const pullOnDevBlock = ` await pullTranslations({ projectRoot: '.'${verboseArg} });\n`;
|
|
128
|
+
const watchBlock = options.watchOnDev
|
|
129
|
+
? ` watchTranslations({ projectRoot: '.', interval: ${options.watchInterval} });\n`
|
|
130
|
+
: '';
|
|
131
|
+
const syncOnBuildBlock = options.syncOnBuild
|
|
132
|
+
? ` await syncTranslations({\n projectRoot: '.',\n pathMappings,\n pluralSuffixes,\n });\n`
|
|
133
|
+
: '';
|
|
134
|
+
const pullOnBuildBlock = ` await pullTranslations({ projectRoot: '.'${verboseArg} });\n`;
|
|
135
|
+
let configContent;
|
|
136
|
+
if (fs.existsSync(configPath)) {
|
|
137
|
+
configContent = fs.readFileSync(configPath, 'utf-8');
|
|
138
|
+
// Try to merge if file exists
|
|
139
|
+
const mergeResult = mergeTranslationSyncConfig(configContent);
|
|
140
|
+
if (mergeResult.alreadyMerged) {
|
|
141
|
+
// eslint-disable-next-line no-console
|
|
142
|
+
console.log(`[Already merged] next.config.ts`);
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
if (!mergeResult.detectFailed) {
|
|
146
|
+
// Successfully merged
|
|
147
|
+
configContent = mergeResult.merged;
|
|
148
|
+
fs.writeFileSync(configPath, configContent, 'utf-8');
|
|
149
|
+
// eslint-disable-next-line no-console
|
|
150
|
+
console.log(`[Merged] next.config.ts`);
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
// If detect failed, show warning
|
|
154
|
+
if (configContent.length >= 50) {
|
|
155
|
+
// eslint-disable-next-line no-console
|
|
156
|
+
console.log(`\n[Warning] next.config.ts exists but auto-merge failed.`);
|
|
157
|
+
// eslint-disable-next-line no-console
|
|
158
|
+
console.log('(Could not detect export pattern - review manually)\n');
|
|
159
|
+
// eslint-disable-next-line no-console
|
|
160
|
+
console.log('Recommended manual merge - add this import and wrap the export:\n');
|
|
161
|
+
// eslint-disable-next-line no-console
|
|
162
|
+
console.log("import { withTranslationSync } from '@translation-cms/sync/next';");
|
|
163
|
+
// eslint-disable-next-line no-console
|
|
164
|
+
console.log('export default withTranslationSync(yourConfig);\n');
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
// Create new next.config.ts
|
|
170
|
+
configContent = '';
|
|
171
|
+
}
|
|
172
|
+
// Generate the template if file is empty or doesn't exist
|
|
173
|
+
if (!configContent || configContent.length < 50) {
|
|
174
|
+
configContent = `import type { NextConfig } from '../next.js';
|
|
175
|
+
import {
|
|
176
|
+
PHASE_DEVELOPMENT_SERVER,
|
|
177
|
+
PHASE_PRODUCTION_BUILD,
|
|
178
|
+
} from 'next/constants';
|
|
179
|
+
import {
|
|
180
|
+
syncTranslations,
|
|
181
|
+
pullTranslations,
|
|
182
|
+
watchTranslations,
|
|
183
|
+
} from '@translation-cms/sync/api';
|
|
184
|
+
import { withTranslationSync } from '@translation-cms/sync/next';
|
|
185
|
+
|
|
186
|
+
// Mirror your tsconfig.json paths so the scanner can resolve @/ alias imports
|
|
187
|
+
const pathMappings: Record<string, string[]> = {
|
|
188
|
+
${pathMappingsCode},
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
${pluralLine}export default async function config(
|
|
192
|
+
phase: string
|
|
193
|
+
): Promise<NextConfig> {
|
|
194
|
+
if (phase === PHASE_DEVELOPMENT_SERVER) {
|
|
195
|
+
${syncOnDevBlock}${pullOnDevBlock}${watchBlock} }
|
|
196
|
+
|
|
197
|
+
if (phase === PHASE_PRODUCTION_BUILD) {
|
|
198
|
+
${syncOnBuildBlock}${pullOnBuildBlock} }
|
|
199
|
+
|
|
200
|
+
const nextConfig: NextConfig = {
|
|
201
|
+
// Your Next.js configuration goes here
|
|
202
|
+
// Example:
|
|
203
|
+
// images: { remotePatterns: [...] },
|
|
204
|
+
// redirects: async () => [...],
|
|
205
|
+
// rewrites: async () => [...],
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
return withTranslationSync(nextConfig);
|
|
209
|
+
}
|
|
210
|
+
`;
|
|
211
|
+
fs.writeFileSync(configPath, configContent, 'utf-8');
|
|
212
|
+
// eslint-disable-next-line no-console
|
|
213
|
+
console.log(`[Created] next.config.ts`);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
4
216
|
/**
|
|
5
217
|
* Interactive `init` command.
|
|
6
218
|
*
|
|
7
|
-
* Walks the user through a series of prompts and
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
219
|
+
* Walks the user through a series of prompts and generates:
|
|
220
|
+
* - .env.local (CMS credentials)
|
|
221
|
+
* - .translationsrc.json (scanner + pull config)
|
|
222
|
+
* - next.config.ts (or updates existing)
|
|
223
|
+
* - i18n directory structure
|
|
11
224
|
*/
|
|
12
225
|
export async function runInit(root) {
|
|
13
226
|
const { createInterface } = await import('readline');
|
|
@@ -18,57 +231,136 @@ export async function runInit(root) {
|
|
|
18
231
|
});
|
|
19
232
|
const question = (prompt) => new Promise(resolve => rl.question(prompt, resolve));
|
|
20
233
|
// eslint-disable-next-line no-console
|
|
21
|
-
console.log('sync-translations
|
|
234
|
+
console.log('\n--- sync-translations setup ---\n');
|
|
22
235
|
// eslint-disable-next-line no-console
|
|
23
|
-
console.log('This
|
|
236
|
+
console.log('This wizard will generate:');
|
|
24
237
|
// eslint-disable-next-line no-console
|
|
25
|
-
console.log('
|
|
26
|
-
//
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
238
|
+
console.log(' - .env.local (CMS credentials)');
|
|
239
|
+
// eslint-disable-next-line no-console
|
|
240
|
+
console.log(' - .translationsrc.json (config)');
|
|
241
|
+
// eslint-disable-next-line no-console
|
|
242
|
+
console.log(' - next.config.ts (auto-sync setup)');
|
|
243
|
+
// eslint-disable-next-line no-console
|
|
244
|
+
console.log(' - i18n directory structure\n');
|
|
245
|
+
// === CMS Configuration ===
|
|
246
|
+
// eslint-disable-next-line no-console
|
|
247
|
+
console.log('CMS Configuration:');
|
|
248
|
+
const cmsUrl = await question(' CMS URL (e.g. https://cms.example.com): ');
|
|
249
|
+
const projectId = await question(' Project ID: ');
|
|
250
|
+
const apiKey = await question(' API key (JWT): ');
|
|
251
|
+
// === i18n Configuration ===
|
|
252
|
+
// eslint-disable-next-line no-console
|
|
253
|
+
console.log('\ni18n Configuration:');
|
|
254
|
+
const i18nDirInput = await question(' i18n directory [./src/lib/i18n]: ');
|
|
255
|
+
const localesInput = await question(' Locales (comma-separated) [en,nl]: ');
|
|
256
|
+
const pullTtlInput = await question(' Pull TTL in seconds [300]: ');
|
|
257
|
+
// === Scanner Configuration ===
|
|
258
|
+
// eslint-disable-next-line no-console
|
|
259
|
+
console.log('\nScanner Configuration:');
|
|
260
|
+
const previewRoutesInput = await question(' Enable preview routes? [Y/n]: ');
|
|
261
|
+
const pluralInput = await question(' Support pluralization (count option)? [Y/n]: ');
|
|
262
|
+
// === Next.js Configuration ===
|
|
263
|
+
// eslint-disable-next-line no-console
|
|
264
|
+
console.log('\nNext.js Integration:');
|
|
265
|
+
const syncOnDevInput = await question(' Auto-sync on dev startup? [Y/n]: ');
|
|
266
|
+
const syncOnBuildInput = await question(' Auto-sync on build? [Y/n]: ');
|
|
267
|
+
const watchOnDevInput = await question(' Watch CMS for updates in dev? [Y/n]: ');
|
|
268
|
+
const watchIntervalInput = await question(' Watch interval in seconds [300]: ');
|
|
269
|
+
// === Scaffolding ===
|
|
270
|
+
const scaffoldInput = await question('\nScaffold i18n files (settings, client, server, provider)? [Y/n]: ');
|
|
33
271
|
rl.close();
|
|
34
|
-
//
|
|
272
|
+
// === Parse Answers ===
|
|
35
273
|
const i18nDir = i18nDirInput.trim() || './src/lib/i18n';
|
|
36
|
-
// Dictionaries live one level deeper than the i18n dir
|
|
37
274
|
const outputDir = `${i18nDir.replace(/\/$/, '')}/dictionaries`;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
275
|
+
const locales = localesInput
|
|
276
|
+
.trim()
|
|
277
|
+
.split(',')
|
|
278
|
+
.map(l => l.trim())
|
|
279
|
+
.filter(l => l) || ['en', 'nl'];
|
|
280
|
+
const ttlSeconds = pullTtlInput.trim()
|
|
281
|
+
? parseInt(pullTtlInput.trim(), 10)
|
|
282
|
+
: 300;
|
|
283
|
+
const previewRoutes = previewRoutesInput.trim().toLowerCase() !== 'n';
|
|
284
|
+
const pluralSuffixes = pluralInput.trim().toLowerCase() !== 'n';
|
|
285
|
+
const syncOnDev = syncOnDevInput.trim().toLowerCase() !== 'n';
|
|
286
|
+
const syncOnBuild = syncOnBuildInput.trim().toLowerCase() !== 'n';
|
|
287
|
+
const watchOnDev = watchOnDevInput.trim().toLowerCase() !== 'n';
|
|
288
|
+
const watchInterval = watchIntervalInput.trim()
|
|
289
|
+
? parseInt(watchIntervalInput.trim(), 10) * 1000
|
|
290
|
+
: 300000;
|
|
291
|
+
// === 1. Write .env.local ===
|
|
292
|
+
const envPath = path.join(root, '.env.local');
|
|
293
|
+
let envContent = '';
|
|
294
|
+
if (fs.existsSync(envPath)) {
|
|
295
|
+
envContent = fs.readFileSync(envPath, 'utf-8');
|
|
296
|
+
}
|
|
297
|
+
// Remove existing translation-related vars to avoid duplicates
|
|
298
|
+
envContent = envContent
|
|
299
|
+
.split('\n')
|
|
300
|
+
.filter(line => !line.startsWith('NEXT_PUBLIC_CMS_URL=') &&
|
|
301
|
+
!line.startsWith('NEXT_PUBLIC_CMS_PROJECT_ID=') &&
|
|
302
|
+
!line.startsWith('CMS_SYNC_API_KEY='))
|
|
303
|
+
.filter(line => line.trim() !== '')
|
|
304
|
+
.join('\n');
|
|
305
|
+
const envVars = [];
|
|
42
306
|
if (cmsUrl.trim())
|
|
43
|
-
|
|
307
|
+
envVars.push(`NEXT_PUBLIC_CMS_URL=${cmsUrl.trim()}`);
|
|
44
308
|
if (projectId.trim())
|
|
45
|
-
|
|
309
|
+
envVars.push(`NEXT_PUBLIC_CMS_PROJECT_ID=${projectId.trim()}`);
|
|
46
310
|
if (apiKey.trim())
|
|
47
|
-
|
|
311
|
+
envVars.push(`CMS_SYNC_API_KEY=${apiKey.trim()}`);
|
|
312
|
+
if (envVars.length > 0) {
|
|
313
|
+
envContent = envContent + (envContent ? '\n' : '') + envVars.join('\n');
|
|
314
|
+
fs.writeFileSync(envPath, envContent, 'utf-8');
|
|
315
|
+
// eslint-disable-next-line no-console
|
|
316
|
+
console.log(`\n[Created] .env.local`);
|
|
317
|
+
envVars.forEach(v => {
|
|
318
|
+
const [key] = v.split('=');
|
|
319
|
+
// eslint-disable-next-line no-console
|
|
320
|
+
console.log(` + ${key}`);
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
// === 2. Generate .translationsrc.json ===
|
|
324
|
+
const config = {
|
|
325
|
+
$schema: './node_modules/@translation-cms/sync/schema.json',
|
|
326
|
+
};
|
|
48
327
|
config['outputDir'] = outputDir;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
328
|
+
config['pullTtlMs'] = ttlSeconds * 1000;
|
|
329
|
+
config['previewRoutes'] = previewRoutes;
|
|
330
|
+
config['locales'] = locales;
|
|
331
|
+
if (pluralSuffixes) {
|
|
332
|
+
config['pluralSuffixes'] = [
|
|
333
|
+
'_one',
|
|
334
|
+
'_other',
|
|
335
|
+
'_zero',
|
|
336
|
+
'_two',
|
|
337
|
+
'_few',
|
|
338
|
+
'_many',
|
|
339
|
+
];
|
|
54
340
|
}
|
|
55
|
-
|
|
341
|
+
config['excludedDirs'] = [
|
|
342
|
+
'e2e',
|
|
343
|
+
'node_modules',
|
|
344
|
+
'dist',
|
|
345
|
+
'.next',
|
|
346
|
+
'build',
|
|
347
|
+
'fixtures',
|
|
348
|
+
];
|
|
349
|
+
config['sourceExtensions'] = ['.ts', '.tsx', '.js', '.jsx'];
|
|
56
350
|
const configPath = path.join(root, '.translationsrc.json');
|
|
57
351
|
fs.writeFileSync(configPath, JSON.stringify(config, null, 2), 'utf-8');
|
|
58
|
-
console
|
|
59
|
-
console.log(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
// Default to scaffolding unless the user explicitly answers "n"
|
|
352
|
+
// eslint-disable-next-line no-console
|
|
353
|
+
console.log(`[Created] .translationsrc.json`);
|
|
354
|
+
// === 3. Generate next.config.ts ===
|
|
355
|
+
generateNextConfig(root, {
|
|
356
|
+
i18nDir,
|
|
357
|
+
syncOnDev,
|
|
358
|
+
syncOnBuild,
|
|
359
|
+
watchOnDev,
|
|
360
|
+
watchInterval,
|
|
361
|
+
pluralSuffixes,
|
|
362
|
+
});
|
|
363
|
+
// === 4. Scaffold i18n files ===
|
|
72
364
|
const doScaffold = scaffoldInput.trim().toLowerCase() !== 'n';
|
|
73
365
|
if (doScaffold) {
|
|
74
366
|
const absI18nDir = path.isAbsolute(i18nDir)
|
|
@@ -76,41 +368,56 @@ export async function runInit(root) {
|
|
|
76
368
|
: path.resolve(root, i18nDir);
|
|
77
369
|
const { written, skipped } = scaffoldI18n({ i18nDir: absI18nDir });
|
|
78
370
|
if (written.length > 0) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
371
|
+
// eslint-disable-next-line no-console
|
|
372
|
+
console.log(`\n[Scaffolded] i18n files:`);
|
|
373
|
+
for (const f of written) {
|
|
374
|
+
// eslint-disable-next-line no-console
|
|
375
|
+
console.log(` + ${f}`);
|
|
376
|
+
}
|
|
82
377
|
}
|
|
83
378
|
if (skipped.length > 0) {
|
|
84
|
-
//
|
|
85
|
-
console.log(
|
|
86
|
-
for (const f of skipped)
|
|
87
|
-
console
|
|
379
|
+
// eslint-disable-next-line no-console
|
|
380
|
+
console.log(`[Skipped] (already exist):`);
|
|
381
|
+
for (const f of skipped) {
|
|
382
|
+
// eslint-disable-next-line no-console
|
|
383
|
+
console.log(` ~ ${f}`);
|
|
384
|
+
}
|
|
88
385
|
}
|
|
89
|
-
console.log('\nNext steps:');
|
|
90
|
-
console.log(' 1. Install peer deps: pnpm add i18next react-i18next i18next-resources-to-backend');
|
|
91
|
-
console.log(' 2. Add to next.config.ts:');
|
|
92
|
-
console.log('');
|
|
93
|
-
console.log(" import { PHASE_DEVELOPMENT_SERVER, PHASE_PRODUCTION_BUILD } from 'next/constants';");
|
|
94
|
-
console.log(" import { syncTranslations, pullTranslations, watchTranslations } from '@translation-cms/sync/api';");
|
|
95
|
-
console.log('');
|
|
96
|
-
console.log(" const pathMappings = { '@/*': ['src/*'] }; // mirror your tsconfig paths");
|
|
97
|
-
console.log(" const pluralSuffixes = ['_one', '_other', '_zero', '_two', '_few', '_many'];");
|
|
98
|
-
console.log('');
|
|
99
|
-
console.log(' export default async function config(phase) {');
|
|
100
|
-
console.log(' if (phase === PHASE_DEVELOPMENT_SERVER) {');
|
|
101
|
-
console.log(" await syncTranslations({ projectRoot: '.', pathMappings, pluralSuffixes });");
|
|
102
|
-
console.log(" await pullTranslations({ projectRoot: '.' });");
|
|
103
|
-
console.log(" watchTranslations({ projectRoot: '.' }); // auto-pull on publish");
|
|
104
|
-
console.log(' }');
|
|
105
|
-
console.log(' if (phase === PHASE_PRODUCTION_BUILD) {');
|
|
106
|
-
console.log(" await syncTranslations({ projectRoot: '.', pathMappings, pluralSuffixes });");
|
|
107
|
-
console.log(" await pullTranslations({ projectRoot: '.' });");
|
|
108
|
-
console.log(' }');
|
|
109
|
-
console.log(' return { /* your next.js config */ };');
|
|
110
|
-
console.log(' }');
|
|
111
|
-
console.log('');
|
|
112
|
-
console.log(' 3. Pull translations: sync-translations pull');
|
|
113
|
-
console.log(' 4. Wrap your root layout with <TranslationProvider locale={locale}>');
|
|
114
386
|
}
|
|
387
|
+
// === Summary ===
|
|
388
|
+
// eslint-disable-next-line no-console
|
|
389
|
+
console.log('\n--- Setup Complete ---\n');
|
|
390
|
+
// eslint-disable-next-line no-console
|
|
391
|
+
console.log('Next steps:');
|
|
392
|
+
// eslint-disable-next-line no-console
|
|
393
|
+
console.log(' 1. Install peer dependencies:');
|
|
394
|
+
// eslint-disable-next-line no-console
|
|
395
|
+
console.log(' pnpm add i18next react-i18next i18next-resources-to-backend');
|
|
396
|
+
// eslint-disable-next-line no-console
|
|
397
|
+
console.log('');
|
|
398
|
+
// eslint-disable-next-line no-console
|
|
399
|
+
console.log(' 2. Fill in your first translations in the CMS');
|
|
400
|
+
// eslint-disable-next-line no-console
|
|
401
|
+
console.log('');
|
|
402
|
+
// eslint-disable-next-line no-console
|
|
403
|
+
console.log(' 3. Pull translations for the first time:');
|
|
404
|
+
// eslint-disable-next-line no-console
|
|
405
|
+
console.log(' pnpm sync-translations pull');
|
|
406
|
+
// eslint-disable-next-line no-console
|
|
407
|
+
console.log('');
|
|
408
|
+
// eslint-disable-next-line no-console
|
|
409
|
+
console.log(' 4. Wrap your root layout with <TranslationProvider>:');
|
|
410
|
+
// eslint-disable-next-line no-console
|
|
411
|
+
console.log(` import { TranslationProvider } from '@/lib/i18n/provider';`);
|
|
412
|
+
// eslint-disable-next-line no-console
|
|
413
|
+
console.log('');
|
|
414
|
+
// eslint-disable-next-line no-console
|
|
415
|
+
console.log('Configuration saved to:');
|
|
416
|
+
// eslint-disable-next-line no-console
|
|
417
|
+
console.log(` - .env.local`);
|
|
418
|
+
// eslint-disable-next-line no-console
|
|
419
|
+
console.log(` - .translationsrc.json`);
|
|
420
|
+
// eslint-disable-next-line no-console
|
|
421
|
+
console.log(` - next.config.ts`);
|
|
115
422
|
}
|
|
116
423
|
//# sourceMappingURL=init.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,IAAY;IACtC,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,CAAC;IAErD,gFAAgF;IAChF,MAAM,EAAE,GAAG,eAAe,CAAC;QACvB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,MAAM,EAAE,OAAO,CAAC,MAAM;KACzB,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,CAAC,MAAc,EAAmB,EAAE,CACjD,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO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AAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../src/core/api-internals/sync.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EACR,iBAAiB,EAEpB,MAAM,4BAA4B,CAAC;AAapC;;;;;;;;;;GAUG;AACH,wBAAsB,UAAU,CAC5B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,YAAY,EACxB,IAAI,GAAE,iBAA2C,GAClD,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../src/core/api-internals/sync.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EACR,iBAAiB,EAEpB,MAAM,4BAA4B,CAAC;AAapC;;;;;;;;;;GAUG;AACH,wBAAsB,UAAU,CAC5B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,YAAY,EACxB,IAAI,GAAE,iBAA2C,GAClD,OAAO,CAAC,IAAI,CAAC,CA8Jf"}
|
|
@@ -83,7 +83,11 @@ export async function postToSync(config, namespaces, opts = { root: process.cwd(
|
|
|
83
83
|
'Content-Type': 'application/json',
|
|
84
84
|
'x-api-key': config.apiKey,
|
|
85
85
|
},
|
|
86
|
-
body: JSON.stringify({
|
|
86
|
+
body: JSON.stringify({
|
|
87
|
+
namespaces: apiPayload,
|
|
88
|
+
pruneKeys,
|
|
89
|
+
pluralSuffixes: opts.pluralSuffixes,
|
|
90
|
+
}),
|
|
87
91
|
});
|
|
88
92
|
const contentType = response.headers.get('content-type') ?? '';
|
|
89
93
|
const isJson = contentType.includes('application/json');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../../../src/core/api-internals/sync.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,OAAO,EACH,aAAa,EACb,aAAa,EACb,YAAY,EACZ,WAAW,EACX,WAAW,EACX,mBAAmB,EACnB,mBAAmB,GACtB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAC5B,MAAc,EACd,UAAwB,EACxB,OAA0B,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE;IAEjD,iFAAiF;IACjF,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAElE,IAAI,SAAS,KAAK,CAAC,EAAE,CAAC;QAClB,OAAO;IACX,CAAC;IAED,kEAAkE;IAClE,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAExC,2EAA2E;IAC3E,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,MAAM,IAAI,GAAG,WAAW,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QAC7C,OAAO,CAAC,GAAG,CAAC,uDAAuD,CAAC,CAAC;QACrE,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,aAAa,CAAC,CAAC;QACnD,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,iBAAiB,CAAC,CAAC;QACzD,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,kBAAkB,CAAC,CAAC;QAChE,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,CAAC,SAAS,YAAY,CAA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