a71f801c3f
- Prisma schema: User, Session, RepoConfig, Preview, Job, WebhookToken, NoConfigComment, AdminSettings - Backend: auth (login/logout/me/first-user setup), webhook handler with HMAC verification, EC2 service, SSH service, deploy pipeline, job queue worker, cron workers - Frontend: Login with first-user detection, Dashboard, PreviewDetail with live log streaming, Settings, Repos config, Admin panel, SetupWizard, Privacy page - Docker Compose and Dockerfile for self-hosted deployment - Uses bcryptjs for Node 24 compatibility Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
17 lines
514 B
JavaScript
17 lines
514 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.boolean = boolean;
|
|
const integer_1 = require("./integer");
|
|
const noBias_1 = require("./noBias");
|
|
function booleanMapper(v) {
|
|
return v === 1;
|
|
}
|
|
function booleanUnmapper(v) {
|
|
if (typeof v !== 'boolean')
|
|
throw new Error('Unsupported input type');
|
|
return v === true ? 1 : 0;
|
|
}
|
|
function boolean() {
|
|
return (0, noBias_1.noBias)((0, integer_1.integer)({ min: 0, max: 1 }).map(booleanMapper, booleanUnmapper));
|
|
}
|