@autobe/agent
Version:
AI backend server code generator
27 lines • 1.58 kB
JavaScript
;
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getAutoBeRealizeGenerated = void 0;
const getAutoBeRealizeGenerated = (props) => __awaiter(void 0, void 0, void 0, function* () {
return (Object.assign(Object.assign(Object.assign({}, Object.fromEntries(props.functions.map((f) => [f.location, f.content]))), Object.fromEntries(props.authorizations
.map((auth) => [
[auth.decorator.location, auth.decorator.content],
[auth.provider.location, auth.provider.content],
[auth.payload.location, auth.payload.content],
])
.flat())), (yield props.compiler.realize.controller({
document: props.document,
functions: props.functions,
authorizations: props.authorizations,
}))));
});
exports.getAutoBeRealizeGenerated = getAutoBeRealizeGenerated;
//# sourceMappingURL=getAutoBeRealizeGenerated.js.map