vibe-squire 4.0.0 → 4.0.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/status/graphql/status-enums.d.ts +1 -1
- package/dist/status/graphql/status-enums.js +5 -5
- package/dist/status/graphql/status-enums.js.map +1 -1
- package/dist/status/status-snapshot.contract.d.ts +1 -1
- package/dist/status/status-snapshot.contract.js +8 -4
- package/dist/status/status-snapshot.contract.js.map +1 -1
- package/dist/status/status-snapshot.schema.d.ts +67 -0
- package/dist/status/status-snapshot.schema.js +70 -0
- package/dist/status/status-snapshot.schema.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { dbStateValues, destStateValues, ghStateValues, scoutUiStateValues } from '
|
|
1
|
+
import { dbStateValues, destStateValues, ghStateValues, scoutUiStateValues } from '../status-snapshot.contract';
|
|
2
2
|
export declare const GhState: Record<"error" | "ok" | "unknown", "error" | "ok" | "unknown">;
|
|
3
3
|
export declare const DatabaseState: Record<"error" | "ok", "error" | "ok">;
|
|
4
4
|
export declare const DestinationState: Record<"error" | "ok" | "unknown" | "degraded", "error" | "ok" | "unknown" | "degraded">;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ScoutUiState = exports.DestinationState = exports.DatabaseState = exports.GhState = void 0;
|
|
4
4
|
const graphql_1 = require("@nestjs/graphql");
|
|
5
|
-
const
|
|
5
|
+
const status_snapshot_contract_1 = require("../status-snapshot.contract");
|
|
6
6
|
function enumFromValues(name, values) {
|
|
7
7
|
const o = {};
|
|
8
8
|
for (const v of values) {
|
|
@@ -11,8 +11,8 @@ function enumFromValues(name, values) {
|
|
|
11
11
|
(0, graphql_1.registerEnumType)(o, { name });
|
|
12
12
|
return o;
|
|
13
13
|
}
|
|
14
|
-
exports.GhState = enumFromValues('GhState',
|
|
15
|
-
exports.DatabaseState = enumFromValues('DatabaseState',
|
|
16
|
-
exports.DestinationState = enumFromValues('DestinationState',
|
|
17
|
-
exports.ScoutUiState = enumFromValues('ScoutUiState',
|
|
14
|
+
exports.GhState = enumFromValues('GhState', status_snapshot_contract_1.ghStateValues);
|
|
15
|
+
exports.DatabaseState = enumFromValues('DatabaseState', status_snapshot_contract_1.dbStateValues);
|
|
16
|
+
exports.DestinationState = enumFromValues('DestinationState', status_snapshot_contract_1.destStateValues);
|
|
17
|
+
exports.ScoutUiState = enumFromValues('ScoutUiState', status_snapshot_contract_1.scoutUiStateValues);
|
|
18
18
|
//# sourceMappingURL=status-enums.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-enums.js","sourceRoot":"","sources":["../../../src/status/graphql/status-enums.ts"],"names":[],"mappings":";;;AAAA,6CAAmD;AACnD,
|
|
1
|
+
{"version":3,"file":"status-enums.js","sourceRoot":"","sources":["../../../src/status/graphql/status-enums.ts"],"names":[],"mappings":";;;AAAA,6CAAmD;AACnD,0EAKqC;AAErC,SAAS,cAAc,CACrB,IAAY,EACZ,MAAoB;IAEpB,MAAM,CAAC,GAAG,EAAkB,CAAC;IAC7B,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE,CAAC;QACvB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACX,CAAC;IACD,IAAA,0BAAgB,EAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;IAC9B,OAAO,CAAC,CAAC;AACX,CAAC;AAGY,QAAA,OAAO,GAAG,cAAc,CAAC,SAAS,EAAE,wCAAa,CAAC,CAAC;AAGnD,QAAA,aAAa,GAAG,cAAc,CAAC,eAAe,EAAE,wCAAa,CAAC,CAAC;AAG/D,QAAA,gBAAgB,GAAG,cAAc,CAC5C,kBAAkB,EAClB,0CAAe,CAChB,CAAC;AAGW,QAAA,YAAY,GAAG,cAAc,CAAC,cAAc,EAAE,6CAAkB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { statusSnapshotSchema, validateStatusSnapshot, } from '
|
|
1
|
+
export { dbStateValues, destStateValues, ghStateValues, scoutUiStateValues, statusSnapshotSchema, validateStatusSnapshot, } from './status-snapshot.schema';
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateStatusSnapshot = exports.statusSnapshotSchema = void 0;
|
|
4
|
-
var
|
|
5
|
-
Object.defineProperty(exports, "
|
|
6
|
-
Object.defineProperty(exports, "
|
|
3
|
+
exports.validateStatusSnapshot = exports.statusSnapshotSchema = exports.scoutUiStateValues = exports.ghStateValues = exports.destStateValues = exports.dbStateValues = void 0;
|
|
4
|
+
var status_snapshot_schema_1 = require("./status-snapshot.schema");
|
|
5
|
+
Object.defineProperty(exports, "dbStateValues", { enumerable: true, get: function () { return status_snapshot_schema_1.dbStateValues; } });
|
|
6
|
+
Object.defineProperty(exports, "destStateValues", { enumerable: true, get: function () { return status_snapshot_schema_1.destStateValues; } });
|
|
7
|
+
Object.defineProperty(exports, "ghStateValues", { enumerable: true, get: function () { return status_snapshot_schema_1.ghStateValues; } });
|
|
8
|
+
Object.defineProperty(exports, "scoutUiStateValues", { enumerable: true, get: function () { return status_snapshot_schema_1.scoutUiStateValues; } });
|
|
9
|
+
Object.defineProperty(exports, "statusSnapshotSchema", { enumerable: true, get: function () { return status_snapshot_schema_1.statusSnapshotSchema; } });
|
|
10
|
+
Object.defineProperty(exports, "validateStatusSnapshot", { enumerable: true, get: function () { return status_snapshot_schema_1.validateStatusSnapshot; } });
|
|
7
11
|
//# sourceMappingURL=status-snapshot.contract.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-snapshot.contract.js","sourceRoot":"","sources":["../../src/status/status-snapshot.contract.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"status-snapshot.contract.js","sourceRoot":"","sources":["../../src/status/status-snapshot.contract.ts"],"names":[],"mappings":";;;AAAA,mEAOkC;AANhC,uHAAA,aAAa,OAAA;AACb,yHAAA,eAAe,OAAA;AACf,uHAAA,aAAa,OAAA;AACb,4HAAA,kBAAkB,OAAA;AAClB,8HAAA,oBAAoB,OAAA;AACpB,gIAAA,sBAAsB,OAAA"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ghStateValues: readonly ["ok", "error", "unknown"];
|
|
3
|
+
export declare const dbStateValues: readonly ["ok", "error"];
|
|
4
|
+
export declare const destStateValues: readonly ["ok", "degraded", "error", "unknown"];
|
|
5
|
+
export declare const scoutUiStateValues: readonly ["idle", "running", "skipped", "error"];
|
|
6
|
+
export declare const statusSnapshotSchema: z.ZodObject<{
|
|
7
|
+
timestamp: z.ZodString;
|
|
8
|
+
pending_triage_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
9
|
+
gh: z.ZodObject<{
|
|
10
|
+
state: z.ZodEnum<{
|
|
11
|
+
error: "error";
|
|
12
|
+
ok: "ok";
|
|
13
|
+
unknown: "unknown";
|
|
14
|
+
}>;
|
|
15
|
+
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16
|
+
}, z.core.$loose>;
|
|
17
|
+
database: z.ZodObject<{
|
|
18
|
+
state: z.ZodEnum<{
|
|
19
|
+
error: "error";
|
|
20
|
+
ok: "ok";
|
|
21
|
+
}>;
|
|
22
|
+
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
23
|
+
}, z.core.$loose>;
|
|
24
|
+
setup: z.ZodObject<{
|
|
25
|
+
complete: z.ZodBoolean;
|
|
26
|
+
mappingCount: z.ZodNumber;
|
|
27
|
+
reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
28
|
+
}, z.core.$loose>;
|
|
29
|
+
configuration: z.ZodObject<{
|
|
30
|
+
source_type: z.ZodString;
|
|
31
|
+
destination_type: z.ZodString;
|
|
32
|
+
vibe_kanban_board_active: z.ZodBoolean;
|
|
33
|
+
}, z.core.$loose>;
|
|
34
|
+
destinations: z.ZodArray<z.ZodObject<{
|
|
35
|
+
id: z.ZodString;
|
|
36
|
+
state: z.ZodEnum<{
|
|
37
|
+
error: "error";
|
|
38
|
+
ok: "ok";
|
|
39
|
+
unknown: "unknown";
|
|
40
|
+
degraded: "degraded";
|
|
41
|
+
}>;
|
|
42
|
+
}, z.core.$loose>>;
|
|
43
|
+
scouts: z.ZodArray<z.ZodObject<{
|
|
44
|
+
id: z.ZodString;
|
|
45
|
+
state: z.ZodEnum<{
|
|
46
|
+
error: "error";
|
|
47
|
+
running: "running";
|
|
48
|
+
idle: "idle";
|
|
49
|
+
skipped: "skipped";
|
|
50
|
+
}>;
|
|
51
|
+
last_poll: z.ZodObject<{
|
|
52
|
+
candidates_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
53
|
+
skipped_unmapped: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
54
|
+
issues_created: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
55
|
+
}, z.core.$loose>;
|
|
56
|
+
}, z.core.$loose>>;
|
|
57
|
+
manual_sync: z.ZodObject<{
|
|
58
|
+
canRun: z.ZodBoolean;
|
|
59
|
+
reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
60
|
+
cooldownUntil: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
61
|
+
}, z.core.$loose>;
|
|
62
|
+
scheduled_sync: z.ZodObject<{
|
|
63
|
+
enabled: z.ZodBoolean;
|
|
64
|
+
}, z.core.$loose>;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
export type StatusSnapshot = z.output<typeof statusSnapshotSchema>;
|
|
67
|
+
export declare function validateStatusSnapshot(body: unknown): string | null;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.statusSnapshotSchema = exports.scoutUiStateValues = exports.destStateValues = exports.dbStateValues = exports.ghStateValues = void 0;
|
|
4
|
+
exports.validateStatusSnapshot = validateStatusSnapshot;
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
exports.ghStateValues = ['ok', 'error', 'unknown'];
|
|
7
|
+
exports.dbStateValues = ['ok', 'error'];
|
|
8
|
+
exports.destStateValues = ['ok', 'degraded', 'error', 'unknown'];
|
|
9
|
+
exports.scoutUiStateValues = [
|
|
10
|
+
'idle',
|
|
11
|
+
'running',
|
|
12
|
+
'skipped',
|
|
13
|
+
'error',
|
|
14
|
+
];
|
|
15
|
+
const ghState = zod_1.z.enum(exports.ghStateValues);
|
|
16
|
+
const dbState = zod_1.z.enum(exports.dbStateValues);
|
|
17
|
+
const destState = zod_1.z.enum(exports.destStateValues);
|
|
18
|
+
const scoutUiState = zod_1.z.enum(exports.scoutUiStateValues);
|
|
19
|
+
const lastPollSchema = zod_1.z.looseObject({
|
|
20
|
+
candidates_count: zod_1.z.number().nullable().optional(),
|
|
21
|
+
skipped_unmapped: zod_1.z.number().nullable().optional(),
|
|
22
|
+
issues_created: zod_1.z.number().nullable().optional(),
|
|
23
|
+
});
|
|
24
|
+
exports.statusSnapshotSchema = zod_1.z.object({
|
|
25
|
+
timestamp: zod_1.z.string(),
|
|
26
|
+
pending_triage_count: zod_1.z.number().int().nonnegative().nullish(),
|
|
27
|
+
gh: zod_1.z.looseObject({
|
|
28
|
+
state: ghState,
|
|
29
|
+
message: zod_1.z.string().nullish(),
|
|
30
|
+
}),
|
|
31
|
+
database: zod_1.z.looseObject({
|
|
32
|
+
state: dbState,
|
|
33
|
+
message: zod_1.z.string().nullish(),
|
|
34
|
+
}),
|
|
35
|
+
setup: zod_1.z.looseObject({
|
|
36
|
+
complete: zod_1.z.boolean(),
|
|
37
|
+
mappingCount: zod_1.z.number(),
|
|
38
|
+
reason: zod_1.z.string().nullish(),
|
|
39
|
+
}),
|
|
40
|
+
configuration: zod_1.z.looseObject({
|
|
41
|
+
source_type: zod_1.z.string(),
|
|
42
|
+
destination_type: zod_1.z.string(),
|
|
43
|
+
vibe_kanban_board_active: zod_1.z.boolean(),
|
|
44
|
+
}),
|
|
45
|
+
destinations: zod_1.z.array(zod_1.z.looseObject({
|
|
46
|
+
id: zod_1.z.string(),
|
|
47
|
+
state: destState,
|
|
48
|
+
})),
|
|
49
|
+
scouts: zod_1.z.array(zod_1.z.looseObject({
|
|
50
|
+
id: zod_1.z.string(),
|
|
51
|
+
state: scoutUiState,
|
|
52
|
+
last_poll: lastPollSchema,
|
|
53
|
+
})),
|
|
54
|
+
manual_sync: zod_1.z.looseObject({
|
|
55
|
+
canRun: zod_1.z.boolean(),
|
|
56
|
+
reason: zod_1.z.string().nullish(),
|
|
57
|
+
cooldownUntil: zod_1.z.string().nullish(),
|
|
58
|
+
}),
|
|
59
|
+
scheduled_sync: zod_1.z.looseObject({
|
|
60
|
+
enabled: zod_1.z.boolean(),
|
|
61
|
+
}),
|
|
62
|
+
});
|
|
63
|
+
function validateStatusSnapshot(body) {
|
|
64
|
+
const parsed = exports.statusSnapshotSchema.safeParse(body);
|
|
65
|
+
if (parsed.success) {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
return parsed.error.issues.map((issue) => issue.message).join('; ');
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=status-snapshot.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-snapshot.schema.js","sourceRoot":"","sources":["../../src/status/status-snapshot.schema.ts"],"names":[],"mappings":";;;AAsEA,wDAMC;AA5ED,6BAAwB;AAGX,QAAA,aAAa,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,CAAU,CAAC;AACpD,QAAA,aAAa,GAAG,CAAC,IAAI,EAAE,OAAO,CAAU,CAAC;AACzC,QAAA,eAAe,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,CAAU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