@nexia/sdk 0.8.11 → 0.8.12
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/changelog/0.8.12/en.md +13 -0
- package/changelog/0.8.12/ko.md +13 -0
- package/dist/data-migration.d.ts +5 -1
- package/dist/host.js +2 -1
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: published
|
|
3
|
+
version: 0.8.12
|
|
4
|
+
date: 2026-10-23
|
|
5
|
+
title: Import progress timestamps
|
|
6
|
+
description: Observe phase start and the last work response in background imports.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Import progress timestamps
|
|
10
|
+
|
|
11
|
+
Background migration `onProgress` callbacks can now receive an optional third argument with `phase_started_at` and `last_activity_at`. Existing two-argument callbacks remain compatible; missing timestamps mean the host has no observation. Activity is not a completed-row count.
|
|
12
|
+
|
|
13
|
+
[Frontend migration contracts](https://github.com/nexia-cloud-os/app-sdk/blob/develop/packages/react/src/data-migration.ts)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: published
|
|
3
|
+
version: 0.8.12
|
|
4
|
+
date: 2026-10-23
|
|
5
|
+
title: 가져오기 진행 시각
|
|
6
|
+
description: 백그라운드 가져오기의 단계 시작과 마지막 작업 응답 시각을 확인합니다.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# 가져오기 진행 시각
|
|
10
|
+
|
|
11
|
+
백그라운드 가져오기 `onProgress` 콜백의 선택적 세 번째 인자로 `phase_started_at`과 `last_activity_at`을 받을 수 있습니다. 기존 두 인자 콜백도 그대로 동작하며, 시각이 없으면 호스트에서 확인한 정보가 없는 상태입니다. 작업 응답 시각은 처리 완료 행 수를 뜻하지 않습니다.
|
|
12
|
+
|
|
13
|
+
[프런트엔드 가져오기 계약](https://github.com/nexia-cloud-os/app-sdk/blob/develop/packages/react/src/data-migration.ts)
|
package/dist/data-migration.d.ts
CHANGED
|
@@ -9,6 +9,10 @@ export interface DataMigrationBackgroundOperation<TResult = Readonly<Record<stri
|
|
|
9
9
|
validation_errors?: Record<string, string[]>;
|
|
10
10
|
progress?: number;
|
|
11
11
|
phase?: string;
|
|
12
|
+
/** Last actual phase transition, never the status polling time. */
|
|
13
|
+
phase_started_at?: string | null;
|
|
14
|
+
/** Last successful work callback; not a completed-row count. */
|
|
15
|
+
last_activity_at?: string | null;
|
|
12
16
|
}
|
|
13
17
|
/** Initial response when a migration operation continues on the queue. */
|
|
14
18
|
export interface DataMigrationOperationAccepted {
|
|
@@ -21,7 +25,7 @@ export interface DataMigrationOperationWaitOptions {
|
|
|
21
25
|
signal?: AbortSignal;
|
|
22
26
|
/** Keep an already submitted operation observable across route unmounts. */
|
|
23
27
|
continueInBackground?: boolean;
|
|
24
|
-
onProgress?: (progress: number, phase: string | null) => void;
|
|
28
|
+
onProgress?: (progress: number, phase: string | null, details?: Pick<DataMigrationBackgroundOperation, 'phase_started_at' | 'last_activity_at'>) => void;
|
|
25
29
|
}
|
|
26
30
|
export interface DataMigrationBackgroundOperationClient {
|
|
27
31
|
wait<TResult>(accepted: DataMigrationOperationAccepted | string, options?: DataMigrationOperationWaitOptions): Promise<TResult>;
|
package/dist/host.js
CHANGED
|
@@ -177,7 +177,8 @@ function useBackgroundOperationClient(client) {
|
|
|
177
177
|
try {
|
|
178
178
|
for (;;) {
|
|
179
179
|
const operation = (await client.get(backgroundOperationClientPath(statusUrl), { signal: controller.signal })).data;
|
|
180
|
-
options.onProgress?.(typeof operation.progress === 'number' ? operation.progress : 0, typeof operation.phase === 'string' ? operation.phase : null
|
|
180
|
+
options.onProgress?.(typeof operation.progress === 'number' ? operation.progress : 0, typeof operation.phase === 'string' ? operation.phase : null, ...(operation.phase_started_at || operation.last_activity_at ? [{ phase_started_at: operation.phase_started_at,
|
|
181
|
+
...(operation.last_activity_at ? { last_activity_at: operation.last_activity_at } : {}) }] : []));
|
|
181
182
|
if (operation.status === 'completed') {
|
|
182
183
|
if (operation.result === undefined) {
|
|
183
184
|
throw new Error('Completed data migration operation has no result.');
|