Handle browser Errors.
This commit is contained in:
Vendored
+31
@@ -0,0 +1,31 @@
|
||||
import { type ExecSyncOptions } from "child_process";
|
||||
declare const BuildKeys: readonly [{
|
||||
readonly key: "production";
|
||||
}, {
|
||||
readonly key: "bytecode";
|
||||
}, {
|
||||
readonly key: "conditions";
|
||||
}, {
|
||||
readonly key: "format";
|
||||
}, {
|
||||
readonly key: "root";
|
||||
}, {
|
||||
readonly key: "splitting";
|
||||
}, {
|
||||
readonly key: "cdd-chunking";
|
||||
}];
|
||||
type Params = {
|
||||
src: string;
|
||||
out_dir: string;
|
||||
entry_naming?: string;
|
||||
minify?: boolean;
|
||||
exec_options?: ExecSyncOptions;
|
||||
debug?: boolean;
|
||||
sourcemap?: boolean;
|
||||
target?: "browser" | "node" | "bun";
|
||||
build_options?: {
|
||||
[k in (typeof BuildKeys)[number]["key"]]: string | boolean;
|
||||
};
|
||||
};
|
||||
export default function bundle({ out_dir, src, minify, exec_options, debug, entry_naming, sourcemap, target, build_options, }: Params): void;
|
||||
export {};
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* # Convert Serialized Query back to object
|
||||
*/
|
||||
export default function deserializeQuery(query: string | {
|
||||
[s: string]: any;
|
||||
}): {
|
||||
[s: string]: any;
|
||||
};
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* # EJSON parse string
|
||||
*/
|
||||
declare function parse(string: string | null | number, reviver?: (this: any, key: string, value: any) => any): {
|
||||
[s: string]: any;
|
||||
} | {
|
||||
[s: string]: any;
|
||||
}[] | undefined;
|
||||
/**
|
||||
* # EJSON stringify object
|
||||
*/
|
||||
declare function stringify(value: any, replacer?: ((this: any, key: string, value: any) => any) | null, space?: string | number): string | undefined;
|
||||
declare const EJSON: {
|
||||
parse: typeof parse;
|
||||
stringify: typeof stringify;
|
||||
};
|
||||
export default EJSON;
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
export default function exitWithError(msg: string, code?: number): void;
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
import type { PageFiles } from "../types";
|
||||
type Params = {
|
||||
exclude_api?: boolean;
|
||||
};
|
||||
export default function grabAllPages(params?: Params): PageFiles[];
|
||||
export {};
|
||||
Vendored
+1
-1
@@ -26,7 +26,7 @@ function grabPageDirRecursively({ page_dir }) {
|
||||
if (page.match(new RegExp(`${AppNames["RootPagesComponentName"]}`))) {
|
||||
continue;
|
||||
}
|
||||
if (page.match(/\(|\)|--/)) {
|
||||
if (page.match(/\(|\)|--|\/api\//)) {
|
||||
continue;
|
||||
}
|
||||
const page_stat = statSync(full_page_path);
|
||||
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
declare const AppNames: {
|
||||
readonly defaultPort: 7000;
|
||||
readonly defaultAssetPrefix: "_bunext/static";
|
||||
readonly name: "Bunext";
|
||||
readonly version: "1.0.1";
|
||||
readonly defaultDistDir: ".bunext";
|
||||
readonly RootPagesComponentName: "__root";
|
||||
};
|
||||
export default AppNames;
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
export default function grabAppPort(): number;
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
export default function grabAssetsPrefix(): string;
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
export default function grabConstants(): {
|
||||
readonly ClientRootElementIDName: "__bunext";
|
||||
readonly ClientWindowPagePropsName: "__PAGE_PROPS__";
|
||||
readonly MBInBytes: number;
|
||||
readonly ServerDefaultRequestBodyLimitBytes: number;
|
||||
readonly ClientRootComponentWindowName: "BUNEXT_ROOT";
|
||||
readonly MaxBundlerRebuilds: 5;
|
||||
readonly config: import("../types").BunextConfig;
|
||||
};
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
export default function grabDirNames(): {
|
||||
ROOT_DIR: string;
|
||||
SRC_DIR: string;
|
||||
PAGES_DIR: string;
|
||||
API_DIR: string;
|
||||
PUBLIC_DIR: string;
|
||||
HYDRATION_DST_DIR: string;
|
||||
BUNX_ROOT_DIR: string;
|
||||
CONFIG_FILE: string;
|
||||
BUNX_TMP_DIR: string;
|
||||
BUNX_HYDRATION_SRC_DIR: string;
|
||||
BUNX_ROOT_SRC_DIR: string;
|
||||
BUNX_ROOT_PRESETS_DIR: string;
|
||||
BUNX_ROOT_500_PRESET_COMPONENT: string;
|
||||
BUNX_ROOT_500_FILE_NAME: string;
|
||||
BUNX_ROOT_404_PRESET_COMPONENT: string;
|
||||
BUNX_ROOT_404_FILE_NAME: string;
|
||||
HYDRATION_DST_DIR_MAP_JSON_FILE: string;
|
||||
BUNEXT_CACHE_DIR: string;
|
||||
BUNX_CWD_MODULE_CACHE_DIR: string;
|
||||
};
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
export default function grabOrigin(): string;
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
type Params = {
|
||||
path: string;
|
||||
};
|
||||
export default function grabPageName(params: Params): string;
|
||||
export {};
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
import type { BunxRouteParams } from "../types";
|
||||
type Params = {
|
||||
req: Request;
|
||||
};
|
||||
export default function grabRouteParams({ req, }: Params): Promise<BunxRouteParams>;
|
||||
export {};
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
export default function grabRouter(): import("bun").FileSystemRouter;
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
export default function isDevelopment(): boolean;
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
export declare const log: {
|
||||
info: (msg: string, log?: any) => void;
|
||||
success: (msg: string, log?: any) => void;
|
||||
error: (msg: string | Error) => void;
|
||||
warn: (msg: string) => void;
|
||||
build: (msg: string) => void;
|
||||
watch: (msg: string) => void;
|
||||
server: (url: string) => void;
|
||||
banner: () => void;
|
||||
};
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
export default function numberfy(num: any, decimals?: number): number;
|
||||
export declare const _n: typeof numberfy;
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
export default function refreshRouter(): void;
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
export default function registerDevPlugin(): void;
|
||||
Reference in New Issue
Block a user