ship 1.4.53:Arcrun@db33cbe907dd
This commit is contained in:
@@ -15048,6 +15048,8 @@ init_webhook_handlers();
|
||||
// cypher-executor/src/lib/app-system.ts
|
||||
init_kbdb_proxy();
|
||||
init_webhook_handlers();
|
||||
var APP_UI_STYLES = ["inherit", "own"];
|
||||
var DEFAULT_APP_UI_STYLE = "inherit";
|
||||
var ID_RE = /^[a-z][a-z0-9_-]{0,63}$/;
|
||||
function validateAppDeclaration(raw2) {
|
||||
const errors = [];
|
||||
@@ -15092,6 +15094,12 @@ function validateAppDeclaration(raw2) {
|
||||
if (d.ui !== void 0 && !hasUi) {
|
||||
errors.push("ui.html \u5FC5\u586B\u4E14\u4E0D\u53EF\u7A7A\uFF08\u6709 ui \u6B04\u4F4D\u5C31\u8981\u6709\u756B\u9762\u5167\u5BB9\uFF09");
|
||||
}
|
||||
if (d.ui && typeof d.ui === "object") {
|
||||
const s = d.ui.style;
|
||||
if (s !== void 0 && (typeof s !== "string" || !APP_UI_STYLES.includes(s))) {
|
||||
errors.push(`ui.style \u53EA\u80FD\u662F ${APP_UI_STYLES.join(" \u6216 ")}\uFF08\u7701\u7565\uFF1D${DEFAULT_APP_UI_STYLE}\uFF0C\u8DDF\u96A8\u5168\u5C40\uFF09`);
|
||||
}
|
||||
}
|
||||
if (d.data !== void 0) {
|
||||
if (!Array.isArray(d.data)) {
|
||||
errors.push("data \u5FC5\u9808\u662F\u9663\u5217");
|
||||
@@ -15238,6 +15246,7 @@ async function installApp(env, tenant2, rawDecl) {
|
||||
data_templates: decl.data.map((d) => d.name),
|
||||
has_ui: Boolean(uiHtml),
|
||||
ui_html: uiHtml,
|
||||
ui_style: uiHtml ? decl.ui?.style ?? DEFAULT_APP_UI_STYLE : void 0,
|
||||
keeps_data: decl.keeps_data,
|
||||
installed_at: existing?.installed_at ?? (/* @__PURE__ */ new Date()).toISOString(),
|
||||
updated_at: (/* @__PURE__ */ new Date()).toISOString(),
|
||||
@@ -15290,6 +15299,9 @@ function detailApp(app2) {
|
||||
version: app2.version,
|
||||
has_ui: app2.has_ui,
|
||||
ui_html: app2.ui_html,
|
||||
// 舊安裝態(v0.1 裝的 App)沒有這一欄——一律當「跟隨全局」,不是「維持原樣」。
|
||||
// 那正是 leo 抱怨的那個狀態,預設值要把它修好,不是把它保留下來。
|
||||
ui_style: app2.ui_style ?? DEFAULT_APP_UI_STYLE,
|
||||
workflows: app2.workflows.map((w) => ({ name: w.name, description: w.description })),
|
||||
actions: app2.actions
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user