import { isObject } from '@emprespresso/pengueno'; export type JobArgT = Record; export type JobType = | 'fetch_code' | 'ci_pipeline' | 'build_docker_image.js' | 'ansible_playbook.js' | 'checkout_ci.js' | 'npm_publish.js'; export const JobTypes: Array = [ 'fetch_code', 'ci_pipeline', 'build_docker_image.js', 'ansible_playbook.js', 'checkout_ci.js', 'npm_publish.js', ]; export interface Job { readonly type: JobType; readonly arguments: JobArgT; } export const isJobType = (j: unknown): j is JobType => typeof j === 'string' && JobTypes.includes(j); export const isJob = (j: unknown): j is Job => !!(isObject(j) && 'arguments' in j && isObject(j.arguments) && 'type' in j && isJobType(j.type) && j); export * from './jobs.js';