@sixb/sqlite 0.2.0 → 0.2.1
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/dist/index.js
CHANGED
|
@@ -19318,7 +19318,10 @@ class SqliteOntologyStorage {
|
|
|
19318
19318
|
// src/pipeline-run-storage.ts
|
|
19319
19319
|
import { parseSixbFailure as parseSixbFailure4, serializeSixbFailure as serializeSixbFailure3 } from "@sixb/core/internal/errors";
|
|
19320
19320
|
import { assertPipelineRunExecution } from "@sixb/core/internal/pipeline-run-storage-provider";
|
|
19321
|
-
import {
|
|
19321
|
+
import {
|
|
19322
|
+
canFinishPipelineRun,
|
|
19323
|
+
canRequeuePipelineRunAfterEnqueueFailure
|
|
19324
|
+
} from "@sixb/core/internal/storage";
|
|
19322
19325
|
import { PIPELINE_RUN_FAILURE_CODES, PipelineRunError } from "@sixb/core/storage";
|
|
19323
19326
|
|
|
19324
19327
|
// src/latest-run-query.ts
|
|
@@ -19434,8 +19437,7 @@ class SqlitePipelineRunStorage {
|
|
|
19434
19437
|
if (!existing) {
|
|
19435
19438
|
throw new PipelineRunError(`[SixbSqlite] Pipeline run '${input.id}' not found for project '${input.projectId}'.`);
|
|
19436
19439
|
}
|
|
19437
|
-
|
|
19438
|
-
if (enqueueFailure && existing.status !== "queued" || !enqueueFailure && existing.status !== "running") {
|
|
19440
|
+
if (!canFinishPipelineRun(existing.status, input)) {
|
|
19439
19441
|
throw new PipelineRunError(`[SixbSqlite] Pipeline run '${input.id}' cannot finish from status '${existing.status}'.`);
|
|
19440
19442
|
}
|
|
19441
19443
|
this.db.query(`
|
|
@@ -20646,7 +20648,7 @@ function invalidRecord2(message) {
|
|
|
20646
20648
|
|
|
20647
20649
|
// src/sync-run-storage.ts
|
|
20648
20650
|
import { parseSixbFailure as parseSixbFailure5, serializeSixbFailure as serializeSixbFailure5 } from "@sixb/core/internal/errors";
|
|
20649
|
-
import { canRequeueSyncRunAfterEnqueueFailure } from "@sixb/core/internal/storage";
|
|
20651
|
+
import { canFinishSyncRun, canRequeueSyncRunAfterEnqueueFailure } from "@sixb/core/internal/storage";
|
|
20650
20652
|
import { assertSyncRunExecution } from "@sixb/core/internal/sync-run-storage-provider";
|
|
20651
20653
|
import { SYNC_RUN_FAILURE_CODES, SyncRunError } from "@sixb/core/storage";
|
|
20652
20654
|
class SqliteSyncRunStorage {
|
|
@@ -20734,8 +20736,7 @@ class SqliteSyncRunStorage {
|
|
|
20734
20736
|
if (!existing) {
|
|
20735
20737
|
throw new SyncRunError(`[SixbSqlite] Sync run '${input.id}' not found for project '${input.projectId}'.`);
|
|
20736
20738
|
}
|
|
20737
|
-
|
|
20738
|
-
if (enqueueFailure && existing.status !== "queued" || !enqueueFailure && existing.status !== "running") {
|
|
20739
|
+
if (!canFinishSyncRun(existing.status, input)) {
|
|
20739
20740
|
throw new SyncRunError(`[SixbSqlite] Sync run '${input.id}' cannot finish from status '${existing.status}'.`);
|
|
20740
20741
|
}
|
|
20741
20742
|
if (input.status === "succeeded") {
|
|
@@ -22210,4 +22211,4 @@ export {
|
|
|
22210
22211
|
migrateSqliteStorage
|
|
22211
22212
|
};
|
|
22212
22213
|
|
|
22213
|
-
//# debugId=
|
|
22214
|
+
//# debugId=70BDC079F392018764756E2164756E21
|