kebalik
This commit is contained in:
parent
7ba10c820e
commit
674a39fdca
|
|
@ -6,18 +6,26 @@ declare module "app/srv/api/npm-size" {
|
||||||
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/api/site-dts" {
|
|
||||||
export const _: {
|
|
||||||
url: string;
|
|
||||||
api(site_id: string): Promise<string>;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
declare module "app/srv/global" {
|
declare module "app/srv/global" {
|
||||||
import { site, user } from "dbgen";
|
import { site, user } from "dbgen";
|
||||||
import { ExecaChildProcess } from "execa";
|
import { ExecaChildProcess } from "execa";
|
||||||
|
|
@ -44,6 +52,18 @@ declare module "app/srv/global" {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
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/web/src/utils/types/ws" {
|
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 | {
|
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: "ping";
|
||||||
|
|
@ -586,30 +606,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/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/local-ip" {
|
|
||||||
export const _: {
|
|
||||||
url: string;
|
|
||||||
api(): Promise<string[]>;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
declare module "app/srv/exports" {
|
declare module "app/srv/exports" {
|
||||||
|
|
@ -620,26 +620,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_dts: {
|
|
||||||
name: string;
|
|
||||||
url: string;
|
|
||||||
path: string;
|
|
||||||
args: string[];
|
|
||||||
handler: Promise<typeof import("app/srv/api/site-dts")>;
|
|
||||||
};
|
|
||||||
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;
|
||||||
|
|
@ -648,13 +641,6 @@ 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 login: {
|
|
||||||
name: string;
|
|
||||||
url: string;
|
|
||||||
path: string;
|
|
||||||
args: string[];
|
|
||||||
handler: Promise<typeof import("app/srv/api/auth/login")>;
|
|
||||||
};
|
|
||||||
export const local_ip: {
|
export const local_ip: {
|
||||||
name: string;
|
name: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
|
@ -662,6 +648,20 @@ declare module "app/srv/exports" {
|
||||||
args: any[];
|
args: any[];
|
||||||
handler: Promise<typeof import("app/srv/api/local-ip")>;
|
handler: Promise<typeof import("app/srv/api/local-ip")>;
|
||||||
};
|
};
|
||||||
|
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 _upload: {
|
export const _upload: {
|
||||||
name: string;
|
name: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
|
@ -676,6 +676,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;
|
||||||
|
|
@ -690,11 +697,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,34 +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_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 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 login = {
|
export const login = {
|
||||||
name: "login",
|
name: "login",
|
||||||
url: "/_login",
|
url: "/_login",
|
||||||
|
|
@ -40,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",
|
||||||
|
|
@ -47,6 +33,20 @@ export const local_ip = {
|
||||||
args: [],
|
args: [],
|
||||||
handler: import("./api/local-ip")
|
handler: import("./api/local-ip")
|
||||||
}
|
}
|
||||||
|
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 _upload = {
|
export const _upload = {
|
||||||
name: "_upload",
|
name: "_upload",
|
||||||
url: "/_upload",
|
url: "/_upload",
|
||||||
|
|
@ -61,6 +61,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",
|
||||||
|
|
@ -75,10 +82,3 @@ export const _dbs = {
|
||||||
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")
|
|
||||||
}
|
|
||||||
|
|
@ -7,8 +7,8 @@
|
||||||
"clean": "rm -rf app/static && rm -rf app/web/.parcel-cache",
|
"clean": "rm -rf app/static && rm -rf app/web/.parcel-cache",
|
||||||
"build": "bun run --silent ./pkgs/core/build.ts",
|
"build": "bun run --silent ./pkgs/core/build.ts",
|
||||||
"db-pull": "bun run --silent ./pkgs/core/db-pull.ts",
|
"db-pull": "bun run --silent ./pkgs/core/db-pull.ts",
|
||||||
"local-prod": "bun run --silent ./pkgs/core/index.ts",
|
"prod": "bun run --silent ./pkgs/core/index.ts",
|
||||||
"prod": "bun run build && bun run deploy && bun run ./pkgs/core/index.ts",
|
"local-prod": "bun run build && bun run deploy && bun run ./pkgs/core/index.ts",
|
||||||
"pull": "cd app/db && bun prisma db pull && bun prisma generate",
|
"pull": "cd app/db && bun prisma db pull && bun prisma generate",
|
||||||
"pkgs-upgrade": "bun run --silent ./pkgs/core/upgrade.ts"
|
"pkgs-upgrade": "bun run --silent ./pkgs/core/upgrade.ts"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue