@autobe/agent 0.10.5 → 0.11.0
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/lib/AutoBeAgent.js +13 -46
- package/lib/AutoBeAgent.js.map +1 -1
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +11 -6
- package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
- package/lib/context/AutoBeContext.d.ts +3 -2
- package/lib/factory/getAutoBeGenerated.d.ts +5 -0
- package/lib/factory/getAutoBeGenerated.js +307 -0
- package/lib/factory/getAutoBeGenerated.js.map +1 -0
- package/lib/index.mjs +1631 -1389
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.d.ts +2 -7
- package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js +1 -9
- package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js.map +1 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzeRole.d.ts +13 -0
- package/lib/orchestrate/analyze/AutoBeAnalyzeRole.js +3 -0
- package/lib/orchestrate/analyze/AutoBeAnalyzeRole.js.map +1 -0
- package/lib/orchestrate/analyze/orchestrateAnalyze.d.ts +0 -25
- package/lib/orchestrate/analyze/orchestrateAnalyze.js +22 -420
- package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.d.ts +6 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.js +561 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.js.map +1 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.d.ts +6 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js +41 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js.map +1 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +14 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +468 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.d.ts +68 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.js +3 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.js.map +1 -0
- package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.d.ts +5 -0
- package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js +27 -0
- package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js.map +1 -0
- package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.d.ts +12 -0
- package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.js +78 -0
- package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.js.map +1 -0
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.d.ts +6 -0
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.js +58 -0
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterface.js +0 -2
- package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComponents.js +17 -137
- package/lib/orchestrate/interface/orchestrateInterfaceComponents.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +92 -141
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrisma.js +9 -5
- package/lib/orchestrate/prisma/orchestratePrisma.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js +54 -25
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +4 -3
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/orchestrate/prisma/{orchestratePrismaSchema.d.ts → orchestratePrismaSchemas.d.ts} +2 -4
- package/lib/orchestrate/prisma/{orchestratePrismaSchema.js → orchestratePrismaSchemas.js} +269 -203
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -0
- package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js +1 -1
- package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js.map +1 -1
- package/lib/orchestrate/prisma/transformPrismaCorrectHistories.js +1 -1
- package/lib/orchestrate/prisma/transformPrismaHistories.js +1 -1
- package/lib/orchestrate/prisma/transformPrismaHistories.js.map +1 -1
- package/lib/orchestrate/prisma/transformPrismaSchemaHistories.d.ts +2 -6
- package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js +24 -32
- package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js.map +1 -1
- package/lib/orchestrate/realize/RealizePipe.d.ts +5 -0
- package/lib/orchestrate/realize/RealizePipe.js +14 -0
- package/lib/orchestrate/realize/RealizePipe.js.map +1 -0
- package/lib/orchestrate/realize/orchestrateRealize.d.ts +0 -6
- package/lib/orchestrate/realize/orchestrateRealize.js +6 -43
- package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeCoder.d.ts +3 -3
- package/lib/orchestrate/realize/orchestrateRealizeCoder.js +124 -59
- package/lib/orchestrate/realize/orchestrateRealizeCoder.js.map +1 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +188 -18
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +23 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.js +3 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.js.map +1 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.d.ts +2 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js +5 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js.map +1 -0
- package/lib/orchestrate/realize/transformRealizeCoderHistories.d.ts +2 -1
- package/lib/orchestrate/realize/transformRealizeCoderHistories.js +50 -36
- package/lib/orchestrate/realize/transformRealizeCoderHistories.js.map +1 -1
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.d.ts +5 -0
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js +123 -0
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js.map +1 -0
- package/lib/orchestrate/test/compile/getTestExternalDeclarations.js +4 -1
- package/lib/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -1
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js +2 -1
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTest.js +11 -5
- package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestCorrect.js +3 -2
- package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/structures/IAutoBeProps.d.ts +8 -8
- package/lib/utils/pipe.d.ts +5 -0
- package/lib/utils/pipe.js +14 -0
- package/lib/utils/pipe.js.map +1 -0
- package/package.json +6 -6
- package/src/AutoBeAgent.ts +22 -76
- package/src/constants/AutoBeSystemPromptConstant.ts +11 -6
- package/src/context/AutoBeContext.ts +3 -1
- package/src/factory/getAutoBeGenerated.ts +113 -0
- package/src/orchestrate/analyze/AutoBeAnalyzeFileSystem.ts +5 -13
- package/src/orchestrate/analyze/AutoBeAnalyzeRole.ts +14 -0
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +30 -165
- package/src/orchestrate/analyze/orchestrateAnalyzeComposer.ts +115 -0
- package/src/orchestrate/analyze/orchestrateAnalyzeReviewer.ts +39 -0
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +106 -0
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.ts +74 -0
- package/src/orchestrate/analyze/transformAnalyzeReviewerHistories.ts +31 -0
- package/src/orchestrate/analyze/transformAnalyzeWriteHistories.ts +94 -0
- package/src/orchestrate/analyze/writeDocumentUntilReviewPassed.ts +66 -0
- package/src/orchestrate/interface/orchestrateInterface.ts +0 -2
- package/src/orchestrate/interface/orchestrateInterfaceComponents.ts +2 -3
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +21 -0
- package/src/orchestrate/prisma/orchestratePrisma.ts +12 -5
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +4 -13
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +9 -4
- package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +265 -0
- package/src/orchestrate/prisma/transformPrismaSchemaHistories.ts +26 -37
- package/src/orchestrate/realize/RealizePipe.ts +39 -0
- package/src/orchestrate/realize/orchestrateRealize.ts +3 -91
- package/src/orchestrate/realize/orchestrateRealizeCoder.ts +60 -25
- package/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.ts +192 -18
- package/src/orchestrate/realize/structures/IAutoBeRealizeCompile.ts +34 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.ts +2 -0
- package/src/orchestrate/realize/transformRealizeCoderHistories.ts +58 -34
- package/src/orchestrate/realize/writeCodeUntilCompilePassed.ts +178 -0
- package/src/orchestrate/test/compile/getTestExternalDeclarations.ts +5 -4
- package/src/orchestrate/test/compile/getTestScenarioArtifacts.ts +7 -2
- package/src/orchestrate/test/orchestrateTest.ts +14 -12
- package/src/orchestrate/test/orchestrateTestCorrect.ts +10 -9
- package/src/structures/IAutoBeProps.ts +10 -7
- package/src/utils/pipe.ts +39 -0
- package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.d.ts +0 -20
- package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js +0 -735
- package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js.map +0 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.d.ts +0 -15
- package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js +0 -44
- package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js.map +0 -1
- package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +0 -1
- package/src/orchestrate/analyze/AutoBeAnalyzeAgent.ts +0 -219
- package/src/orchestrate/analyze/AutoBeAnalyzeReviewer.ts +0 -62
- package/src/orchestrate/prisma/orchestratePrismaSchema.ts +0 -157
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoBeSystemPromptConstant.js","sourceRoot":"","sources":["../../src/constants/AutoBeSystemPromptConstant.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"AutoBeSystemPromptConstant.js","sourceRoot":"","sources":["../../src/constants/AutoBeSystemPromptConstant.ts"],"names":[],"mappings":";;AA4BC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IAgenticaVendor } from "@agentica/core";
|
|
2
|
-
import { AutoBeEvent, AutoBeHistory, IAutoBeCompiler, IAutoBeGetFilesOptions } from "@autobe/interface";
|
|
2
|
+
import { AutoBeEvent, AutoBeHistory, IAutoBeCompiler, IAutoBeCompilerListener, IAutoBeGetFilesOptions } from "@autobe/interface";
|
|
3
3
|
import { ILlmSchema } from "@samchon/openapi";
|
|
4
4
|
import { IAutoBeConfig } from "../structures/IAutoBeConfig";
|
|
5
5
|
import { AutoBeState } from "./AutoBeState";
|
|
@@ -8,7 +8,8 @@ export interface AutoBeContext<Model extends ILlmSchema.Model> {
|
|
|
8
8
|
model: Model;
|
|
9
9
|
vendor: IAgenticaVendor;
|
|
10
10
|
config: IAutoBeConfig | undefined;
|
|
11
|
-
|
|
11
|
+
compilerListener: IAutoBeCompilerListener;
|
|
12
|
+
compiler: () => Promise<IAutoBeCompiler>;
|
|
12
13
|
files: (options: IAutoBeGetFilesOptions) => Promise<Record<string, string>>;
|
|
13
14
|
histories: () => AutoBeHistory[];
|
|
14
15
|
state: () => AutoBeState;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AutoBeHistory, IAutoBeGetFilesOptions } from "@autobe/interface";
|
|
2
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
+
import { AutoBeContext } from "../context/AutoBeContext";
|
|
4
|
+
import { AutoBeTokenUsage } from "../context/AutoBeTokenUsage";
|
|
5
|
+
export declare function getAutoBeGenerated<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, histories: AutoBeHistory[], tokenUsage: AutoBeTokenUsage, options?: Partial<IAutoBeGetFilesOptions>): Promise<Record<string, string>>;
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
45
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
|
+
};
|
|
47
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
+
exports.getAutoBeGenerated = getAutoBeGenerated;
|
|
49
|
+
const __typia_transform__isUniqueItems = __importStar(require("typia/lib/internal/_isUniqueItems.js"));
|
|
50
|
+
const __typia_transform__jsonStringifyString = __importStar(require("typia/lib/internal/_jsonStringifyString.js"));
|
|
51
|
+
const __typia_transform__throwTypeGuardError = __importStar(require("typia/lib/internal/_throwTypeGuardError.js"));
|
|
52
|
+
const __typia_transform__isFormatDateTime = __importStar(require("typia/lib/internal/_isFormatDateTime.js"));
|
|
53
|
+
const __typia_transform__isFormatUuid = __importStar(require("typia/lib/internal/_isFormatUuid.js"));
|
|
54
|
+
const __typia_transform__isFormatUrl = __importStar(require("typia/lib/internal/_isFormatUrl.js"));
|
|
55
|
+
const typia_1 = __importDefault(require("typia"));
|
|
56
|
+
function getAutoBeGenerated(ctx, histories, tokenUsage, options) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
var _a, _b, _c, _d, _e, _f;
|
|
59
|
+
const state = ctx.state();
|
|
60
|
+
const ret = {};
|
|
61
|
+
// ANALYZE
|
|
62
|
+
if (state.analyze === null)
|
|
63
|
+
return {};
|
|
64
|
+
Object.assign(ret, Object.fromEntries(Object.entries(state.analyze.files).map(([key, value]) => [
|
|
65
|
+
`docs/analysis/${key.split("/").at(-1)}`,
|
|
66
|
+
value,
|
|
67
|
+
])));
|
|
68
|
+
// PRISMA
|
|
69
|
+
const compiler = yield ctx.compiler();
|
|
70
|
+
if (((_a = state.prisma) === null || _a === void 0 ? void 0 : _a.step) === state.analyze.step) {
|
|
71
|
+
const schemaFiles = ((_b = options === null || options === void 0 ? void 0 : options.dbms) !== null && _b !== void 0 ? _b : "postgres") === "postgres"
|
|
72
|
+
? state.prisma.schemas
|
|
73
|
+
: yield compiler.prisma.write(state.prisma.result.data, options.dbms);
|
|
74
|
+
Object.assign(ret, Object.fromEntries(Object.entries(schemaFiles).map(([key, value]) => [
|
|
75
|
+
`prisma/schema/${key.split("/").at(-1)}`,
|
|
76
|
+
value,
|
|
77
|
+
])), {
|
|
78
|
+
"autobe/prisma.json": (() => { const _so0 = input => `{"files":${`[${input.files.map(elem => _so1(elem)).join(",")}]`}}`; const _so1 = input => `{"filename":${__typia_transform__jsonStringifyString._jsonStringifyString(input.filename)},"namespace":${__typia_transform__jsonStringifyString._jsonStringifyString(input.namespace)},"models":${`[${input.models.map(elem => _so2(elem)).join(",")}]`}}`; const _so2 = input => `{"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)},"material":${input.material},"primaryField":${_so3(input.primaryField)},"foreignFields":${`[${input.foreignFields.map(elem => _so4(elem)).join(",")}]`},"plainFields":${`[${input.plainFields.map(elem => _so6(elem)).join(",")}]`},"uniqueIndexes":${`[${input.uniqueIndexes.map(elem => _so7(elem)).join(",")}]`},"plainIndexes":${`[${input.plainIndexes.map(elem => _so8(elem)).join(",")}]`},"ginIndexes":${`[${input.ginIndexes.map(elem => _so9(elem)).join(",")}]`}}`; const _so3 = input => `{"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"type":${"\"" + input.type + "\""},"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)}}`; const _so4 = input => `{"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"type":${"\"" + input.type + "\""},"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)},"relation":${_so5(input.relation)},"unique":${input.unique},"nullable":${input.nullable}}`; const _so5 = input => `{"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"targetModel":${__typia_transform__jsonStringifyString._jsonStringifyString(input.targetModel)}}`; const _so6 = input => `{"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"type":${"\"" + input.type + "\""},"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)},"nullable":${input.nullable}}`; const _so7 = input => `{"fieldNames":${`[${input.fieldNames.map(elem => __typia_transform__jsonStringifyString._jsonStringifyString(elem)).join(",")}]`},"unique":${input.unique}}`; const _so8 = input => `{"fieldNames":${`[${input.fieldNames.map(elem => __typia_transform__jsonStringifyString._jsonStringifyString(elem)).join(",")}]`}}`; const _so9 = input => `{"fieldName":${__typia_transform__jsonStringifyString._jsonStringifyString(input.fieldName)}}`; const _io1 = input => "string" === typeof input.filename && RegExp("^[a-zA-Z0-9._-]+\\.prisma$").test(input.filename) && "string" === typeof input.namespace && (Array.isArray(input.models) && (1 <= input.models.length && input.models.every(elem => "object" === typeof elem && null !== elem && _io2(elem)))); const _io2 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "string" === typeof input.description && "boolean" === typeof input.material && ("object" === typeof input.primaryField && null !== input.primaryField && _io3(input.primaryField)) && (Array.isArray(input.foreignFields) && input.foreignFields.every(elem => "object" === typeof elem && null !== elem && _io4(elem))) && (Array.isArray(input.plainFields) && input.plainFields.every(elem => "object" === typeof elem && null !== elem && _io6(elem))) && (Array.isArray(input.uniqueIndexes) && input.uniqueIndexes.every(elem => "object" === typeof elem && null !== elem && _io7(elem))) && (Array.isArray(input.plainIndexes) && input.plainIndexes.every(elem => "object" === typeof elem && null !== elem && _io8(elem))) && (Array.isArray(input.ginIndexes) && input.ginIndexes.every(elem => "object" === typeof elem && null !== elem && _io9(elem))); const _io3 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description; const _io4 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description && ("object" === typeof input.relation && null !== input.relation && _io5(input.relation)) && "boolean" === typeof input.unique && "boolean" === typeof input.nullable; const _io5 = input => "string" === typeof input.name && RegExp("^[a-zA-Z_][a-zA-Z0-9_]*$").test(input.name) && "string" === typeof input.targetModel; const _io6 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && ("string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type) && "string" === typeof input.description && "boolean" === typeof input.nullable; const _io7 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)) && true === input.unique; const _io8 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)); const _io9 = input => "string" === typeof input.fieldName; return input => _so0(input); })()(state.prisma.result.data),
|
|
79
|
+
});
|
|
80
|
+
if (state.prisma.compiled.type === "success")
|
|
81
|
+
ret["docs/ERD.md"] = state.prisma.compiled.document;
|
|
82
|
+
else if (state.prisma.compiled.type === "failure")
|
|
83
|
+
ret["prisma/compile-error-reason.log"] = state.prisma.compiled.reason;
|
|
84
|
+
}
|
|
85
|
+
// INTERFACE
|
|
86
|
+
if (((_c = state.interface) === null || _c === void 0 ? void 0 : _c.step) === state.analyze.step) {
|
|
87
|
+
const files = yield compiler.interface.write(state.interface.document);
|
|
88
|
+
Object.assign(ret, ((_d = state.test) === null || _d === void 0 ? void 0 : _d.step) === state.interface.step
|
|
89
|
+
? Object.fromEntries(Object.entries(files).filter(([key]) => key.startsWith("test/features/") === false))
|
|
90
|
+
: files, {
|
|
91
|
+
"autobe/document.json": (() => { const _so0 = input => `{"operations":${`[${input.operations.map(elem => _so1(elem)).join(",")}]`},"components":${_so8(input.components)}}`; const _so1 = input => `{"specification":${__typia_transform__jsonStringifyString._jsonStringifyString(input.specification)},"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)},"summary":${__typia_transform__jsonStringifyString._jsonStringifyString(input.summary)},"parameters":${`[${input.parameters.map(elem => _so2(elem)).join(",")}]`},"requestBody":${null !== input.requestBody ? _so6(input.requestBody) : "null"},"responseBody":${null !== input.responseBody ? _so7(input.responseBody) : "null"},"authorizationRoles":${null !== input.authorizationRoles ? `[${input.authorizationRoles.map(elem => __typia_transform__jsonStringifyString._jsonStringifyString(elem)).join(",")}]` : "null"},"path":${__typia_transform__jsonStringifyString._jsonStringifyString(input.path)},"method":${"\"" + input.method + "\""}}`; const _so2 = input => `{"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)},"schema":${_su0(input.schema)}}`; const _so3 = input => `{${undefined === input.minimum ? "" : `"minimum":${undefined !== input.minimum ? input.minimum : undefined},`}${undefined === input.maximum ? "" : `"maximum":${undefined !== input.maximum ? input.maximum : undefined},`}${undefined === input.exclusiveMinimum ? "" : `"exclusiveMinimum":${undefined !== input.exclusiveMinimum ? input.exclusiveMinimum : undefined},`}${undefined === input.exclusiveMaximum ? "" : `"exclusiveMaximum":${undefined !== input.exclusiveMaximum ? input.exclusiveMaximum : undefined},`}${undefined === input.multipleOf ? "" : `"multipleOf":${undefined !== input.multipleOf ? input.multipleOf : undefined},`}"type":${"\"" + input.type + "\""}}`; const _so4 = input => `{${undefined === input.minimum ? "" : `"minimum":${undefined !== input.minimum ? input.minimum : undefined},`}${undefined === input.maximum ? "" : `"maximum":${undefined !== input.maximum ? input.maximum : undefined},`}${undefined === input.exclusiveMinimum ? "" : `"exclusiveMinimum":${undefined !== input.exclusiveMinimum ? input.exclusiveMinimum : undefined},`}${undefined === input.exclusiveMaximum ? "" : `"exclusiveMaximum":${undefined !== input.exclusiveMaximum ? input.exclusiveMaximum : undefined},`}${undefined === input.multipleOf ? "" : `"multipleOf":${undefined !== input.multipleOf ? input.multipleOf : undefined},`}"type":${"\"" + input.type + "\""}}`; const _so5 = input => `{${undefined === input.format ? "" : `"format":${undefined !== input.format ? __typia_transform__jsonStringifyString._jsonStringifyString(input.format) : undefined},`}${undefined === input.pattern ? "" : `"pattern":${undefined !== input.pattern ? __typia_transform__jsonStringifyString._jsonStringifyString(input.pattern) : undefined},`}${undefined === input.contentMediaType ? "" : `"contentMediaType":${undefined !== input.contentMediaType ? __typia_transform__jsonStringifyString._jsonStringifyString(input.contentMediaType) : undefined},`}${undefined === input.minLength ? "" : `"minLength":${undefined !== input.minLength ? input.minLength : undefined},`}${undefined === input.maxLength ? "" : `"maxLength":${undefined !== input.maxLength ? input.maxLength : undefined},`}"type":${"\"" + input.type + "\""}}`; const _so6 = input => `{"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)},"typeName":${__typia_transform__jsonStringifyString._jsonStringifyString(input.typeName)}}`; const _so7 = input => `{"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)},"typeName":${__typia_transform__jsonStringifyString._jsonStringifyString(input.typeName)}}`; const _so8 = input => `{${undefined === input.authorization ? "" : `"authorization":${undefined !== input.authorization ? `[${input.authorization.map(elem => _so11(elem)).join(",")}]` : undefined},`}"schemas":${_so9(input.schemas)}}`; const _so9 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
92
|
+
return ""; return `${JSON.stringify(key)}:${_so10(value)}`; }).filter(str => "" !== str).join(",")}}`; const _so10 = input => `{"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)}}`; const _so11 = input => `{"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)}}`; const _su0 = input => (() => {
|
|
93
|
+
if ("number" === input.type)
|
|
94
|
+
return _so4(input);
|
|
95
|
+
else if ("integer" === input.type)
|
|
96
|
+
return _so3(input);
|
|
97
|
+
else if ("string" === input.type)
|
|
98
|
+
return _so5(input);
|
|
99
|
+
else
|
|
100
|
+
__typia_transform__throwTypeGuardError._throwTypeGuardError({
|
|
101
|
+
method: "typia.json.stringify",
|
|
102
|
+
expected: "(AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.IString)",
|
|
103
|
+
value: input
|
|
104
|
+
});
|
|
105
|
+
})(); const _io1 = input => "string" === typeof input.specification && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io6(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io7(input.responseBody)) && (null === input.authorizationRoles || Array.isArray(input.authorizationRoles) && (__typia_transform__isUniqueItems._isUniqueItems(input.authorizationRoles) && input.authorizationRoles.every(elem => "string" === typeof elem))) && "string" === typeof input.path && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io2 = input => "string" === typeof input.name && "string" === typeof input.description && ("object" === typeof input.schema && null !== input.schema && _iu0(input.schema)); const _io3 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io4 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io5 = input => (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io6 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io7 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io8 = input => "object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) && _io9(input.schemas) && (undefined === input.authorization || Array.isArray(input.authorization) && input.authorization.every(elem => "object" === typeof elem && null !== elem && _io11(elem))); const _io9 = input => Object.keys(input).every(key => {
|
|
106
|
+
const value = input[key];
|
|
107
|
+
if (undefined === value)
|
|
108
|
+
return true;
|
|
109
|
+
return "object" === typeof value && null !== value && _io10(value);
|
|
110
|
+
}); const _io10 = input => "string" === typeof input.description; const _io11 = input => "string" === typeof input.name && "string" === typeof input.description; const _iu0 = input => (() => {
|
|
111
|
+
if ("number" === input.type)
|
|
112
|
+
return _io4(input);
|
|
113
|
+
else if ("integer" === input.type)
|
|
114
|
+
return _io3(input);
|
|
115
|
+
else if ("string" === input.type)
|
|
116
|
+
return _io5(input);
|
|
117
|
+
else
|
|
118
|
+
return false;
|
|
119
|
+
})(); return input => _so0(input); })()(state.interface.document),
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
// TEST
|
|
123
|
+
if (((_e = state.test) === null || _e === void 0 ? void 0 : _e.step) === state.analyze.step)
|
|
124
|
+
Object.assign(ret, Object.fromEntries(state.test.files.map((f) => [f.location, f.content])), yield compiler.test.getTemplate());
|
|
125
|
+
// REALIZE
|
|
126
|
+
if (((_f = state.realize) === null || _f === void 0 ? void 0 : _f.step) === state.analyze.step)
|
|
127
|
+
Object.assign(ret, state.realize.files, yield compiler.realize.getTemplate());
|
|
128
|
+
// LOGGING
|
|
129
|
+
Object.assign(ret, {
|
|
130
|
+
"autobe/histories.json": (() => { const _so0 = input => `{"reason":${__typia_transform__jsonStringifyString._jsonStringifyString(input.reason)},"step":${input.step},"prefix":${__typia_transform__jsonStringifyString._jsonStringifyString(input.prefix)},"files":${_so1(input.files)},"completed_at":${__typia_transform__jsonStringifyString._jsonStringifyString(input.completed_at)},"roles":${`[${input.roles.map(elem => _so2(elem)).join(",")}]`},"id":${__typia_transform__jsonStringifyString._jsonStringifyString(input.id)},"type":${"\"" + input.type + "\""},"created_at":${__typia_transform__jsonStringifyString._jsonStringifyString(input.created_at)}}`; const _so1 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
131
|
+
return ""; return `${JSON.stringify(key)}:${__typia_transform__jsonStringifyString._jsonStringifyString(value)}`; }).filter(str => "" !== str).join(",")}}`; const _so2 = input => `{"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)}}`; const _so3 = input => `{"text":${__typia_transform__jsonStringifyString._jsonStringifyString(input.text)},"completed_at":${__typia_transform__jsonStringifyString._jsonStringifyString(input.completed_at)},"id":${__typia_transform__jsonStringifyString._jsonStringifyString(input.id)},"type":${"\"" + input.type + "\""},"created_at":${__typia_transform__jsonStringifyString._jsonStringifyString(input.created_at)}}`; const _so4 = input => `{"document":${_so5(input.document)},"reason":${__typia_transform__jsonStringifyString._jsonStringifyString(input.reason)},"step":${input.step},"completed_at":${__typia_transform__jsonStringifyString._jsonStringifyString(input.completed_at)},"id":${__typia_transform__jsonStringifyString._jsonStringifyString(input.id)},"type":${"\"" + input.type + "\""},"created_at":${__typia_transform__jsonStringifyString._jsonStringifyString(input.created_at)}}`; const _so5 = input => `{"operations":${`[${input.operations.map(elem => _so6(elem)).join(",")}]`},"components":${_so13(input.components)}}`; const _so6 = input => `{"specification":${__typia_transform__jsonStringifyString._jsonStringifyString(input.specification)},"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)},"summary":${__typia_transform__jsonStringifyString._jsonStringifyString(input.summary)},"parameters":${`[${input.parameters.map(elem => _so7(elem)).join(",")}]`},"requestBody":${null !== input.requestBody ? _so11(input.requestBody) : "null"},"responseBody":${null !== input.responseBody ? _so12(input.responseBody) : "null"},"authorizationRoles":${null !== input.authorizationRoles ? `[${input.authorizationRoles.map(elem => __typia_transform__jsonStringifyString._jsonStringifyString(elem)).join(",")}]` : "null"},"path":${__typia_transform__jsonStringifyString._jsonStringifyString(input.path)},"method":${"\"" + input.method + "\""}}`; const _so7 = input => `{"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)},"schema":${_su2(input.schema)}}`; const _so8 = input => `{${undefined === input.minimum ? "" : `"minimum":${undefined !== input.minimum ? input.minimum : undefined},`}${undefined === input.maximum ? "" : `"maximum":${undefined !== input.maximum ? input.maximum : undefined},`}${undefined === input.exclusiveMinimum ? "" : `"exclusiveMinimum":${undefined !== input.exclusiveMinimum ? input.exclusiveMinimum : undefined},`}${undefined === input.exclusiveMaximum ? "" : `"exclusiveMaximum":${undefined !== input.exclusiveMaximum ? input.exclusiveMaximum : undefined},`}${undefined === input.multipleOf ? "" : `"multipleOf":${undefined !== input.multipleOf ? input.multipleOf : undefined},`}"type":${"\"" + input.type + "\""}}`; const _so9 = input => `{${undefined === input.minimum ? "" : `"minimum":${undefined !== input.minimum ? input.minimum : undefined},`}${undefined === input.maximum ? "" : `"maximum":${undefined !== input.maximum ? input.maximum : undefined},`}${undefined === input.exclusiveMinimum ? "" : `"exclusiveMinimum":${undefined !== input.exclusiveMinimum ? input.exclusiveMinimum : undefined},`}${undefined === input.exclusiveMaximum ? "" : `"exclusiveMaximum":${undefined !== input.exclusiveMaximum ? input.exclusiveMaximum : undefined},`}${undefined === input.multipleOf ? "" : `"multipleOf":${undefined !== input.multipleOf ? input.multipleOf : undefined},`}"type":${"\"" + input.type + "\""}}`; const _so10 = input => `{${undefined === input.format ? "" : `"format":${undefined !== input.format ? __typia_transform__jsonStringifyString._jsonStringifyString(input.format) : undefined},`}${undefined === input.pattern ? "" : `"pattern":${undefined !== input.pattern ? __typia_transform__jsonStringifyString._jsonStringifyString(input.pattern) : undefined},`}${undefined === input.contentMediaType ? "" : `"contentMediaType":${undefined !== input.contentMediaType ? __typia_transform__jsonStringifyString._jsonStringifyString(input.contentMediaType) : undefined},`}${undefined === input.minLength ? "" : `"minLength":${undefined !== input.minLength ? input.minLength : undefined},`}${undefined === input.maxLength ? "" : `"maxLength":${undefined !== input.maxLength ? input.maxLength : undefined},`}"type":${"\"" + input.type + "\""}}`; const _so11 = input => `{"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)},"typeName":${__typia_transform__jsonStringifyString._jsonStringifyString(input.typeName)}}`; const _so12 = input => `{"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)},"typeName":${__typia_transform__jsonStringifyString._jsonStringifyString(input.typeName)}}`; const _so13 = input => `{${undefined === input.authorization ? "" : `"authorization":${undefined !== input.authorization ? `[${input.authorization.map(elem => _so16(elem)).join(",")}]` : undefined},`}"schemas":${_so14(input.schemas)}}`; const _so14 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
132
|
+
return ""; return `${JSON.stringify(key)}:${_so15(value)}`; }).filter(str => "" !== str).join(",")}}`; const _so15 = input => `{"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)}}`; const _so16 = input => `{"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)}}`; const _so17 = input => `{"result":${_su3(input.result)},"schemas":${_so1(input.schemas)},"compiled":${_su4(input.compiled)},"reason":${__typia_transform__jsonStringifyString._jsonStringifyString(input.reason)},"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)},"step":${input.step},"completed_at":${__typia_transform__jsonStringifyString._jsonStringifyString(input.completed_at)},"id":${__typia_transform__jsonStringifyString._jsonStringifyString(input.id)},"type":${"\"" + input.type + "\""},"created_at":${__typia_transform__jsonStringifyString._jsonStringifyString(input.created_at)}}`; const _so18 = input => `{"success":${input.success},"data":${_so19(input.data)}}`; const _so19 = input => `{"files":${`[${input.files.map(elem => _so20(elem)).join(",")}]`}}`; const _so20 = input => `{"filename":${__typia_transform__jsonStringifyString._jsonStringifyString(input.filename)},"namespace":${__typia_transform__jsonStringifyString._jsonStringifyString(input.namespace)},"models":${`[${input.models.map(elem => _so21(elem)).join(",")}]`}}`; const _so21 = input => `{"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)},"material":${input.material},"primaryField":${_so22(input.primaryField)},"foreignFields":${`[${input.foreignFields.map(elem => _so23(elem)).join(",")}]`},"plainFields":${`[${input.plainFields.map(elem => _so25(elem)).join(",")}]`},"uniqueIndexes":${`[${input.uniqueIndexes.map(elem => _so26(elem)).join(",")}]`},"plainIndexes":${`[${input.plainIndexes.map(elem => _so27(elem)).join(",")}]`},"ginIndexes":${`[${input.ginIndexes.map(elem => _so28(elem)).join(",")}]`}}`; const _so22 = input => `{"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"type":${"\"" + input.type + "\""},"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)}}`; const _so23 = input => `{"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"type":${"\"" + input.type + "\""},"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)},"relation":${_so24(input.relation)},"unique":${input.unique},"nullable":${input.nullable}}`; const _so24 = input => `{"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"targetModel":${__typia_transform__jsonStringifyString._jsonStringifyString(input.targetModel)}}`; const _so25 = input => `{"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"type":${"\"" + input.type + "\""},"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)},"nullable":${input.nullable}}`; const _so26 = input => `{"fieldNames":${`[${input.fieldNames.map(elem => __typia_transform__jsonStringifyString._jsonStringifyString(elem)).join(",")}]`},"unique":${input.unique}}`; const _so27 = input => `{"fieldNames":${`[${input.fieldNames.map(elem => __typia_transform__jsonStringifyString._jsonStringifyString(elem)).join(",")}]`}}`; const _so28 = input => `{"fieldName":${__typia_transform__jsonStringifyString._jsonStringifyString(input.fieldName)}}`; const _so29 = input => `{"success":${input.success},"data":${_so19(input.data)},"errors":${`[${input.errors.map(elem => _so30(elem)).join(",")}]`}}`; const _so30 = input => `{"path":${__typia_transform__jsonStringifyString._jsonStringifyString(input.path)},"table":${null !== input.table ? __typia_transform__jsonStringifyString._jsonStringifyString(input.table) : "null"},"field":${null !== input.field ? __typia_transform__jsonStringifyString._jsonStringifyString(input.field) : "null"},"message":${__typia_transform__jsonStringifyString._jsonStringifyString(input.message)}}`; const _so31 = input => `{"type":${"\"" + input.type + "\""},"document":${__typia_transform__jsonStringifyString._jsonStringifyString(input.document)},"diagrams":${_so1(input.diagrams)},"schemas":${_so1(input.schemas)},"nodeModules":${_so1(input.nodeModules)}}`; const _so32 = input => `{"type":${"\"" + input.type + "\""},"reason":${__typia_transform__jsonStringifyString._jsonStringifyString(input.reason)}}`; const _so33 = input => `{${undefined === input.error || "function" === typeof input.error ? "" : `"error":${undefined !== input.error ? JSON.stringify(input.error) : undefined},`}"type":${"\"" + input.type + "\""}}`; const _so34 = input => `{"files":${_so1(input.files)},"compiled":${_su5(input.compiled)},"reason":${__typia_transform__jsonStringifyString._jsonStringifyString(input.reason)},"step":${input.step},"completed_at":${__typia_transform__jsonStringifyString._jsonStringifyString(input.completed_at)},"id":${__typia_transform__jsonStringifyString._jsonStringifyString(input.id)},"type":${"\"" + input.type + "\""},"created_at":${__typia_transform__jsonStringifyString._jsonStringifyString(input.created_at)}}`; const _so35 = input => `{"type":${"\"" + input.type + "\""}}`; const _so36 = input => `{"type":${"\"" + input.type + "\""},"diagnostics":${`[${input.diagnostics.map(elem => _so37(elem)).join(",")}]`}}`; const _so37 = input => `{${undefined === input.start ? "" : `"start":${undefined !== input.start ? input.start : undefined},`}${undefined === input.length ? "" : `"length":${undefined !== input.length ? input.length : undefined},`}"file":${null !== input.file ? __typia_transform__jsonStringifyString._jsonStringifyString(input.file) : "null"},"category":${"\"" + input.category + "\""},"code":${(() => {
|
|
133
|
+
if ("string" === typeof input.code)
|
|
134
|
+
return __typia_transform__jsonStringifyString._jsonStringifyString(input.code);
|
|
135
|
+
if ("number" === typeof input.code)
|
|
136
|
+
return input.code;
|
|
137
|
+
__typia_transform__throwTypeGuardError._throwTypeGuardError({
|
|
138
|
+
method: "typia.json.stringify",
|
|
139
|
+
expected: "(number | string)",
|
|
140
|
+
value: input.code
|
|
141
|
+
});
|
|
142
|
+
})()},"messageText":${__typia_transform__jsonStringifyString._jsonStringifyString(input.messageText)}}`; const _so38 = input => `{${undefined === input.error || "function" === typeof input.error ? "" : `"error":${undefined !== input.error ? JSON.stringify(input.error) : undefined},`}"type":${"\"" + input.type + "\""}}`; const _so39 = input => `{"files":${`[${input.files.map(elem => _so40(elem)).join(",")}]`},"compiled":${_su5(input.compiled)},"reason":${__typia_transform__jsonStringifyString._jsonStringifyString(input.reason)},"step":${input.step},"completed_at":${__typia_transform__jsonStringifyString._jsonStringifyString(input.completed_at)},"id":${__typia_transform__jsonStringifyString._jsonStringifyString(input.id)},"type":${"\"" + input.type + "\""},"created_at":${__typia_transform__jsonStringifyString._jsonStringifyString(input.created_at)}}`; const _so40 = input => `{"location":${__typia_transform__jsonStringifyString._jsonStringifyString(input.location)},"content":${__typia_transform__jsonStringifyString._jsonStringifyString(input.content)},"scenario":${_so41(input.scenario)}}`; const _so41 = input => `{"endpoint":${_so42(input.endpoint)},"draft":${__typia_transform__jsonStringifyString._jsonStringifyString(input.draft)},"functionName":${__typia_transform__jsonStringifyString._jsonStringifyString(input.functionName)},"dependencies":${`[${input.dependencies.map(elem => _so43(elem)).join(",")}]`}}`; const _so42 = input => `{"path":${__typia_transform__jsonStringifyString._jsonStringifyString(input.path)},"method":${"\"" + input.method + "\""}}`; const _so43 = input => `{"purpose":${__typia_transform__jsonStringifyString._jsonStringifyString(input.purpose)},"endpoint":${_so42(input.endpoint)}}`; const _so44 = input => `{"contents":${`[${input.contents.map(elem => _su1(elem)).join(",")}]`},"id":${__typia_transform__jsonStringifyString._jsonStringifyString(input.id)},"type":${"\"" + input.type + "\""},"created_at":${__typia_transform__jsonStringifyString._jsonStringifyString(input.created_at)}}`; const _so45 = input => `{"data":${__typia_transform__jsonStringifyString._jsonStringifyString(input.data)},"format":${"\"" + input.format + "\""},"type":${"\"" + input.type + "\""}}`; const _so46 = input => `{"file":${_su6(input.file)},"type":${"\"" + input.type + "\""}}`; const _so47 = input => `{"type":${"\"" + input.type + "\""},"id":${__typia_transform__jsonStringifyString._jsonStringifyString(input.id)}}`; const _so48 = input => `{"type":${"\"" + input.type + "\""},"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"data":${__typia_transform__jsonStringifyString._jsonStringifyString(input.data)}}`; const _so49 = input => `{${undefined === input.detail ? "" : `"detail":${undefined !== input.detail ? "\"" + input.detail + "\"" : undefined},`}"url":${__typia_transform__jsonStringifyString._jsonStringifyString(input.url)},"type":${"\"" + input.type + "\""}}`; const _so50 = input => `{"text":${__typia_transform__jsonStringifyString._jsonStringifyString(input.text)},"type":${"\"" + input.type + "\""}}`; const _su0 = input => (() => {
|
|
143
|
+
if ("analyze" === input.type)
|
|
144
|
+
return _so0(input);
|
|
145
|
+
else if ("assistantMessage" === input.type)
|
|
146
|
+
return _so3(input);
|
|
147
|
+
else if ("interface" === input.type)
|
|
148
|
+
return _so4(input);
|
|
149
|
+
else if ("prisma" === input.type)
|
|
150
|
+
return _so17(input);
|
|
151
|
+
else if ("test" === input.type)
|
|
152
|
+
return _so39(input);
|
|
153
|
+
else if ("realize" === input.type)
|
|
154
|
+
return _so34(input);
|
|
155
|
+
else if ("userMessage" === input.type)
|
|
156
|
+
return _so44(input);
|
|
157
|
+
else
|
|
158
|
+
__typia_transform__throwTypeGuardError._throwTypeGuardError({
|
|
159
|
+
method: "typia.json.stringify",
|
|
160
|
+
expected: "(AutoBeAnalyzeHistory | AutoBeAssistantMessageHistory | AutoBeInterfaceHistory | AutoBePrismaHistory | AutoBeTestHistory | AutoBeRealizeHistory | AutoBeUserMessageHistory)",
|
|
161
|
+
value: input
|
|
162
|
+
});
|
|
163
|
+
})(); const _su1 = input => (() => {
|
|
164
|
+
if (undefined !== input.format)
|
|
165
|
+
return _so45(input);
|
|
166
|
+
else if ("file" === input.type)
|
|
167
|
+
return _so46(input);
|
|
168
|
+
else if ("image" === input.type)
|
|
169
|
+
return _so49(input);
|
|
170
|
+
else if ("text" === input.type)
|
|
171
|
+
return _so50(input);
|
|
172
|
+
else
|
|
173
|
+
__typia_transform__throwTypeGuardError._throwTypeGuardError({
|
|
174
|
+
method: "typia.json.stringify",
|
|
175
|
+
expected: "(AutoBeUserMessageAudioContent | AutoBeUserMessageFileContent | AutoBeUserMessageImageContent | AutoBeUserMessageTextContent)",
|
|
176
|
+
value: input
|
|
177
|
+
});
|
|
178
|
+
})(); const _su2 = input => (() => {
|
|
179
|
+
if ("number" === input.type)
|
|
180
|
+
return _so9(input);
|
|
181
|
+
else if ("integer" === input.type)
|
|
182
|
+
return _so8(input);
|
|
183
|
+
else if ("string" === input.type)
|
|
184
|
+
return _so10(input);
|
|
185
|
+
else
|
|
186
|
+
__typia_transform__throwTypeGuardError._throwTypeGuardError({
|
|
187
|
+
method: "typia.json.stringify",
|
|
188
|
+
expected: "(AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.IString)",
|
|
189
|
+
value: input
|
|
190
|
+
});
|
|
191
|
+
})(); const _su3 = input => (() => {
|
|
192
|
+
if (true === input.success)
|
|
193
|
+
return _so18(input);
|
|
194
|
+
else if (false === input.success)
|
|
195
|
+
return _so29(input);
|
|
196
|
+
else
|
|
197
|
+
__typia_transform__throwTypeGuardError._throwTypeGuardError({
|
|
198
|
+
method: "typia.json.stringify",
|
|
199
|
+
expected: "(IAutoBePrismaValidation.ISuccess | IAutoBePrismaValidation.IFailure)",
|
|
200
|
+
value: input
|
|
201
|
+
});
|
|
202
|
+
})(); const _su4 = input => (() => {
|
|
203
|
+
if ("success" === input.type)
|
|
204
|
+
return _so31(input);
|
|
205
|
+
else if ("failure" === input.type)
|
|
206
|
+
return _so32(input);
|
|
207
|
+
else if ("exception" === input.type)
|
|
208
|
+
return _so33(input);
|
|
209
|
+
else
|
|
210
|
+
__typia_transform__throwTypeGuardError._throwTypeGuardError({
|
|
211
|
+
method: "typia.json.stringify",
|
|
212
|
+
expected: "(IAutoBePrismaCompileResult.ISuccess | IAutoBePrismaCompileResult.IFailure | IAutoBePrismaCompileResult.IException)",
|
|
213
|
+
value: input
|
|
214
|
+
});
|
|
215
|
+
})(); const _su5 = input => (() => {
|
|
216
|
+
if ("success" === input.type)
|
|
217
|
+
return _so35(input);
|
|
218
|
+
else if ("failure" === input.type)
|
|
219
|
+
return _so36(input);
|
|
220
|
+
else if ("exception" === input.type)
|
|
221
|
+
return _so38(input);
|
|
222
|
+
else
|
|
223
|
+
__typia_transform__throwTypeGuardError._throwTypeGuardError({
|
|
224
|
+
method: "typia.json.stringify",
|
|
225
|
+
expected: "(IAutoBeTypeScriptCompileResult.ISuccess | IAutoBeTypeScriptCompileResult.IFailure | IAutoBeTypeScriptCompileResult.IException)",
|
|
226
|
+
value: input
|
|
227
|
+
});
|
|
228
|
+
})(); const _su6 = input => (() => {
|
|
229
|
+
if ("reference" === input.type)
|
|
230
|
+
return _so47(input);
|
|
231
|
+
else if ("data" === input.type)
|
|
232
|
+
return _so48(input);
|
|
233
|
+
else
|
|
234
|
+
__typia_transform__throwTypeGuardError._throwTypeGuardError({
|
|
235
|
+
method: "typia.json.stringify",
|
|
236
|
+
expected: "(AutoBeUserMessageFileContent.IReference | AutoBeUserMessageFileContent.IData)",
|
|
237
|
+
value: input
|
|
238
|
+
});
|
|
239
|
+
})(); const _io0 = input => "string" === typeof input.reason && "number" === typeof input.step && "string" === typeof input.prefix && ("object" === typeof input.files && null !== input.files && false === Array.isArray(input.files) && _io1(input.files)) && ("string" === typeof input.completed_at && __typia_transform__isFormatDateTime._isFormatDateTime(input.completed_at)) && (Array.isArray(input.roles) && input.roles.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && ("string" === typeof input.id && __typia_transform__isFormatUuid._isFormatUuid(input.id)) && "analyze" === input.type && ("string" === typeof input.created_at && __typia_transform__isFormatDateTime._isFormatDateTime(input.created_at)); const _io1 = input => Object.keys(input).every(key => {
|
|
240
|
+
const value = input[key];
|
|
241
|
+
if (undefined === value)
|
|
242
|
+
return true;
|
|
243
|
+
return "string" === typeof value;
|
|
244
|
+
}); const _io2 = input => "string" === typeof input.name && "string" === typeof input.description; const _io3 = input => "string" === typeof input.text && ("string" === typeof input.completed_at && __typia_transform__isFormatDateTime._isFormatDateTime(input.completed_at)) && ("string" === typeof input.id && __typia_transform__isFormatUuid._isFormatUuid(input.id)) && "assistantMessage" === input.type && ("string" === typeof input.created_at && __typia_transform__isFormatDateTime._isFormatDateTime(input.created_at)); const _io4 = input => "object" === typeof input.document && null !== input.document && _io5(input.document) && "string" === typeof input.reason && "number" === typeof input.step && ("string" === typeof input.completed_at && __typia_transform__isFormatDateTime._isFormatDateTime(input.completed_at)) && ("string" === typeof input.id && __typia_transform__isFormatUuid._isFormatUuid(input.id)) && "interface" === input.type && ("string" === typeof input.created_at && __typia_transform__isFormatDateTime._isFormatDateTime(input.created_at)); const _io5 = input => Array.isArray(input.operations) && (1 <= input.operations.length && input.operations.every(elem => "object" === typeof elem && null !== elem && _io6(elem))) && ("object" === typeof input.components && null !== input.components && _io13(input.components)); const _io6 = input => "string" === typeof input.specification && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io7(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io11(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io12(input.responseBody)) && (null === input.authorizationRoles || Array.isArray(input.authorizationRoles) && (__typia_transform__isUniqueItems._isUniqueItems(input.authorizationRoles) && input.authorizationRoles.every(elem => "string" === typeof elem))) && "string" === typeof input.path && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io7 = input => "string" === typeof input.name && "string" === typeof input.description && ("object" === typeof input.schema && null !== input.schema && _iu2(input.schema)); const _io8 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io9 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io10 = input => (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io11 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io12 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io13 = input => "object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) && _io14(input.schemas) && (undefined === input.authorization || Array.isArray(input.authorization) && input.authorization.every(elem => "object" === typeof elem && null !== elem && _io16(elem))); const _io14 = input => Object.keys(input).every(key => {
|
|
245
|
+
const value = input[key];
|
|
246
|
+
if (undefined === value)
|
|
247
|
+
return true;
|
|
248
|
+
return "object" === typeof value && null !== value && _io15(value);
|
|
249
|
+
}); const _io15 = input => "string" === typeof input.description; const _io16 = input => "string" === typeof input.name && "string" === typeof input.description; const _io17 = input => "object" === typeof input.result && null !== input.result && _iu3(input.result) && ("object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) && _io1(input.schemas)) && ("object" === typeof input.compiled && null !== input.compiled && _iu4(input.compiled)) && "string" === typeof input.reason && "string" === typeof input.description && "number" === typeof input.step && ("string" === typeof input.completed_at && __typia_transform__isFormatDateTime._isFormatDateTime(input.completed_at)) && ("string" === typeof input.id && __typia_transform__isFormatUuid._isFormatUuid(input.id)) && "prisma" === input.type && ("string" === typeof input.created_at && __typia_transform__isFormatDateTime._isFormatDateTime(input.created_at)); const _io18 = input => true === input.success && ("object" === typeof input.data && null !== input.data && _io19(input.data)); const _io19 = input => Array.isArray(input.files) && input.files.every(elem => "object" === typeof elem && null !== elem && _io20(elem)); const _io20 = input => "string" === typeof input.filename && RegExp("^[a-zA-Z0-9._-]+\\.prisma$").test(input.filename) && "string" === typeof input.namespace && (Array.isArray(input.models) && (1 <= input.models.length && input.models.every(elem => "object" === typeof elem && null !== elem && _io21(elem)))); const _io21 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "string" === typeof input.description && "boolean" === typeof input.material && ("object" === typeof input.primaryField && null !== input.primaryField && _io22(input.primaryField)) && (Array.isArray(input.foreignFields) && input.foreignFields.every(elem => "object" === typeof elem && null !== elem && _io23(elem))) && (Array.isArray(input.plainFields) && input.plainFields.every(elem => "object" === typeof elem && null !== elem && _io25(elem))) && (Array.isArray(input.uniqueIndexes) && input.uniqueIndexes.every(elem => "object" === typeof elem && null !== elem && _io26(elem))) && (Array.isArray(input.plainIndexes) && input.plainIndexes.every(elem => "object" === typeof elem && null !== elem && _io27(elem))) && (Array.isArray(input.ginIndexes) && input.ginIndexes.every(elem => "object" === typeof elem && null !== elem && _io28(elem))); const _io22 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description; const _io23 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description && ("object" === typeof input.relation && null !== input.relation && _io24(input.relation)) && "boolean" === typeof input.unique && "boolean" === typeof input.nullable; const _io24 = input => "string" === typeof input.name && RegExp("^[a-zA-Z_][a-zA-Z0-9_]*$").test(input.name) && "string" === typeof input.targetModel; const _io25 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && ("string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type) && "string" === typeof input.description && "boolean" === typeof input.nullable; const _io26 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)) && true === input.unique; const _io27 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)); const _io28 = input => "string" === typeof input.fieldName; const _io29 = input => false === input.success && ("object" === typeof input.data && null !== input.data && _io19(input.data)) && (Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && _io30(elem))); const _io30 = input => "string" === typeof input.path && (null === input.table || "string" === typeof input.table) && (null === input.field || "string" === typeof input.field) && "string" === typeof input.message; const _io31 = input => "success" === input.type && "string" === typeof input.document && ("object" === typeof input.diagrams && null !== input.diagrams && false === Array.isArray(input.diagrams) && _io1(input.diagrams)) && ("object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) && _io1(input.schemas)) && ("object" === typeof input.nodeModules && null !== input.nodeModules && false === Array.isArray(input.nodeModules) && _io1(input.nodeModules)); const _io32 = input => "failure" === input.type && "string" === typeof input.reason; const _io33 = input => "exception" === input.type && true; const _io34 = input => "object" === typeof input.files && null !== input.files && false === Array.isArray(input.files) && _io1(input.files) && ("object" === typeof input.compiled && null !== input.compiled && _iu5(input.compiled)) && "string" === typeof input.reason && "number" === typeof input.step && ("string" === typeof input.completed_at && __typia_transform__isFormatDateTime._isFormatDateTime(input.completed_at)) && ("string" === typeof input.id && __typia_transform__isFormatUuid._isFormatUuid(input.id)) && "realize" === input.type && ("string" === typeof input.created_at && __typia_transform__isFormatDateTime._isFormatDateTime(input.created_at)); const _io35 = input => "success" === input.type; const _io36 = input => "failure" === input.type && (Array.isArray(input.diagnostics) && input.diagnostics.every(elem => "object" === typeof elem && null !== elem && _io37(elem))); const _io37 = input => (null === input.file || "string" === typeof input.file) && ("warning" === input.category || "error" === input.category || "suggestion" === input.category || "message" === input.category) && ("string" === typeof input.code || "number" === typeof input.code) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.length || "number" === typeof input.length) && "string" === typeof input.messageText; const _io38 = input => "exception" === input.type && true; const _io39 = input => Array.isArray(input.files) && input.files.every(elem => "object" === typeof elem && null !== elem && _io40(elem)) && ("object" === typeof input.compiled && null !== input.compiled && _iu5(input.compiled)) && "string" === typeof input.reason && "number" === typeof input.step && ("string" === typeof input.completed_at && __typia_transform__isFormatDateTime._isFormatDateTime(input.completed_at)) && ("string" === typeof input.id && __typia_transform__isFormatUuid._isFormatUuid(input.id)) && "test" === input.type && ("string" === typeof input.created_at && __typia_transform__isFormatDateTime._isFormatDateTime(input.created_at)); const _io40 = input => "string" === typeof input.location && "string" === typeof input.content && ("object" === typeof input.scenario && null !== input.scenario && _io41(input.scenario)); const _io41 = input => "object" === typeof input.endpoint && null !== input.endpoint && _io42(input.endpoint) && "string" === typeof input.draft && "string" === typeof input.functionName && (Array.isArray(input.dependencies) && input.dependencies.every(elem => "object" === typeof elem && null !== elem && _io43(elem))); const _io42 = input => "string" === typeof input.path && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io43 = input => "string" === typeof input.purpose && ("object" === typeof input.endpoint && null !== input.endpoint && _io42(input.endpoint)); const _io44 = input => Array.isArray(input.contents) && input.contents.every(elem => "object" === typeof elem && null !== elem && _iu1(elem)) && ("string" === typeof input.id && __typia_transform__isFormatUuid._isFormatUuid(input.id)) && "userMessage" === input.type && ("string" === typeof input.created_at && __typia_transform__isFormatDateTime._isFormatDateTime(input.created_at)); const _io45 = input => "string" === typeof input.data && ("wav" === input.format || "mp3" === input.format) && "audio" === input.type; const _io46 = input => "object" === typeof input.file && null !== input.file && _iu6(input.file) && "file" === input.type; const _io47 = input => "reference" === input.type && "string" === typeof input.id; const _io48 = input => "data" === input.type && "string" === typeof input.name && "string" === typeof input.data; const _io49 = input => "string" === typeof input.url && __typia_transform__isFormatUrl._isFormatUrl(input.url) && (undefined === input.detail || "auto" === input.detail || "high" === input.detail || "low" === input.detail) && "image" === input.type; const _io50 = input => "string" === typeof input.text && "text" === input.type; const _iu1 = input => (() => {
|
|
250
|
+
if (undefined !== input.format)
|
|
251
|
+
return _io45(input);
|
|
252
|
+
else if ("file" === input.type)
|
|
253
|
+
return _io46(input);
|
|
254
|
+
else if ("image" === input.type)
|
|
255
|
+
return _io49(input);
|
|
256
|
+
else if ("text" === input.type)
|
|
257
|
+
return _io50(input);
|
|
258
|
+
else
|
|
259
|
+
return false;
|
|
260
|
+
})(); const _iu2 = input => (() => {
|
|
261
|
+
if ("number" === input.type)
|
|
262
|
+
return _io9(input);
|
|
263
|
+
else if ("integer" === input.type)
|
|
264
|
+
return _io8(input);
|
|
265
|
+
else if ("string" === input.type)
|
|
266
|
+
return _io10(input);
|
|
267
|
+
else
|
|
268
|
+
return false;
|
|
269
|
+
})(); const _iu3 = input => (() => {
|
|
270
|
+
if (true === input.success)
|
|
271
|
+
return _io18(input);
|
|
272
|
+
else if (false === input.success)
|
|
273
|
+
return _io29(input);
|
|
274
|
+
else
|
|
275
|
+
return false;
|
|
276
|
+
})(); const _iu4 = input => (() => {
|
|
277
|
+
if ("success" === input.type)
|
|
278
|
+
return _io31(input);
|
|
279
|
+
else if ("failure" === input.type)
|
|
280
|
+
return _io32(input);
|
|
281
|
+
else if ("exception" === input.type)
|
|
282
|
+
return _io33(input);
|
|
283
|
+
else
|
|
284
|
+
return false;
|
|
285
|
+
})(); const _iu5 = input => (() => {
|
|
286
|
+
if ("success" === input.type)
|
|
287
|
+
return _io35(input);
|
|
288
|
+
else if ("failure" === input.type)
|
|
289
|
+
return _io36(input);
|
|
290
|
+
else if ("exception" === input.type)
|
|
291
|
+
return _io38(input);
|
|
292
|
+
else
|
|
293
|
+
return false;
|
|
294
|
+
})(); const _iu6 = input => (() => {
|
|
295
|
+
if ("reference" === input.type)
|
|
296
|
+
return _io47(input);
|
|
297
|
+
else if ("data" === input.type)
|
|
298
|
+
return _io48(input);
|
|
299
|
+
else
|
|
300
|
+
return false;
|
|
301
|
+
})(); return input => `[${input.map(elem => _su0(elem)).join(",")}]`; })()(histories),
|
|
302
|
+
"autobe/tokenUsage.json": (() => { const _so2 = input => `{"total":${input.total},"input":${_so3(input.input)},"output":${_so4(input.output)}}`; const _so3 = input => `{"total":${input.total},"cached":${input.cached}}`; const _so4 = input => `{"total":${input.total},"reasoning":${input.reasoning},"accepted_prediction":${input.accepted_prediction},"rejected_prediction":${input.rejected_prediction}}`; const _so5 = input => `{"aggregate":${_so6(input.aggregate)},"initialize":${_so6(input.initialize)},"select":${_so6(input.select)},"cancel":${_so6(input.cancel)},"call":${_so6(input.call)},"describe":${_so6(input.describe)}}`; const _so6 = input => `{"total":${input.total},"input":${_so7(input.input)},"output":${_so8(input.output)}}`; const _so7 = input => `{"total":${input.total},"cached":${input.cached}}`; const _so8 = input => `{"total":${input.total},"reasoning":${input.reasoning},"accepted_prediction":${input.accepted_prediction},"rejected_prediction":${input.rejected_prediction}}`; const _so9 = input => `{"facade":${_so10(input.facade)},"analyze":${_so10(input.analyze)},"prisma":${_so10(input.prisma)},"interface":${_so10(input.interface)},"test":${_so10(input.test)},"realize":${_so10(input.realize)}}`; const _so10 = input => `{"aggregate":${_so11(input.aggregate)},"initialize":${_so11(input.initialize)},"select":${_so11(input.select)},"cancel":${_so11(input.cancel)},"call":${_so11(input.call)},"describe":${_so11(input.describe)}}`; const _so11 = input => `{"total":${input.total},"input":${_so12(input.input)},"output":${_so13(input.output)}}`; const _so12 = input => `{"total":${input.total},"cached":${input.cached}}`; const _so13 = input => `{"total":${input.total},"reasoning":${input.reasoning},"accepted_prediction":${input.accepted_prediction},"rejected_prediction":${input.rejected_prediction}}`; const _io1 = input => "object" === typeof input.aggregate && null !== input.aggregate && _io2(input.aggregate) && ("object" === typeof input.initialize && null !== input.initialize && _io2(input.initialize)) && ("object" === typeof input.select && null !== input.select && _io2(input.select)) && ("object" === typeof input.cancel && null !== input.cancel && _io2(input.cancel)) && ("object" === typeof input.call && null !== input.call && _io2(input.call)) && ("object" === typeof input.describe && null !== input.describe && _io2(input.describe)); const _io2 = input => "number" === typeof input.total && ("object" === typeof input.input && null !== input.input && _io3(input.input)) && ("object" === typeof input.output && null !== input.output && _io4(input.output)); const _io3 = input => "number" === typeof input.total && "number" === typeof input.cached; const _io4 = input => "number" === typeof input.total && "number" === typeof input.reasoning && "number" === typeof input.accepted_prediction && "number" === typeof input.rejected_prediction; const _io5 = input => "object" === typeof input.aggregate && null !== input.aggregate && _io6(input.aggregate) && ("object" === typeof input.initialize && null !== input.initialize && _io6(input.initialize)) && ("object" === typeof input.select && null !== input.select && _io6(input.select)) && ("object" === typeof input.cancel && null !== input.cancel && _io6(input.cancel)) && ("object" === typeof input.call && null !== input.call && _io6(input.call)) && ("object" === typeof input.describe && null !== input.describe && _io6(input.describe)); const _io6 = input => "number" === typeof input.total && ("object" === typeof input.input && null !== input.input && _io7(input.input)) && ("object" === typeof input.output && null !== input.output && _io8(input.output)); const _io7 = input => "number" === typeof input.total && "number" === typeof input.cached; const _io8 = input => "number" === typeof input.total && "number" === typeof input.reasoning && "number" === typeof input.accepted_prediction && "number" === typeof input.rejected_prediction; const _io10 = input => "object" === typeof input.aggregate && null !== input.aggregate && _io11(input.aggregate) && ("object" === typeof input.initialize && null !== input.initialize && _io11(input.initialize)) && ("object" === typeof input.select && null !== input.select && _io11(input.select)) && ("object" === typeof input.cancel && null !== input.cancel && _io11(input.cancel)) && ("object" === typeof input.call && null !== input.call && _io11(input.call)) && ("object" === typeof input.describe && null !== input.describe && _io11(input.describe)); const _io11 = input => "number" === typeof input.total && ("object" === typeof input.input && null !== input.input && _io12(input.input)) && ("object" === typeof input.output && null !== input.output && _io13(input.output)); const _io12 = input => "number" === typeof input.total && "number" === typeof input.cached; const _io13 = input => "number" === typeof input.total && "number" === typeof input.reasoning && "number" === typeof input.accepted_prediction && "number" === typeof input.rejected_prediction; return input => _so9(input.toJSON()); })()(tokenUsage),
|
|
303
|
+
});
|
|
304
|
+
return ret;
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
//# sourceMappingURL=getAutoBeGenerated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAutoBeGenerated.js","sourceRoot":"","sources":["../../src/factory/getAutoBeGenerated.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,gDAoGC;;;;;;;AA1GD,kDAA0B;AAM1B,SAAsB,kBAAkB,CACtC,GAAyB,EACzB,SAA0B,EAC1B,UAA4B,EAC5B,OAAyC;;;QAEzC,MAAM,KAAK,GAAgB,GAAG,CAAC,KAAK,EAAE,CAAC;QACvC,MAAM,GAAG,GAA2B,EAAE,CAAC;QAEvC,UAAU;QACV,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI;YAAE,OAAO,EAAE,CAAC;QACtC,MAAM,CAAC,MAAM,CACX,GAAG,EACH,MAAM,CAAC,WAAW,CAChB,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC;YACxD,iBAAiB,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE;YACxC,KAAK;SACN,CAAC,CACH,CACF,CAAC;QAEF,SAAS;QACT,MAAM,QAAQ,GAAoB,MAAM,GAAG,CAAC,QAAQ,EAAE,CAAC;QACvD,IAAI,CAAA,MAAA,KAAK,CAAC,MAAM,0CAAE,IAAI,MAAK,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YAC9C,MAAM,WAAW,GACf,CAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,mCAAI,UAAU,CAAC,KAAK,UAAU;gBAC1C,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO;gBACtB,CAAC,CAAC,MAAM,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAQ,CAAC,IAAK,CAAC,CAAC;YAC5E,MAAM,CAAC,MAAM,CAKX,GAAG,EACH,MAAM,CAAC,WAAW,CAChB,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC;gBAChD,iBAAiB,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE;gBACxC,KAAK;aACN,CAAC,CACH,EACD;gBACE,oBAAoB,uvKAAuB,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;aACrE,CACF,CAAC;YACF,IAAI,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,KAAK,SAAS;gBAC1C,GAAG,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC;iBACjD,IAAI,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,KAAK,SAAS;gBAC/C,GAAG,CAAC,iCAAiC,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;QAC1E,CAAC;QAED,YAAY;QACZ,IAAI,CAAA,MAAA,KAAK,CAAC,SAAS,0CAAE,IAAI,MAAK,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YACjD,MAAM,KAAK,GAA2B,MAAM,QAAQ,CAAC,SAAS,CAAC,KAAK,CAClE,KAAK,CAAC,SAAS,CAAC,QAAQ,CACzB,CAAC;YACF,MAAM,CAAC,MAAM,CAKX,GAAG,EACH,CAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,IAAI,MAAK,KAAK,CAAC,SAAS,CAAC,IAAI;gBACvC,CAAC,CAAC,MAAM,CAAC,WAAW,CAChB,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAC1B,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,KAAK,CACtD,CACF;gBACH,CAAC,CAAC,KAAK,EACT;gBACE,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;wDAAuB,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC;aACvE,CACF,CAAC;QACJ,CAAC;QAED,OAAO;QACP,IAAI,CAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,IAAI,MAAK,KAAK,CAAC,OAAO,CAAC,IAAI;YACzC,MAAM,CAAC,MAAM,CAKX,GAAG,EACH,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EACxE,MAAM,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,CAClC,CAAC;QAEJ,UAAU;QACV,IAAI,CAAA,MAAA,KAAK,CAAC,OAAO,0CAAE,IAAI,MAAK,KAAK,CAAC,OAAO,CAAC,IAAI;YAC5C,MAAM,CAAC,MAAM,CAIX,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,QAAQ,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;QAEpE,UAAU;QACV,MAAM,CAAC,MAAM,CAAiD,GAAG,EAAE;YACjE,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uFAAuB,SAAS,CAAC;YACxD,wBAAwB,+5JAAuB,UAAU,CAAC;SAC3D,CAAC,CAAC;QACH,OAAO,GAAG,CAAC;IACb,CAAC;CAAA"}
|