@adminforth/i18n 2.3.1 → 2.3.2

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/build.log CHANGED
@@ -20,5 +20,5 @@ custom/package.json
20
20
  custom/pnpm-lock.yaml
21
21
  custom/tsconfig.json
22
22
 
23
- sent 47,968 bytes received 305 bytes 96,546.00 bytes/sec
24
- total size is 46,800 speedup is 0.97
23
+ sent 48,185 bytes received 305 bytes 96,980.00 bytes/sec
24
+ total size is 47,033 speedup is 0.97
@@ -82,6 +82,7 @@ const props = defineProps<{
82
82
  meta: any;
83
83
  getJobTasks: (limit?: number, offset?: number, fieldsToReturn?: string[]) => Promise<
84
84
  {state: Record<string, any>, status: string}[]>;
85
+ tasksStorageLost?: boolean;
85
86
  job: {
86
87
  id: string;
87
88
  name: string;
@@ -115,6 +116,11 @@ async function loadPage(targetPage: number) {
115
116
  } catch (error) {
116
117
  console.error('Failed to fetch translation tasks, retrying...', error);
117
118
  }
119
+ // the task storage of the job was deleted, tasks will never come back, so retrying only keeps the
120
+ // spinner on screen for nothing
121
+ if (props.tasksStorageLost) {
122
+ break;
123
+ }
118
124
  if (retry < retries - 1) {
119
125
  await new Promise(resolve => setTimeout(resolve, RETRY_DELAY_MS));
120
126
  }
@@ -82,6 +82,7 @@ const props = defineProps<{
82
82
  meta: any;
83
83
  getJobTasks: (limit?: number, offset?: number, fieldsToReturn?: string[]) => Promise<
84
84
  {state: Record<string, any>, status: string}[]>;
85
+ tasksStorageLost?: boolean;
85
86
  job: {
86
87
  id: string;
87
88
  name: string;
@@ -115,6 +116,11 @@ async function loadPage(targetPage: number) {
115
116
  } catch (error) {
116
117
  console.error('Failed to fetch translation tasks, retrying...', error);
117
118
  }
119
+ // the task storage of the job was deleted, tasks will never come back, so retrying only keeps the
120
+ // spinner on screen for nothing
121
+ if (props.tasksStorageLost) {
122
+ break;
123
+ }
118
124
  if (retry < retries - 1) {
119
125
  await new Promise(resolve => setTimeout(resolve, RETRY_DELAY_MS));
120
126
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/i18n",
3
- "version": "2.3.1",
3
+ "version": "2.3.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",