feat: initial scaffold - backend, frontend, Prisma schema, Docker
- 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>
This commit is contained in:
Vendored
+64
@@ -0,0 +1,64 @@
|
||||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var response_exports = {};
|
||||
__export(response_exports, {
|
||||
endResponse: () => endResponse,
|
||||
makeResponse: () => makeResponse
|
||||
});
|
||||
module.exports = __toCommonJS(response_exports);
|
||||
var import_errors = require("./errors");
|
||||
function resolve(content) {
|
||||
const code = "code" in content ? content.code : content.status;
|
||||
const message = code >= 500 ? import_errors.ERROR_MESSAGES.INTERNAL_SERVER_ERROR.message : content.message;
|
||||
return { code, message };
|
||||
}
|
||||
function buildBody(code, message, data) {
|
||||
if (code >= 400) {
|
||||
return { status: "FAILED", message };
|
||||
}
|
||||
return {
|
||||
status: "OK",
|
||||
...message !== void 0 ? { message } : {},
|
||||
...data !== void 0 ? { data } : {}
|
||||
};
|
||||
}
|
||||
async function makeResponse({
|
||||
ctr,
|
||||
content
|
||||
}) {
|
||||
const { code, message } = resolve(content);
|
||||
const data = "data" in content ? content.data : void 0;
|
||||
return ctr.status(code).print(buildBody(code, message, data));
|
||||
}
|
||||
async function endResponse({
|
||||
ctr,
|
||||
end,
|
||||
content
|
||||
}) {
|
||||
const { code, message } = resolve(content);
|
||||
const data = "data" in content ? content.data : void 0;
|
||||
ctr.status(code).print(buildBody(code, message, data));
|
||||
end();
|
||||
}
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
endResponse,
|
||||
makeResponse
|
||||
});
|
||||
//# sourceMappingURL=response.js.map
|
||||
Reference in New Issue
Block a user