@autobe/ui 0.29.1 → 0.29.2
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.
|
@@ -20,7 +20,7 @@ const react_1 = require("react");
|
|
|
20
20
|
const tstl_1 = require("tstl");
|
|
21
21
|
const common_1 = require("./common");
|
|
22
22
|
const AutoBeCompleteEventMovie = (props) => {
|
|
23
|
-
const
|
|
23
|
+
const phase = getPhase(props.event);
|
|
24
24
|
const [size, setSize] = (0, react_1.useState)(null);
|
|
25
25
|
const [downloading, setDownloading] = (0, react_1.useState)(false);
|
|
26
26
|
const getFiles = (dbms) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -28,7 +28,7 @@ const AutoBeCompleteEventMovie = (props) => {
|
|
|
28
28
|
try {
|
|
29
29
|
const result = yield props.getFiles({
|
|
30
30
|
dbms,
|
|
31
|
-
|
|
31
|
+
phase,
|
|
32
32
|
});
|
|
33
33
|
return result;
|
|
34
34
|
}
|
|
@@ -120,7 +120,7 @@ const AutoBeCompleteEventMovie = (props) => {
|
|
|
120
120
|
cursor: "not-allowed",
|
|
121
121
|
fontSize: "0.875rem",
|
|
122
122
|
color: "#6b7280",
|
|
123
|
-
}, children: "\u23F3 Downloading Source Codes..." })) : props.event.type === "analyzeComplete" ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ActionButton, { icon: "\uD83D\uDCE5", text: "Zip (SQLite)", onClick: () => download("sqlite"), title:
|
|
123
|
+
}, children: "\u23F3 Downloading Source Codes..." })) : props.event.type === "analyzeComplete" ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ActionButton, { icon: "\uD83D\uDCE5", text: "Zip (SQLite)", onClick: () => download("sqlite"), title: phase !== "analyze"
|
|
124
124
|
? "Download SQLite-based backend application (ideal for local development and testing)"
|
|
125
125
|
: "Download requirement analysis report" }), (0, jsx_runtime_1.jsx)(ActionButton, { icon: "\uD83D\uDE80", text: "StackBlitz", onClick: () => openStackBlitz(), variant: size !== null && size >= LIMIT ? "warning" : "primary", title: "Open project in StackBlitz for instant online development and testing" })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ActionButton, { icon: "\u2601\uFE0F", text: "Zip (Postgres)", onClick: () => download("postgres"), title: "Download PostgreSQL-based backend application (optimized for production deployment)" }), (0, jsx_runtime_1.jsx)(ActionButton, { icon: "\uD83D\uDCE5", text: "Zip (SQLite)", onClick: () => download("sqlite"), title: "Download SQLite-based backend application (ideal for local development and testing)" }), (0, jsx_runtime_1.jsx)(ActionButton, { icon: "\uD83D\uDE80", text: "StackBlitz", onClick: () => openStackBlitz(), variant: size !== null && size >= LIMIT ? "warning" : "primary", title: "Open project in StackBlitz for instant online development and testing" })] })) })] })] }));
|
|
126
126
|
};
|
|
@@ -189,7 +189,7 @@ const getMessage = (openStackBlitz, event) => {
|
|
|
189
189
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), "Succeeded to compose", " ", event.type === "testComplete" ? "test functions" : "realize functions", ", but failed to pass the TypeScript compilation. This is a bug of", " ", (0, jsx_runtime_1.jsx)("code", { children: "@autobe" }), ". Please", " ", (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/wrtnlabs/autobe/issues", target: "_blank", style: { color: "#3b82f6", textDecoration: "underline" }, children: "write a bug report to our repository" }), " ", "with the", " ", (0, jsx_runtime_1.jsx)("a", { href: "#", onClick: () => openStackBlitz(), style: { color: "#3b82f6", textDecoration: "underline" }, children: (0, jsx_runtime_1.jsx)("code", { children: "autobe/histories.json" }) }), " ", "file."] }));
|
|
190
190
|
return null;
|
|
191
191
|
};
|
|
192
|
-
const
|
|
192
|
+
const getPhase = (event) => {
|
|
193
193
|
if (event.type === "analyzeComplete")
|
|
194
194
|
return "analyze";
|
|
195
195
|
else if (event.type === "prismaComplete")
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autobe/ui",
|
|
3
3
|
"type": "commonjs",
|
|
4
|
-
"version": "0.29.
|
|
4
|
+
"version": "0.29.2",
|
|
5
5
|
"description": "AutoBE UI",
|
|
6
6
|
"author": "Wrtn Technologies",
|
|
7
7
|
"homepage": "https://autobe.dev",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"react-dom": "^19.1.1",
|
|
29
29
|
"typescript": "~5.9.3",
|
|
30
30
|
"vitest": "^2.0.0",
|
|
31
|
-
"@autobe/interface": "0.29.
|
|
31
|
+
"@autobe/interface": "0.29.2"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@stackblitz/sdk": "^1.11.0",
|
|
@@ -28,7 +28,7 @@ export interface IAutoBeCompleteEventMovieProps {
|
|
|
28
28
|
export const AutoBeCompleteEventMovie = (
|
|
29
29
|
props: IAutoBeCompleteEventMovieProps,
|
|
30
30
|
) => {
|
|
31
|
-
const
|
|
31
|
+
const phase = getPhase(props.event);
|
|
32
32
|
const [size, setSize] = useState<number | null>(null);
|
|
33
33
|
const [downloading, setDownloading] = useState(false);
|
|
34
34
|
|
|
@@ -37,7 +37,7 @@ export const AutoBeCompleteEventMovie = (
|
|
|
37
37
|
try {
|
|
38
38
|
const result = await props.getFiles({
|
|
39
39
|
dbms,
|
|
40
|
-
|
|
40
|
+
phase,
|
|
41
41
|
});
|
|
42
42
|
return result;
|
|
43
43
|
} catch (error) {
|
|
@@ -189,7 +189,7 @@ export const AutoBeCompleteEventMovie = (
|
|
|
189
189
|
text="Zip (SQLite)"
|
|
190
190
|
onClick={() => download("sqlite")}
|
|
191
191
|
title={
|
|
192
|
-
|
|
192
|
+
phase !== "analyze"
|
|
193
193
|
? "Download SQLite-based backend application (ideal for local development and testing)"
|
|
194
194
|
: "Download requirement analysis report"
|
|
195
195
|
}
|
|
@@ -385,7 +385,7 @@ const getMessage = (
|
|
|
385
385
|
return null;
|
|
386
386
|
};
|
|
387
387
|
|
|
388
|
-
const
|
|
388
|
+
const getPhase = (event: IAutoBeCompleteEventMovieProps["event"]) => {
|
|
389
389
|
if (event.type === "analyzeComplete") return "analyze";
|
|
390
390
|
else if (event.type === "prismaComplete") return "prisma";
|
|
391
391
|
else if (event.type === "interfaceComplete") return "interface";
|