@@ -3,6 +3,7 @@ import Ora from 'ora';
33import { getEnv } from './services/env.js' ;
44import path from 'path' ;
55import fs from 'fs/promises' ;
6+ import { createId } from '@paralleldrive/cuid2' ;
67
78const buildDataDir = path . resolve ( process . cwd ( ) , 'node_modules' , '@replexica/translations' ) ;
89const buildDataFilePath = path . resolve ( buildDataDir , '.replexica.json' ) ;
@@ -40,7 +41,7 @@ export default new Command()
4041
4142 spinner . succeed ( 'Replexica build data loaded!' ) ;
4243
43-
44+ const workflowId = createId ( ) ;
4445 for ( let i = 0 ; i < localeTargets . length ; i ++ ) {
4546 const targetLocale = localeTargets [ i ] ;
4647 const resultData : any = { } ;
@@ -52,6 +53,7 @@ export default new Command()
5253
5354 const partialLocaleData = { [ localeFileId ] : localeFileData } ;
5455 const result = await processI18n (
56+ { workflowId } ,
5557 { source : localeSource , target : targetLocale } ,
5658 buildData . meta ,
5759 partialLocaleData ,
@@ -69,6 +71,7 @@ export default new Command()
6971 } ) ;
7072
7173async function processI18n (
74+ params : { workflowId : string } ,
7275 locale : { source : string , target : string } ,
7376 meta : any ,
7477 data : any ,
@@ -82,6 +85,7 @@ async function processI18n(
8285 Authorization : `Bearer ${ env . REPLEXICA_API_KEY } ` ,
8386 } ,
8487 body : JSON . stringify ( {
88+ params,
8589 locale,
8690 meta,
8791 data,
0 commit comments