diff --git a/.eslintignore b/.eslintignore index 77320ef911..282654ab2f 100644 --- a/.eslintignore +++ b/.eslintignore @@ -7,3 +7,5 @@ public scripts test-results *.config.js + +components/apps/Ocaps/dist \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 356b2843ce..c23358ae3e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,4 +39,4 @@ jobs: touch out/.nojekyll uses: JamesIves/github-pages-deploy-action@v4 with: - folder: out \ No newline at end of file + folder: out diff --git a/components/apps/NoodJs/index.tsx b/components/apps/NoodJs/index.tsx index c9d416a965..84b00741cd 100644 --- a/components/apps/NoodJs/index.tsx +++ b/components/apps/NoodJs/index.tsx @@ -35,9 +35,9 @@ const defaultRuntime = `{ }`; export type RuntimeConfig = { - libs: string[], - runtime: string, - transformInputSource?: (source: string) => string, + libs: string[]; + runtime: string; + transformInputSource?: (source: string) => string; }; export const defaultRuntimeConfig: RuntimeConfig = { @@ -141,5 +141,5 @@ const Browser: FC = ({ export default Browser; function escapeForScriptTag(str: string): string { - return str.replace(/<\/script>/gi, '<\\/script>'); + return str.replace(/<\/script>/gi, "<\\/script>"); } diff --git a/components/apps/Ocaps/daemon.ts b/components/apps/Ocaps/daemon.ts index 653491d902..b0952049c3 100644 --- a/components/apps/Ocaps/daemon.ts +++ b/components/apps/Ocaps/daemon.ts @@ -6,18 +6,18 @@ import { HelloPortMessage, type RpcMessage } from "./util"; main(); -async function main () { +async function main() { // @ts-ignore const { connectGuestPort } = await globalThis.startDaemon({ - makeWebWorker () { - console.log('making endo worker in subworker') - const worker = new Worker(new URL('./worker.ts', import.meta.url)); + makeWebWorker() { + console.log("making endo worker in subworker"); + const worker = new Worker(new URL("./worker.ts", import.meta.url)); return worker; - } - }) + }, + }); + + console.log("hello from daemon!"); - console.log('hello from daemon!') - addEventListener("message", (event) => { if (typeof event.data !== "object") return; /* eslint-disable-next-line @typescript-eslint/no-unsafe-member-access */ @@ -26,7 +26,7 @@ async function main () { const message = event.data as HelloPortMessage; const { appId } = message.params; const port = event.ports[0]; - console.log('daemon HELLO PORT', port, appId); + console.log("daemon HELLO PORT", port, appId); connectGuestPort(port, appId); } }); diff --git a/components/apps/Ocaps/index.tsx b/components/apps/Ocaps/index.tsx index 807f819cbd..1365261ccd 100644 --- a/components/apps/Ocaps/index.tsx +++ b/components/apps/Ocaps/index.tsx @@ -3,15 +3,15 @@ import type { ComponentProcessProps } from "components/system/Apps/RenderCompone import { useProcesses } from "contexts/process"; import { MessageEventHandler } from "hooks/usePostMessage"; import { useCallback, type FC } from "react"; -import WorkerEnvSource from './dist/dist-worker-env-bundle.js.raw'; +import WorkerEnvSource from "./dist/dist-worker-env-bundle.js.raw"; import { HelloPortMessage, RpcMessage } from "./util"; /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */ // @ts-ignore // no SSR let daemonWebWorker: Worker; -if (typeof window !== 'undefined') { - daemonWebWorker = new Worker(new URL('./daemon.ts', import.meta.url)); +if (typeof window !== "undefined") { + daemonWebWorker = new Worker(new URL("./daemon.ts", import.meta.url)); } const Browser: FC = (props) => { @@ -19,10 +19,10 @@ const Browser: FC = (props) => { const { processes: { [id]: process }, } = useProcesses(); - const url = process?.url || ''; + const url = process?.url || ""; const libs: string[] = []; - const runtime = `${WorkerEnvSource}` + const runtime = `${WorkerEnvSource}`; const runtimeConfig: RuntimeConfig = { libs, @@ -36,11 +36,14 @@ const Browser: FC = (props) => { const message = event.data as RpcMessage; if (message.type === "HELLO_PORT") { const port = event.ports[0]; - const appId = url === '/Users/Public/Start Menu/Endo/cat-wallet.ocaps' ? 'HOST' : url; + const appId = + url === "/Users/Public/Start Menu/Endo/cat-wallet.ocaps" + ? "HOST" + : url; const helloPortMessage: HelloPortMessage = { type: "HELLO_PORT", params: { - appId, + appId, }, }; daemonWebWorker.postMessage(helloPortMessage, [port]); diff --git a/components/apps/Ocaps/util.ts b/components/apps/Ocaps/util.ts index 15623bda5b..2a9966b285 100644 --- a/components/apps/Ocaps/util.ts +++ b/components/apps/Ocaps/util.ts @@ -11,5 +11,5 @@ export type HelloPortMessage = RpcMessage & { type: "HELLO_PORT"; params: { appId: string; - } + }; }; diff --git a/components/apps/Ocaps/worker.ts b/components/apps/Ocaps/worker.ts index 0d711a14a0..7cfd7ae2e5 100644 --- a/components/apps/Ocaps/worker.ts +++ b/components/apps/Ocaps/worker.ts @@ -2,5 +2,4 @@ import "./dist/dist-worker-init-bundle.js"; // import "../../../../endo/packages/daemon/dist-worker-init-bundle"; -console.log('hello from worker!') - +console.log("hello from worker!"); diff --git a/components/apps/OldMacFileExplorer/StyledWindow.ts b/components/apps/OldMacFileExplorer/StyledWindow.ts index 7a913dfeb2..d75de26427 100644 --- a/components/apps/OldMacFileExplorer/StyledWindow.ts +++ b/components/apps/OldMacFileExplorer/StyledWindow.ts @@ -21,7 +21,8 @@ const StyledWindow = styled(motion.section)` @font-face { font-family: "ChicagoRegular"; - src: url("./System/Fonts/bitchicago12-webfont.eot?iefix") format("eot"), + src: + url("./System/Fonts/bitchicago12-webfont.eot?iefix") format("eot"), url("./System/Fonts/bitchicago12-webfont.woff") format("woff"), url("./System/Fonts/bitchicago12-webfont.ttf") format("truetype"), url("./System/Fonts/bitchicago12-webfont.svg#webfontvbCjnPDX") diff --git a/next.config.js b/next.config.js index a3d819e43d..ca3c96c4b0 100644 --- a/next.config.js +++ b/next.config.js @@ -47,7 +47,7 @@ const nextConfig = { ); config.module.rules.push({ test: /\.js\.raw$/, - type: 'asset/source' + type: "asset/source", }); config.resolve.fallback = config.resolve.fallback || {}; @@ -63,6 +63,6 @@ const nextConfig = { module.exports = bundleAnalyzer ? require("@next/bundle-analyzer")({ - enabled: isProduction, - })(nextConfig) + enabled: isProduction, + })(nextConfig) : nextConfig;