@enplug/scripts 1.11.4-dev62 → 1.11.4-dev63

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.
@@ -249,6 +249,11 @@ function fetchFileFromCrowdin(credentials, language, fileId) {
249
249
  return axios.post(url, body, { headers: { Authorization: AuthStr } });
250
250
  }
251
251
 
252
+ function readFakeTranslationsFile(url) {
253
+ return axios.get(url);
254
+ }
255
+
256
+
252
257
  function promptAddFile(crowdinPath) {
253
258
  const prompt = inquirer.createPromptModule();
254
259
 
@@ -126,12 +126,15 @@ async function syncTranslations(s3Client, bucket) {
126
126
  }
127
127
 
128
128
  async function updateFrakeTranslations(credentials, fileId, s3EnPath) {
129
- const { data: fakeTranslation } = await fetchFileFromCrowdin(credentials, FAKE_IN_CONTEXT_LANGUAGE, fileId);
130
- console.log('eo data', fakeTranslation);
129
+ const { data: fakeTranslationUrl } = await fetchFileFromCrowdin(credentials, FAKE_IN_CONTEXT_LANGUAGE, fileId);
130
+ console.log('eo data', fakeTranslationUrl);
131
131
  const s3TranslationsPath = path.parse(s3EnPath).dir;
132
132
  console.log('s3TranslationsPath', s3TranslationsPath);
133
133
  const s3FakeTranslationPath = path.join(s3TranslationsPath, FAKE_IN_CONTEXT_LANGUAGE_FILE);
134
134
  console.log('s3FakeTranslationPath', s3FakeTranslationPath);
135
+ const fakeTranslation = await readFakeTranslationsFile(fakeTranslationUrl.data.url);
136
+ console.log('s3FakeTranslationPath', fakeTranslation.data);
137
+
135
138
  // await uploadTranslationToS3(s3Client, bucket, s3FakeTranslationPath, JSON.stringify(fakeTranslation));
136
139
  }
137
140
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enplug/scripts",
3
- "version": "1.11.4-dev62",
3
+ "version": "1.11.4-dev63",
4
4
  "description": "Enplug scripts",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",