fix cpoption
This commit is contained in:
parent
55e887e107
commit
03e0215ae7
|
|
@ -1,27 +1,136 @@
|
||||||
/// <reference types="react" />
|
|
||||||
/// <reference types="node" />
|
/// <reference types="node" />
|
||||||
|
/// <reference types="react" />
|
||||||
declare module "app/srv/api/npm-size" {
|
declare module "app/srv/api/npm-size" {
|
||||||
export const _: {
|
export const _: {
|
||||||
url: string;
|
url: string;
|
||||||
api(mode: "site" | "page", id: string): Promise<string>;
|
api(mode: "site" | "page", id: string): Promise<string>;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
declare module "app/srv/api/auth/session" {
|
declare module "app/srv/api/auth/login" {
|
||||||
|
export const _: {
|
||||||
|
url: string;
|
||||||
|
api(username: string, password: string): Promise<{
|
||||||
|
status: string;
|
||||||
|
session: any;
|
||||||
|
reason?: undefined;
|
||||||
|
} | {
|
||||||
|
status: string;
|
||||||
|
reason: string;
|
||||||
|
session?: undefined;
|
||||||
|
}>;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
declare module "app/srv/api/session" {
|
||||||
export const _: {
|
export const _: {
|
||||||
url: string;
|
url: string;
|
||||||
api(): Promise<any>;
|
api(): Promise<any>;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
declare module "app/srv/global" {
|
||||||
|
import { site, user } from "dbgen";
|
||||||
|
import { ExecaChildProcess } from "execa";
|
||||||
|
export const glb: {
|
||||||
|
lastUpdate: Record<string, number>;
|
||||||
|
prasiSrv: {
|
||||||
|
status: Record<string, "unavailable" | "installing" | "starting" | "started" | "stopped" | "destroying">;
|
||||||
|
running: Record<string, ExecaChildProcess>;
|
||||||
|
};
|
||||||
|
npm: {
|
||||||
|
page: Record<string, null | {
|
||||||
|
file: Buffer;
|
||||||
|
etag: string;
|
||||||
|
}>;
|
||||||
|
site: Record<string, null | {
|
||||||
|
file: Buffer;
|
||||||
|
etag: string;
|
||||||
|
}>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
export type Session = {
|
||||||
|
user: user & {
|
||||||
|
site: site[];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
declare module "app/srv/api/npm" {
|
||||||
|
export const _: {
|
||||||
|
url: string;
|
||||||
|
api(mode: "site" | "page", id: string): Promise<void>;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
declare module "app/srv/api/local-ip" {
|
||||||
|
export const _: {
|
||||||
|
url: string;
|
||||||
|
api(): Promise<string[]>;
|
||||||
|
};
|
||||||
|
}
|
||||||
declare module "app/srv/api/site-bundle" {
|
declare module "app/srv/api/site-bundle" {
|
||||||
export const _: {
|
export const _: {
|
||||||
url: string;
|
url: string;
|
||||||
api(mode: "md5" | "download"): Promise<string>;
|
api(mode: "md5" | "download"): Promise<string>;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
declare module "app/srv/api/site-dts" {
|
declare module "app/web/src/utils/types/ws" {
|
||||||
export const _: {
|
export type WS_MSG = WS_MSG_GET_COMP | WS_MSG_SET_COMP | WS_MSG_GET_PAGE | WS_MSG_SET_PAGE | WS_MSG_SV_LOCAL | WS_MSG_SVDIFF_REMOTE | WS_MSG_DIFF_LOCAL | WS_MSG_UNDO | WS_MSG_REDO | WS_MSG_NEW_COMP | WS_SITE_JS | {
|
||||||
url: string;
|
type: "ping";
|
||||||
api(site_id: string): Promise<string>;
|
} | {
|
||||||
|
type: "pong";
|
||||||
|
};
|
||||||
|
export type WS_SITE_JS = {
|
||||||
|
type: "site-js";
|
||||||
|
id_site: string;
|
||||||
|
src: string;
|
||||||
|
};
|
||||||
|
export type WS_MSG_GET_COMP = {
|
||||||
|
type: "get_comp";
|
||||||
|
comp_id: string;
|
||||||
|
};
|
||||||
|
export type WS_MSG_SET_COMP = {
|
||||||
|
type: "set_comp";
|
||||||
|
comp_id: string;
|
||||||
|
changes: string;
|
||||||
|
};
|
||||||
|
export type WS_MSG_GET_PAGE = {
|
||||||
|
type: "get_page";
|
||||||
|
page_id: string;
|
||||||
|
};
|
||||||
|
export type WS_MSG_SET_PAGE = {
|
||||||
|
type: "set_page";
|
||||||
|
changes: string;
|
||||||
|
};
|
||||||
|
export type WS_MSG_NEW_COMP = {
|
||||||
|
type: "new_comp";
|
||||||
|
id: string;
|
||||||
|
doc: string;
|
||||||
|
};
|
||||||
|
export type WS_MSG_UNDO = {
|
||||||
|
type: "undo";
|
||||||
|
mode: "page" | "site" | "comp";
|
||||||
|
id: string;
|
||||||
|
};
|
||||||
|
export type WS_MSG_REDO = {
|
||||||
|
type: "redo";
|
||||||
|
mode: "page" | "site" | "comp";
|
||||||
|
id: string;
|
||||||
|
};
|
||||||
|
export type WS_MSG_SV_LOCAL = {
|
||||||
|
type: "sv_local";
|
||||||
|
mode: "page" | "site" | "comp";
|
||||||
|
id: string;
|
||||||
|
sv_local: string;
|
||||||
|
};
|
||||||
|
export type WS_MSG_SVDIFF_REMOTE = {
|
||||||
|
type: "svd_remote";
|
||||||
|
mode: "page" | "site" | "comp";
|
||||||
|
id: string;
|
||||||
|
sv_remote: string;
|
||||||
|
diff_remote: string;
|
||||||
|
};
|
||||||
|
export type WS_MSG_DIFF_LOCAL = {
|
||||||
|
type: "diff_local";
|
||||||
|
mode: "page" | "site" | "comp";
|
||||||
|
id: string;
|
||||||
|
diff_local: string;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
declare module "app/web/src/utils/types/meta-fn" {
|
declare module "app/web/src/utils/types/meta-fn" {
|
||||||
|
|
@ -315,69 +424,6 @@ declare module "app/web/src/utils/types/general" {
|
||||||
item: ITEM;
|
item: ITEM;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
declare module "app/web/src/utils/types/ws" {
|
|
||||||
export type WS_MSG = WS_MSG_GET_COMP | WS_MSG_SET_COMP | WS_MSG_GET_PAGE | WS_MSG_SET_PAGE | WS_MSG_SV_LOCAL | WS_MSG_SVDIFF_REMOTE | WS_MSG_DIFF_LOCAL | WS_MSG_UNDO | WS_MSG_REDO | WS_MSG_NEW_COMP | WS_SITE_JS | {
|
|
||||||
type: "ping";
|
|
||||||
} | {
|
|
||||||
type: "pong";
|
|
||||||
};
|
|
||||||
export type WS_SITE_JS = {
|
|
||||||
type: "site-js";
|
|
||||||
id_site: string;
|
|
||||||
src: string;
|
|
||||||
};
|
|
||||||
export type WS_MSG_GET_COMP = {
|
|
||||||
type: "get_comp";
|
|
||||||
comp_id: string;
|
|
||||||
};
|
|
||||||
export type WS_MSG_SET_COMP = {
|
|
||||||
type: "set_comp";
|
|
||||||
comp_id: string;
|
|
||||||
changes: string;
|
|
||||||
};
|
|
||||||
export type WS_MSG_GET_PAGE = {
|
|
||||||
type: "get_page";
|
|
||||||
page_id: string;
|
|
||||||
};
|
|
||||||
export type WS_MSG_SET_PAGE = {
|
|
||||||
type: "set_page";
|
|
||||||
changes: string;
|
|
||||||
};
|
|
||||||
export type WS_MSG_NEW_COMP = {
|
|
||||||
type: "new_comp";
|
|
||||||
id: string;
|
|
||||||
doc: string;
|
|
||||||
};
|
|
||||||
export type WS_MSG_UNDO = {
|
|
||||||
type: "undo";
|
|
||||||
mode: "page" | "site" | "comp";
|
|
||||||
id: string;
|
|
||||||
};
|
|
||||||
export type WS_MSG_REDO = {
|
|
||||||
type: "redo";
|
|
||||||
mode: "page" | "site" | "comp";
|
|
||||||
id: string;
|
|
||||||
};
|
|
||||||
export type WS_MSG_SV_LOCAL = {
|
|
||||||
type: "sv_local";
|
|
||||||
mode: "page" | "site" | "comp";
|
|
||||||
id: string;
|
|
||||||
sv_local: string;
|
|
||||||
};
|
|
||||||
export type WS_MSG_SVDIFF_REMOTE = {
|
|
||||||
type: "svd_remote";
|
|
||||||
mode: "page" | "site" | "comp";
|
|
||||||
id: string;
|
|
||||||
sv_remote: string;
|
|
||||||
diff_remote: string;
|
|
||||||
};
|
|
||||||
export type WS_MSG_DIFF_LOCAL = {
|
|
||||||
type: "diff_local";
|
|
||||||
mode: "page" | "site" | "comp";
|
|
||||||
id: string;
|
|
||||||
diff_local: string;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
declare module "app/srv/ws/edit/tools/load-page" {
|
declare module "app/srv/ws/edit/tools/load-page" {
|
||||||
import { Page } from "app/web/src/utils/types/general";
|
import { Page } from "app/web/src/utils/types/general";
|
||||||
export const loadPage: (page_id: string) => Promise<Page>;
|
export const loadPage: (page_id: string) => Promise<Page>;
|
||||||
|
|
@ -552,38 +598,6 @@ declare module "app/srv/ws/edit/edit-global" {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
declare module "app/srv/api/page-reload" {
|
|
||||||
export const _: {
|
|
||||||
url: string;
|
|
||||||
api(page_id: string): Promise<string>;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
declare module "app/srv/global" {
|
|
||||||
import { site, user } from "dbgen";
|
|
||||||
import { ExecaChildProcess } from "execa";
|
|
||||||
export const glb: {
|
|
||||||
lastUpdate: Record<string, number>;
|
|
||||||
prasiSrv: {
|
|
||||||
status: Record<string, "unavailable" | "installing" | "starting" | "started" | "stopped" | "destroying">;
|
|
||||||
running: Record<string, ExecaChildProcess>;
|
|
||||||
};
|
|
||||||
npm: {
|
|
||||||
page: Record<string, null | {
|
|
||||||
file: Buffer;
|
|
||||||
etag: string;
|
|
||||||
}>;
|
|
||||||
site: Record<string, null | {
|
|
||||||
file: Buffer;
|
|
||||||
etag: string;
|
|
||||||
}>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
export type Session = {
|
|
||||||
user: user & {
|
|
||||||
site: site[];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
declare module "app/srv/api/npm-bundle" {
|
declare module "app/srv/api/npm-bundle" {
|
||||||
export type NPMImportAs = {
|
export type NPMImportAs = {
|
||||||
main: {
|
main: {
|
||||||
|
|
@ -598,10 +612,10 @@ declare module "app/srv/api/npm-bundle" {
|
||||||
api(mode: "site" | "page", id: string): Promise<any>;
|
api(mode: "site" | "page", id: string): Promise<any>;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
declare module "app/srv/api/npm" {
|
declare module "app/srv/api/site-dts" {
|
||||||
export const _: {
|
export const _: {
|
||||||
url: string;
|
url: string;
|
||||||
api(mode: "site" | "page", id: string): Promise<void>;
|
api(site_id: string): Promise<string>;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
declare module "app/srv/api/site-export" {
|
declare module "app/srv/api/site-export" {
|
||||||
|
|
@ -610,24 +624,10 @@ declare module "app/srv/api/site-export" {
|
||||||
api(site_id: string): Promise<void>;
|
api(site_id: string): Promise<void>;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
declare module "app/srv/api/auth/login" {
|
declare module "app/srv/api/page-reload" {
|
||||||
export const _: {
|
export const _: {
|
||||||
url: string;
|
url: string;
|
||||||
api(username: string, password: string): Promise<{
|
api(page_id: string): Promise<string>;
|
||||||
status: string;
|
|
||||||
session: any;
|
|
||||||
reason?: undefined;
|
|
||||||
} | {
|
|
||||||
status: string;
|
|
||||||
reason: string;
|
|
||||||
session?: undefined;
|
|
||||||
}>;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
declare module "app/srv/api/local-ip" {
|
|
||||||
export const _: {
|
|
||||||
url: string;
|
|
||||||
api(): Promise<string[]>;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
declare module "app/srv/exports" {
|
declare module "app/srv/exports" {
|
||||||
|
|
@ -638,40 +638,19 @@ declare module "app/srv/exports" {
|
||||||
args: string[];
|
args: string[];
|
||||||
handler: Promise<typeof import("app/srv/api/npm-size")>;
|
handler: Promise<typeof import("app/srv/api/npm-size")>;
|
||||||
};
|
};
|
||||||
|
export const login: {
|
||||||
|
name: string;
|
||||||
|
url: string;
|
||||||
|
path: string;
|
||||||
|
args: string[];
|
||||||
|
handler: Promise<typeof import("app/srv/api/auth/login")>;
|
||||||
|
};
|
||||||
export const session: {
|
export const session: {
|
||||||
name: string;
|
name: string;
|
||||||
url: string;
|
url: string;
|
||||||
path: string;
|
path: string;
|
||||||
args: any[];
|
args: any[];
|
||||||
handler: Promise<typeof import("app/srv/api/auth/session")>;
|
handler: Promise<typeof import("app/srv/api/session")>;
|
||||||
};
|
|
||||||
export const site_bundle: {
|
|
||||||
name: string;
|
|
||||||
url: string;
|
|
||||||
path: string;
|
|
||||||
args: string[];
|
|
||||||
handler: Promise<typeof import("app/srv/api/site-bundle")>;
|
|
||||||
};
|
|
||||||
export const site_dts: {
|
|
||||||
name: string;
|
|
||||||
url: string;
|
|
||||||
path: string;
|
|
||||||
args: string[];
|
|
||||||
handler: Promise<typeof import("app/srv/api/site-dts")>;
|
|
||||||
};
|
|
||||||
export const page_reload: {
|
|
||||||
name: string;
|
|
||||||
url: string;
|
|
||||||
path: string;
|
|
||||||
args: string[];
|
|
||||||
handler: Promise<typeof import("app/srv/api/page-reload")>;
|
|
||||||
};
|
|
||||||
export const npm_bundle: {
|
|
||||||
name: string;
|
|
||||||
url: string;
|
|
||||||
path: string;
|
|
||||||
args: string[];
|
|
||||||
handler: Promise<typeof import("app/srv/api/npm-bundle")>;
|
|
||||||
};
|
};
|
||||||
export const npm: {
|
export const npm: {
|
||||||
name: string;
|
name: string;
|
||||||
|
|
@ -680,6 +659,34 @@ declare module "app/srv/exports" {
|
||||||
args: string[];
|
args: string[];
|
||||||
handler: Promise<typeof import("app/srv/api/npm")>;
|
handler: Promise<typeof import("app/srv/api/npm")>;
|
||||||
};
|
};
|
||||||
|
export const local_ip: {
|
||||||
|
name: string;
|
||||||
|
url: string;
|
||||||
|
path: string;
|
||||||
|
args: any[];
|
||||||
|
handler: Promise<typeof import("app/srv/api/local-ip")>;
|
||||||
|
};
|
||||||
|
export const site_bundle: {
|
||||||
|
name: string;
|
||||||
|
url: string;
|
||||||
|
path: string;
|
||||||
|
args: string[];
|
||||||
|
handler: Promise<typeof import("app/srv/api/site-bundle")>;
|
||||||
|
};
|
||||||
|
export const npm_bundle: {
|
||||||
|
name: string;
|
||||||
|
url: string;
|
||||||
|
path: string;
|
||||||
|
args: string[];
|
||||||
|
handler: Promise<typeof import("app/srv/api/npm-bundle")>;
|
||||||
|
};
|
||||||
|
export const site_dts: {
|
||||||
|
name: string;
|
||||||
|
url: string;
|
||||||
|
path: string;
|
||||||
|
args: string[];
|
||||||
|
handler: Promise<typeof import("app/srv/api/site-dts")>;
|
||||||
|
};
|
||||||
export const site_export: {
|
export const site_export: {
|
||||||
name: string;
|
name: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
|
@ -687,19 +694,12 @@ declare module "app/srv/exports" {
|
||||||
args: string[];
|
args: string[];
|
||||||
handler: Promise<typeof import("app/srv/api/site-export")>;
|
handler: Promise<typeof import("app/srv/api/site-export")>;
|
||||||
};
|
};
|
||||||
export const login: {
|
export const page_reload: {
|
||||||
name: string;
|
name: string;
|
||||||
url: string;
|
url: string;
|
||||||
path: string;
|
path: string;
|
||||||
args: string[];
|
args: string[];
|
||||||
handler: Promise<typeof import("app/srv/api/auth/login")>;
|
handler: Promise<typeof import("app/srv/api/page-reload")>;
|
||||||
};
|
|
||||||
export const local_ip: {
|
|
||||||
name: string;
|
|
||||||
url: string;
|
|
||||||
path: string;
|
|
||||||
args: any[];
|
|
||||||
handler: Promise<typeof import("app/srv/api/local-ip")>;
|
|
||||||
};
|
};
|
||||||
export const _upload: {
|
export const _upload: {
|
||||||
name: string;
|
name: string;
|
||||||
|
|
@ -715,6 +715,13 @@ declare module "app/srv/exports" {
|
||||||
args: any[];
|
args: any[];
|
||||||
handler: Promise<any>;
|
handler: Promise<any>;
|
||||||
};
|
};
|
||||||
|
export const _file: {
|
||||||
|
name: string;
|
||||||
|
url: string;
|
||||||
|
path: string;
|
||||||
|
args: any[];
|
||||||
|
handler: Promise<any>;
|
||||||
|
};
|
||||||
export const _api_frm: {
|
export const _api_frm: {
|
||||||
name: string;
|
name: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
|
@ -729,11 +736,4 @@ declare module "app/srv/exports" {
|
||||||
args: string[];
|
args: string[];
|
||||||
handler: Promise<any>;
|
handler: Promise<any>;
|
||||||
};
|
};
|
||||||
export const _file: {
|
|
||||||
name: string;
|
|
||||||
url: string;
|
|
||||||
path: string;
|
|
||||||
args: any[];
|
|
||||||
handler: Promise<any>;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,55 +5,6 @@ export const npm_size = {
|
||||||
args: ["mode","id"],
|
args: ["mode","id"],
|
||||||
handler: import("./api/npm-size")
|
handler: import("./api/npm-size")
|
||||||
}
|
}
|
||||||
export const session = {
|
|
||||||
name: "session",
|
|
||||||
url: "/_session",
|
|
||||||
path: "app/srv/api/auth/session.ts",
|
|
||||||
args: [],
|
|
||||||
handler: import("./api/auth/session")
|
|
||||||
}
|
|
||||||
export const site_bundle = {
|
|
||||||
name: "site_bundle",
|
|
||||||
url: "/site-bundle/:mode",
|
|
||||||
path: "app/srv/api/site-bundle.ts",
|
|
||||||
args: ["mode"],
|
|
||||||
handler: import("./api/site-bundle")
|
|
||||||
}
|
|
||||||
export const site_dts = {
|
|
||||||
name: "site_dts",
|
|
||||||
url: "/site-dts/:site_id",
|
|
||||||
path: "app/srv/api/site-dts.ts",
|
|
||||||
args: ["site_id"],
|
|
||||||
handler: import("./api/site-dts")
|
|
||||||
}
|
|
||||||
export const page_reload = {
|
|
||||||
name: "page_reload",
|
|
||||||
url: "/page-reload/:page_id",
|
|
||||||
path: "app/srv/api/page-reload.ts",
|
|
||||||
args: ["page_id"],
|
|
||||||
handler: import("./api/page-reload")
|
|
||||||
}
|
|
||||||
export const npm_bundle = {
|
|
||||||
name: "npm_bundle",
|
|
||||||
url: "/npm-bundle/:mode/:id",
|
|
||||||
path: "app/srv/api/npm-bundle.ts",
|
|
||||||
args: ["mode","id"],
|
|
||||||
handler: import("./api/npm-bundle")
|
|
||||||
}
|
|
||||||
export const npm = {
|
|
||||||
name: "npm",
|
|
||||||
url: "/npm/:mode/:id/*",
|
|
||||||
path: "app/srv/api/npm.ts",
|
|
||||||
args: ["mode","id"],
|
|
||||||
handler: import("./api/npm")
|
|
||||||
}
|
|
||||||
export const site_export = {
|
|
||||||
name: "site_export",
|
|
||||||
url: "/site-export/:site_id",
|
|
||||||
path: "app/srv/api/site-export.ts",
|
|
||||||
args: ["site_id"],
|
|
||||||
handler: import("./api/site-export")
|
|
||||||
}
|
|
||||||
export const login = {
|
export const login = {
|
||||||
name: "login",
|
name: "login",
|
||||||
url: "/_login",
|
url: "/_login",
|
||||||
|
|
@ -61,6 +12,20 @@ export const login = {
|
||||||
args: ["username","password"],
|
args: ["username","password"],
|
||||||
handler: import("./api/auth/login")
|
handler: import("./api/auth/login")
|
||||||
}
|
}
|
||||||
|
export const session = {
|
||||||
|
name: "session",
|
||||||
|
url: "/session",
|
||||||
|
path: "app/srv/api/session.ts",
|
||||||
|
args: [],
|
||||||
|
handler: import("./api/session")
|
||||||
|
}
|
||||||
|
export const npm = {
|
||||||
|
name: "npm",
|
||||||
|
url: "/npm/:mode/:id/*",
|
||||||
|
path: "app/srv/api/npm.ts",
|
||||||
|
args: ["mode","id"],
|
||||||
|
handler: import("./api/npm")
|
||||||
|
}
|
||||||
export const local_ip = {
|
export const local_ip = {
|
||||||
name: "local_ip",
|
name: "local_ip",
|
||||||
url: "/local-ip",
|
url: "/local-ip",
|
||||||
|
|
@ -68,6 +33,41 @@ export const local_ip = {
|
||||||
args: [],
|
args: [],
|
||||||
handler: import("./api/local-ip")
|
handler: import("./api/local-ip")
|
||||||
}
|
}
|
||||||
|
export const site_bundle = {
|
||||||
|
name: "site_bundle",
|
||||||
|
url: "/site-bundle/:mode",
|
||||||
|
path: "app/srv/api/site-bundle.ts",
|
||||||
|
args: ["mode"],
|
||||||
|
handler: import("./api/site-bundle")
|
||||||
|
}
|
||||||
|
export const npm_bundle = {
|
||||||
|
name: "npm_bundle",
|
||||||
|
url: "/npm-bundle/:mode/:id",
|
||||||
|
path: "app/srv/api/npm-bundle.ts",
|
||||||
|
args: ["mode","id"],
|
||||||
|
handler: import("./api/npm-bundle")
|
||||||
|
}
|
||||||
|
export const site_dts = {
|
||||||
|
name: "site_dts",
|
||||||
|
url: "/site-dts/:site_id",
|
||||||
|
path: "app/srv/api/site-dts.ts",
|
||||||
|
args: ["site_id"],
|
||||||
|
handler: import("./api/site-dts")
|
||||||
|
}
|
||||||
|
export const site_export = {
|
||||||
|
name: "site_export",
|
||||||
|
url: "/site-export/:site_id",
|
||||||
|
path: "app/srv/api/site-export.ts",
|
||||||
|
args: ["site_id"],
|
||||||
|
handler: import("./api/site-export")
|
||||||
|
}
|
||||||
|
export const page_reload = {
|
||||||
|
name: "page_reload",
|
||||||
|
url: "/page-reload/:page_id",
|
||||||
|
path: "app/srv/api/page-reload.ts",
|
||||||
|
args: ["page_id"],
|
||||||
|
handler: import("./api/page-reload")
|
||||||
|
}
|
||||||
export const _upload = {
|
export const _upload = {
|
||||||
name: "_upload",
|
name: "_upload",
|
||||||
url: "/_upload",
|
url: "/_upload",
|
||||||
|
|
@ -82,6 +82,13 @@ export const _prasi = {
|
||||||
args: [],
|
args: [],
|
||||||
handler: import("./api/_prasi")
|
handler: import("./api/_prasi")
|
||||||
}
|
}
|
||||||
|
export const _file = {
|
||||||
|
name: "_file",
|
||||||
|
url: "/_file/*",
|
||||||
|
path: "app/srv/api/_file.ts",
|
||||||
|
args: [],
|
||||||
|
handler: import("./api/_file")
|
||||||
|
}
|
||||||
export const _api_frm = {
|
export const _api_frm = {
|
||||||
name: "_api_frm",
|
name: "_api_frm",
|
||||||
url: "/_api_frm",
|
url: "/_api_frm",
|
||||||
|
|
@ -95,11 +102,4 @@ export const _dbs = {
|
||||||
path: "app/srv/api/_dbs.ts",
|
path: "app/srv/api/_dbs.ts",
|
||||||
args: ["dbName","action"],
|
args: ["dbName","action"],
|
||||||
handler: import("./api/_dbs")
|
handler: import("./api/_dbs")
|
||||||
}
|
|
||||||
export const _file = {
|
|
||||||
name: "_file",
|
|
||||||
url: "/_file/*",
|
|
||||||
path: "app/srv/api/_file.ts",
|
|
||||||
args: [],
|
|
||||||
handler: import("./api/_file")
|
|
||||||
}
|
}
|
||||||
|
|
@ -21,7 +21,6 @@ export const CPOption: FC<CPArgs> = ({ prop, onChange, editCode, reset }) => {
|
||||||
if (prop.meta?.options || prop.meta?.optionsBuilt) {
|
if (prop.meta?.options || prop.meta?.optionsBuilt) {
|
||||||
if (!local.loaded) {
|
if (!local.loaded) {
|
||||||
try {
|
try {
|
||||||
local.loaded = true;
|
|
||||||
const args = {
|
const args = {
|
||||||
...window.exports,
|
...window.exports,
|
||||||
db: p.script.db,
|
db: p.script.db,
|
||||||
|
|
@ -58,8 +57,10 @@ else metaOptions = resOpt;
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
local.val = evalue;
|
if (Array.isArray(metaOptions)) {
|
||||||
local.render();
|
local.val = evalue;
|
||||||
|
local.render();
|
||||||
|
}
|
||||||
}, [evalue]);
|
}, [evalue]);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue