fg-devkit 1.6.6 → 1.6.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fg-devkit",
3
- "version": "1.6.6",
3
+ "version": "1.6.7",
4
4
  "description": "Shared configs, scripts, and DX tooling for Vue / TypeScript frontend repos",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
@@ -34,7 +34,7 @@
34
34
  "@tanstack/vue-query-devtools": "6.1.24",
35
35
  "@types/node": "22.16.5",
36
36
  "@vitejs/plugin-vue": "6.0.6",
37
- "fg-devkit": "1.6.6",
37
+ "fg-devkit": "1.6.7",
38
38
  "start-server-and-test": "2.1.3",
39
39
  "tailwindcss": "4.2.4",
40
40
  "tsx": "4.21.0",
@@ -36,9 +36,16 @@ async function exportLanguage({ token, projectId, language, format }) {
36
36
  throw new Error(`PoEditor export failed (${res.status})`)
37
37
  }
38
38
  const data = await res.json()
39
+ if (data?.response?.status !== 'success') {
40
+ const message = data?.response?.message ?? 'Unknown PoEditor error'
41
+ const code = data?.response?.code
42
+ const details = data?.response?.details
43
+ const suffix = [code !== undefined ? `code=${code}` : '', details ? `details=${details}` : ''].filter(Boolean).join(', ')
44
+ throw new Error(`PoEditor export failed for language ${language}: ${message}${suffix ? ` (${suffix})` : ''}`)
45
+ }
39
46
  const url = data?.result?.url
40
47
  if (!url) {
41
- throw new Error(`PoEditor export missing URL for language ${language}`)
48
+ throw new Error(`PoEditor export missing URL for language ${language}: ${JSON.stringify(data)}`)
42
49
  }
43
50
  return url
44
51
  }