diff --git a/dist/functions/server/watcher-esbuild-ctx.js b/dist/functions/server/watcher-esbuild-ctx.js index c7b53ef..0344491 100644 --- a/dist/functions/server/watcher-esbuild-ctx.js +++ b/dist/functions/server/watcher-esbuild-ctx.js @@ -57,6 +57,8 @@ export default async function watcherEsbuildCTX() { return; if (filename.match(/\/(--|\()/)) return; + if (filename.match(/ /)) + return; if (global.RECOMPILING) return; const action = existsSync(full_file_path) ? "created" : "deleted"; diff --git a/dist/functions/server/watcher.js b/dist/functions/server/watcher.js index 7c1fa63..0af8ea3 100644 --- a/dist/functions/server/watcher.js +++ b/dist/functions/server/watcher.js @@ -45,7 +45,7 @@ export default async function watcher() { } if (!filename.match(/^src\/pages\/|\.css$/)) return; - if (filename.match(/\/(--|\()/)) + if (filename.match(/\/(--|\(| )/)) return; if (global.RECOMPILING) return; diff --git a/dist/functions/server/web-pages/grab-page-bundled-react-component.js b/dist/functions/server/web-pages/grab-page-bundled-react-component.js index 7aa6e1c..ca5a65e 100644 --- a/dist/functions/server/web-pages/grab-page-bundled-react-component.js +++ b/dist/functions/server/web-pages/grab-page-bundled-react-component.js @@ -1,6 +1,7 @@ import { jsx as _jsx } from "react/jsx-runtime"; import grabPageReactComponentString from "./grab-page-react-component-string"; import grabTsxStringModule from "./grab-tsx-string-module"; +import { log } from "../../../utils/log"; export default async function grabPageBundledReactComponent({ file_path, root_file_path, server_res, }) { try { let tsx = grabPageReactComponentString({ @@ -21,6 +22,7 @@ export default async function grabPageBundledReactComponent({ file_path, root_fi }; } catch (error) { + log.error(`grabPageBundledReactComponent Error: ${error.message}`); return undefined; } } diff --git a/dist/functions/server/web-pages/grab-page-component.js b/dist/functions/server/web-pages/grab-page-component.js index 6ca61d6..0192576 100644 --- a/dist/functions/server/web-pages/grab-page-component.js +++ b/dist/functions/server/web-pages/grab-page-component.js @@ -1,11 +1,7 @@ import grabRouteParams from "../../../utils/grab-route-params"; import grabPageErrorComponent from "./grab-page-error-component"; -import grabPageBundledReactComponent from "./grab-page-bundled-react-component"; import _ from "lodash"; import { log } from "../../../utils/log"; -import grabRootFilePath from "./grab-root-file-path"; -import grabPageServerRes from "./grab-page-server-res"; -import grabPageServerPath from "./grab-page-server-path"; import grabPageModules from "./grab-page-modules"; import grabPageCombinedServerRes from "./grab-page-combined-server-res"; class NotFoundError extends Error { diff --git a/dist/functions/server/web-pages/grab-page-react-component-string.js b/dist/functions/server/web-pages/grab-page-react-component-string.js index 54d3471..6a3c79f 100644 --- a/dist/functions/server/web-pages/grab-page-react-component-string.js +++ b/dist/functions/server/web-pages/grab-page-react-component-string.js @@ -1,4 +1,5 @@ import EJSON from "../../../utils/ejson"; +import { log } from "../../../utils/log"; import pagePathTransform from "../../../utils/page-path-transform"; export default function grabPageReactComponentString({ file_path, root_file_path, server_res, }) { try { @@ -31,6 +32,7 @@ export default function grabPageReactComponentString({ file_path, root_file_path return tsx; } catch (error) { + log.error(`grabPageReactComponentString Error: ${error.message}`); return undefined; } } diff --git a/package.json b/package.json index 2efcab6..b5f7776 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@moduletrace/bunext", "module": "index.ts", "type": "module", - "version": "1.0.45", + "version": "1.0.46", "main": "dist/index.js", "types": "dist/index.d.ts", "exports": { diff --git a/src/functions/server/watcher-esbuild-ctx.ts b/src/functions/server/watcher-esbuild-ctx.ts index cf8336d..9ba03af 100644 --- a/src/functions/server/watcher-esbuild-ctx.ts +++ b/src/functions/server/watcher-esbuild-ctx.ts @@ -79,6 +79,7 @@ export default async function watcherEsbuildCTX() { if (!filename.match(/^src\/pages\/|\.css$/)) return; if (filename.match(/\/(--|\()/)) return; + if (filename.match(/ /)) return; if (global.RECOMPILING) return; diff --git a/src/functions/server/watcher.ts b/src/functions/server/watcher.ts index 2a0dc48..f2bc8c1 100644 --- a/src/functions/server/watcher.ts +++ b/src/functions/server/watcher.ts @@ -59,7 +59,7 @@ export default async function watcher() { } if (!filename.match(/^src\/pages\/|\.css$/)) return; - if (filename.match(/\/(--|\()/)) return; + if (filename.match(/\/(--|\(| )/)) return; if (global.RECOMPILING) return; diff --git a/src/functions/server/web-pages/grab-page-bundled-react-component.tsx b/src/functions/server/web-pages/grab-page-bundled-react-component.tsx index a8d72ce..65a2875 100644 --- a/src/functions/server/web-pages/grab-page-bundled-react-component.tsx +++ b/src/functions/server/web-pages/grab-page-bundled-react-component.tsx @@ -1,7 +1,7 @@ -import type { JSX } from "react"; import type { GrabPageReactBundledComponentRes } from "../../../types"; import grabPageReactComponentString from "./grab-page-react-component-string"; import grabTsxStringModule from "./grab-tsx-string-module"; +import { log } from "../../../utils/log"; type Params = { file_path: string; @@ -35,6 +35,7 @@ export default async function grabPageBundledReactComponent({ tsx, }; } catch (error: any) { + log.error(`grabPageBundledReactComponent Error: ${error.message}`); return undefined; } } diff --git a/src/functions/server/web-pages/grab-page-component.tsx b/src/functions/server/web-pages/grab-page-component.tsx index 520216a..2b1106f 100644 --- a/src/functions/server/web-pages/grab-page-component.tsx +++ b/src/functions/server/web-pages/grab-page-component.tsx @@ -1,19 +1,8 @@ import grabRouteParams from "../../../utils/grab-route-params"; -import type { - BunextPageModule, - BunextPageModuleServerReturn, - BunextPageServerModule, - BunextRootModule, - BunxRouteParams, - GrabPageComponentRes, -} from "../../../types"; +import type { BunxRouteParams, GrabPageComponentRes } from "../../../types"; import grabPageErrorComponent from "./grab-page-error-component"; -import grabPageBundledReactComponent from "./grab-page-bundled-react-component"; import _ from "lodash"; import { log } from "../../../utils/log"; -import grabRootFilePath from "./grab-root-file-path"; -import grabPageServerRes from "./grab-page-server-res"; -import grabPageServerPath from "./grab-page-server-path"; import grabPageModules from "./grab-page-modules"; import grabPageCombinedServerRes from "./grab-page-combined-server-res"; diff --git a/src/functions/server/web-pages/grab-page-react-component-string.tsx b/src/functions/server/web-pages/grab-page-react-component-string.tsx index 9ff54ff..79cd165 100644 --- a/src/functions/server/web-pages/grab-page-react-component-string.tsx +++ b/src/functions/server/web-pages/grab-page-react-component-string.tsx @@ -1,4 +1,5 @@ import EJSON from "../../../utils/ejson"; +import { log } from "../../../utils/log"; import pagePathTransform from "../../../utils/page-path-transform"; type Params = { @@ -47,6 +48,7 @@ export default function grabPageReactComponentString({ return tsx; } catch (error: any) { + log.error(`grabPageReactComponentString Error: ${error.message}`); return undefined; } }