@fullstackhouse/open-mercato-data-sync-durable 0.1.0
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/README.md +86 -0
- package/dist/engine/durable-run.js +130 -0
- package/dist/engine/durable-run.js.map +7 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +7 -0
- package/dist/kinds/data-sync-run.js +57 -0
- package/dist/kinds/data-sync-run.js.map +7 -0
- package/dist/mirror-version.js +5 -0
- package/dist/mirror-version.js.map +7 -0
- package/dist/mirror.manifest.json +65 -0
- package/dist/modules/data_sync/acl.js +8 -0
- package/dist/modules/data_sync/acl.js.map +7 -0
- package/dist/modules/data_sync/api/mappings/[id]/route.js +17 -0
- package/dist/modules/data_sync/api/mappings/[id]/route.js.map +7 -0
- package/dist/modules/data_sync/api/mappings/route.js +15 -0
- package/dist/modules/data_sync/api/mappings/route.js.map +7 -0
- package/dist/modules/data_sync/api/options.js +13 -0
- package/dist/modules/data_sync/api/options.js.map +7 -0
- package/dist/modules/data_sync/api/run.js +59 -0
- package/dist/modules/data_sync/api/run.js.map +7 -0
- package/dist/modules/data_sync/api/runs/[id]/cancel.js +13 -0
- package/dist/modules/data_sync/api/runs/[id]/cancel.js.map +7 -0
- package/dist/modules/data_sync/api/runs/[id]/retry.js +13 -0
- package/dist/modules/data_sync/api/runs/[id]/retry.js.map +7 -0
- package/dist/modules/data_sync/api/runs/[id]/route.js +13 -0
- package/dist/modules/data_sync/api/runs/[id]/route.js.map +7 -0
- package/dist/modules/data_sync/api/runs.js +13 -0
- package/dist/modules/data_sync/api/runs.js.map +7 -0
- package/dist/modules/data_sync/api/schedules/[id]/route.js +17 -0
- package/dist/modules/data_sync/api/schedules/[id]/route.js.map +7 -0
- package/dist/modules/data_sync/api/schedules/route.js +15 -0
- package/dist/modules/data_sync/api/schedules/route.js.map +7 -0
- package/dist/modules/data_sync/api/schedules/serialize.js +6 -0
- package/dist/modules/data_sync/api/schedules/serialize.js.map +7 -0
- package/dist/modules/data_sync/api/validate.js +13 -0
- package/dist/modules/data_sync/api/validate.js.map +7 -0
- package/dist/modules/data_sync/backend/data-sync/page.js +7 -0
- package/dist/modules/data_sync/backend/data-sync/page.js.map +7 -0
- package/dist/modules/data_sync/backend/data-sync/page.meta.js +6 -0
- package/dist/modules/data_sync/backend/data-sync/page.meta.js.map +7 -0
- package/dist/modules/data_sync/backend/data-sync/runs/[id]/page.js +7 -0
- package/dist/modules/data_sync/backend/data-sync/runs/[id]/page.js.map +7 -0
- package/dist/modules/data_sync/backend/data-sync/runs/[id]/page.meta.js +6 -0
- package/dist/modules/data_sync/backend/data-sync/runs/[id]/page.meta.js.map +7 -0
- package/dist/modules/data_sync/components/IntegrationScheduleTab.js +9 -0
- package/dist/modules/data_sync/components/IntegrationScheduleTab.js.map +7 -0
- package/dist/modules/data_sync/components/RunParameterFields.js +13 -0
- package/dist/modules/data_sync/components/RunParameterFields.js.map +7 -0
- package/dist/modules/data_sync/data/entities.js +9 -0
- package/dist/modules/data_sync/data/entities.js.map +7 -0
- package/dist/modules/data_sync/data/validators.js +12 -0
- package/dist/modules/data_sync/data/validators.js.map +7 -0
- package/dist/modules/data_sync/di.js +33 -0
- package/dist/modules/data_sync/di.js.map +7 -0
- package/dist/modules/data_sync/events.js +9 -0
- package/dist/modules/data_sync/events.js.map +7 -0
- package/dist/modules/data_sync/extension-points.js +8 -0
- package/dist/modules/data_sync/extension-points.js.map +7 -0
- package/dist/modules/data_sync/i18n/de.json +135 -0
- package/dist/modules/data_sync/i18n/en.json +135 -0
- package/dist/modules/data_sync/i18n/es.json +135 -0
- package/dist/modules/data_sync/i18n/ko.json +135 -0
- package/dist/modules/data_sync/i18n/pl.json +135 -0
- package/dist/modules/data_sync/index.js +6 -0
- package/dist/modules/data_sync/index.js.map +7 -0
- package/dist/modules/data_sync/lib/abandoned-run.js +6 -0
- package/dist/modules/data_sync/lib/abandoned-run.js.map +7 -0
- package/dist/modules/data_sync/lib/adapter-registry.js +10 -0
- package/dist/modules/data_sync/lib/adapter-registry.js.map +7 -0
- package/dist/modules/data_sync/lib/adapter.js +2 -0
- package/dist/modules/data_sync/lib/adapter.js.map +7 -0
- package/dist/modules/data_sync/lib/adopt-on-delivery.js +35 -0
- package/dist/modules/data_sync/lib/adopt-on-delivery.js.map +7 -0
- package/dist/modules/data_sync/lib/batch-stream.js +6 -0
- package/dist/modules/data_sync/lib/batch-stream.js.map +7 -0
- package/dist/modules/data_sync/lib/id-mapping.js +6 -0
- package/dist/modules/data_sync/lib/id-mapping.js.map +7 -0
- package/dist/modules/data_sync/lib/queue-policy.js +11 -0
- package/dist/modules/data_sync/lib/queue-policy.js.map +7 -0
- package/dist/modules/data_sync/lib/queue.js +6 -0
- package/dist/modules/data_sync/lib/queue.js.map +7 -0
- package/dist/modules/data_sync/lib/run-parameters.js +8 -0
- package/dist/modules/data_sync/lib/run-parameters.js.map +7 -0
- package/dist/modules/data_sync/lib/start-cursor.js +8 -0
- package/dist/modules/data_sync/lib/start-cursor.js.map +7 -0
- package/dist/modules/data_sync/lib/start-run.js +51 -0
- package/dist/modules/data_sync/lib/start-run.js.map +7 -0
- package/dist/modules/data_sync/lib/sync-engine.js +6 -0
- package/dist/modules/data_sync/lib/sync-engine.js.map +7 -0
- package/dist/modules/data_sync/lib/sync-run-service.js +7 -0
- package/dist/modules/data_sync/lib/sync-run-service.js.map +7 -0
- package/dist/modules/data_sync/lib/sync-schedule-service.js +6 -0
- package/dist/modules/data_sync/lib/sync-schedule-service.js.map +7 -0
- package/dist/modules/data_sync/lib/syncRunStatus.js +9 -0
- package/dist/modules/data_sync/lib/syncRunStatus.js.map +7 -0
- package/dist/modules/data_sync/lib/version-guard.js +14 -0
- package/dist/modules/data_sync/lib/version-guard.js.map +7 -0
- package/dist/modules/data_sync/migrations/Migration20260304113737.js +6 -0
- package/dist/modules/data_sync/migrations/Migration20260304113737.js.map +7 -0
- package/dist/modules/data_sync/migrations/Migration20260810120000.js +6 -0
- package/dist/modules/data_sync/migrations/Migration20260810120000.js.map +7 -0
- package/dist/modules/data_sync/setup.js +8 -0
- package/dist/modules/data_sync/setup.js.map +7 -0
- package/dist/modules/data_sync/workers/sync-export.js +19 -0
- package/dist/modules/data_sync/workers/sync-export.js.map +7 -0
- package/dist/modules/data_sync/workers/sync-import.js +19 -0
- package/dist/modules/data_sync/workers/sync-import.js.map +7 -0
- package/dist/modules/data_sync/workers/sync-scheduled.js +8 -0
- package/dist/modules/data_sync/workers/sync-scheduled.js.map +7 -0
- package/generated/entities/sync_cursor/index.ts +8 -0
- package/generated/entities/sync_mapping/index.ts +8 -0
- package/generated/entities/sync_run/index.ts +22 -0
- package/generated/entities/sync_schedule/index.ts +16 -0
- package/generated/entities.ids.generated.ts +13 -0
- package/package.json +135 -0
- package/src/compat/mirror-shape.test.ts +106 -0
- package/src/compat/seams.test.ts +97 -0
- package/src/engine/durable-run.ts +231 -0
- package/src/index.ts +4 -0
- package/src/kinds/data-sync-run.ts +104 -0
- package/src/mirror-version.ts +3 -0
- package/src/mirror.manifest.json +65 -0
- package/src/modules/data_sync/__integration__/TC-DSD-001.spec.ts +80 -0
- package/src/modules/data_sync/acl.ts +5 -0
- package/src/modules/data_sync/api/mappings/[id]/route.ts +12 -0
- package/src/modules/data_sync/api/mappings/route.ts +11 -0
- package/src/modules/data_sync/api/options.ts +10 -0
- package/src/modules/data_sync/api/run.ts +103 -0
- package/src/modules/data_sync/api/runs/[id]/cancel.ts +10 -0
- package/src/modules/data_sync/api/runs/[id]/retry.ts +10 -0
- package/src/modules/data_sync/api/runs/[id]/route.ts +10 -0
- package/src/modules/data_sync/api/runs.ts +10 -0
- package/src/modules/data_sync/api/schedules/[id]/route.ts +12 -0
- package/src/modules/data_sync/api/schedules/route.ts +11 -0
- package/src/modules/data_sync/api/schedules/serialize.ts +4 -0
- package/src/modules/data_sync/api/validate.ts +10 -0
- package/src/modules/data_sync/backend/data-sync/page.meta.ts +4 -0
- package/src/modules/data_sync/backend/data-sync/page.tsx +5 -0
- package/src/modules/data_sync/backend/data-sync/runs/[id]/page.meta.ts +4 -0
- package/src/modules/data_sync/backend/data-sync/runs/[id]/page.tsx +5 -0
- package/src/modules/data_sync/components/IntegrationScheduleTab.tsx +6 -0
- package/src/modules/data_sync/components/RunParameterFields.tsx +5 -0
- package/src/modules/data_sync/data/entities.ts +4 -0
- package/src/modules/data_sync/data/validators.ts +4 -0
- package/src/modules/data_sync/di.ts +57 -0
- package/src/modules/data_sync/events.ts +5 -0
- package/src/modules/data_sync/extension-points.ts +5 -0
- package/src/modules/data_sync/i18n/de.json +135 -0
- package/src/modules/data_sync/i18n/en.json +135 -0
- package/src/modules/data_sync/i18n/es.json +135 -0
- package/src/modules/data_sync/i18n/ko.json +135 -0
- package/src/modules/data_sync/i18n/pl.json +135 -0
- package/src/modules/data_sync/index.ts +4 -0
- package/src/modules/data_sync/lib/adapter-registry.ts +4 -0
- package/src/modules/data_sync/lib/adapter.ts +3 -0
- package/src/modules/data_sync/lib/adopt-on-delivery.ts +69 -0
- package/src/modules/data_sync/lib/batch-stream.ts +4 -0
- package/src/modules/data_sync/lib/id-mapping.ts +4 -0
- package/src/modules/data_sync/lib/queue-policy.ts +4 -0
- package/src/modules/data_sync/lib/queue.ts +4 -0
- package/src/modules/data_sync/lib/run-parameters.ts +4 -0
- package/src/modules/data_sync/lib/start-cursor.ts +4 -0
- package/src/modules/data_sync/lib/start-run.ts +106 -0
- package/src/modules/data_sync/lib/sync-engine.ts +4 -0
- package/src/modules/data_sync/lib/sync-run-service.ts +4 -0
- package/src/modules/data_sync/lib/sync-schedule-service.ts +4 -0
- package/src/modules/data_sync/lib/syncRunStatus.ts +4 -0
- package/src/modules/data_sync/lib/version-guard.ts +27 -0
- package/src/modules/data_sync/migrations/.snapshot-open-mercato.json +1013 -0
- package/src/modules/data_sync/migrations/Migration20260304113737.ts +4 -0
- package/src/modules/data_sync/migrations/Migration20260810120000.ts +4 -0
- package/src/modules/data_sync/setup.ts +5 -0
- package/src/modules/data_sync/workers/sync-export.ts +20 -0
- package/src/modules/data_sync/workers/sync-import.ts +20 -0
- package/src/modules/data_sync/workers/sync-scheduled.ts +5 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// GENERATED by scripts/gen-mirror.mjs from @open-mercato/core@0.7.0 (migrations/Migration20260304113737.ts). Do not edit.
|
|
2
|
+
// This package mirrors core's data_sync module file-for-file; see docs/adr/0006-drop-in-data-sync.md.
|
|
3
|
+
export * from '@open-mercato/core/modules/data_sync/migrations/Migration20260304113737'
|
|
4
|
+
export { Migration20260304113737 } from '@open-mercato/core/modules/data_sync/migrations/Migration20260304113737'
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// GENERATED by scripts/gen-mirror.mjs from @open-mercato/core@0.7.0 (migrations/Migration20260810120000.ts). Do not edit.
|
|
2
|
+
// This package mirrors core's data_sync module file-for-file; see docs/adr/0006-drop-in-data-sync.md.
|
|
3
|
+
export * from '@open-mercato/core/modules/data_sync/migrations/Migration20260810120000'
|
|
4
|
+
export { Migration20260810120000 } from '@open-mercato/core/modules/data_sync/migrations/Migration20260810120000'
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// GENERATED by scripts/gen-mirror.mjs from @open-mercato/core@0.7.0 (setup.ts). Do not edit.
|
|
2
|
+
// This package mirrors core's data_sync module file-for-file; see docs/adr/0006-drop-in-data-sync.md.
|
|
3
|
+
export * from '@open-mercato/core/modules/data_sync/setup'
|
|
4
|
+
export { default } from '@open-mercato/core/modules/data_sync/setup'
|
|
5
|
+
export { setup } from '@open-mercato/core/modules/data_sync/setup'
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { WorkerMeta } from '@open-mercato/queue'
|
|
2
|
+
import {
|
|
3
|
+
DATA_SYNC_EXPORT_QUEUE,
|
|
4
|
+
DATA_SYNC_LOCK_DURATION_MS,
|
|
5
|
+
DATA_SYNC_MAX_STALLED_COUNT,
|
|
6
|
+
} from '@open-mercato/core/modules/data_sync/lib/queue-policy'
|
|
7
|
+
|
|
8
|
+
import { adoptOnDelivery } from '../lib/adopt-on-delivery'
|
|
9
|
+
|
|
10
|
+
// Registered under core's worker id, on core's queue, so a message enqueued by anything still
|
|
11
|
+
// using core's start path arrives here instead of at core's worker.
|
|
12
|
+
export const metadata: WorkerMeta = {
|
|
13
|
+
queue: DATA_SYNC_EXPORT_QUEUE,
|
|
14
|
+
id: 'data-sync:export',
|
|
15
|
+
concurrency: 5,
|
|
16
|
+
lockDuration: DATA_SYNC_LOCK_DURATION_MS,
|
|
17
|
+
maxStalledCount: DATA_SYNC_MAX_STALLED_COUNT,
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default adoptOnDelivery('export')
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { WorkerMeta } from '@open-mercato/queue'
|
|
2
|
+
import {
|
|
3
|
+
DATA_SYNC_IMPORT_QUEUE,
|
|
4
|
+
DATA_SYNC_LOCK_DURATION_MS,
|
|
5
|
+
DATA_SYNC_MAX_STALLED_COUNT,
|
|
6
|
+
} from '@open-mercato/core/modules/data_sync/lib/queue-policy'
|
|
7
|
+
|
|
8
|
+
import { adoptOnDelivery } from '../lib/adopt-on-delivery'
|
|
9
|
+
|
|
10
|
+
// Registered under core's worker id, on core's queue, so a message enqueued by anything still
|
|
11
|
+
// using core's start path arrives here instead of at core's worker.
|
|
12
|
+
export const metadata: WorkerMeta = {
|
|
13
|
+
queue: DATA_SYNC_IMPORT_QUEUE,
|
|
14
|
+
id: 'data-sync:import',
|
|
15
|
+
concurrency: 5,
|
|
16
|
+
lockDuration: DATA_SYNC_LOCK_DURATION_MS,
|
|
17
|
+
maxStalledCount: DATA_SYNC_MAX_STALLED_COUNT,
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default adoptOnDelivery('import')
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// GENERATED by scripts/gen-mirror.mjs from @open-mercato/core@0.7.0 (workers/sync-scheduled.ts). Do not edit.
|
|
2
|
+
// This package mirrors core's data_sync module file-for-file; see docs/adr/0006-drop-in-data-sync.md.
|
|
3
|
+
export * from '@open-mercato/core/modules/data_sync/workers/sync-scheduled'
|
|
4
|
+
export { default } from '@open-mercato/core/modules/data_sync/workers/sync-scheduled'
|
|
5
|
+
export { metadata } from '@open-mercato/core/modules/data_sync/workers/sync-scheduled'
|