Dedup-check, build, and write a Blocks upload in one call
sync_keysAdds new translation keys for a module, dedup-checks them against existing keys, and writes the portal-ready upload JSON.
Instructions
The one-call path for adding new translation keys: resolves the module by name (cached to disk), dedup-checks every key against the target module + any BLOCKS_DEDUP_MODULES, skips any key whose exact KeyName already exists in the target module (would overwrite/duplicate), builds portal-ready upload entries for the rest, and — if outputPath is given — writes them straight to disk. Keys with the same English text under a DIFFERENT existing key are NOT auto-skipped (reusing them means changing the calling code, not this tool's call) — they come back in duplicateWarnings for you to decide on. Returns a compact summary, not the full entry JSON, to keep the response small — read the written file if you need the entries themselves. The upload JSON is written to outputPath, or — when you omit outputPath (recommended) — to the path from BLOCKS_OUTPUT_PATH_PATTERN with {module} substituted, resolved against the project root. Parent directories are created automatically. Do NOT invent an output path: omit outputPath and let the configured location be used.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entries | Yes | ||
| tenantId | No | Defaults to BLOCKS_TENANT_ID from .env if omitted. | |
| moduleName | Yes | e.g. "app-survey" (not a ModuleId). | |
| outputPath | No | Where to write the upload JSON. Omit to use BLOCKS_OUTPUT_PATH_PATTERN (recommended). A relative path is resolved against the project root; parent dirs are created. | |
| extraModuleNames | No | Additional module names to dedup-check beyond the target module and BLOCKS_DEDUP_MODULES. |