From 2714ca481594d7694cf55d948d2c3fb6bc8065a9 Mon Sep 17 00:00:00 2001 From: cha0s Date: Sat, 27 Jan 2024 08:12:30 -0600 Subject: [PATCH] fix: missing --- 404.html | 2 +- assets/js/72512343.2d22eabb.js | 1 - assets/js/72512343.825e848a.js | 1 + assets/js/773fe5c0.520fdb63.js | 1 - assets/js/773fe5c0.68bde60d.js | 1 + ...n.5bd8cfb0.js => runtime~main.cc04bf75.js} | 2 +- docs/adding-flecks/index.html | 2 +- docs/category/generated-details/index.html | 2 +- docs/category/getting-started/index.html | 2 +- docs/category/guides/index.html | 2 +- docs/category/writing-your-code/index.html | 2 +- docs/cli/index.html | 2 +- docs/configuration/index.html | 2 +- docs/creating-a-fleck/index.html | 2 +- docs/database/index.html | 2 +- docs/docker/index.html | 2 +- docs/documentation/index.html | 2 +- docs/electron/index.html | 2 +- docs/environment/index.html | 2 +- docs/flecks/build-files/index.html | 2 +- docs/flecks/config/index.html | 6 +- docs/flecks/hooks/index.html | 129 +++++++++++------- docs/flecks/todo/index.html | 2 +- docs/flecks/todos/index.html | 2 +- docs/gathering/index.html | 2 +- docs/index.html | 2 +- docs/installation/index.html | 2 +- docs/isomorphism/index.html | 2 +- docs/ordering/index.html | 2 +- docs/react/index.html | 2 +- docs/redux/index.html | 2 +- docs/repl/index.html | 2 +- docs/sockets/index.html | 2 +- docs/testing/index.html | 2 +- index.html | 2 +- 35 files changed, 115 insertions(+), 82 deletions(-) delete mode 100644 assets/js/72512343.2d22eabb.js create mode 100644 assets/js/72512343.825e848a.js delete mode 100644 assets/js/773fe5c0.520fdb63.js create mode 100644 assets/js/773fe5c0.68bde60d.js rename assets/js/{runtime~main.5bd8cfb0.js => runtime~main.cc04bf75.js} (97%) diff --git a/404.html b/404.html index 51641ba1..a3b51b81 100644 --- a/404.html +++ b/404.html @@ -4,7 +4,7 @@ Page Not Found | flecks - + diff --git a/assets/js/72512343.2d22eabb.js b/assets/js/72512343.2d22eabb.js deleted file mode 100644 index c427a058..00000000 --- a/assets/js/72512343.2d22eabb.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkflecks_docusaurus=self.webpackChunkflecks_docusaurus||[]).push([[5679],{6057:(e,s,c)=>{c.r(s),c.d(s,{assets:()=>i,contentTitle:()=>a,default:()=>d,frontMatter:()=>t,metadata:()=>n,toc:()=>o});var r=c(5893),l=c(1151);const t={title:"Hooks",description:"All the hooks in this project."},a=void 0,n={id:"flecks/hooks",title:"Hooks",description:"All the hooks in this project.",source:"@site/docs/flecks/hooks.mdx",sourceDirName:"flecks",slug:"/flecks/hooks",permalink:"/flecks/docs/flecks/hooks",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"Hooks",description:"All the hooks in this project."},sidebar:"flecksSidebar",previous:{title:"Generated details",permalink:"/flecks/docs/category/generated-details"},next:{title:"Fleck configuration",permalink:"/flecks/docs/flecks/config"}},i={},o=[{value:"@flecks/build.commands",id:"flecksbuildcommands",level:2},{value:"Example usage",id:"example-usage",level:3},{value:"program: Command",id:"program-command",level:3},{value:"@flecks/build.config",id:"flecksbuildconfig",level:2},{value:"Example usage",id:"example-usage-1",level:3},{value:"target: string",id:"target-string",level:3},{value:"config: Object",id:"config-object",level:3},{value:"env: Object",id:"env-object",level:3},{value:"argv: Object",id:"argv-object",level:3},{value:"@flecks/build.config.alter",id:"flecksbuildconfigalter",level:2},{value:"Example usage",id:"example-usage-2",level:3},{value:"configs: Object",id:"configs-object",level:3},{value:"env: Object",id:"env-object-1",level:3},{value:"argv: Object",id:"argv-object-1",level:3},{value:"@flecks/build.extensions",id:"flecksbuildextensions",level:2},{value:"Example usage",id:"example-usage-3",level:3},{value:"@flecks/build.files",id:"flecksbuildfiles",level:2},{value:"Example usage",id:"example-usage-4",level:3},{value:"@flecks/build.processAssets",id:"flecksbuildprocessassets",level:2},{value:"Example usage",id:"example-usage-5",level:3},{value:"target: string",id:"target-string-1",level:3},{value:"assets: Record<string, Source>",id:"assets-recordstring-source",level:3},{value:"compilation: Compilation",id:"compilation-compilation",level:3},{value:"@flecks/build.targets",id:"flecksbuildtargets",level:2},{value:"Example usage",id:"example-usage-6",level:3},{value:"@flecks/build.targets.alter",id:"flecksbuildtargetsalter",level:2},{value:"Example usage",id:"example-usage-7",level:3},{value:"targets: Set<string>",id:"targets-setstring",level:3},{value:"@flecks/core.babel",id:"fleckscorebabel",level:2},{value:"Example usage",id:"example-usage-8",level:3},{value:"@flecks/core.config",id:"fleckscoreconfig",level:2},{value:"Example usage",id:"example-usage-9",level:3},{value:"@flecks/core.hmr",id:"fleckscorehmr",level:2},{value:"Example usage",id:"example-usage-10",level:3},{value:"path: string",id:"path-string",level:3},{value:"updatedFleck: Module",id:"updatedfleck-module",level:3},{value:"@flecks/core.hmr.gathered",id:"fleckscorehmrgathered",level:2},{value:"Example usage",id:"example-usage-11",level:3},{value:"gathered: constructor",id:"gathered-constructor",level:3},{value:"hook: string",id:"hook-string",level:3},{value:"@flecks/core.hmr.gathered.class",id:"fleckscorehmrgatheredclass",level:2},{value:"Example usage",id:"example-usage-12",level:3},{value:"Class: constructor",id:"class-constructor",level:3},{value:"hook: string",id:"hook-string-1",level:3},{value:"@flecks/core.priority",id:"fleckscorepriority",level:2},{value:"Example usage",id:"example-usage-13",level:3},{value:"graph: Digraph",id:"graph-digraph",level:3},{value:"hook: string",id:"hook-string-2",level:3},{value:"@flecks/core.starting",id:"fleckscorestarting",level:2},{value:"Example usage",id:"example-usage-14",level:3},{value:"@flecks/db/server.models",id:"flecksdbservermodels",level:2},{value:"Example usage",id:"example-usage-15",level:3},{value:"@flecks/db/server.models.decorate",id:"flecksdbservermodelsdecorate",level:2},{value:"Example usage",id:"example-usage-16",level:3},{value:"Model: constructor",id:"model-constructor",level:3},{value:"@flecks/docker.Dockerfile",id:"flecksdockerdockerfile",level:2},{value:"Example usage",id:"example-usage-17",level:3},{value:"dockerfile: string",id:"dockerfile-string",level:3},{value:"@flecks/docker.containers",id:"flecksdockercontainers",level:2},{value:"Example usage",id:"example-usage-18",level:3},{value:"@flecks/docker.docker-compose.yml",id:"flecksdockerdocker-composeyml",level:2},{value:"Example usage",id:"example-usage-19",level:3},{value:"config: Object",id:"config-object-1",level:3},{value:"@flecks/electron/server.browserWindowOptions.alter",id:"fleckselectronserverbrowserwindowoptionsalter",level:2},{value:"Example usage",id:"example-usage-20",level:3},{value:"browserWindowOptions: BrowserWindowConstructorOptions",id:"browserwindowoptions-browserwindowconstructoroptions",level:3},{value:"@flecks/electron/server.extensions",id:"fleckselectronserverextensions",level:2},{value:"Example usage",id:"example-usage-21",level:3},{value:"installer: Installer",id:"installer-installer",level:3},{value:"@flecks/electron/server.initialize",id:"fleckselectronserverinitialize",level:2},{value:"Example usage",id:"example-usage-22",level:3},{value:"electron: Electron",id:"electron-electron",level:3},{value:"@flecks/electron/server.window",id:"fleckselectronserverwindow",level:2},{value:"Example usage",id:"example-usage-23",level:3},{value:"win: Electron.BrowserWindow",id:"win-electronbrowserwindow",level:3},{value:"@flecks/fleck.packageJson",id:"flecksfleckpackagejson",level:2},{value:"Example usage",id:"example-usage-24",level:3},{value:"json: Object",id:"json-object",level:3},{value:"compilation: Compilation",id:"compilation-compilation-1",level:3},{value:"@flecks/passport-react.strategies",id:"fleckspassport-reactstrategies",level:2},{value:"@flecks/react.providers",id:"flecksreactproviders",level:2},{value:"Example usage",id:"example-usage-25",level:3},{value:"req: http.ClientRequest",id:"req-httpclientrequest",level:3},{value:"@flecks/react.roots",id:"flecksreactroots",level:2},{value:"Example usage",id:"example-usage-26",level:3},{value:"req: http.ClientRequest",id:"req-httpclientrequest-1",level:3},{value:"@flecks/redux.effects",id:"flecksreduxeffects",level:2},{value:"Example usage",id:"example-usage-27",level:3},{value:"@flecks/redux.reducers",id:"flecksreduxreducers",level:2},{value:"Example usage",id:"example-usage-28",level:3},{value:"@flecks/redux.slices",id:"flecksreduxslices",level:2},{value:"Example usage",id:"example-usage-29",level:3},{value:"@flecks/redux.store",id:"flecksreduxstore",level:2},{value:"Example usage",id:"example-usage-30",level:3},{value:"options: Object",id:"options-object",level:3},{value:"@flecks/repl.commands",id:"flecksreplcommands",level:2},{value:"Example usage",id:"example-usage-31",level:3},{value:"@flecks/repl.context",id:"flecksreplcontext",level:2},{value:"Example usage",id:"example-usage-32",level:3},{value:"@flecks/server.runtime",id:"flecksserverruntime",level:2},{value:"Example usage",id:"example-usage-33",level:3},{value:"@flecks/server.up",id:"flecksserverup",level:2},{value:"Example usage",id:"example-usage-34",level:3},{value:"@flecks/session.config",id:"fleckssessionconfig",level:2},{value:"Example usage",id:"example-usage-35",level:3},{value:"@flecks/socket.client",id:"fleckssocketclient",level:2},{value:"Example usage",id:"example-usage-36",level:3},{value:"@flecks/socket.intercom",id:"fleckssocketintercom",level:2},{value:"Example usage",id:"example-usage-37",level:3},{value:"@flecks/socket.packets",id:"fleckssocketpackets",level:2},{value:"Example usage",id:"example-usage-38",level:3},{value:"@flecks/socket.packets.decorate",id:"fleckssocketpacketsdecorate",level:2},{value:"Example usage",id:"example-usage-39",level:3},{value:"Packet: constructor",id:"packet-constructor",level:3},{value:"@flecks/socket.server",id:"fleckssocketserver",level:2},{value:"Example usage",id:"example-usage-40",level:3},{value:"@flecks/socket/server.request.socket",id:"fleckssocketserverrequestsocket",level:2},{value:"Example usage",id:"example-usage-41",level:3},{value:"@flecks/web.config",id:"fleckswebconfig",level:2},{value:"Example usage",id:"example-usage-42",level:3},{value:"req: http.ClientRequest",id:"req-httpclientrequest-2",level:3},{value:"@flecks/web.routes",id:"fleckswebroutes",level:2},{value:"Example usage",id:"example-usage-43",level:3},{value:"@flecks/web/client.up",id:"fleckswebclientup",level:2},{value:"Example usage",id:"example-usage-44",level:3},{value:"@flecks/web/server.request.route",id:"fleckswebserverrequestroute",level:2},{value:"Example usage",id:"example-usage-45",level:3},{value:"@flecks/web/server.request.socket",id:"fleckswebserverrequestsocket",level:2},{value:"Example usage",id:"example-usage-46",level:3},{value:"@flecks/web/server.stream.html",id:"fleckswebserverstreamhtml",level:2},{value:"Example usage",id:"example-usage-47",level:3},{value:"stream: stream.Readable",id:"stream-streamreadable",level:3},{value:"req: http.ClientRequest",id:"req-httpclientrequest-3",level:3},{value:"@flecks/web/server.up",id:"fleckswebserverup",level:2},{value:"Example usage",id:"example-usage-48",level:3}];function h(e){const s={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",...(0,l.a)(),...e.components},{Details:c}=s;return c||function(e,s){throw new Error("Expected "+(s?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.p,{children:"This page documents all the hooks in this project."}),"\n",(0,r.jsx)(s.h2,{id:"flecksbuildcommands",children:(0,r.jsx)(s.code,{children:"@flecks/build.commands"})}),"\n",(0,r.jsx)(s.p,{children:"Define CLI commands."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/build.commands': (program, flecks) => {\n return {\n // So this could be invoked like:\n // npx flecks something -t --blow-up blah\n something: {\n action: (...args) => {\n // Run the command...\n },\n args: [\n program.createArgument('', 'some argument'),\n ],\n description: 'This command does tests and also blows up',\n options: [\n program.createOption('-t, --test', 'Do a test'),\n program.createOption('-b, --blow-up', 'Blow up instead of running the command'),\n ],\n },\n };\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"program-command",children:(0,r.jsxs)("code",{children:["program: ",(0,r.jsx)(s.a,{href:"https://github.com/tj/commander.js/tree/master#declaring-program-variable",children:"Command"})]})}),"\n",(0,r.jsxs)("p",{children:["The ",(0,r.jsx)(s.a,{href:"https://github.com/tj/commander.js",children:"Commander.js"})," program."]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/build/build/flecks.bootstrap.js#L14",children:"https://github.com/cha0s/flecks/tree/master/packages/build/build/flecks.bootstrap.js#L14"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/dox/build/flecks.bootstrap.js#L4",children:"https://github.com/cha0s/flecks/tree/master/packages/dox/build/flecks.bootstrap.js#L4"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/fleck/build/flecks.bootstrap.js#L6",children:"https://github.com/cha0s/flecks/tree/master/packages/fleck/build/flecks.bootstrap.js#L6"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/repl/build/flecks.bootstrap.js#L4",children:"https://github.com/cha0s/flecks/tree/master/packages/repl/build/flecks.bootstrap.js#L4"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/build/build/cli.js#L449",children:"https://github.com/cha0s/flecks/tree/master/packages/build/build/cli.js#L449"})," (",(0,r.jsx)(s.code,{children:"invokeMerge"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksbuildconfig",children:(0,r.jsx)(s.code,{children:"@flecks/build.config"})}),"\n",(0,r.jsx)(s.p,{children:"Hook into webpack configuration."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-1",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/build.config': (target, config, env, argv) => {\n if ('something' === target) {\n if ('production' === argv.mode) {\n config.plugins.push(new SomePlugin());\n }\n }\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"target-string",children:(0,r.jsx)("code",{children:"target: string"})}),"\n",(0,r.jsxs)("p",{children:["The build target; e.g. ",(0,r.jsx)(s.code,{children:"server"}),"."]}),"\n",(0,r.jsx)(s.h3,{id:"config-object",children:(0,r.jsx)("code",{children:"config: Object"})}),"\n",(0,r.jsx)("p",{children:"The webpack configuration."}),"\n",(0,r.jsx)(s.h3,{id:"env-object",children:(0,r.jsx)("code",{children:"env: Object"})}),"\n",(0,r.jsx)("p",{children:"The webpack environment."}),"\n",(0,r.jsx)(s.h3,{id:"argv-object",children:(0,r.jsx)("code",{children:"argv: Object"})}),"\n",(0,r.jsx)("p",{children:"The webpack commandline arguments."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/build/build/flecks.bootstrap.js#L15",children:"https://github.com/cha0s/flecks/tree/master/packages/build/build/flecks.bootstrap.js#L15"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/docker/build/flecks.bootstrap.js#L4",children:"https://github.com/cha0s/flecks/tree/master/packages/docker/build/flecks.bootstrap.js#L4"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react/build/flecks.bootstrap.js#L22",children:"https://github.com/cha0s/flecks/tree/master/packages/react/build/flecks.bootstrap.js#L22"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L14",children:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L14"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsxs)("ul",{children:[(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/build/build/eslint.config.js#L37",children:"https://github.com/cha0s/flecks/tree/master/packages/build/build/eslint.config.js#L37"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/build/build/fleckspack.config.js#L478",children:"https://github.com/cha0s/flecks/tree/master/packages/build/build/fleckspack.config.js#L478"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]})]})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksbuildconfigalter",children:(0,r.jsx)(s.code,{children:"@flecks/build.config.alter"})}),"\n",(0,r.jsx)(s.p,{children:"Alter build configurations after they have been hooked."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-2",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/build.config.alter': (configs) => {\n // Maybe we want to do something if a target exists..?\n if (configs.someTarget) {\n configs.plugins.push('...');\n }\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"configs-object",children:(0,r.jsx)("code",{children:"configs: Object"})}),"\n",(0,r.jsx)("p",{children:"The webpack configurations keyed by target."}),"\n",(0,r.jsx)(s.h3,{id:"env-object-1",children:(0,r.jsx)("code",{children:"env: Object"})}),"\n",(0,r.jsx)("p",{children:"The webpack environment."}),"\n",(0,r.jsx)(s.h3,{id:"argv-object-1",children:(0,r.jsx)("code",{children:"argv: Object"})}),"\n",(0,r.jsx)("p",{children:"The webpack commandline arguments."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/electron/build/flecks.bootstrap.js#L28",children:"https://github.com/cha0s/flecks/tree/master/packages/electron/build/flecks.bootstrap.js#L28"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/server/build/flecks.bootstrap.js#L4",children:"https://github.com/cha0s/flecks/tree/master/packages/server/build/flecks.bootstrap.js#L4"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L112",children:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L112"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsxs)("ul",{children:[(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/build/build/eslint.config.js#L40",children:"https://github.com/cha0s/flecks/tree/master/packages/build/build/eslint.config.js#L40"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/build/build/fleckspack.config.js#L510",children:"https://github.com/cha0s/flecks/tree/master/packages/build/build/fleckspack.config.js#L510"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]})]})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksbuildextensions",children:(0,r.jsx)(s.code,{children:"@flecks/build.extensions"})}),"\n",(0,r.jsx)(s.p,{children:"Add implicitly resolved extensions."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-3",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/build.extensions': () => ['.coffee']\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/build/build/flecks.bootstrap.js#L13",children:"https://github.com/cha0s/flecks/tree/master/packages/build/build/flecks.bootstrap.js#L13"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react/build/flecks.bootstrap.js#L28",children:"https://github.com/cha0s/flecks/tree/master/packages/react/build/flecks.bootstrap.js#L28"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/build/build/webpack.js#L231",children:"https://github.com/cha0s/flecks/tree/master/packages/build/build/webpack.js#L231"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksbuildfiles",children:(0,r.jsx)(s.code,{children:"@flecks/build.files"})}),"\n",(0,r.jsx)(s.p,{children:"Register build files."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-4",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/build.files': () => [\n /**\n * If you document your build files like this, documentation will be automatically generated.\n */\n '.myrc.js',\n ]\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/build/build/flecks.bootstrap.js#L28",children:"https://github.com/cha0s/flecks/tree/master/packages/build/build/flecks.bootstrap.js#L28"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/server/build/flecks.bootstrap.js#L22",children:"https://github.com/cha0s/flecks/tree/master/packages/server/build/flecks.bootstrap.js#L22"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L192",children:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L192"})})]})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksbuildprocessassets",children:(0,r.jsx)(s.code,{children:"@flecks/build.processAssets"})}),"\n",(0,r.jsx)(s.p,{children:"Process assets during a compilation."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-5",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/build.processAssets': (target, assets, compilation) => {\n if (this.myTargets.includes(target)) {\n assets['my-file.js'] = new compilation.compiler.webpack.sources.RawSource('content');\n }\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"target-string-1",children:(0,r.jsx)("code",{children:"target: string"})}),"\n",(0,r.jsx)("p",{children:"The build target."}),"\n",(0,r.jsx)(s.h3,{id:"assets-recordstring-source",children:(0,r.jsx)("code",{children:"assets: Record"})}),"\n",(0,r.jsx)("p",{children:"The assets."}),"\n",(0,r.jsx)(s.h3,{id:"compilation-compilation",children:(0,r.jsxs)("code",{children:["compilation: ",(0,r.jsx)(s.a,{href:"https://webpack.js.org/api/compilation-object/",children:"Compilation"})]})}),"\n",(0,r.jsx)("p",{children:"The webpack compilation."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/fleck/build/flecks.bootstrap.js#L17",children:"https://github.com/cha0s/flecks/tree/master/packages/fleck/build/flecks.bootstrap.js#L17"})})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksbuildtargets",children:(0,r.jsx)(s.code,{children:"@flecks/build.targets"})}),"\n",(0,r.jsx)(s.p,{children:"Define build targets."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-6",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/build.targets': () => ['sometarget']\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/fleck/build/flecks.bootstrap.js#L16",children:"https://github.com/cha0s/flecks/tree/master/packages/fleck/build/flecks.bootstrap.js#L16"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/server/build/flecks.bootstrap.js#L53",children:"https://github.com/cha0s/flecks/tree/master/packages/server/build/flecks.bootstrap.js#L53"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L295",children:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L295"})})]})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksbuildtargetsalter",children:(0,r.jsx)(s.code,{children:"@flecks/build.targets.alter"})}),"\n",(0,r.jsx)(s.p,{children:"Alter defined build targets."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-7",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/build.targets.alter': (targets) => {\n targets.delete('some-target');\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"targets-setstring",children:(0,r.jsx)("code",{children:"targets: Set"})}),"\n",(0,r.jsx)("p",{children:"The targets to build."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/server/build/flecks.bootstrap.js#L54",children:"https://github.com/cha0s/flecks/tree/master/packages/server/build/flecks.bootstrap.js#L54"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L299",children:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L299"})})]})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckscorebabel",children:(0,r.jsx)(s.code,{children:"@flecks/core.babel"})}),"\n",(0,r.jsx)(s.p,{children:"Babel configuration."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-8",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/core.babel': () => ({\n plugins: ['...'],\n })\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react/build/flecks.bootstrap.js#L16",children:"https://github.com/cha0s/flecks/tree/master/packages/react/build/flecks.bootstrap.js#L16"})})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckscoreconfig",children:(0,r.jsx)(s.code,{children:"@flecks/core.config"})}),"\n",(0,r.jsx)(s.p,{children:"Define configuration."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-9",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/core.config': () => ({\n whatever: 'configuration',\n your: 1337,\n fleck: 'needs',\n /**\n * Also, comments like this will be used to automatically generate documentation.\n */\n though: 'you should keep the values serializable',\n })\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/build/build/flecks.bootstrap.js#L51",children:"https://github.com/cha0s/flecks/tree/master/packages/build/build/flecks.bootstrap.js#L51"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/core/build/flecks.bootstrap.js#L8",children:"https://github.com/cha0s/flecks/tree/master/packages/core/build/flecks.bootstrap.js#L8"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/db/src/server.js#L19",children:"https://github.com/cha0s/flecks/tree/master/packages/db/src/server.js#L19"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/docker/build/flecks.bootstrap.js#L10",children:"https://github.com/cha0s/flecks/tree/master/packages/docker/build/flecks.bootstrap.js#L10"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/electron/build/flecks.bootstrap.js#L4",children:"https://github.com/cha0s/flecks/tree/master/packages/electron/build/flecks.bootstrap.js#L4"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/fleck/build/flecks.bootstrap.js#L7",children:"https://github.com/cha0s/flecks/tree/master/packages/fleck/build/flecks.bootstrap.js#L7"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/governor/src/server.js#L10",children:"https://github.com/cha0s/flecks/tree/master/packages/governor/src/server.js#L10"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react/src/index.js#L15",children:"https://github.com/cha0s/flecks/tree/master/packages/react/src/index.js#L15"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redis/src/server.js#L33",children:"https://github.com/cha0s/flecks/tree/master/packages/redis/src/server.js#L33"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/server/build/flecks.bootstrap.js#L28",children:"https://github.com/cha0s/flecks/tree/master/packages/server/build/flecks.bootstrap.js#L28"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/session/src/server.js#L9",children:"https://github.com/cha0s/flecks/tree/master/packages/session/src/server.js#L9"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L214",children:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L214"})})]})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckscorehmr",children:(0,r.jsx)(s.code,{children:"@flecks/core.hmr"})}),"\n",(0,r.jsx)(s.p,{children:"Invoked when a fleck is HMR'd"}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-10",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/core.hmr': (path, updatedFleck) => {\n if ('my-fleck' === path) {\n updatedFleck.doSomething();\n }\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"path-string",children:(0,r.jsx)("code",{children:"path: string"})}),"\n",(0,r.jsx)("p",{children:"The path of the fleck"}),"\n",(0,r.jsx)(s.h3,{id:"updatedfleck-module",children:(0,r.jsx)("code",{children:"updatedFleck: Module"})}),"\n",(0,r.jsx)("p",{children:"The updated fleck module."}),"\n",(0,r.jsx)(s.h2,{id:"fleckscorehmrgathered",children:(0,r.jsx)(s.code,{children:"@flecks/core.hmr.gathered"})}),"\n",(0,r.jsx)(s.p,{children:"Invoked when a gathered set is HMR'd."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-11",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/core.hmr.gathered': (gathered, hook) => {\n // Do something with the gathered set...\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"gathered-constructor",children:(0,r.jsx)("code",{children:"gathered: constructor"})}),"\n",(0,r.jsx)("p",{children:"The gathered set."}),"\n",(0,r.jsx)(s.h3,{id:"hook-string",children:(0,r.jsx)("code",{children:"hook: string"})}),"\n",(0,r.jsxs)("p",{children:["The gather hook; e.g. ",(0,r.jsx)(s.code,{children:"@flecks/db/server.models"}),"."]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/db/src/server.js#L47",children:"https://github.com/cha0s/flecks/tree/master/packages/db/src/server.js#L47"})})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckscorehmrgatheredclass",children:(0,r.jsx)(s.code,{children:"@flecks/core.hmr.gathered.class"})}),"\n",(0,r.jsx)(s.p,{children:"Invoked when a gathered class is HMR'd."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-12",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/core.hmr.gathered.class': (Class, hook) => {\n // Do something with Class...\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"class-constructor",children:(0,r.jsx)("code",{children:"Class: constructor"})}),"\n",(0,r.jsx)("p",{children:"The class."}),"\n",(0,r.jsx)(s.h3,{id:"hook-string-1",children:(0,r.jsx)("code",{children:"hook: string"})}),"\n",(0,r.jsxs)("p",{children:["The gather hook; e.g. ",(0,r.jsx)(s.code,{children:"@flecks/db/server.models"}),"."]}),"\n",(0,r.jsx)(s.h2,{id:"fleckscorepriority",children:(0,r.jsx)(s.code,{children:"@flecks/core.priority"})}),"\n",(0,r.jsx)(s.p,{children:"Invoked when flecks is building a fleck dependency graph."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-13",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/core.priority': (graph, hook) => {\n // Make `@flecks/socket/server`'s `@flecks/server.up` implementation depend on\n // `@flecks/db/server`'s:\n if ('@flecks/server.up' === hook) {\n graph.addDependency('@flecks/socket/server', '@flecks/db/server');\n // Remove a dependency.\n graph.removeDependency('@flecks/socket/server', '@flecks/db/server');\n }\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"graph-digraph",children:(0,r.jsx)("code",{children:"graph: Digraph"})}),"\n",(0,r.jsx)("p",{children:"The dependency graph."}),"\n",(0,r.jsx)(s.h3,{id:"hook-string-2",children:(0,r.jsx)("code",{children:"hook: string"})}),"\n",(0,r.jsxs)("p",{children:["The hook; e.g. ",(0,r.jsx)(s.code,{children:"@flecks/db/server"}),"."]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redis/src/session/server.js#L14",children:"https://github.com/cha0s/flecks/tree/master/packages/redis/src/session/server.js#L14"})})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckscorestarting",children:(0,r.jsx)(s.code,{children:"@flecks/core.starting"})}),"\n",(0,r.jsx)(s.p,{children:"Invoked when the application is starting. Use for order-independent initialization tasks."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-14",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/core.starting': () => {\n console.log('starting!');\n }\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/db/src/server.js#L52",children:"https://github.com/cha0s/flecks/tree/master/packages/db/src/server.js#L52"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/index.js#L11",children:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/index.js#L11"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/build/entry.js#L602",children:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/build/entry.js#L602"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksdbservermodels",children:(0,r.jsx)(s.code,{children:"@flecks/db/server.models"})}),"\n",(0,r.jsx)(s.p,{children:"Gather database models."}),"\n",(0,r.jsxs)(s.p,{children:["In the example below, your fleck would have a ",(0,r.jsx)(s.code,{children:"models"})," subdirectory, and each model would be\ndefined in its own file.\nSee: ",(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/user/src/server/models",children:"https://github.com/cha0s/flecks/tree/master/packages/user/src/server/models"})]}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-15",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/db/server.models': Flecks.provide(require.context('./models', false, /\\.js$/))\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/governor/src/server.js#L28",children:"https://github.com/cha0s/flecks/tree/master/packages/governor/src/server.js#L28"})})})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/db/src/server.js#L533",children:"https://github.com/cha0s/flecks/tree/master/packages/db/src/server.js#L533"})," (",(0,r.jsx)(s.code,{children:"invokeMerge"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksdbservermodelsdecorate",children:(0,r.jsx)(s.code,{children:"@flecks/db/server.models.decorate"})}),"\n",(0,r.jsx)(s.p,{children:"Decorate database models."}),"\n",(0,r.jsxs)(s.p,{children:["In the example below, your fleck would have a ",(0,r.jsx)(s.code,{children:"models/decorators"})," subdirectory, and each\ndecorator would be defined in its own file.\nSee: ",(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/user/src/local/server/models/decorators",children:"https://github.com/cha0s/flecks/tree/master/packages/user/src/local/server/models/decorators"})]}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-16",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/db/server.models.decorate': Flecks.decorate(require.context('./models/decorators', false, /\\.js$/))\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"model-constructor",children:(0,r.jsx)("code",{children:"Model: constructor"})}),"\n",(0,r.jsx)("p",{children:"The model to decorate."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/db/src/server.js#L533",children:"https://github.com/cha0s/flecks/tree/master/packages/db/src/server.js#L533"})," (",(0,r.jsx)(s.code,{children:"invokeComposed"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksdockerdockerfile",children:(0,r.jsx)(s.code,{children:"@flecks/docker.Dockerfile"})}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-17",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/docker.Dockerfile': (dockerfile) => (\n dockerfile.replace('DEBUG=*', 'DEBUG=*,-*:silly')\n )\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"dockerfile-string",children:(0,r.jsx)("code",{children:"dockerfile: string"})}),"\n",(0,r.jsx)("p",{children:"The content of the Dockerfile."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/docker/build/generate.js#L19",children:"https://github.com/cha0s/flecks/tree/master/packages/docker/build/generate.js#L19"})," (",(0,r.jsx)(s.code,{children:"invokeComposed"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksdockercontainers",children:(0,r.jsx)(s.code,{children:"@flecks/docker.containers"})}),"\n",(0,r.jsx)(s.p,{children:"Define docker containers."}),"\n",(0,r.jsx)(s.admonition,{type:"warning",children:(0,r.jsxs)(s.p,{children:["The user running the server must have Docker privileges.\nSee: ",(0,r.jsx)(s.a,{href:"https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user",children:"https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user"})]})}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-18",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/docker.containers': () => ({\n someContainer: {\n // Environment variables.\n environment: {\n SOME_CONTAINER_VAR: 'hello',\n },\n // The docker image.\n image: 'some-image:latest',\n // Some container path you'd like to persist. Flecks handles the host path.\n mount: '/some/container/path',\n // Expose ports.\n ports: {3000: 3000},\n },\n })\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/db/src/server.js#L55",children:"https://github.com/cha0s/flecks/tree/master/packages/db/src/server.js#L55"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redis/src/server.js#L43",children:"https://github.com/cha0s/flecks/tree/master/packages/redis/src/server.js#L43"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsxs)("ul",{children:[(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/docker/build/generate.js#L391",children:"https://github.com/cha0s/flecks/tree/master/packages/docker/build/generate.js#L391"})," (",(0,r.jsx)(s.code,{children:"invoke"}),")"]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/docker/src/server.js#L89",children:"https://github.com/cha0s/flecks/tree/master/packages/docker/src/server.js#L89"})," (",(0,r.jsx)(s.code,{children:"invokeMergeAsync"}),")"]})]})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksdockerdocker-composeyml",children:(0,r.jsx)(s.code,{children:"@flecks/docker.docker-compose.yml"})}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-19",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/docker.docker-compose.yml': (config) => {\n config.version = '3.1';\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"config-object-1",children:(0,r.jsx)("code",{children:"config: Object"})}),"\n",(0,r.jsx)("p",{children:"The object representing the docker compose configuration."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/docker/build/generate.js#L72",children:"https://github.com/cha0s/flecks/tree/master/packages/docker/build/generate.js#L72"})," (",(0,r.jsx)(s.code,{children:"invoke"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckselectronserverbrowserwindowoptionsalter",children:(0,r.jsx)(s.code,{children:"@flecks/electron/server.browserWindowOptions.alter"})}),"\n",(0,r.jsx)(s.p,{children:"Alter the options for initialization of the Electron browser window."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-20",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/electron/server.browserWindowOptions.alter': (browserWindowOptions) => {\n browserWindowOptions.icon = 'cute-kitten.png';\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"browserwindowoptions-browserwindowconstructoroptions",children:(0,r.jsxs)("code",{children:["browserWindowOptions: ",(0,r.jsx)(s.a,{href:"https://www.electronjs.org/docs/latest/api/structures/browser-window-options",children:"BrowserWindowConstructorOptions"})]})}),"\n",(0,r.jsx)("p",{children:"The options."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L10",children:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L10"})," (",(0,r.jsx)(s.code,{children:"invoke"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckselectronserverextensions",children:(0,r.jsx)(s.code,{children:"@flecks/electron/server.extensions"})}),"\n",(0,r.jsx)(s.p,{children:"Extensions to install."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-21",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/electron/server.extensions': (installer) => [\n // Some defaults provided...\n installer.BACKBONE_DEBUGGER,\n // By ID (Tamper Monkey):\n 'dhdgffkkebhmkfjojejmpbldmpobfkfo',\n ]\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"installer-installer",children:(0,r.jsxs)("code",{children:["installer: ",(0,r.jsx)(s.a,{href:"https://github.com/MarshallOfSound/electron-devtools-installer",children:"Installer"})]})}),"\n",(0,r.jsx)("p",{children:"The installer."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react/src/server.js#L6",children:"https://github.com/cha0s/flecks/tree/master/packages/react/src/server.js#L6"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/server.js#L11",children:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/server.js#L11"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L441",children:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L441"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckselectronserverinitialize",children:(0,r.jsx)(s.code,{children:"@flecks/electron/server.initialize"})}),"\n",(0,r.jsx)(s.p,{children:"Invoked when electron is initializing."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-22",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/electron/server.initialize': (electron) => {\n electron.app.on('will-quit', () => {\n // ...\n });\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"electron-electron",children:(0,r.jsx)("code",{children:"electron: Electron"})}),"\n",(0,r.jsx)("p",{children:"The electron module."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L16",children:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L16"})})})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L584",children:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L584"})," (",(0,r.jsx)(s.code,{children:"invokeSequentialAsync"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckselectronserverwindow",children:(0,r.jsx)(s.code,{children:"@flecks/electron/server.window"})}),"\n",(0,r.jsx)(s.p,{children:"Invoked when a window is created"}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-23",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/electron/server.window': (win) => {\n win.maximize();\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"win-electronbrowserwindow",children:(0,r.jsx)("code",{children:"win: Electron.BrowserWindow"})}),"\n",(0,r.jsxs)("p",{children:["The electron browser window. See: ",(0,r.jsx)(s.a,{href:"https://www.electronjs.org/docs/latest/api/browser-window",children:"https://www.electronjs.org/docs/latest/api/browser-window"})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L36",children:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L36"})})})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L12",children:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L12"})," (",(0,r.jsx)(s.code,{children:"invokeSequentialAsync"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksfleckpackagejson",children:(0,r.jsx)(s.code,{children:"@flecks/fleck.packageJson"})}),"\n",(0,r.jsxs)(s.p,{children:["Process the ",(0,r.jsx)(s.code,{children:"package.json"})," for a built fleck."]}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-24",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/fleck.packageJson': (json, compilation) => {\n json.files.push('something');\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"json-object",children:(0,r.jsx)("code",{children:"json: Object"})}),"\n",(0,r.jsx)("p",{children:"The JSON."}),"\n",(0,r.jsx)(s.h3,{id:"compilation-compilation-1",children:(0,r.jsxs)("code",{children:["compilation: ",(0,r.jsx)(s.a,{href:"https://webpack.js.org/api/compilation-object/",children:"Compilation"})]})}),"\n",(0,r.jsx)("p",{children:"The webpack compilation."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L305",children:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L305"})})})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/fleck/build/flecks.bootstrap.js#L20",children:"https://github.com/cha0s/flecks/tree/master/packages/fleck/build/flecks.bootstrap.js#L20"})," (",(0,r.jsx)(s.code,{children:"invokeSequentialAsync"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckspassport-reactstrategies",children:(0,r.jsx)(s.code,{children:"@flecks/passport-react.strategies"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/passport/src/index.js#L6",children:"https://github.com/cha0s/flecks/tree/master/packages/passport/src/index.js#L6"})})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksreactproviders",children:(0,r.jsx)(s.code,{children:"@flecks/react.providers"})}),"\n",(0,r.jsx)(s.p,{children:"Define React Providers."}),"\n",(0,r.jsxs)(s.p,{children:["Note: ",(0,r.jsx)(s.code,{children:"req"})," will be only be defined when server-side rendering."]}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-25",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/react.providers': (req) => {\n // Generally it makes more sense to separate client and server concerns using platform\n // naming conventions, but this is just a small contrived example.\n return req ? serverSideProvider(req) : clientSideProvider();\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"req-httpclientrequest",children:(0,r.jsx)("code",{children:"req: http.ClientRequest"})}),"\n",(0,r.jsx)("p",{children:"The HTTP request object."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react-redux/src/client.js#L5",children:"https://github.com/cha0s/flecks/tree/master/packages/react-redux/src/client.js#L5"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react-redux/src/server.js#L5",children:"https://github.com/cha0s/flecks/tree/master/packages/react-redux/src/server.js#L5"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react/src/router/client.js#L7",children:"https://github.com/cha0s/flecks/tree/master/packages/react/src/router/client.js#L7"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react/src/router/server.js#L4",children:"https://github.com/cha0s/flecks/tree/master/packages/react/src/router/server.js#L4"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react/src/root.js#L156",children:"https://github.com/cha0s/flecks/tree/master/packages/react/src/root.js#L156"})," (",(0,r.jsx)(s.code,{children:"invokeSequentialAsync"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksreactroots",children:(0,r.jsx)(s.code,{children:"@flecks/react.roots"})}),"\n",(0,r.jsxs)(s.p,{children:["Define root-level React components that are mounted as siblings on ",(0,r.jsx)(s.code,{children:"#main"}),".\nNote: ",(0,r.jsx)(s.code,{children:"req"})," will be only be defined when server-side rendering."]}),"\n",(0,r.jsx)(s.p,{children:"Return either a React component or an array whose elements must either be a React component\nor an array of two elements where the first element is the component and the second element\nis the props passed to the component."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-26",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/react.roots': (req) => {\n // Note that we're not returning ``, but `Component`.\n return [\n Component,\n [SomeOtherComponent, {prop: 'value'}]\n ];\n // You can also just:\n return Component;\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"req-httpclientrequest-1",children:(0,r.jsx)("code",{children:"req: http.ClientRequest"})}),"\n",(0,r.jsx)("p",{children:"The HTTP request object."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react/src/root.js#L136",children:"https://github.com/cha0s/flecks/tree/master/packages/react/src/root.js#L136"})," (",(0,r.jsx)(s.code,{children:"invoke"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksreduxeffects",children:(0,r.jsx)(s.code,{children:"@flecks/redux.effects"})}),"\n",(0,r.jsx)(s.p,{children:"Define side-effects to run against Redux actions."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-27",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/redux.effects': () => ({\n someActionName: (store, action) => {\n // Runs when `someActionName` actions are dispatched.\n },\n })\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/store/middleware/effects.js#L28",children:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/store/middleware/effects.js#L28"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksreduxreducers",children:(0,r.jsx)(s.code,{children:"@flecks/redux.reducers"})}),"\n",(0,r.jsx)(s.p,{children:"Define root-level reducers for the Redux store."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-28",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/redux.reducers': () => {\n return (state, action) => {\n // Whatever you'd like.\n return state;\n };\n }\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/store/create-reducer.js#L57",children:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/store/create-reducer.js#L57"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksreduxslices",children:(0,r.jsx)(s.code,{children:"@flecks/redux.slices"})}),"\n",(0,r.jsx)(s.p,{children:"Define Redux slices."}),"\n",(0,r.jsxs)(s.p,{children:["See: ",(0,r.jsx)(s.a,{href:"https://redux-toolkit.js.org/api/createSlice",children:"https://redux-toolkit.js.org/api/createSlice"})]}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-29",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/redux.slices': () => {\n const something = createSlice(\n // ...\n );\n return {\n something: something.reducer,\n };\n }\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react/src/router/index.js#L8",children:"https://github.com/cha0s/flecks/tree/master/packages/react/src/router/index.js#L8"})})})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsxs)("ul",{children:[(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/client/index.js#L97",children:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/client/index.js#L97"})," (",(0,r.jsx)(s.code,{children:"invokeMergeUnique"}),")"]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/server.js#L135",children:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/server.js#L135"})," (",(0,r.jsx)(s.code,{children:"invokeMergeUnique"}),")"]})]})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksreduxstore",children:(0,r.jsx)(s.code,{children:"@flecks/redux.store"})}),"\n",(0,r.jsx)(s.p,{children:"Modify Redux store configuration."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-30",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/redux.store': (options) => {\n options.enhancers.splice(someIndex, 1);\n options.middleware.push(mySpecialMiddleware);\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"options-object",children:(0,r.jsx)("code",{children:"options: Object"})}),"\n",(0,r.jsx)("p",{children:"A mutable object with keys for enhancers and middleware."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react/src/router/index.js#L11",children:"https://github.com/cha0s/flecks/tree/master/packages/react/src/router/index.js#L11"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/client/index.js#L18",children:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/client/index.js#L18"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/store/index.js#L17",children:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/store/index.js#L17"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksreplcommands",children:(0,r.jsx)(s.code,{children:"@flecks/repl.commands"})}),"\n",(0,r.jsx)(s.p,{children:"Define REPL commands."}),"\n",(0,r.jsx)(s.p,{children:"Note: commands will be prefixed with a period in the Node REPL."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-31",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/repl.commands': () => ({\n someCommand: (...args) => {\n // args are passed from the Node REPL. So, you could invoke it like:\n // .someCommand foo bar\n // and `args` would be `['foo', 'bar']`.\n },\n })\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/repl/src/repl.js#L22",children:"https://github.com/cha0s/flecks/tree/master/packages/repl/src/repl.js#L22"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksreplcontext",children:(0,r.jsx)(s.code,{children:"@flecks/repl.context"})}),"\n",(0,r.jsx)(s.p,{children:"Provide global context to the REPL."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-32",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/repl.context': () => {\n // Now you'd be able to do like:\n // `node> someValue;`\n // and the REPL would evaluate it to `'foobar'`.\n return {\n someValue: 'foobar',\n };\n }\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L50",children:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L50"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redis/src/server.js#L44",children:"https://github.com/cha0s/flecks/tree/master/packages/redis/src/server.js#L44"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/repl/src/repl.js#L147",children:"https://github.com/cha0s/flecks/tree/master/packages/repl/src/repl.js#L147"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksserverruntime",children:(0,r.jsx)(s.code,{children:"@flecks/server.runtime"})}),"\n",(0,r.jsx)(s.p,{children:"Pass information to the runtime."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-33",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/server.runtime': async () => ({\n something: '...',\n })\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L310",children:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L310"})})})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/server/build/runtime.js#L413",children:"https://github.com/cha0s/flecks/tree/master/packages/server/build/runtime.js#L413"})," (",(0,r.jsx)(s.code,{children:"invokeAsync"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksserverup",children:(0,r.jsx)(s.code,{children:"@flecks/server.up"})}),"\n",(0,r.jsx)(s.p,{children:"Define sequential actions to run when the server comes up."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-34",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/server.up': async () => {\n await youCanDoAsyncThingsHere();\n }\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/db/src/server.js#L56",children:"https://github.com/cha0s/flecks/tree/master/packages/db/src/server.js#L56"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/docker/src/server.js#L4",children:"https://github.com/cha0s/flecks/tree/master/packages/docker/src/server.js#L4"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L55",children:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L55"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/governor/src/server.js#L63",children:"https://github.com/cha0s/flecks/tree/master/packages/governor/src/server.js#L63"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redis/src/server.js#L47",children:"https://github.com/cha0s/flecks/tree/master/packages/redis/src/server.js#L47"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/repl/src/server.js#L4",children:"https://github.com/cha0s/flecks/tree/master/packages/repl/src/server.js#L4"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/session/src/server.js#L38",children:"https://github.com/cha0s/flecks/tree/master/packages/session/src/server.js#L38"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/index.js#L18",children:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/index.js#L18"})})]})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckssessionconfig",children:(0,r.jsx)(s.code,{children:"@flecks/session.config"})}),"\n",(0,r.jsxs)(s.p,{children:["Configure the session. See: ",(0,r.jsx)(s.a,{href:"https://github.com/expressjs/session#sessionoptions",children:"https://github.com/expressjs/session#sessionoptions"})]}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-35",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/session.config': async () => ({\n saveUninitialized: true,\n })\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redis/src/session/server.js#L19",children:"https://github.com/cha0s/flecks/tree/master/packages/redis/src/session/server.js#L19"})})})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/session/src/server.js#L445",children:"https://github.com/cha0s/flecks/tree/master/packages/session/src/server.js#L445"})," (",(0,r.jsx)(s.code,{children:"invokeMergeAsync"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckssocketclient",children:(0,r.jsx)(s.code,{children:"@flecks/socket.client"})}),"\n",(0,r.jsx)(s.p,{children:"Modify Socket.io client configuration."}),"\n",(0,r.jsxs)(s.p,{children:["See: ",(0,r.jsx)(s.a,{href:"https://socket.io/docs/v4/client-options/",children:"https://socket.io/docs/v4/client-options/"})]}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-36",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/socket.client': () => ({\n timeout: Infinity,\n })\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/client/index.js#L10",children:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/client/index.js#L10"})})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckssocketintercom",children:(0,r.jsx)(s.code,{children:"@flecks/socket.intercom"})}),"\n",(0,r.jsx)(s.p,{children:"Define server-side intercom channels."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-37",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/socket.intercom': (req) => ({\n // This would have been called like:\n // `const result = await req.intercom('@my/fleck.key', payload)`.\n // `result` will be an `n`-length array, where `n` is the number of server instances. Each\n // element in the array will be the result of `someServiceSpecificInformation()` running\n // against that server instance.\n '@my/fleck.key': async (payload, server) => {\n return someServiceSpecificInformation();\n },\n })\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/server/server.js#L188",children:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/server/server.js#L188"})," (",(0,r.jsx)(s.code,{children:"invokeMerge"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckssocketpackets",children:(0,r.jsx)(s.code,{children:"@flecks/socket.packets"})}),"\n",(0,r.jsx)(s.p,{children:"Define socket packets."}),"\n",(0,r.jsxs)(s.p,{children:["In the example below, your fleck would have a ",(0,r.jsx)(s.code,{children:"packets"})," subdirectory, and each\ndecorator would be defined in its own file.\nSee: ",(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/packets",children:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/packets"})]}),"\n",(0,r.jsxs)(s.p,{children:["See: ",(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/packet/packet.js",children:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/packet/packet.js"}),"\nSee: ",(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/packet/redirect.js",children:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/packet/redirect.js"})]}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-38",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/socket.packets': Flecks.provide(require.context('./packets', false, /\\.js$/))\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/index.js#L8",children:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/index.js#L8"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/index.js#L14",children:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/index.js#L14"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/index.js#L128",children:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/index.js#L128"})," (",(0,r.jsx)(s.code,{children:"invokeMerge"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckssocketpacketsdecorate",children:(0,r.jsx)(s.code,{children:"@flecks/socket.packets.decorate"})}),"\n",(0,r.jsx)(s.p,{children:"Decorate database models."}),"\n",(0,r.jsxs)(s.p,{children:["In the example below, your fleck would have a ",(0,r.jsx)(s.code,{children:"packets/decorators"})," subdirectory, and each\ndecorator would be defined in its own file."]}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-39",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/socket.packets.decorate': Flecks.decorate(require.context('./packets/decorators', false, /\\.js$/))\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"packet-constructor",children:(0,r.jsx)("code",{children:"Packet: constructor"})}),"\n",(0,r.jsx)("p",{children:"The packet to decorate."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/governor/src/server.js#L132",children:"https://github.com/cha0s/flecks/tree/master/packages/governor/src/server.js#L132"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/client/index.js#L22",children:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/client/index.js#L22"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/index.js#L128",children:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/index.js#L128"})," (",(0,r.jsx)(s.code,{children:"invokeComposed"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckssocketserver",children:(0,r.jsx)(s.code,{children:"@flecks/socket.server"})}),"\n",(0,r.jsx)(s.p,{children:"Modify Socket.io server configuration."}),"\n",(0,r.jsxs)(s.p,{children:["See: ",(0,r.jsx)(s.a,{href:"https://socket.io/docs/v4/server-options/",children:"https://socket.io/docs/v4/server-options/"})]}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-40",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/socket.server': () => ({\n pingTimeout: Infinity,\n })\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redis/src/session/server.js#L25",children:"https://github.com/cha0s/flecks/tree/master/packages/redis/src/session/server.js#L25"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/server/index.js#L14",children:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/server/index.js#L14"})})]})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckssocketserverrequestsocket",children:(0,r.jsx)(s.code,{children:"@flecks/socket/server.request.socket"})}),"\n",(0,r.jsx)(s.p,{children:"Define middleware to run when a socket connection is established."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-41",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/socket/server.request.socket': () => (socket, next) => {\n // Express-style route middleware...\n next();\n }\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/governor/src/server.js#L103",children:"https://github.com/cha0s/flecks/tree/master/packages/governor/src/server.js#L103"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/session/src/server.js#L47",children:"https://github.com/cha0s/flecks/tree/master/packages/session/src/server.js#L47"})})]})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckswebconfig",children:(0,r.jsx)(s.code,{children:"@flecks/web.config"})}),"\n",(0,r.jsx)(s.p,{children:"Override flecks configuration sent to client flecks."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-42",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/web.config': (req) => ({\n someClientFleck: {\n someConfig: req.someConfig,\n },\n })\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"req-httpclientrequest-2",children:(0,r.jsx)("code",{children:"req: http.ClientRequest"})}),"\n",(0,r.jsx)("p",{children:"The HTTP request object."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/core/src/index.js#L12",children:"https://github.com/cha0s/flecks/tree/master/packages/core/src/index.js#L12"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/index.js#L9",children:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/index.js#L9"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/index.js#L19",children:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/index.js#L19"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/src/index.js#L2",children:"https://github.com/cha0s/flecks/tree/master/packages/web/src/index.js#L2"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/config.js#L94",children:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/config.js#L94"})," (",(0,r.jsx)(s.code,{children:"invokeAsync"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckswebroutes",children:(0,r.jsx)(s.code,{children:"@flecks/web.routes"})}),"\n",(0,r.jsx)(s.p,{children:"Define HTTP routes."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-43",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/web.routes': () => [\n {\n method: 'get',\n path: '/some-path',\n middleware: (req, res, next) => {\n // Express-style route middleware...\n next();\n },\n },\n ]\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/index.js#L7",children:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/index.js#L7"})})})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/http.js#L415",children:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/http.js#L415"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckswebclientup",children:(0,r.jsx)(s.code,{children:"@flecks/web/client.up"})}),"\n",(0,r.jsx)(s.p,{children:"Define sequential actions to run when the client comes up."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-44",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/web/client.up': async () => {\n await youCanDoAsyncThingsHere();\n }\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react/src/client.js#L14",children:"https://github.com/cha0s/flecks/tree/master/packages/react/src/client.js#L14"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/client/index.js#L7",children:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/client/index.js#L7"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/client/index.js#L4",children:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/client/index.js#L4"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/build/entry.js#L610",children:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/build/entry.js#L610"})," (",(0,r.jsx)(s.code,{children:"invokeSequentialAsync"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckswebserverrequestroute",children:(0,r.jsx)(s.code,{children:"@flecks/web/server.request.route"})}),"\n",(0,r.jsx)(s.p,{children:"Define middleware to run when a route is matched."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-45",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/web/server.request.route': () => (req, res, next) => {\n // Express-style route middleware...\n next();\n }\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/governor/src/server.js#L29",children:"https://github.com/cha0s/flecks/tree/master/packages/governor/src/server.js#L29"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/server.js#L12",children:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/server.js#L12"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/session/src/server.js#L19",children:"https://github.com/cha0s/flecks/tree/master/packages/session/src/server.js#L19"})})]})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckswebserverrequestsocket",children:(0,r.jsx)(s.code,{children:"@flecks/web/server.request.socket"})}),"\n",(0,r.jsx)(s.p,{children:"Define middleware to run when an HTTP socket connection is established."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-46",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/web/server.request.socket': () => (req, res, next) => {\n // Express-style route middleware...\n next();\n }\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/server/index.js#L5",children:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/server/index.js#L5"})})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckswebserverstreamhtml",children:(0,r.jsx)(s.code,{children:"@flecks/web/server.stream.html"})}),"\n",(0,r.jsx)(s.p,{children:"Define composition functions to run over the HTML stream prepared for the client."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-47",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/web/server.stream.html': (stream, req) => {\n return stream.pipe(myTransformStream);\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"stream-streamreadable",children:(0,r.jsx)("code",{children:"stream: stream.Readable"})}),"\n",(0,r.jsx)("p",{children:"The HTML stream."}),"\n",(0,r.jsx)(s.h3,{id:"req-httpclientrequest-3",children:(0,r.jsx)("code",{children:"req: http.ClientRequest"})}),"\n",(0,r.jsx)("p",{children:"The HTTP request object."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react/src/server.js#L7",children:"https://github.com/cha0s/flecks/tree/master/packages/react/src/server.js#L7"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/index.js#L17",children:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/index.js#L17"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/http.js#L19",children:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/http.js#L19"})," (",(0,r.jsx)(s.code,{children:"invokeComposedAsync"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckswebserverup",children:(0,r.jsx)(s.code,{children:"@flecks/web/server.up"})}),"\n",(0,r.jsx)(s.p,{children:"Define sequential actions to run when the HTTP server comes up."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-48",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/web/server.up': async () => {\n await youCanDoAsyncThingsHere();\n }\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/server/index.js#L9",children:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/server/index.js#L9"})})})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/http.js#L1384",children:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/http.js#L1384"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]})})]})]})}function d(e={}){const{wrapper:s}={...(0,l.a)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},1151:(e,s,c)=>{c.d(s,{Z:()=>n,a:()=>a});var r=c(7294);const l={},t=r.createContext(l);function a(e){const s=r.useContext(t);return r.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function n(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:a(e.components),r.createElement(t.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/72512343.825e848a.js b/assets/js/72512343.825e848a.js new file mode 100644 index 00000000..23791d08 --- /dev/null +++ b/assets/js/72512343.825e848a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkflecks_docusaurus=self.webpackChunkflecks_docusaurus||[]).push([[5679],{6057:(e,s,c)=>{c.r(s),c.d(s,{assets:()=>i,contentTitle:()=>a,default:()=>d,frontMatter:()=>t,metadata:()=>n,toc:()=>h});var r=c(5893),l=c(1151);const t={title:"Hooks",description:"All the hooks in this project."},a=void 0,n={id:"flecks/hooks",title:"Hooks",description:"All the hooks in this project.",source:"@site/docs/flecks/hooks.mdx",sourceDirName:"flecks",slug:"/flecks/hooks",permalink:"/flecks/docs/flecks/hooks",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"Hooks",description:"All the hooks in this project."},sidebar:"flecksSidebar",previous:{title:"Generated details",permalink:"/flecks/docs/category/generated-details"},next:{title:"Fleck configuration",permalink:"/flecks/docs/flecks/config"}},i={},h=[{value:"@flecks/build.commands",id:"flecksbuildcommands",level:2},{value:"Example usage",id:"example-usage",level:3},{value:"program: Command",id:"program-command",level:3},{value:"@flecks/build.config",id:"flecksbuildconfig",level:2},{value:"Example usage",id:"example-usage-1",level:3},{value:"target: string",id:"target-string",level:3},{value:"config: Object",id:"config-object",level:3},{value:"env: Object",id:"env-object",level:3},{value:"argv: Object",id:"argv-object",level:3},{value:"@flecks/build.config.alter",id:"flecksbuildconfigalter",level:2},{value:"Example usage",id:"example-usage-2",level:3},{value:"configs: Object",id:"configs-object",level:3},{value:"env: Object",id:"env-object-1",level:3},{value:"argv: Object",id:"argv-object-1",level:3},{value:"@flecks/build.extensions",id:"flecksbuildextensions",level:2},{value:"Example usage",id:"example-usage-3",level:3},{value:"@flecks/build.files",id:"flecksbuildfiles",level:2},{value:"Example usage",id:"example-usage-4",level:3},{value:"@flecks/build.processAssets",id:"flecksbuildprocessassets",level:2},{value:"Example usage",id:"example-usage-5",level:3},{value:"target: string",id:"target-string-1",level:3},{value:"assets: Record<string, Source>",id:"assets-recordstring-source",level:3},{value:"compilation: Compilation",id:"compilation-compilation",level:3},{value:"@flecks/build.targets",id:"flecksbuildtargets",level:2},{value:"Example usage",id:"example-usage-6",level:3},{value:"@flecks/build.targets.alter",id:"flecksbuildtargetsalter",level:2},{value:"Example usage",id:"example-usage-7",level:3},{value:"targets: Set<string>",id:"targets-setstring",level:3},{value:"@flecks/core.babel",id:"fleckscorebabel",level:2},{value:"Example usage",id:"example-usage-8",level:3},{value:"@flecks/core.config",id:"fleckscoreconfig",level:2},{value:"Example usage",id:"example-usage-9",level:3},{value:"@flecks/core.hmr",id:"fleckscorehmr",level:2},{value:"Example usage",id:"example-usage-10",level:3},{value:"path: string",id:"path-string",level:3},{value:"updatedFleck: Module",id:"updatedfleck-module",level:3},{value:"@flecks/core.hmr.gathered",id:"fleckscorehmrgathered",level:2},{value:"Example usage",id:"example-usage-11",level:3},{value:"gathered: constructor",id:"gathered-constructor",level:3},{value:"hook: string",id:"hook-string",level:3},{value:"@flecks/core.hmr.gathered.class",id:"fleckscorehmrgatheredclass",level:2},{value:"Example usage",id:"example-usage-12",level:3},{value:"Class: constructor",id:"class-constructor",level:3},{value:"hook: string",id:"hook-string-1",level:3},{value:"@flecks/core.priority",id:"fleckscorepriority",level:2},{value:"Example usage",id:"example-usage-13",level:3},{value:"graph: Digraph",id:"graph-digraph",level:3},{value:"hook: string",id:"hook-string-2",level:3},{value:"@flecks/core.registered",id:"fleckscoreregistered",level:2},{value:"Example usage",id:"example-usage-14",level:3},{value:"fleck: string",id:"fleck-string",level:3},{value:"M: Module",id:"m-module",level:3},{value:"@flecks/core.starting",id:"fleckscorestarting",level:2},{value:"Example usage",id:"example-usage-15",level:3},{value:"@flecks/db/server.models",id:"flecksdbservermodels",level:2},{value:"Example usage",id:"example-usage-16",level:3},{value:"@flecks/db/server.models.decorate",id:"flecksdbservermodelsdecorate",level:2},{value:"Example usage",id:"example-usage-17",level:3},{value:"Model: constructor",id:"model-constructor",level:3},{value:"@flecks/docker.Dockerfile",id:"flecksdockerdockerfile",level:2},{value:"Example usage",id:"example-usage-18",level:3},{value:"dockerfile: string",id:"dockerfile-string",level:3},{value:"@flecks/docker.containers",id:"flecksdockercontainers",level:2},{value:"Example usage",id:"example-usage-19",level:3},{value:"@flecks/docker.docker-compose.yml",id:"flecksdockerdocker-composeyml",level:2},{value:"Example usage",id:"example-usage-20",level:3},{value:"config: Object",id:"config-object-1",level:3},{value:"@flecks/electron/server.browserWindowOptions.alter",id:"fleckselectronserverbrowserwindowoptionsalter",level:2},{value:"Example usage",id:"example-usage-21",level:3},{value:"browserWindowOptions: BrowserWindowConstructorOptions",id:"browserwindowoptions-browserwindowconstructoroptions",level:3},{value:"@flecks/electron/server.extensions",id:"fleckselectronserverextensions",level:2},{value:"Example usage",id:"example-usage-22",level:3},{value:"installer: Installer",id:"installer-installer",level:3},{value:"@flecks/electron/server.initialize",id:"fleckselectronserverinitialize",level:2},{value:"Example usage",id:"example-usage-23",level:3},{value:"electron: Electron",id:"electron-electron",level:3},{value:"@flecks/electron/server.window",id:"fleckselectronserverwindow",level:2},{value:"Example usage",id:"example-usage-24",level:3},{value:"win: Electron.BrowserWindow",id:"win-electronbrowserwindow",level:3},{value:"@flecks/fleck.packageJson",id:"flecksfleckpackagejson",level:2},{value:"Example usage",id:"example-usage-25",level:3},{value:"json: Object",id:"json-object",level:3},{value:"compilation: Compilation",id:"compilation-compilation-1",level:3},{value:"@flecks/passport-react.strategies",id:"fleckspassport-reactstrategies",level:2},{value:"Example usage",id:"example-usage-26",level:3},{value:"@flecks/passport.strategies",id:"fleckspassportstrategies",level:2},{value:"Example usage",id:"example-usage-27",level:3},{value:"passport: Passport",id:"passport-passport",level:3},{value:"@flecks/react.providers",id:"flecksreactproviders",level:2},{value:"Example usage",id:"example-usage-28",level:3},{value:"req: http.ClientRequest",id:"req-httpclientrequest",level:3},{value:"@flecks/react.roots",id:"flecksreactroots",level:2},{value:"Example usage",id:"example-usage-29",level:3},{value:"req: http.ClientRequest",id:"req-httpclientrequest-1",level:3},{value:"@flecks/redux.effects",id:"flecksreduxeffects",level:2},{value:"Example usage",id:"example-usage-30",level:3},{value:"@flecks/redux.reducers",id:"flecksreduxreducers",level:2},{value:"Example usage",id:"example-usage-31",level:3},{value:"@flecks/redux.slices",id:"flecksreduxslices",level:2},{value:"Example usage",id:"example-usage-32",level:3},{value:"@flecks/redux.store",id:"flecksreduxstore",level:2},{value:"Example usage",id:"example-usage-33",level:3},{value:"options: Object",id:"options-object",level:3},{value:"@flecks/repl.commands",id:"flecksreplcommands",level:2},{value:"Example usage",id:"example-usage-34",level:3},{value:"@flecks/repl.context",id:"flecksreplcontext",level:2},{value:"Example usage",id:"example-usage-35",level:3},{value:"@flecks/server.runtime",id:"flecksserverruntime",level:2},{value:"Example usage",id:"example-usage-36",level:3},{value:"@flecks/server.up",id:"flecksserverup",level:2},{value:"Example usage",id:"example-usage-37",level:3},{value:"@flecks/session.config",id:"fleckssessionconfig",level:2},{value:"Example usage",id:"example-usage-38",level:3},{value:"@flecks/socket.client",id:"fleckssocketclient",level:2},{value:"Example usage",id:"example-usage-39",level:3},{value:"@flecks/socket.intercom",id:"fleckssocketintercom",level:2},{value:"Example usage",id:"example-usage-40",level:3},{value:"@flecks/socket.packets",id:"fleckssocketpackets",level:2},{value:"Example usage",id:"example-usage-41",level:3},{value:"@flecks/socket.packets.decorate",id:"fleckssocketpacketsdecorate",level:2},{value:"Example usage",id:"example-usage-42",level:3},{value:"Packet: constructor",id:"packet-constructor",level:3},{value:"@flecks/socket.server",id:"fleckssocketserver",level:2},{value:"Example usage",id:"example-usage-43",level:3},{value:"@flecks/socket/server.request.socket",id:"fleckssocketserverrequestsocket",level:2},{value:"Example usage",id:"example-usage-44",level:3},{value:"@flecks/web.config",id:"fleckswebconfig",level:2},{value:"Example usage",id:"example-usage-45",level:3},{value:"req: http.ClientRequest",id:"req-httpclientrequest-2",level:3},{value:"@flecks/web.routes",id:"fleckswebroutes",level:2},{value:"Example usage",id:"example-usage-46",level:3},{value:"@flecks/web/client.up",id:"fleckswebclientup",level:2},{value:"Example usage",id:"example-usage-47",level:3},{value:"@flecks/web/server.request.route",id:"fleckswebserverrequestroute",level:2},{value:"Example usage",id:"example-usage-48",level:3},{value:"@flecks/web/server.request.socket",id:"fleckswebserverrequestsocket",level:2},{value:"Example usage",id:"example-usage-49",level:3},{value:"@flecks/web/server.stream.html",id:"fleckswebserverstreamhtml",level:2},{value:"Example usage",id:"example-usage-50",level:3},{value:"stream: stream.Readable",id:"stream-streamreadable",level:3},{value:"req: http.ClientRequest",id:"req-httpclientrequest-3",level:3},{value:"@flecks/web/server.up",id:"fleckswebserverup",level:2},{value:"Example usage",id:"example-usage-51",level:3}];function o(e){const s={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",...(0,l.a)(),...e.components},{Details:c}=s;return c||function(e,s){throw new Error("Expected "+(s?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.p,{children:"This page documents all the hooks in this project."}),"\n",(0,r.jsx)(s.h2,{id:"flecksbuildcommands",children:(0,r.jsx)(s.code,{children:"@flecks/build.commands"})}),"\n",(0,r.jsx)(s.p,{children:"Define CLI commands."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/build.commands': (program, flecks) => {\n return {\n // So this could be invoked like:\n // npx flecks something -t --blow-up blah\n something: {\n action: (...args) => {\n // Run the command...\n },\n args: [\n program.createArgument('', 'some argument'),\n ],\n description: 'This command does tests and also blows up',\n options: [\n program.createOption('-t, --test', 'Do a test'),\n program.createOption('-b, --blow-up', 'Blow up instead of running the command'),\n ],\n },\n };\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"program-command",children:(0,r.jsxs)("code",{children:["program: ",(0,r.jsx)(s.a,{href:"https://github.com/tj/commander.js/tree/master#declaring-program-variable",children:"Command"})]})}),"\n",(0,r.jsxs)("p",{children:["The ",(0,r.jsx)(s.a,{href:"https://github.com/tj/commander.js",children:"Commander.js"})," program."]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/build/build/flecks.bootstrap.js#L14",children:"https://github.com/cha0s/flecks/tree/master/packages/build/build/flecks.bootstrap.js#L14"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/dox/build/flecks.bootstrap.js#L4",children:"https://github.com/cha0s/flecks/tree/master/packages/dox/build/flecks.bootstrap.js#L4"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/fleck/build/flecks.bootstrap.js#L6",children:"https://github.com/cha0s/flecks/tree/master/packages/fleck/build/flecks.bootstrap.js#L6"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/repl/build/flecks.bootstrap.js#L4",children:"https://github.com/cha0s/flecks/tree/master/packages/repl/build/flecks.bootstrap.js#L4"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/build/build/cli.js#L449",children:"https://github.com/cha0s/flecks/tree/master/packages/build/build/cli.js#L449"})," (",(0,r.jsx)(s.code,{children:"invokeMerge"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksbuildconfig",children:(0,r.jsx)(s.code,{children:"@flecks/build.config"})}),"\n",(0,r.jsx)(s.p,{children:"Hook into webpack configuration."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-1",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/build.config': (target, config, env, argv) => {\n if ('something' === target) {\n if ('production' === argv.mode) {\n config.plugins.push(new SomePlugin());\n }\n }\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"target-string",children:(0,r.jsx)("code",{children:"target: string"})}),"\n",(0,r.jsxs)("p",{children:["The build target; e.g. ",(0,r.jsx)(s.code,{children:"server"}),"."]}),"\n",(0,r.jsx)(s.h3,{id:"config-object",children:(0,r.jsx)("code",{children:"config: Object"})}),"\n",(0,r.jsx)("p",{children:"The webpack configuration."}),"\n",(0,r.jsx)(s.h3,{id:"env-object",children:(0,r.jsx)("code",{children:"env: Object"})}),"\n",(0,r.jsx)("p",{children:"The webpack environment."}),"\n",(0,r.jsx)(s.h3,{id:"argv-object",children:(0,r.jsx)("code",{children:"argv: Object"})}),"\n",(0,r.jsx)("p",{children:"The webpack commandline arguments."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/build/build/flecks.bootstrap.js#L15",children:"https://github.com/cha0s/flecks/tree/master/packages/build/build/flecks.bootstrap.js#L15"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/docker/build/flecks.bootstrap.js#L4",children:"https://github.com/cha0s/flecks/tree/master/packages/docker/build/flecks.bootstrap.js#L4"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react/build/flecks.bootstrap.js#L22",children:"https://github.com/cha0s/flecks/tree/master/packages/react/build/flecks.bootstrap.js#L22"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L14",children:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L14"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsxs)("ul",{children:[(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/build/build/eslint.config.js#L37",children:"https://github.com/cha0s/flecks/tree/master/packages/build/build/eslint.config.js#L37"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/build/build/fleckspack.config.js#L478",children:"https://github.com/cha0s/flecks/tree/master/packages/build/build/fleckspack.config.js#L478"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]})]})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksbuildconfigalter",children:(0,r.jsx)(s.code,{children:"@flecks/build.config.alter"})}),"\n",(0,r.jsx)(s.p,{children:"Alter build configurations after they have been hooked."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-2",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/build.config.alter': (configs) => {\n // Maybe we want to do something if a target exists..?\n if (configs.someTarget) {\n configs.plugins.push('...');\n }\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"configs-object",children:(0,r.jsx)("code",{children:"configs: Object"})}),"\n",(0,r.jsx)("p",{children:"The webpack configurations keyed by target."}),"\n",(0,r.jsx)(s.h3,{id:"env-object-1",children:(0,r.jsx)("code",{children:"env: Object"})}),"\n",(0,r.jsx)("p",{children:"The webpack environment."}),"\n",(0,r.jsx)(s.h3,{id:"argv-object-1",children:(0,r.jsx)("code",{children:"argv: Object"})}),"\n",(0,r.jsx)("p",{children:"The webpack commandline arguments."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/electron/build/flecks.bootstrap.js#L28",children:"https://github.com/cha0s/flecks/tree/master/packages/electron/build/flecks.bootstrap.js#L28"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/server/build/flecks.bootstrap.js#L4",children:"https://github.com/cha0s/flecks/tree/master/packages/server/build/flecks.bootstrap.js#L4"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L112",children:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L112"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsxs)("ul",{children:[(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/build/build/eslint.config.js#L40",children:"https://github.com/cha0s/flecks/tree/master/packages/build/build/eslint.config.js#L40"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/build/build/fleckspack.config.js#L510",children:"https://github.com/cha0s/flecks/tree/master/packages/build/build/fleckspack.config.js#L510"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]})]})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksbuildextensions",children:(0,r.jsx)(s.code,{children:"@flecks/build.extensions"})}),"\n",(0,r.jsx)(s.p,{children:"Add implicitly resolved extensions."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-3",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/build.extensions': () => ['.coffee']\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/build/build/flecks.bootstrap.js#L13",children:"https://github.com/cha0s/flecks/tree/master/packages/build/build/flecks.bootstrap.js#L13"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react/build/flecks.bootstrap.js#L28",children:"https://github.com/cha0s/flecks/tree/master/packages/react/build/flecks.bootstrap.js#L28"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/build/build/webpack.js#L231",children:"https://github.com/cha0s/flecks/tree/master/packages/build/build/webpack.js#L231"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksbuildfiles",children:(0,r.jsx)(s.code,{children:"@flecks/build.files"})}),"\n",(0,r.jsx)(s.p,{children:"Register build files."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-4",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/build.files': () => [\n /**\n * If you document your build files like this, documentation will be automatically generated.\n */\n '.myrc.js',\n ]\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/build/build/flecks.bootstrap.js#L28",children:"https://github.com/cha0s/flecks/tree/master/packages/build/build/flecks.bootstrap.js#L28"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/server/build/flecks.bootstrap.js#L22",children:"https://github.com/cha0s/flecks/tree/master/packages/server/build/flecks.bootstrap.js#L22"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L192",children:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L192"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/build/build/build.js#L1429",children:"https://github.com/cha0s/flecks/tree/master/packages/build/build/build.js#L1429"})," (",(0,r.jsx)(s.code,{children:"invoke"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksbuildprocessassets",children:(0,r.jsx)(s.code,{children:"@flecks/build.processAssets"})}),"\n",(0,r.jsx)(s.p,{children:"Process assets during a compilation."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-5",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/build.processAssets': (target, assets, compilation) => {\n if (this.myTargets.includes(target)) {\n assets['my-file.js'] = new compilation.compiler.webpack.sources.RawSource('content');\n }\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"target-string-1",children:(0,r.jsx)("code",{children:"target: string"})}),"\n",(0,r.jsx)("p",{children:"The build target."}),"\n",(0,r.jsx)(s.h3,{id:"assets-recordstring-source",children:(0,r.jsx)("code",{children:"assets: Record"})}),"\n",(0,r.jsx)("p",{children:"The assets."}),"\n",(0,r.jsx)(s.h3,{id:"compilation-compilation",children:(0,r.jsxs)("code",{children:["compilation: ",(0,r.jsx)(s.a,{href:"https://webpack.js.org/api/compilation-object/",children:"Compilation"})]})}),"\n",(0,r.jsx)("p",{children:"The webpack compilation."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/fleck/build/flecks.bootstrap.js#L17",children:"https://github.com/cha0s/flecks/tree/master/packages/fleck/build/flecks.bootstrap.js#L17"})})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksbuildtargets",children:(0,r.jsx)(s.code,{children:"@flecks/build.targets"})}),"\n",(0,r.jsx)(s.p,{children:"Define build targets."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-6",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/build.targets': () => ['sometarget']\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/fleck/build/flecks.bootstrap.js#L16",children:"https://github.com/cha0s/flecks/tree/master/packages/fleck/build/flecks.bootstrap.js#L16"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/server/build/flecks.bootstrap.js#L53",children:"https://github.com/cha0s/flecks/tree/master/packages/server/build/flecks.bootstrap.js#L53"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L295",children:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L295"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/build/build/build.js#L2400",children:"https://github.com/cha0s/flecks/tree/master/packages/build/build/build.js#L2400"})," (",(0,r.jsx)(s.code,{children:"invoke"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksbuildtargetsalter",children:(0,r.jsx)(s.code,{children:"@flecks/build.targets.alter"})}),"\n",(0,r.jsx)(s.p,{children:"Alter defined build targets."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-7",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/build.targets.alter': (targets) => {\n targets.delete('some-target');\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"targets-setstring",children:(0,r.jsx)("code",{children:"targets: Set"})}),"\n",(0,r.jsx)("p",{children:"The targets to build."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/server/build/flecks.bootstrap.js#L54",children:"https://github.com/cha0s/flecks/tree/master/packages/server/build/flecks.bootstrap.js#L54"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L299",children:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L299"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/build/build/build.js#L262",children:"https://github.com/cha0s/flecks/tree/master/packages/build/build/build.js#L262"})," (",(0,r.jsx)(s.code,{children:"invoke"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckscorebabel",children:(0,r.jsx)(s.code,{children:"@flecks/core.babel"})}),"\n",(0,r.jsx)(s.p,{children:"Babel configuration."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-8",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/core.babel': () => ({\n plugins: ['...'],\n })\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react/build/flecks.bootstrap.js#L16",children:"https://github.com/cha0s/flecks/tree/master/packages/react/build/flecks.bootstrap.js#L16"})})})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/build/build/build.js#L69",children:"https://github.com/cha0s/flecks/tree/master/packages/build/build/build.js#L69"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckscoreconfig",children:(0,r.jsx)(s.code,{children:"@flecks/core.config"})}),"\n",(0,r.jsx)(s.p,{children:"Define configuration."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-9",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/core.config': () => ({\n whatever: 'configuration',\n your: 1337,\n fleck: 'needs',\n /**\n * Also, comments like this will be used to automatically generate documentation.\n */\n though: 'you should keep the values serializable',\n })\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/build/build/flecks.bootstrap.js#L51",children:"https://github.com/cha0s/flecks/tree/master/packages/build/build/flecks.bootstrap.js#L51"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/core/build/flecks.bootstrap.js#L8",children:"https://github.com/cha0s/flecks/tree/master/packages/core/build/flecks.bootstrap.js#L8"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/db/src/server.js#L19",children:"https://github.com/cha0s/flecks/tree/master/packages/db/src/server.js#L19"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/docker/build/flecks.bootstrap.js#L10",children:"https://github.com/cha0s/flecks/tree/master/packages/docker/build/flecks.bootstrap.js#L10"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/electron/build/flecks.bootstrap.js#L4",children:"https://github.com/cha0s/flecks/tree/master/packages/electron/build/flecks.bootstrap.js#L4"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/fleck/build/flecks.bootstrap.js#L7",children:"https://github.com/cha0s/flecks/tree/master/packages/fleck/build/flecks.bootstrap.js#L7"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/governor/src/server.js#L10",children:"https://github.com/cha0s/flecks/tree/master/packages/governor/src/server.js#L10"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/passport/src/server/index.js#L8",children:"https://github.com/cha0s/flecks/tree/master/packages/passport/src/server/index.js#L8"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react/src/index.js#L15",children:"https://github.com/cha0s/flecks/tree/master/packages/react/src/index.js#L15"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redis/src/server.js#L33",children:"https://github.com/cha0s/flecks/tree/master/packages/redis/src/server.js#L33"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/server/build/flecks.bootstrap.js#L28",children:"https://github.com/cha0s/flecks/tree/master/packages/server/build/flecks.bootstrap.js#L28"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/session/src/server.js#L9",children:"https://github.com/cha0s/flecks/tree/master/packages/session/src/server.js#L9"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L214",children:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L214"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/core/build/flecks.js#L104",children:"https://github.com/cha0s/flecks/tree/master/packages/core/build/flecks.js#L104"})," (",(0,r.jsx)(s.code,{children:"invokeFleck"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckscorehmr",children:(0,r.jsx)(s.code,{children:"@flecks/core.hmr"})}),"\n",(0,r.jsx)(s.p,{children:"Invoked when a fleck is HMR'd"}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-10",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/core.hmr': (path, updatedFleck) => {\n if ('my-fleck' === path) {\n updatedFleck.doSomething();\n }\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"path-string",children:(0,r.jsx)("code",{children:"path: string"})}),"\n",(0,r.jsx)("p",{children:"The path of the fleck"}),"\n",(0,r.jsx)(s.h3,{id:"updatedfleck-module",children:(0,r.jsx)("code",{children:"updatedFleck: Module"})}),"\n",(0,r.jsx)("p",{children:"The updated fleck module."}),"\n",(0,r.jsx)(s.h2,{id:"fleckscorehmrgathered",children:(0,r.jsx)(s.code,{children:"@flecks/core.hmr.gathered"})}),"\n",(0,r.jsx)(s.p,{children:"Invoked when a gathered set is HMR'd."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-11",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/core.hmr.gathered': (gathered, hook) => {\n // Do something with the gathered set...\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"gathered-constructor",children:(0,r.jsx)("code",{children:"gathered: constructor"})}),"\n",(0,r.jsx)("p",{children:"The gathered set."}),"\n",(0,r.jsx)(s.h3,{id:"hook-string",children:(0,r.jsx)("code",{children:"hook: string"})}),"\n",(0,r.jsxs)("p",{children:["The gather hook; e.g. ",(0,r.jsx)(s.code,{children:"@flecks/db/server.models"}),"."]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/db/src/server.js#L47",children:"https://github.com/cha0s/flecks/tree/master/packages/db/src/server.js#L47"})})})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/core/build/flecks.js#L856",children:"https://github.com/cha0s/flecks/tree/master/packages/core/build/flecks.js#L856"})," (",(0,r.jsx)(s.code,{children:"invoke"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckscorehmrgatheredclass",children:(0,r.jsx)(s.code,{children:"@flecks/core.hmr.gathered.class"})}),"\n",(0,r.jsx)(s.p,{children:"Invoked when a gathered class is HMR'd."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-12",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/core.hmr.gathered.class': (Class, hook) => {\n // Do something with Class...\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"class-constructor",children:(0,r.jsx)("code",{children:"Class: constructor"})}),"\n",(0,r.jsx)("p",{children:"The class."}),"\n",(0,r.jsx)(s.h3,{id:"hook-string-1",children:(0,r.jsx)("code",{children:"hook: string"})}),"\n",(0,r.jsxs)("p",{children:["The gather hook; e.g. ",(0,r.jsx)(s.code,{children:"@flecks/db/server.models"}),"."]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/core/build/flecks.js#L8540",children:"https://github.com/cha0s/flecks/tree/master/packages/core/build/flecks.js#L8540"})," (",(0,r.jsx)(s.code,{children:"invoke"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckscorepriority",children:(0,r.jsx)(s.code,{children:"@flecks/core.priority"})}),"\n",(0,r.jsx)(s.p,{children:"Invoked when flecks is building a fleck dependency graph."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-13",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/core.priority': (graph, hook) => {\n // Make `@flecks/socket/server`'s `@flecks/server.up` implementation depend on\n // `@flecks/db/server`'s:\n if ('@flecks/server.up' === hook) {\n graph.addDependency('@flecks/socket/server', '@flecks/db/server');\n // Remove a dependency.\n graph.removeDependency('@flecks/socket/server', '@flecks/db/server');\n }\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"graph-digraph",children:(0,r.jsx)("code",{children:"graph: Digraph"})}),"\n",(0,r.jsx)("p",{children:"The dependency graph."}),"\n",(0,r.jsx)(s.h3,{id:"hook-string-2",children:(0,r.jsx)("code",{children:"hook: string"})}),"\n",(0,r.jsxs)("p",{children:["The hook; e.g. ",(0,r.jsx)(s.code,{children:"@flecks/db/server"}),"."]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redis/src/session/server.js#L14",children:"https://github.com/cha0s/flecks/tree/master/packages/redis/src/session/server.js#L14"})})})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/core/build/flecks.js#L354",children:"https://github.com/cha0s/flecks/tree/master/packages/core/build/flecks.js#L354"})," (",(0,r.jsx)(s.code,{children:"invoke"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckscoreregistered",children:(0,r.jsx)(s.code,{children:"@flecks/core.registered"})}),"\n",(0,r.jsx)(s.p,{children:"Invoked when a fleck is registered."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-14",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/core.registered': (fleck, M) => {\n if ('@something/or-other' === fleck) {\n doSomethingWith(M);\n }\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"fleck-string",children:(0,r.jsx)("code",{children:"fleck: string"})}),"\n",(0,r.jsx)("p",{}),"\n",(0,r.jsx)(s.h3,{id:"m-module",children:(0,r.jsx)("code",{children:"M: Module"})}),"\n",(0,r.jsx)("p",{}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/core/build/flecks.js#L90",children:"https://github.com/cha0s/flecks/tree/master/packages/core/build/flecks.js#L90"})," (",(0,r.jsx)(s.code,{children:"invoke"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckscorestarting",children:(0,r.jsx)(s.code,{children:"@flecks/core.starting"})}),"\n",(0,r.jsx)(s.p,{children:"Invoked when the application is starting. Use for order-independent initialization tasks."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-15",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/core.starting': () => {\n console.log('starting!');\n }\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/db/src/server.js#L52",children:"https://github.com/cha0s/flecks/tree/master/packages/db/src/server.js#L52"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/index.js#L11",children:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/index.js#L11"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/build/entry.js#L602",children:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/build/entry.js#L602"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksdbservermodels",children:(0,r.jsx)(s.code,{children:"@flecks/db/server.models"})}),"\n",(0,r.jsx)(s.p,{children:"Gather database models."}),"\n",(0,r.jsxs)(s.p,{children:["In the example below, your fleck would have a ",(0,r.jsx)(s.code,{children:"models"})," subdirectory, and each model would be\ndefined in its own file.\nSee: ",(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/user/src/server/models",children:"https://github.com/cha0s/flecks/tree/master/packages/user/src/server/models"})]}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-16",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/db/server.models': Flecks.provide(require.context('./models', false, /\\.js$/))\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/governor/src/server.js#L28",children:"https://github.com/cha0s/flecks/tree/master/packages/governor/src/server.js#L28"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/passport/src/server/index.js#L22",children:"https://github.com/cha0s/flecks/tree/master/packages/passport/src/server/index.js#L22"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/db/src/server.js#L533",children:"https://github.com/cha0s/flecks/tree/master/packages/db/src/server.js#L533"})," (",(0,r.jsx)(s.code,{children:"invokeMerge"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksdbservermodelsdecorate",children:(0,r.jsx)(s.code,{children:"@flecks/db/server.models.decorate"})}),"\n",(0,r.jsx)(s.p,{children:"Decorate database models."}),"\n",(0,r.jsxs)(s.p,{children:["In the example below, your fleck would have a ",(0,r.jsx)(s.code,{children:"models/decorators"})," subdirectory, and each\ndecorator would be defined in its own file.\nSee: ",(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/user/src/local/server/models/decorators",children:"https://github.com/cha0s/flecks/tree/master/packages/user/src/local/server/models/decorators"})]}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-17",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/db/server.models.decorate': Flecks.decorate(require.context('./models/decorators', false, /\\.js$/))\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"model-constructor",children:(0,r.jsx)("code",{children:"Model: constructor"})}),"\n",(0,r.jsx)("p",{children:"The model to decorate."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/passport-local/src/server/index.js#L7",children:"https://github.com/cha0s/flecks/tree/master/packages/passport-local/src/server/index.js#L7"})})})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/db/src/server.js#L533",children:"https://github.com/cha0s/flecks/tree/master/packages/db/src/server.js#L533"})," (",(0,r.jsx)(s.code,{children:"invokeComposed"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksdockerdockerfile",children:(0,r.jsx)(s.code,{children:"@flecks/docker.Dockerfile"})}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-18",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/docker.Dockerfile': (dockerfile) => (\n dockerfile.replace('DEBUG=*', 'DEBUG=*,-*:silly')\n )\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"dockerfile-string",children:(0,r.jsx)("code",{children:"dockerfile: string"})}),"\n",(0,r.jsx)("p",{children:"The content of the Dockerfile."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/docker/build/generate.js#L19",children:"https://github.com/cha0s/flecks/tree/master/packages/docker/build/generate.js#L19"})," (",(0,r.jsx)(s.code,{children:"invokeComposed"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksdockercontainers",children:(0,r.jsx)(s.code,{children:"@flecks/docker.containers"})}),"\n",(0,r.jsx)(s.p,{children:"Define docker containers."}),"\n",(0,r.jsx)(s.admonition,{type:"warning",children:(0,r.jsxs)(s.p,{children:["The user running the server must have Docker privileges.\nSee: ",(0,r.jsx)(s.a,{href:"https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user",children:"https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user"})]})}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-19",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/docker.containers': () => ({\n someContainer: {\n // Environment variables.\n environment: {\n SOME_CONTAINER_VAR: 'hello',\n },\n // The docker image.\n image: 'some-image:latest',\n // Some container path you'd like to persist. Flecks handles the host path.\n mount: '/some/container/path',\n // Expose ports.\n ports: {3000: 3000},\n },\n })\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/db/src/server.js#L55",children:"https://github.com/cha0s/flecks/tree/master/packages/db/src/server.js#L55"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redis/src/server.js#L43",children:"https://github.com/cha0s/flecks/tree/master/packages/redis/src/server.js#L43"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsxs)("ul",{children:[(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/docker/build/generate.js#L391",children:"https://github.com/cha0s/flecks/tree/master/packages/docker/build/generate.js#L391"})," (",(0,r.jsx)(s.code,{children:"invoke"}),")"]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/docker/src/server.js#L89",children:"https://github.com/cha0s/flecks/tree/master/packages/docker/src/server.js#L89"})," (",(0,r.jsx)(s.code,{children:"invokeMergeAsync"}),")"]})]})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksdockerdocker-composeyml",children:(0,r.jsx)(s.code,{children:"@flecks/docker.docker-compose.yml"})}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-20",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/docker.docker-compose.yml': (config) => {\n config.version = '3.1';\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"config-object-1",children:(0,r.jsx)("code",{children:"config: Object"})}),"\n",(0,r.jsx)("p",{children:"The object representing the docker compose configuration."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/docker/build/generate.js#L72",children:"https://github.com/cha0s/flecks/tree/master/packages/docker/build/generate.js#L72"})," (",(0,r.jsx)(s.code,{children:"invoke"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckselectronserverbrowserwindowoptionsalter",children:(0,r.jsx)(s.code,{children:"@flecks/electron/server.browserWindowOptions.alter"})}),"\n",(0,r.jsx)(s.p,{children:"Alter the options for initialization of the Electron browser window."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-21",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/electron/server.browserWindowOptions.alter': (browserWindowOptions) => {\n browserWindowOptions.icon = 'cute-kitten.png';\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"browserwindowoptions-browserwindowconstructoroptions",children:(0,r.jsxs)("code",{children:["browserWindowOptions: ",(0,r.jsx)(s.a,{href:"https://www.electronjs.org/docs/latest/api/structures/browser-window-options",children:"BrowserWindowConstructorOptions"})]})}),"\n",(0,r.jsx)("p",{children:"The options."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L10",children:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L10"})," (",(0,r.jsx)(s.code,{children:"invoke"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckselectronserverextensions",children:(0,r.jsx)(s.code,{children:"@flecks/electron/server.extensions"})}),"\n",(0,r.jsx)(s.p,{children:"Extensions to install."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-22",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/electron/server.extensions': (installer) => [\n // Some defaults provided...\n installer.BACKBONE_DEBUGGER,\n // By ID (Tamper Monkey):\n 'dhdgffkkebhmkfjojejmpbldmpobfkfo',\n ]\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"installer-installer",children:(0,r.jsxs)("code",{children:["installer: ",(0,r.jsx)(s.a,{href:"https://github.com/MarshallOfSound/electron-devtools-installer",children:"Installer"})]})}),"\n",(0,r.jsx)("p",{children:"The installer."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react/src/server.js#L6",children:"https://github.com/cha0s/flecks/tree/master/packages/react/src/server.js#L6"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/server.js#L11",children:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/server.js#L11"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L441",children:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L441"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckselectronserverinitialize",children:(0,r.jsx)(s.code,{children:"@flecks/electron/server.initialize"})}),"\n",(0,r.jsx)(s.p,{children:"Invoked when electron is initializing."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-23",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/electron/server.initialize': (electron) => {\n electron.app.on('will-quit', () => {\n // ...\n });\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"electron-electron",children:(0,r.jsx)("code",{children:"electron: Electron"})}),"\n",(0,r.jsx)("p",{children:"The electron module."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L16",children:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L16"})})})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L584",children:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L584"})," (",(0,r.jsx)(s.code,{children:"invokeSequentialAsync"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckselectronserverwindow",children:(0,r.jsx)(s.code,{children:"@flecks/electron/server.window"})}),"\n",(0,r.jsx)(s.p,{children:"Invoked when a window is created"}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-24",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/electron/server.window': (win) => {\n win.maximize();\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"win-electronbrowserwindow",children:(0,r.jsx)("code",{children:"win: Electron.BrowserWindow"})}),"\n",(0,r.jsxs)("p",{children:["The electron browser window. See: ",(0,r.jsx)(s.a,{href:"https://www.electronjs.org/docs/latest/api/browser-window",children:"https://www.electronjs.org/docs/latest/api/browser-window"})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L36",children:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L36"})})})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L12",children:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L12"})," (",(0,r.jsx)(s.code,{children:"invokeSequentialAsync"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksfleckpackagejson",children:(0,r.jsx)(s.code,{children:"@flecks/fleck.packageJson"})}),"\n",(0,r.jsxs)(s.p,{children:["Process the ",(0,r.jsx)(s.code,{children:"package.json"})," for a built fleck."]}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-25",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/fleck.packageJson': (json, compilation) => {\n json.files.push('something');\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"json-object",children:(0,r.jsx)("code",{children:"json: Object"})}),"\n",(0,r.jsx)("p",{children:"The JSON."}),"\n",(0,r.jsx)(s.h3,{id:"compilation-compilation-1",children:(0,r.jsxs)("code",{children:["compilation: ",(0,r.jsx)(s.a,{href:"https://webpack.js.org/api/compilation-object/",children:"Compilation"})]})}),"\n",(0,r.jsx)("p",{children:"The webpack compilation."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L305",children:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L305"})})})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/fleck/build/flecks.bootstrap.js#L20",children:"https://github.com/cha0s/flecks/tree/master/packages/fleck/build/flecks.bootstrap.js#L20"})," (",(0,r.jsx)(s.code,{children:"invokeSequentialAsync"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckspassport-reactstrategies",children:(0,r.jsx)(s.code,{children:"@flecks/passport-react.strategies"})}),"\n",(0,r.jsx)(s.p,{children:"Define React components for login strategies."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-26",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/passport-react.strategies': () => ({\n MyService: SomeBeautifulComponent,\n })\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/passport-local-react/src/index.js#L6",children:"https://github.com/cha0s/flecks/tree/master/packages/passport-local-react/src/index.js#L6"})})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckspassportstrategies",children:(0,r.jsx)(s.code,{children:"@flecks/passport.strategies"})}),"\n",(0,r.jsxs)(s.p,{children:["Define passport login strategies. See: ",(0,r.jsx)(s.a,{href:"https://www.passportjs.org/concepts/authentication/strategies/",children:"https://www.passportjs.org/concepts/authentication/strategies/"})]}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-27",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/passport.strategies': (passport) => ({\n MyService: SomeStrategy,\n })\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"passport-passport",children:(0,r.jsx)("code",{children:"passport: Passport"})}),"\n",(0,r.jsx)("p",{children:"The passport instance."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/passport-local/src/server/index.js#L8",children:"https://github.com/cha0s/flecks/tree/master/packages/passport-local/src/server/index.js#L8"})})})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/passport/src/server/index.js#L580",children:"https://github.com/cha0s/flecks/tree/master/packages/passport/src/server/index.js#L580"})," (",(0,r.jsx)(s.code,{children:"invokeMergeUnique"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksreactproviders",children:(0,r.jsx)(s.code,{children:"@flecks/react.providers"})}),"\n",(0,r.jsx)(s.p,{children:"Define React Providers."}),"\n",(0,r.jsxs)(s.p,{children:["Note: ",(0,r.jsx)(s.code,{children:"req"})," will be only be defined when server-side rendering."]}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-28",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/react.providers': (req) => {\n // Generally it makes more sense to separate client and server concerns using platform\n // naming conventions, but this is just a small contrived example.\n return req ? serverSideProvider(req) : clientSideProvider();\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"req-httpclientrequest",children:(0,r.jsx)("code",{children:"req: http.ClientRequest"})}),"\n",(0,r.jsx)("p",{children:"The HTTP request object."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react-redux/src/client.js#L5",children:"https://github.com/cha0s/flecks/tree/master/packages/react-redux/src/client.js#L5"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react-redux/src/server.js#L5",children:"https://github.com/cha0s/flecks/tree/master/packages/react-redux/src/server.js#L5"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react/src/router/client.js#L7",children:"https://github.com/cha0s/flecks/tree/master/packages/react/src/router/client.js#L7"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react/src/router/server.js#L4",children:"https://github.com/cha0s/flecks/tree/master/packages/react/src/router/server.js#L4"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react/src/root.js#L156",children:"https://github.com/cha0s/flecks/tree/master/packages/react/src/root.js#L156"})," (",(0,r.jsx)(s.code,{children:"invokeSequentialAsync"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksreactroots",children:(0,r.jsx)(s.code,{children:"@flecks/react.roots"})}),"\n",(0,r.jsxs)(s.p,{children:["Define root-level React components that are mounted as siblings on ",(0,r.jsx)(s.code,{children:"#main"}),".\nNote: ",(0,r.jsx)(s.code,{children:"req"})," will be only be defined when server-side rendering."]}),"\n",(0,r.jsx)(s.p,{children:"Return either a React component or an array whose elements must either be a React component\nor an array of two elements where the first element is the component and the second element\nis the props passed to the component."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-29",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/react.roots': (req) => {\n // Note that we're not returning ``, but `Component`.\n return [\n Component,\n [SomeOtherComponent, {prop: 'value'}]\n ];\n // You can also just:\n return Component;\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"req-httpclientrequest-1",children:(0,r.jsx)("code",{children:"req: http.ClientRequest"})}),"\n",(0,r.jsx)("p",{children:"The HTTP request object."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react/src/root.js#L136",children:"https://github.com/cha0s/flecks/tree/master/packages/react/src/root.js#L136"})," (",(0,r.jsx)(s.code,{children:"invoke"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksreduxeffects",children:(0,r.jsx)(s.code,{children:"@flecks/redux.effects"})}),"\n",(0,r.jsx)(s.p,{children:"Define side-effects to run against Redux actions."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-30",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/redux.effects': () => ({\n someActionName: (store, action) => {\n // Runs when `someActionName` actions are dispatched.\n },\n })\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/store/middleware/effects.js#L28",children:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/store/middleware/effects.js#L28"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksreduxreducers",children:(0,r.jsx)(s.code,{children:"@flecks/redux.reducers"})}),"\n",(0,r.jsx)(s.p,{children:"Define root-level reducers for the Redux store."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-31",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/redux.reducers': () => {\n return (state, action) => {\n // Whatever you'd like.\n return state;\n };\n }\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/store/create-reducer.js#L57",children:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/store/create-reducer.js#L57"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksreduxslices",children:(0,r.jsx)(s.code,{children:"@flecks/redux.slices"})}),"\n",(0,r.jsx)(s.p,{children:"Define Redux slices."}),"\n",(0,r.jsxs)(s.p,{children:["See: ",(0,r.jsx)(s.a,{href:"https://redux-toolkit.js.org/api/createSlice",children:"https://redux-toolkit.js.org/api/createSlice"})]}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-32",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/redux.slices': () => {\n const something = createSlice(\n // ...\n );\n return {\n something: something.reducer,\n };\n }\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/passport/src/index.js#L8",children:"https://github.com/cha0s/flecks/tree/master/packages/passport/src/index.js#L8"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react/src/router/index.js#L8",children:"https://github.com/cha0s/flecks/tree/master/packages/react/src/router/index.js#L8"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsxs)("ul",{children:[(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/client/index.js#L97",children:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/client/index.js#L97"})," (",(0,r.jsx)(s.code,{children:"invokeMergeUnique"}),")"]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/server.js#L135",children:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/server.js#L135"})," (",(0,r.jsx)(s.code,{children:"invokeMergeUnique"}),")"]})]})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksreduxstore",children:(0,r.jsx)(s.code,{children:"@flecks/redux.store"})}),"\n",(0,r.jsx)(s.p,{children:"Modify Redux store configuration."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-33",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/redux.store': (options) => {\n options.enhancers.splice(someIndex, 1);\n options.middleware.push(mySpecialMiddleware);\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"options-object",children:(0,r.jsx)("code",{children:"options: Object"})}),"\n",(0,r.jsx)("p",{children:"A mutable object with keys for enhancers and middleware."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react/src/router/index.js#L11",children:"https://github.com/cha0s/flecks/tree/master/packages/react/src/router/index.js#L11"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/client/index.js#L18",children:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/client/index.js#L18"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/store/index.js#L17",children:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/store/index.js#L17"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksreplcommands",children:(0,r.jsx)(s.code,{children:"@flecks/repl.commands"})}),"\n",(0,r.jsx)(s.p,{children:"Define REPL commands."}),"\n",(0,r.jsx)(s.p,{children:"Note: commands will be prefixed with a period in the Node REPL."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-34",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/repl.commands': () => ({\n someCommand: (...args) => {\n // args are passed from the Node REPL. So, you could invoke it like:\n // .someCommand foo bar\n // and `args` would be `['foo', 'bar']`.\n },\n })\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/passport-local/src/server/index.js#L23",children:"https://github.com/cha0s/flecks/tree/master/packages/passport-local/src/server/index.js#L23"})})})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/repl/src/repl.js#L22",children:"https://github.com/cha0s/flecks/tree/master/packages/repl/src/repl.js#L22"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksreplcontext",children:(0,r.jsx)(s.code,{children:"@flecks/repl.context"})}),"\n",(0,r.jsx)(s.p,{children:"Provide global context to the REPL."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-35",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/repl.context': () => {\n // Now you'd be able to do like:\n // `node> someValue;`\n // and the REPL would evaluate it to `'foobar'`.\n return {\n someValue: 'foobar',\n };\n }\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L50",children:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L50"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redis/src/server.js#L44",children:"https://github.com/cha0s/flecks/tree/master/packages/redis/src/server.js#L44"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/repl/src/repl.js#L147",children:"https://github.com/cha0s/flecks/tree/master/packages/repl/src/repl.js#L147"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksserverruntime",children:(0,r.jsx)(s.code,{children:"@flecks/server.runtime"})}),"\n",(0,r.jsx)(s.p,{children:"Pass information to the runtime."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-36",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/server.runtime': async () => ({\n something: '...',\n })\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L310",children:"https://github.com/cha0s/flecks/tree/master/packages/web/build/flecks.bootstrap.js#L310"})})})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/server/build/runtime.js#L413",children:"https://github.com/cha0s/flecks/tree/master/packages/server/build/runtime.js#L413"})," (",(0,r.jsx)(s.code,{children:"invokeAsync"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"flecksserverup",children:(0,r.jsx)(s.code,{children:"@flecks/server.up"})}),"\n",(0,r.jsx)(s.p,{children:"Define sequential actions to run when the server comes up."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-37",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/server.up': async () => {\n await youCanDoAsyncThingsHere();\n }\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/db/src/server.js#L56",children:"https://github.com/cha0s/flecks/tree/master/packages/db/src/server.js#L56"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/docker/src/server.js#L4",children:"https://github.com/cha0s/flecks/tree/master/packages/docker/src/server.js#L4"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L55",children:"https://github.com/cha0s/flecks/tree/master/packages/electron/src/server/index.js#L55"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/governor/src/server.js#L63",children:"https://github.com/cha0s/flecks/tree/master/packages/governor/src/server.js#L63"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/passport/src/server/index.js#L43",children:"https://github.com/cha0s/flecks/tree/master/packages/passport/src/server/index.js#L43"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redis/src/server.js#L47",children:"https://github.com/cha0s/flecks/tree/master/packages/redis/src/server.js#L47"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/repl/src/server.js#L4",children:"https://github.com/cha0s/flecks/tree/master/packages/repl/src/server.js#L4"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/session/src/server.js#L38",children:"https://github.com/cha0s/flecks/tree/master/packages/session/src/server.js#L38"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/index.js#L18",children:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/index.js#L18"})})]})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckssessionconfig",children:(0,r.jsx)(s.code,{children:"@flecks/session.config"})}),"\n",(0,r.jsxs)(s.p,{children:["Configure the session. See: ",(0,r.jsx)(s.a,{href:"https://github.com/expressjs/session#sessionoptions",children:"https://github.com/expressjs/session#sessionoptions"})]}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-38",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/session.config': async () => ({\n saveUninitialized: true,\n })\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redis/src/session/server.js#L19",children:"https://github.com/cha0s/flecks/tree/master/packages/redis/src/session/server.js#L19"})})})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/session/src/server.js#L445",children:"https://github.com/cha0s/flecks/tree/master/packages/session/src/server.js#L445"})," (",(0,r.jsx)(s.code,{children:"invokeMergeAsync"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckssocketclient",children:(0,r.jsx)(s.code,{children:"@flecks/socket.client"})}),"\n",(0,r.jsx)(s.p,{children:"Modify Socket.io client configuration."}),"\n",(0,r.jsxs)(s.p,{children:["See: ",(0,r.jsx)(s.a,{href:"https://socket.io/docs/v4/client-options/",children:"https://socket.io/docs/v4/client-options/"})]}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-39",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/socket.client': () => ({\n timeout: Infinity,\n })\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/client/index.js#L10",children:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/client/index.js#L10"})})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckssocketintercom",children:(0,r.jsx)(s.code,{children:"@flecks/socket.intercom"})}),"\n",(0,r.jsx)(s.p,{children:"Define server-side intercom channels."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-40",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/socket.intercom': (req) => ({\n // This would have been called like:\n // `const result = await req.intercom('@my/fleck.key', payload)`.\n // `result` will be an `n`-length array, where `n` is the number of server instances. Each\n // element in the array will be the result of `someServiceSpecificInformation()` running\n // against that server instance.\n '@my/fleck.key': async (payload, server) => {\n return someServiceSpecificInformation();\n },\n })\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/passport/src/server/index.js#L67",children:"https://github.com/cha0s/flecks/tree/master/packages/passport/src/server/index.js#L67"})})})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/server/server.js#L188",children:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/server/server.js#L188"})," (",(0,r.jsx)(s.code,{children:"invokeMerge"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckssocketpackets",children:(0,r.jsx)(s.code,{children:"@flecks/socket.packets"})}),"\n",(0,r.jsx)(s.p,{children:"Define socket packets."}),"\n",(0,r.jsxs)(s.p,{children:["In the example below, your fleck would have a ",(0,r.jsx)(s.code,{children:"packets"})," subdirectory, and each\ndecorator would be defined in its own file.\nSee: ",(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/packets",children:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/packets"})]}),"\n",(0,r.jsxs)(s.p,{children:["See: ",(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/packet/packet.js",children:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/packet/packet.js"}),"\nSee: ",(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/packet/redirect.js",children:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/packet/redirect.js"})]}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-41",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/socket.packets': Flecks.provide(require.context('./packets', false, /\\.js$/))\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/passport/src/index.js#L9",children:"https://github.com/cha0s/flecks/tree/master/packages/passport/src/index.js#L9"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/index.js#L8",children:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/index.js#L8"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/index.js#L14",children:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/index.js#L14"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/index.js#L128",children:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/index.js#L128"})," (",(0,r.jsx)(s.code,{children:"invokeMerge"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckssocketpacketsdecorate",children:(0,r.jsx)(s.code,{children:"@flecks/socket.packets.decorate"})}),"\n",(0,r.jsx)(s.p,{children:"Decorate database models."}),"\n",(0,r.jsxs)(s.p,{children:["In the example below, your fleck would have a ",(0,r.jsx)(s.code,{children:"packets/decorators"})," subdirectory, and each\ndecorator would be defined in its own file."]}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-42",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/socket.packets.decorate': Flecks.decorate(require.context('./packets/decorators', false, /\\.js$/))\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"packet-constructor",children:(0,r.jsx)("code",{children:"Packet: constructor"})}),"\n",(0,r.jsx)("p",{children:"The packet to decorate."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/governor/src/server.js#L132",children:"https://github.com/cha0s/flecks/tree/master/packages/governor/src/server.js#L132"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/passport/src/server/index.js#L23",children:"https://github.com/cha0s/flecks/tree/master/packages/passport/src/server/index.js#L23"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/client/index.js#L22",children:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/client/index.js#L22"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/index.js#L128",children:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/index.js#L128"})," (",(0,r.jsx)(s.code,{children:"invokeComposed"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckssocketserver",children:(0,r.jsx)(s.code,{children:"@flecks/socket.server"})}),"\n",(0,r.jsx)(s.p,{children:"Modify Socket.io server configuration."}),"\n",(0,r.jsxs)(s.p,{children:["See: ",(0,r.jsx)(s.a,{href:"https://socket.io/docs/v4/server-options/",children:"https://socket.io/docs/v4/server-options/"})]}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-43",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/socket.server': () => ({\n pingTimeout: Infinity,\n })\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redis/src/session/server.js#L25",children:"https://github.com/cha0s/flecks/tree/master/packages/redis/src/session/server.js#L25"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/server/index.js#L14",children:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/server/index.js#L14"})})]})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckssocketserverrequestsocket",children:(0,r.jsx)(s.code,{children:"@flecks/socket/server.request.socket"})}),"\n",(0,r.jsx)(s.p,{children:"Define middleware to run when a socket connection is established."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-44",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/socket/server.request.socket': () => (socket, next) => {\n // Express-style route middleware...\n next();\n }\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/governor/src/server.js#L103",children:"https://github.com/cha0s/flecks/tree/master/packages/governor/src/server.js#L103"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/passport/src/server/index.js#L81",children:"https://github.com/cha0s/flecks/tree/master/packages/passport/src/server/index.js#L81"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/session/src/server.js#L47",children:"https://github.com/cha0s/flecks/tree/master/packages/session/src/server.js#L47"})})]})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckswebconfig",children:(0,r.jsx)(s.code,{children:"@flecks/web.config"})}),"\n",(0,r.jsx)(s.p,{children:"Send configuration to clients."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-45",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/web.config': (req) => ({\n someConfig: req.someConfig,\n })\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"req-httpclientrequest-2",children:(0,r.jsx)("code",{children:"req: http.ClientRequest"})}),"\n",(0,r.jsx)("p",{children:"The HTTP request object."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/core/src/index.js#L12",children:"https://github.com/cha0s/flecks/tree/master/packages/core/src/index.js#L12"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/index.js#L9",children:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/index.js#L9"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/index.js#L19",children:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/index.js#L19"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/src/index.js#L2",children:"https://github.com/cha0s/flecks/tree/master/packages/web/src/index.js#L2"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/config.js#L94",children:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/config.js#L94"})," (",(0,r.jsx)(s.code,{children:"invokeAsync"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckswebroutes",children:(0,r.jsx)(s.code,{children:"@flecks/web.routes"})}),"\n",(0,r.jsx)(s.p,{children:"Define HTTP routes."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-46",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/web.routes': () => [\n {\n method: 'get',\n path: '/some-path',\n middleware: (req, res, next) => {\n // Express-style route middleware...\n next();\n },\n },\n ]\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/passport/src/server/index.js#L101",children:"https://github.com/cha0s/flecks/tree/master/packages/passport/src/server/index.js#L101"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/index.js#L7",children:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/index.js#L7"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/http.js#L415",children:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/http.js#L415"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckswebclientup",children:(0,r.jsx)(s.code,{children:"@flecks/web/client.up"})}),"\n",(0,r.jsx)(s.p,{children:"Define sequential actions to run when the client comes up."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-47",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/web/client.up': async () => {\n await youCanDoAsyncThingsHere();\n }\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react/src/client.js#L14",children:"https://github.com/cha0s/flecks/tree/master/packages/react/src/client.js#L14"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/client/index.js#L7",children:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/client/index.js#L7"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/client/index.js#L4",children:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/client/index.js#L4"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/build/entry.js#L610",children:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/build/entry.js#L610"})," (",(0,r.jsx)(s.code,{children:"invokeSequentialAsync"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckswebserverrequestroute",children:(0,r.jsx)(s.code,{children:"@flecks/web/server.request.route"})}),"\n",(0,r.jsx)(s.p,{children:"Define middleware to run when a route is matched."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-48",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/web/server.request.route': () => (req, res, next) => {\n // Express-style route middleware...\n next();\n }\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/governor/src/server.js#L29",children:"https://github.com/cha0s/flecks/tree/master/packages/governor/src/server.js#L29"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/passport/src/server/index.js#L24",children:"https://github.com/cha0s/flecks/tree/master/packages/passport/src/server/index.js#L24"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/server.js#L12",children:"https://github.com/cha0s/flecks/tree/master/packages/redux/src/server.js#L12"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/session/src/server.js#L19",children:"https://github.com/cha0s/flecks/tree/master/packages/session/src/server.js#L19"})})]})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckswebserverrequestsocket",children:(0,r.jsx)(s.code,{children:"@flecks/web/server.request.socket"})}),"\n",(0,r.jsx)(s.p,{children:"Define middleware to run when an HTTP socket connection is established."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-49",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/web/server.request.socket': () => (req, res, next) => {\n // Express-style route middleware...\n next();\n }\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/server/index.js#L5",children:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/server/index.js#L5"})})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckswebserverstreamhtml",children:(0,r.jsx)(s.code,{children:"@flecks/web/server.stream.html"})}),"\n",(0,r.jsx)(s.p,{children:"Define composition functions to run over the HTML stream prepared for the client."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-50",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/web/server.stream.html': (stream, req) => {\n return stream.pipe(myTransformStream);\n }\n};\n"})}),"\n",(0,r.jsx)(s.h3,{id:"stream-streamreadable",children:(0,r.jsx)("code",{children:"stream: stream.Readable"})}),"\n",(0,r.jsx)("p",{children:"The HTML stream."}),"\n",(0,r.jsx)(s.h3,{id:"req-httpclientrequest-3",children:(0,r.jsx)("code",{children:"req: http.ClientRequest"})}),"\n",(0,r.jsx)("p",{children:"The HTTP request object."}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/react/src/server.js#L7",children:"https://github.com/cha0s/flecks/tree/master/packages/react/src/server.js#L7"})}),(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/index.js#L17",children:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/index.js#L17"})})]})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/http.js#L19",children:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/http.js#L19"})," (",(0,r.jsx)(s.code,{children:"invokeComposedAsync"}),")"]})})]}),"\n",(0,r.jsx)(s.h2,{id:"fleckswebserverup",children:(0,r.jsx)(s.code,{children:"@flecks/web/server.up"})}),"\n",(0,r.jsx)(s.p,{children:"Define sequential actions to run when the HTTP server comes up."}),"\n",(0,r.jsx)(s.h3,{id:"example-usage-51",children:"Example usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-javascript",children:"export const hooks = {\n '@flecks/web/server.up': async () => {\n await youCanDoAsyncThingsHere();\n }\n};\n"})}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Implementations"}),(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/server/index.js#L9",children:"https://github.com/cha0s/flecks/tree/master/packages/socket/src/server/index.js#L9"})})})]}),"\n",(0,r.jsxs)(c,{children:[(0,r.jsx)("summary",{children:"Invocations"}),(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:[(0,r.jsx)(s.a,{href:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/http.js#L1384",children:"https://github.com/cha0s/flecks/tree/master/packages/web/src/server/http.js#L1384"})," (",(0,r.jsx)(s.code,{children:"invokeFlat"}),")"]})})]})]})}function d(e={}){const{wrapper:s}={...(0,l.a)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(o,{...e})}):o(e)}},1151:(e,s,c)=>{c.d(s,{Z:()=>n,a:()=>a});var r=c(7294);const l={},t=r.createContext(l);function a(e){const s=r.useContext(t);return r.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function n(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:a(e.components),r.createElement(t.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/773fe5c0.520fdb63.js b/assets/js/773fe5c0.520fdb63.js deleted file mode 100644 index ea729f85..00000000 --- a/assets/js/773fe5c0.520fdb63.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkflecks_docusaurus=self.webpackChunkflecks_docusaurus||[]).push([[1144],{9192:(e,s,r)=>{r.r(s),r.d(s,{assets:()=>h,contentTitle:()=>i,default:()=>x,frontMatter:()=>t,metadata:()=>n,toc:()=>a});var d=r(5893),l=r(1151),c=r(9286);const t={title:"Fleck configuration",description:"All the configurable flecks in this project."},i=void 0,n={id:"flecks/config",title:"Fleck configuration",description:"All the configurable flecks in this project.",source:"@site/docs/flecks/config.mdx",sourceDirName:"flecks",slug:"/flecks/config",permalink:"/flecks/docs/flecks/config",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"Fleck configuration",description:"All the configurable flecks in this project."},sidebar:"flecksSidebar",previous:{title:"Hooks",permalink:"/flecks/docs/flecks/hooks"},next:{title:"Build files",permalink:"/flecks/docs/flecks/build-files"}},h={},a=[{value:"@flecks/build",id:"flecksbuild",level:2},{value:"@flecks/core",id:"fleckscore",level:2},{value:"@flecks/db/server",id:"flecksdbserver",level:2},{value:"@flecks/docker",id:"flecksdocker",level:2},{value:"@flecks/electron",id:"fleckselectron",level:2},{value:"@flecks/fleck",id:"flecksfleck",level:2},{value:"@flecks/governor/server",id:"flecksgovernorserver",level:2},{value:"@flecks/react",id:"flecksreact",level:2},{value:"@flecks/redis/server",id:"flecksredisserver",level:2},{value:"@flecks/server",id:"flecksserver",level:2},{value:"@flecks/session/server",id:"fleckssessionserver",level:2},{value:"@flecks/web",id:"flecksweb",level:2}];function j(e){const s={a:"a",code:"code",h2:"h2",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,l.a)(),...e.components};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("style",{children:"td > .theme-code-block { margin: 0; }"}),"\n",(0,d.jsx)(s.p,{children:"This page documents all configurable flecks in this project."}),"\n",(0,d.jsx)(s.h2,{id:"flecksbuild",children:(0,d.jsx)(s.code,{children:"@flecks/build"})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Name"}),(0,d.jsx)(s.th,{children:"Default"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsxs)(s.tbody,{children:[(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"packageManager"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"'npm'"})}),(0,d.jsx)(s.td,{children:"The package manager used for tasks."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"profile"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"[]"})}),(0,d.jsxs)(s.td,{children:["Build targets to profile with ",(0,d.jsx)(s.code,{children:"webpack.debug.ProfilingPlugin"}),"."]})]})]})]}),"\n",(0,d.jsx)(s.h2,{id:"fleckscore",children:(0,d.jsx)(s.code,{children:"@flecks/core"})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Name"}),(0,d.jsx)(s.th,{children:"Default"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsx)(s.tbody,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"id"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"'flecks'"})}),(0,d.jsx)(s.td,{children:"The ID of your application."})]})})]}),"\n",(0,d.jsx)(s.h2,{id:"flecksdbserver",children:(0,d.jsx)(s.code,{children:"@flecks/db/server"})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Name"}),(0,d.jsx)(s.th,{children:"Default"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsxs)(s.tbody,{children:[(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"database"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"':memory:'"})}),(0,d.jsx)(s.td,{children:"The database to connect to."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"dialect"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"'sqlite'"})}),(0,d.jsxs)(s.td,{children:["SQL dialect. See: ",(0,d.jsx)(s.a,{href:"https://sequelize.org/v5/manual/dialects.html",children:"https://sequelize.org/v5/manual/dialects.html"})]})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"host"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"undefined"})}),(0,d.jsx)(s.td,{children:"Database server host."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"password"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"undefined"})}),(0,d.jsx)(s.td,{children:"Database server password."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"port"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"undefined"})}),(0,d.jsx)(s.td,{children:"Database server port."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"username"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"undefined"})}),(0,d.jsx)(s.td,{children:"Database server username."})]})]})]}),"\n",(0,d.jsx)(s.h2,{id:"flecksdocker",children:(0,d.jsx)(s.code,{children:"@flecks/docker"})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Name"}),(0,d.jsx)(s.th,{children:"Default"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsx)(s.tbody,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"enabled"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"true"})}),(0,d.jsx)(s.td,{children:"Whether to run docker containers."})]})})]}),"\n",(0,d.jsx)(s.h2,{id:"fleckselectron",children:(0,d.jsx)(s.code,{children:"@flecks/electron"})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Name"}),(0,d.jsx)(s.th,{children:"Default"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsxs)(s.tbody,{children:[(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"browserWindowOptions"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"{}"})}),(0,d.jsxs)(s.td,{children:["Browser window options. See: ",(0,d.jsx)(s.a,{href:"https://www.electronjs.org/docs/latest/api/browser-window",children:"https://www.electronjs.org/docs/latest/api/browser-window"})]})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"installExtensions"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"true"})}),(0,d.jsx)(s.td,{children:"Install devtools extensions (by default). You can pass an array of Chrome store IDs to install a list of custom extensions."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"quitOnClosed"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"true"})}),(0,d.jsx)(s.td,{children:"Quit the app when all windows are closed."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"url"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"undefined"})}),(0,d.jsxs)(s.td,{children:["The URL to load in electron by default. Defaults to ",(0,d.jsx)(s.code,{children:"http://${flecks.get('@flecks/web.public')}"}),"."]})]})]})]}),"\n",(0,d.jsx)(s.h2,{id:"flecksfleck",children:(0,d.jsx)(s.code,{children:"@flecks/fleck"})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Name"}),(0,d.jsx)(s.th,{children:"Default"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsx)(s.tbody,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"stats"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"{\n colors: true,\n errorDetails: true,\n}"})}),(0,d.jsx)(s.td,{children:"Webpack stats configuration."})]})})]}),"\n",(0,d.jsx)(s.h2,{id:"flecksgovernorserver",children:(0,d.jsx)(s.code,{children:"@flecks/governor/server"})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Name"}),(0,d.jsx)(s.th,{children:"Default"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsxs)(s.tbody,{children:[(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"keys"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"['ip']"})}),(0,d.jsx)(s.td,{children:"All keys used to determine fingerprint."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"web"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"{\n keys: ['ip'],\n points: 60,\n duration: 30,\n ttl: 30,\n}"})}),(0,d.jsx)(s.td,{})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"socket"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"{\n keys: ['ip'],\n points: 60,\n duration: 30,\n ttl: 30,\n}"})}),(0,d.jsx)(s.td,{})]})]})]}),"\n",(0,d.jsx)(s.h2,{id:"flecksreact",children:(0,d.jsx)(s.code,{children:"@flecks/react"})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Name"}),(0,d.jsx)(s.th,{children:"Default"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsxs)(s.tbody,{children:[(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"providers"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"['...']"})}),(0,d.jsx)(s.td,{children:"React providers."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"ssr"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"true"})}),(0,d.jsx)(s.td,{children:"Whether to enable server-side rendering."})]})]})]}),"\n",(0,d.jsx)(s.h2,{id:"flecksredisserver",children:(0,d.jsx)(s.code,{children:"@flecks/redis/server"})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Name"}),(0,d.jsx)(s.th,{children:"Default"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsxs)(s.tbody,{children:[(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"host"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"'localhost'"})}),(0,d.jsx)(s.td,{children:"Redis server host."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"port"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"6379"})}),(0,d.jsx)(s.td,{children:"Redis server port."})]})]})]}),"\n",(0,d.jsx)(s.h2,{id:"flecksserver",children:(0,d.jsx)(s.code,{children:"@flecks/server"})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Name"}),(0,d.jsx)(s.th,{children:"Default"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsxs)(s.tbody,{children:[(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"hot"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"false"})}),(0,d.jsx)(s.td,{children:"Whether HMR is enabled."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"nodeArgs"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"[]"})}),(0,d.jsxs)(s.td,{children:["Arguments to pass along to node. See: ",(0,d.jsx)(s.a,{href:"https://nodejs.org/api/cli.html",children:"https://nodejs.org/api/cli.html"})]})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"nodeEnv"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"{}"})}),(0,d.jsxs)(s.td,{children:["Environment to pass along to node. See: ",(0,d.jsx)(s.a,{href:"https://nodejs.org/api/cli.html#environment-variables",children:"https://nodejs.org/api/cli.html#environment-variables"})]})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"start"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"true"})}),(0,d.jsx)(s.td,{children:"Whether to start the server after building."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"stats"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"{\n colors: true,\n errorDetails: true,\n}"})}),(0,d.jsx)(s.td,{children:"Webpack stats configuration."})]})]})]}),"\n",(0,d.jsx)(s.h2,{id:"fleckssessionserver",children:(0,d.jsx)(s.code,{children:"@flecks/session/server"})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Name"}),(0,d.jsx)(s.th,{children:"Default"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsx)(s.tbody,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"cookieSecret"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"'Set the FLECKS_ENV__flecks_session_server__cookieSecret environment variable!'"})}),(0,d.jsxs)(s.td,{children:["Set the cookie secret for session encryption. See: ",(0,d.jsx)(s.a,{href:"http://expressjs.com/en/resources/middleware/cookie-parser.html",children:"http://expressjs.com/en/resources/middleware/cookie-parser.html"})]})]})})]}),"\n",(0,d.jsx)(s.h2,{id:"flecksweb",children:(0,d.jsx)(s.code,{children:"@flecks/web"})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Name"}),(0,d.jsx)(s.th,{children:"Default"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsxs)(s.tbody,{children:[(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"appMountId"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"'root'"})}),(0,d.jsx)(s.td,{children:"The ID of the root element on the page."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"base"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"'/'"})}),(0,d.jsx)(s.td,{children:"Base tag path."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"devDisableHostCheck"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"false"})}),(0,d.jsxs)(s.td,{children:["(webpack-dev-server) Disable the host check. See: ",(0,d.jsx)(s.a,{href:"https://github.com/webpack/webpack-dev-server/issues/887",children:"https://github.com/webpack/webpack-dev-server/issues/887"})]})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"devHost"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"'localhost'"})}),(0,d.jsx)(s.td,{children:"(webpack-dev-server) Host to bind."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"devPort"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"undefined"})}),(0,d.jsx)(s.td,{children:"(webpack-dev-server) Port to bind."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"devPublic"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"undefined"})}),(0,d.jsxs)(s.td,{children:["(webpack-dev-server) Public path to serve. Defaults to ",(0,d.jsx)(s.code,{children:"flecks.get('@flecks/web.public')"}),"."]})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"devStats"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"{\n colors: true,\n errorDetails: true,\n}"})}),(0,d.jsx)(s.td,{children:"(webpack-dev-server) Webpack stats output."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"dll"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"[]"})}),(0,d.jsxs)(s.td,{children:["Modules to externalize using ",(0,d.jsx)(s.code,{children:"webpack.DllPlugin"}),"."]})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"host"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"'0.0.0.0'"})}),(0,d.jsx)(s.td,{children:"Host to bind."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"icon"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"''"})}),(0,d.jsx)(s.td,{children:"Path to icon."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"port"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"32340"})}),(0,d.jsx)(s.td,{children:"Port to bind."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"meta"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"{\n charset: 'utf-8',\n viewport: 'width=device-width, user-scalable=no',\n}"})}),(0,d.jsx)(s.td,{children:"Meta tags."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"public"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"'localhost:32340'"})}),(0,d.jsx)(s.td,{children:"Public path to server."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"stats"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"{\n colors: true,\n errorDetails: true,\n}"})}),(0,d.jsx)(s.td,{children:"Webpack stats configuration."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"title"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"'[@flecks/core.id]'"})}),(0,d.jsx)(s.td,{children:"HTML title."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"trust"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"false"})}),(0,d.jsxs)(s.td,{children:["Proxies to trust. See: ",(0,d.jsx)(s.a,{href:"https://www.npmjs.com/package/proxy-addr",children:"https://www.npmjs.com/package/proxy-addr"})]})]})]})]})]})}function x(e={}){const{wrapper:s}={...(0,l.a)(),...e.components};return s?(0,d.jsx)(s,{...e,children:(0,d.jsx)(j,{...e})}):j(e)}}}]); \ No newline at end of file diff --git a/assets/js/773fe5c0.68bde60d.js b/assets/js/773fe5c0.68bde60d.js new file mode 100644 index 00000000..6587757d --- /dev/null +++ b/assets/js/773fe5c0.68bde60d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkflecks_docusaurus=self.webpackChunkflecks_docusaurus||[]).push([[1144],{9192:(e,s,r)=>{r.r(s),r.d(s,{assets:()=>h,contentTitle:()=>i,default:()=>x,frontMatter:()=>t,metadata:()=>n,toc:()=>a});var d=r(5893),l=r(1151),c=r(9286);const t={title:"Fleck configuration",description:"All the configurable flecks in this project."},i=void 0,n={id:"flecks/config",title:"Fleck configuration",description:"All the configurable flecks in this project.",source:"@site/docs/flecks/config.mdx",sourceDirName:"flecks",slug:"/flecks/config",permalink:"/flecks/docs/flecks/config",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"Fleck configuration",description:"All the configurable flecks in this project."},sidebar:"flecksSidebar",previous:{title:"Hooks",permalink:"/flecks/docs/flecks/hooks"},next:{title:"Build files",permalink:"/flecks/docs/flecks/build-files"}},h={},a=[{value:"@flecks/build",id:"flecksbuild",level:2},{value:"@flecks/core",id:"fleckscore",level:2},{value:"@flecks/db/server",id:"flecksdbserver",level:2},{value:"@flecks/docker",id:"flecksdocker",level:2},{value:"@flecks/electron",id:"fleckselectron",level:2},{value:"@flecks/fleck",id:"flecksfleck",level:2},{value:"@flecks/governor/server",id:"flecksgovernorserver",level:2},{value:"@flecks/passport/server",id:"fleckspassportserver",level:2},{value:"@flecks/react",id:"flecksreact",level:2},{value:"@flecks/redis/server",id:"flecksredisserver",level:2},{value:"@flecks/server",id:"flecksserver",level:2},{value:"@flecks/session/server",id:"fleckssessionserver",level:2},{value:"@flecks/web",id:"flecksweb",level:2}];function j(e){const s={a:"a",code:"code",h2:"h2",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,l.a)(),...e.components};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("style",{children:"td > .theme-code-block { margin: 0; }"}),"\n",(0,d.jsx)(s.p,{children:"This page documents all configurable flecks in this project."}),"\n",(0,d.jsx)(s.h2,{id:"flecksbuild",children:(0,d.jsx)(s.code,{children:"@flecks/build"})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Name"}),(0,d.jsx)(s.th,{children:"Default"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsxs)(s.tbody,{children:[(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"packageManager"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"'npm'"})}),(0,d.jsx)(s.td,{children:"The package manager used for tasks."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"profile"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"[]"})}),(0,d.jsxs)(s.td,{children:["Build targets to profile with ",(0,d.jsx)(s.code,{children:"webpack.debug.ProfilingPlugin"}),"."]})]})]})]}),"\n",(0,d.jsx)(s.h2,{id:"fleckscore",children:(0,d.jsx)(s.code,{children:"@flecks/core"})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Name"}),(0,d.jsx)(s.th,{children:"Default"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsx)(s.tbody,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"id"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"'flecks'"})}),(0,d.jsx)(s.td,{children:"The ID of your application."})]})})]}),"\n",(0,d.jsx)(s.h2,{id:"flecksdbserver",children:(0,d.jsx)(s.code,{children:"@flecks/db/server"})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Name"}),(0,d.jsx)(s.th,{children:"Default"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsxs)(s.tbody,{children:[(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"database"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"':memory:'"})}),(0,d.jsx)(s.td,{children:"The database to connect to."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"dialect"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"'sqlite'"})}),(0,d.jsxs)(s.td,{children:["SQL dialect. See: ",(0,d.jsx)(s.a,{href:"https://sequelize.org/v5/manual/dialects.html",children:"https://sequelize.org/v5/manual/dialects.html"})]})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"host"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"undefined"})}),(0,d.jsx)(s.td,{children:"Database server host."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"password"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"undefined"})}),(0,d.jsx)(s.td,{children:"Database server password."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"port"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"undefined"})}),(0,d.jsx)(s.td,{children:"Database server port."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"username"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"undefined"})}),(0,d.jsx)(s.td,{children:"Database server username."})]})]})]}),"\n",(0,d.jsx)(s.h2,{id:"flecksdocker",children:(0,d.jsx)(s.code,{children:"@flecks/docker"})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Name"}),(0,d.jsx)(s.th,{children:"Default"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsx)(s.tbody,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"enabled"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"true"})}),(0,d.jsx)(s.td,{children:"Whether to run docker containers."})]})})]}),"\n",(0,d.jsx)(s.h2,{id:"fleckselectron",children:(0,d.jsx)(s.code,{children:"@flecks/electron"})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Name"}),(0,d.jsx)(s.th,{children:"Default"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsxs)(s.tbody,{children:[(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"browserWindowOptions"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"{}"})}),(0,d.jsxs)(s.td,{children:["Browser window options. See: ",(0,d.jsx)(s.a,{href:"https://www.electronjs.org/docs/latest/api/browser-window",children:"https://www.electronjs.org/docs/latest/api/browser-window"})]})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"installExtensions"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"true"})}),(0,d.jsx)(s.td,{children:"Install devtools extensions (by default). You can pass an array of Chrome store IDs to install a list of custom extensions."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"quitOnClosed"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"true"})}),(0,d.jsx)(s.td,{children:"Quit the app when all windows are closed."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"url"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"undefined"})}),(0,d.jsxs)(s.td,{children:["The URL to load in electron by default. Defaults to ",(0,d.jsx)(s.code,{children:"http://${flecks.get('@flecks/web.public')}"}),"."]})]})]})]}),"\n",(0,d.jsx)(s.h2,{id:"flecksfleck",children:(0,d.jsx)(s.code,{children:"@flecks/fleck"})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Name"}),(0,d.jsx)(s.th,{children:"Default"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsx)(s.tbody,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"stats"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"{\n colors: true,\n errorDetails: true,\n}"})}),(0,d.jsx)(s.td,{children:"Webpack stats configuration."})]})})]}),"\n",(0,d.jsx)(s.h2,{id:"flecksgovernorserver",children:(0,d.jsx)(s.code,{children:"@flecks/governor/server"})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Name"}),(0,d.jsx)(s.th,{children:"Default"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsxs)(s.tbody,{children:[(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"keys"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"['ip']"})}),(0,d.jsx)(s.td,{children:"All keys used to determine fingerprint."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"web"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"{\n keys: ['ip'],\n points: 60,\n duration: 30,\n ttl: 30,\n}"})}),(0,d.jsx)(s.td,{})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"socket"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"{\n keys: ['ip'],\n points: 60,\n duration: 30,\n ttl: 30,\n}"})}),(0,d.jsx)(s.td,{})]})]})]}),"\n",(0,d.jsx)(s.h2,{id:"fleckspassportserver",children:(0,d.jsx)(s.code,{children:"@flecks/passport/server"})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Name"}),(0,d.jsx)(s.th,{children:"Default"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsxs)(s.tbody,{children:[(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"failureRedirect"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"'/'"})}),(0,d.jsx)(s.td,{children:"Path to redirect to after failed login."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"logoutRedirect"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"'/'"})}),(0,d.jsx)(s.td,{children:"Path to redirect to after logout."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"successRedirect"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"'/'"})}),(0,d.jsx)(s.td,{children:"Path to redirect to after successful login."})]})]})]}),"\n",(0,d.jsx)(s.h2,{id:"flecksreact",children:(0,d.jsx)(s.code,{children:"@flecks/react"})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Name"}),(0,d.jsx)(s.th,{children:"Default"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsxs)(s.tbody,{children:[(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"providers"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"['...']"})}),(0,d.jsx)(s.td,{children:"React providers."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"ssr"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"true"})}),(0,d.jsx)(s.td,{children:"Whether to enable server-side rendering."})]})]})]}),"\n",(0,d.jsx)(s.h2,{id:"flecksredisserver",children:(0,d.jsx)(s.code,{children:"@flecks/redis/server"})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Name"}),(0,d.jsx)(s.th,{children:"Default"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsxs)(s.tbody,{children:[(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"host"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"'localhost'"})}),(0,d.jsx)(s.td,{children:"Redis server host."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"port"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"6379"})}),(0,d.jsx)(s.td,{children:"Redis server port."})]})]})]}),"\n",(0,d.jsx)(s.h2,{id:"flecksserver",children:(0,d.jsx)(s.code,{children:"@flecks/server"})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Name"}),(0,d.jsx)(s.th,{children:"Default"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsxs)(s.tbody,{children:[(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"hot"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"false"})}),(0,d.jsx)(s.td,{children:"Whether HMR is enabled."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"nodeArgs"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"[]"})}),(0,d.jsxs)(s.td,{children:["Arguments to pass along to node. See: ",(0,d.jsx)(s.a,{href:"https://nodejs.org/api/cli.html",children:"https://nodejs.org/api/cli.html"})]})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"nodeEnv"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"{}"})}),(0,d.jsxs)(s.td,{children:["Environment to pass along to node. See: ",(0,d.jsx)(s.a,{href:"https://nodejs.org/api/cli.html#environment-variables",children:"https://nodejs.org/api/cli.html#environment-variables"})]})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"start"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"true"})}),(0,d.jsx)(s.td,{children:"Whether to start the server after building."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"stats"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"{\n colors: true,\n errorDetails: true,\n}"})}),(0,d.jsx)(s.td,{children:"Webpack stats configuration."})]})]})]}),"\n",(0,d.jsx)(s.h2,{id:"fleckssessionserver",children:(0,d.jsx)(s.code,{children:"@flecks/session/server"})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Name"}),(0,d.jsx)(s.th,{children:"Default"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsx)(s.tbody,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"cookieSecret"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"'Set the FLECKS_ENV__flecks_session_server__cookieSecret environment variable!'"})}),(0,d.jsxs)(s.td,{children:["Set the cookie secret for session encryption. See: ",(0,d.jsx)(s.a,{href:"http://expressjs.com/en/resources/middleware/cookie-parser.html",children:"http://expressjs.com/en/resources/middleware/cookie-parser.html"})]})]})})]}),"\n",(0,d.jsx)(s.h2,{id:"flecksweb",children:(0,d.jsx)(s.code,{children:"@flecks/web"})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Name"}),(0,d.jsx)(s.th,{children:"Default"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsxs)(s.tbody,{children:[(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"appMountId"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"'root'"})}),(0,d.jsx)(s.td,{children:"The ID of the root element on the page."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"base"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"'/'"})}),(0,d.jsx)(s.td,{children:"Base tag path."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"devDisableHostCheck"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"false"})}),(0,d.jsxs)(s.td,{children:["(webpack-dev-server) Disable the host check. See: ",(0,d.jsx)(s.a,{href:"https://github.com/webpack/webpack-dev-server/issues/887",children:"https://github.com/webpack/webpack-dev-server/issues/887"})]})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"devHost"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"'localhost'"})}),(0,d.jsx)(s.td,{children:"(webpack-dev-server) Host to bind."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"devPort"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"undefined"})}),(0,d.jsx)(s.td,{children:"(webpack-dev-server) Port to bind."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"devPublic"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"undefined"})}),(0,d.jsxs)(s.td,{children:["(webpack-dev-server) Public path to serve. Defaults to ",(0,d.jsx)(s.code,{children:"flecks.get('@flecks/web.public')"}),"."]})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"devStats"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"{\n colors: true,\n errorDetails: true,\n}"})}),(0,d.jsx)(s.td,{children:"(webpack-dev-server) Webpack stats output."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"dll"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"[]"})}),(0,d.jsxs)(s.td,{children:["Modules to externalize using ",(0,d.jsx)(s.code,{children:"webpack.DllPlugin"}),"."]})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"host"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"'0.0.0.0'"})}),(0,d.jsx)(s.td,{children:"Host to bind."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"icon"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"''"})}),(0,d.jsx)(s.td,{children:"Path to icon."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"port"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"32340"})}),(0,d.jsx)(s.td,{children:"Port to bind."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"meta"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"{\n charset: 'utf-8',\n viewport: 'width=device-width, user-scalable=no',\n}"})}),(0,d.jsx)(s.td,{children:"Meta tags."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"public"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"'localhost:32340'"})}),(0,d.jsx)(s.td,{children:"Public path to server."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"stats"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"{\n colors: true,\n errorDetails: true,\n}"})}),(0,d.jsx)(s.td,{children:"Webpack stats configuration."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"title"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"'[@flecks/core.id]'"})}),(0,d.jsx)(s.td,{children:"HTML title."})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:"trust"}),(0,d.jsx)(s.td,{children:(0,d.jsx)(c.Z,{language:"javascript",children:"false"})}),(0,d.jsxs)(s.td,{children:["Proxies to trust. See: ",(0,d.jsx)(s.a,{href:"https://www.npmjs.com/package/proxy-addr",children:"https://www.npmjs.com/package/proxy-addr"})]})]})]})]})]})}function x(e={}){const{wrapper:s}={...(0,l.a)(),...e.components};return s?(0,d.jsx)(s,{...e,children:(0,d.jsx)(j,{...e})}):j(e)}}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.5bd8cfb0.js b/assets/js/runtime~main.cc04bf75.js similarity index 97% rename from assets/js/runtime~main.5bd8cfb0.js rename to assets/js/runtime~main.cc04bf75.js index da16c265..eb7eda5c 100644 --- a/assets/js/runtime~main.5bd8cfb0.js +++ b/assets/js/runtime~main.cc04bf75.js @@ -1 +1 @@ -(()=>{"use strict";var e,a,c,t,r,b={},f={};function d(e){var a=f[e];if(void 0!==a)return a.exports;var c=f[e]={id:e,loaded:!1,exports:{}};return b[e].call(c.exports,c,c.exports,d),c.loaded=!0,c.exports}d.m=b,d.c=f,e=[],d.O=(a,c,t,r)=>{if(!c){var b=1/0;for(i=0;i=r)&&Object.keys(d.O).every((e=>d.O[e](c[o])))?c.splice(o--,1):(f=!1,r0&&e[i-1][2]>r;i--)e[i]=e[i-1];e[i]=[c,t,r]},d.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return d.d(a,{a:a}),a},c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,d.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var r=Object.create(null);d.r(r);var b={};a=a||[null,c({}),c([]),c(c)];for(var f=2&t&&e;"object"==typeof f&&!~a.indexOf(f);f=c(f))Object.getOwnPropertyNames(f).forEach((a=>b[a]=()=>e[a]));return b.default=()=>e,d.d(r,b),r},d.d=(e,a)=>{for(var c in a)d.o(a,c)&&!d.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:a[c]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((a,c)=>(d.f[c](e,a),a)),[])),d.u=e=>"assets/js/"+({53:"935f2afb",196:"cbb899e4",262:"8827d4c5",937:"972d9d57",944:"57cdf011",1052:"3c291670",1144:"773fe5c0",1204:"be07d3f5",1825:"c208b484",1851:"b045326f",2528:"1dc09441",2596:"357e2da2",2873:"18911325",3541:"af7d3287",3850:"1ecec20c",3951:"94cab2e7",4364:"5df00a39",4368:"a94703ab",4639:"8d4b214a",4891:"cb5b5a7a",5287:"8d2f4c1c",5679:"72512343",5930:"fa4d91bf",6128:"160a3b85",6324:"01bbcd7b",6325:"8f92789c",6911:"8b0cd02a",7041:"ba61d949",7918:"17896441",8312:"bfa2a205",8518:"a7bd4aaa",8532:"32a57bab",9091:"06d8b529",9661:"5e95c892",9686:"041c5cc5",9817:"14eb3368",9828:"fb49b6cf"}[e]||e)+"."+{53:"f5cd253e",109:"32733b05",132:"ae35eca4",196:"c02bcdbb",240:"07917f61",262:"f2e2176a",937:"eeafcbae",944:"30c569f1",1052:"1e709b46",1144:"520fdb63",1204:"fc009175",1504:"957f1d57",1644:"03bc3b57",1763:"5ae8bab8",1772:"897dbcaa",1825:"a1634965",1851:"985451e2",2183:"3334b572",2312:"2c0c9fc1",2528:"da92058a",2596:"b6b0f02c",2661:"5f234f73",2693:"a00fcec7",2696:"43f9fa5f",2700:"b8c28ffc",2873:"0dc82106",3076:"1e2e3390",3343:"e0acdec4",3541:"b1177b65",3619:"fbb2fff5",3850:"37a9cd97",3951:"d4af77d8",4238:"641fbfe9",4364:"7bfa3769",4368:"0848533e",4639:"4aa69cf7",4706:"a02e6509",4891:"cd3d8902",5269:"c28d6be0",5287:"012e4fbc",5326:"b2028c2d",5679:"2d22eabb",5790:"4a3585b2",5930:"927421e0",5943:"426845a9",6128:"f00afb49",6255:"d3d0f009",6324:"1dfb9d17",6325:"01fc6817",6648:"b268d988",6911:"c73f1091",6985:"bd79313b",7041:"d5997d16",7918:"f9921edf",7936:"8edc4d0d",8016:"5c15b204",8312:"fe5e394a",8518:"b46b1112",8532:"41bf717a",8955:"e03572fe",9091:"988cc583",9138:"8c3e3e31",9661:"68abf1d3",9686:"d6ff3d43",9817:"67536d34",9828:"52f8f6aa",9893:"cf0ffbf2"}[e]+".js",d.miniCssF=e=>{},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),t={},r="flecks-docusaurus:",d.l=(e,a,c,b)=>{if(t[e])t[e].push(a);else{var f,o;if(void 0!==c)for(var n=document.getElementsByTagName("script"),i=0;i{f.onerror=f.onload=null,clearTimeout(s);var r=t[e];if(delete t[e],f.parentNode&&f.parentNode.removeChild(f),r&&r.forEach((e=>e(c))),a)return a(c)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:f}),12e4);f.onerror=l.bind(null,f.onerror),f.onload=l.bind(null,f.onload),o&&document.head.appendChild(f)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.p="/flecks/",d.gca=function(e){return e={17896441:"7918",18911325:"2873",72512343:"5679","935f2afb":"53",cbb899e4:"196","8827d4c5":"262","972d9d57":"937","57cdf011":"944","3c291670":"1052","773fe5c0":"1144",be07d3f5:"1204",c208b484:"1825",b045326f:"1851","1dc09441":"2528","357e2da2":"2596",af7d3287:"3541","1ecec20c":"3850","94cab2e7":"3951","5df00a39":"4364",a94703ab:"4368","8d4b214a":"4639",cb5b5a7a:"4891","8d2f4c1c":"5287",fa4d91bf:"5930","160a3b85":"6128","01bbcd7b":"6324","8f92789c":"6325","8b0cd02a":"6911",ba61d949:"7041",bfa2a205:"8312",a7bd4aaa:"8518","32a57bab":"8532","06d8b529":"9091","5e95c892":"9661","041c5cc5":"9686","14eb3368":"9817",fb49b6cf:"9828"}[e]||e,d.p+d.u(e)},(()=>{var e={1303:0,532:0};d.f.j=(a,c)=>{var t=d.o(e,a)?e[a]:void 0;if(0!==t)if(t)c.push(t[2]);else if(/^(1303|532)$/.test(a))e[a]=0;else{var r=new Promise(((c,r)=>t=e[a]=[c,r]));c.push(t[2]=r);var b=d.p+d.u(a),f=new Error;d.l(b,(c=>{if(d.o(e,a)&&(0!==(t=e[a])&&(e[a]=void 0),t)){var r=c&&("load"===c.type?"missing":c.type),b=c&&c.target&&c.target.src;f.message="Loading chunk "+a+" failed.\n("+r+": "+b+")",f.name="ChunkLoadError",f.type=r,f.request=b,t[1](f)}}),"chunk-"+a,a)}},d.O.j=a=>0===e[a];var a=(a,c)=>{var t,r,b=c[0],f=c[1],o=c[2],n=0;if(b.some((a=>0!==e[a]))){for(t in f)d.o(f,t)&&(d.m[t]=f[t]);if(o)var i=o(d)}for(a&&a(c);n{"use strict";var e,a,c,t,r,b={},f={};function d(e){var a=f[e];if(void 0!==a)return a.exports;var c=f[e]={id:e,loaded:!1,exports:{}};return b[e].call(c.exports,c,c.exports,d),c.loaded=!0,c.exports}d.m=b,d.c=f,e=[],d.O=(a,c,t,r)=>{if(!c){var b=1/0;for(i=0;i=r)&&Object.keys(d.O).every((e=>d.O[e](c[o])))?c.splice(o--,1):(f=!1,r0&&e[i-1][2]>r;i--)e[i]=e[i-1];e[i]=[c,t,r]},d.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return d.d(a,{a:a}),a},c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,d.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var r=Object.create(null);d.r(r);var b={};a=a||[null,c({}),c([]),c(c)];for(var f=2&t&&e;"object"==typeof f&&!~a.indexOf(f);f=c(f))Object.getOwnPropertyNames(f).forEach((a=>b[a]=()=>e[a]));return b.default=()=>e,d.d(r,b),r},d.d=(e,a)=>{for(var c in a)d.o(a,c)&&!d.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:a[c]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((a,c)=>(d.f[c](e,a),a)),[])),d.u=e=>"assets/js/"+({53:"935f2afb",196:"cbb899e4",262:"8827d4c5",937:"972d9d57",944:"57cdf011",1052:"3c291670",1144:"773fe5c0",1204:"be07d3f5",1825:"c208b484",1851:"b045326f",2528:"1dc09441",2596:"357e2da2",2873:"18911325",3541:"af7d3287",3850:"1ecec20c",3951:"94cab2e7",4364:"5df00a39",4368:"a94703ab",4639:"8d4b214a",4891:"cb5b5a7a",5287:"8d2f4c1c",5679:"72512343",5930:"fa4d91bf",6128:"160a3b85",6324:"01bbcd7b",6325:"8f92789c",6911:"8b0cd02a",7041:"ba61d949",7918:"17896441",8312:"bfa2a205",8518:"a7bd4aaa",8532:"32a57bab",9091:"06d8b529",9661:"5e95c892",9686:"041c5cc5",9817:"14eb3368",9828:"fb49b6cf"}[e]||e)+"."+{53:"f5cd253e",109:"32733b05",132:"ae35eca4",196:"c02bcdbb",240:"07917f61",262:"f2e2176a",937:"eeafcbae",944:"30c569f1",1052:"1e709b46",1144:"68bde60d",1204:"fc009175",1504:"957f1d57",1644:"03bc3b57",1763:"5ae8bab8",1772:"897dbcaa",1825:"a1634965",1851:"985451e2",2183:"3334b572",2312:"2c0c9fc1",2528:"da92058a",2596:"b6b0f02c",2661:"5f234f73",2693:"a00fcec7",2696:"43f9fa5f",2700:"b8c28ffc",2873:"0dc82106",3076:"1e2e3390",3343:"e0acdec4",3541:"b1177b65",3619:"fbb2fff5",3850:"37a9cd97",3951:"d4af77d8",4238:"641fbfe9",4364:"7bfa3769",4368:"0848533e",4639:"4aa69cf7",4706:"a02e6509",4891:"cd3d8902",5269:"c28d6be0",5287:"012e4fbc",5326:"b2028c2d",5679:"825e848a",5790:"4a3585b2",5930:"927421e0",5943:"426845a9",6128:"f00afb49",6255:"d3d0f009",6324:"1dfb9d17",6325:"01fc6817",6648:"b268d988",6911:"c73f1091",6985:"bd79313b",7041:"d5997d16",7918:"f9921edf",7936:"8edc4d0d",8016:"5c15b204",8312:"fe5e394a",8518:"b46b1112",8532:"41bf717a",8955:"e03572fe",9091:"988cc583",9138:"8c3e3e31",9661:"68abf1d3",9686:"d6ff3d43",9817:"67536d34",9828:"52f8f6aa",9893:"cf0ffbf2"}[e]+".js",d.miniCssF=e=>{},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),t={},r="flecks-docusaurus:",d.l=(e,a,c,b)=>{if(t[e])t[e].push(a);else{var f,o;if(void 0!==c)for(var n=document.getElementsByTagName("script"),i=0;i{f.onerror=f.onload=null,clearTimeout(s);var r=t[e];if(delete t[e],f.parentNode&&f.parentNode.removeChild(f),r&&r.forEach((e=>e(c))),a)return a(c)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:f}),12e4);f.onerror=l.bind(null,f.onerror),f.onload=l.bind(null,f.onload),o&&document.head.appendChild(f)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.p="/flecks/",d.gca=function(e){return e={17896441:"7918",18911325:"2873",72512343:"5679","935f2afb":"53",cbb899e4:"196","8827d4c5":"262","972d9d57":"937","57cdf011":"944","3c291670":"1052","773fe5c0":"1144",be07d3f5:"1204",c208b484:"1825",b045326f:"1851","1dc09441":"2528","357e2da2":"2596",af7d3287:"3541","1ecec20c":"3850","94cab2e7":"3951","5df00a39":"4364",a94703ab:"4368","8d4b214a":"4639",cb5b5a7a:"4891","8d2f4c1c":"5287",fa4d91bf:"5930","160a3b85":"6128","01bbcd7b":"6324","8f92789c":"6325","8b0cd02a":"6911",ba61d949:"7041",bfa2a205:"8312",a7bd4aaa:"8518","32a57bab":"8532","06d8b529":"9091","5e95c892":"9661","041c5cc5":"9686","14eb3368":"9817",fb49b6cf:"9828"}[e]||e,d.p+d.u(e)},(()=>{var e={1303:0,532:0};d.f.j=(a,c)=>{var t=d.o(e,a)?e[a]:void 0;if(0!==t)if(t)c.push(t[2]);else if(/^(1303|532)$/.test(a))e[a]=0;else{var r=new Promise(((c,r)=>t=e[a]=[c,r]));c.push(t[2]=r);var b=d.p+d.u(a),f=new Error;d.l(b,(c=>{if(d.o(e,a)&&(0!==(t=e[a])&&(e[a]=void 0),t)){var r=c&&("load"===c.type?"missing":c.type),b=c&&c.target&&c.target.src;f.message="Loading chunk "+a+" failed.\n("+r+": "+b+")",f.name="ChunkLoadError",f.type=r,f.request=b,t[1](f)}}),"chunk-"+a,a)}},d.O.j=a=>0===e[a];var a=(a,c)=>{var t,r,b=c[0],f=c[1],o=c[2],n=0;if(b.some((a=>0!==e[a]))){for(t in f)d.o(f,t)&&(d.m[t]=f[t]);if(o)var i=o(d)}for(a&&a(c);n Adding flecks | flecks - + diff --git a/docs/category/generated-details/index.html b/docs/category/generated-details/index.html index f02f2882..602bd03b 100644 --- a/docs/category/generated-details/index.html +++ b/docs/category/generated-details/index.html @@ -4,7 +4,7 @@ Generated details | flecks - + diff --git a/docs/category/getting-started/index.html b/docs/category/getting-started/index.html index 0cc63034..c0fbd761 100644 --- a/docs/category/getting-started/index.html +++ b/docs/category/getting-started/index.html @@ -4,7 +4,7 @@ Getting Started | flecks - + diff --git a/docs/category/guides/index.html b/docs/category/guides/index.html index 6dba582a..ee187069 100644 --- a/docs/category/guides/index.html +++ b/docs/category/guides/index.html @@ -4,7 +4,7 @@ Guides | flecks - + diff --git a/docs/category/writing-your-code/index.html b/docs/category/writing-your-code/index.html index 8dc0d18b..77378f4b 100644 --- a/docs/category/writing-your-code/index.html +++ b/docs/category/writing-your-code/index.html @@ -4,7 +4,7 @@ Writing your code | flecks - + diff --git a/docs/cli/index.html b/docs/cli/index.html index 90a05ee8..dfe2160d 100644 --- a/docs/cli/index.html +++ b/docs/cli/index.html @@ -4,7 +4,7 @@ Command-line interface | flecks - + diff --git a/docs/configuration/index.html b/docs/configuration/index.html index 036efb45..47c9d819 100644 --- a/docs/configuration/index.html +++ b/docs/configuration/index.html @@ -4,7 +4,7 @@ Configuration | flecks - + diff --git a/docs/creating-a-fleck/index.html b/docs/creating-a-fleck/index.html index f6fd5ca6..a99bd43f 100644 --- a/docs/creating-a-fleck/index.html +++ b/docs/creating-a-fleck/index.html @@ -4,7 +4,7 @@ Creating a fleck | flecks - + diff --git a/docs/database/index.html b/docs/database/index.html index 3a2499ee..583670b9 100644 --- a/docs/database/index.html +++ b/docs/database/index.html @@ -4,7 +4,7 @@ Database | flecks - + diff --git a/docs/docker/index.html b/docs/docker/index.html index 12e019a3..35ce1549 100644 --- a/docs/docker/index.html +++ b/docs/docker/index.html @@ -4,7 +4,7 @@ Docker | flecks - + diff --git a/docs/documentation/index.html b/docs/documentation/index.html index 729523ee..115cc4cc 100644 --- a/docs/documentation/index.html +++ b/docs/documentation/index.html @@ -4,7 +4,7 @@ Documentation | flecks - + diff --git a/docs/electron/index.html b/docs/electron/index.html index 2f11cde5..642e9c89 100644 --- a/docs/electron/index.html +++ b/docs/electron/index.html @@ -4,7 +4,7 @@ Electron | flecks - + diff --git a/docs/environment/index.html b/docs/environment/index.html index 0eb5cc5a..60844550 100644 --- a/docs/environment/index.html +++ b/docs/environment/index.html @@ -4,7 +4,7 @@ Environment Variables | flecks - + diff --git a/docs/flecks/build-files/index.html b/docs/flecks/build-files/index.html index acf0d589..11c169c3 100644 --- a/docs/flecks/build-files/index.html +++ b/docs/flecks/build-files/index.html @@ -4,7 +4,7 @@ Build files | flecks - + diff --git a/docs/flecks/config/index.html b/docs/flecks/config/index.html index 937a54cb..fbb17bc2 100644 --- a/docs/flecks/config/index.html +++ b/docs/flecks/config/index.html @@ -4,7 +4,7 @@ Fleck configuration | flecks - + @@ -24,6 +24,8 @@

@flecks/fl
NameDefaultDescription
stats
{
colors: true,
errorDetails: true,
}
Webpack stats configuration.

@flecks/governor/server

NameDefaultDescription
keys
['ip']
All keys used to determine fingerprint.
web
{
keys: ['ip'],
points: 60,
duration: 30,
ttl: 30,
}
socket
{
keys: ['ip'],
points: 60,
duration: 30,
ttl: 30,
}
+

@flecks/passport/server

+
NameDefaultDescription
failureRedirect
'/'
Path to redirect to after failed login.
logoutRedirect
'/'
Path to redirect to after logout.
successRedirect
'/'
Path to redirect to after successful login.

@flecks/react

NameDefaultDescription
providers
['...']
React providers.
ssr
true
Whether to enable server-side rendering.

@flecks/redis/server

@@ -33,6 +35,6 @@

@flecks/s

@flecks/session/server

NameDefaultDescription
cookieSecret
'Set the FLECKS_ENV__flecks_session_server__cookieSecret environment variable!'
Set the cookie secret for session encryption. See: http://expressjs.com/en/resources/middleware/cookie-parser.html

@flecks/web

-
NameDefaultDescription
appMountId
'root'
The ID of the root element on the page.
base
'/'
Base tag path.
devDisableHostCheck
false
(webpack-dev-server) Disable the host check. See: https://github.com/webpack/webpack-dev-server/issues/887
devHost
'localhost'
(webpack-dev-server) Host to bind.
devPort
undefined
(webpack-dev-server) Port to bind.
devPublic
undefined
(webpack-dev-server) Public path to serve. Defaults to flecks.get('@flecks/web.public').
devStats
{
colors: true,
errorDetails: true,
}
(webpack-dev-server) Webpack stats output.
dll
[]
Modules to externalize using webpack.DllPlugin.
host
'0.0.0.0'
Host to bind.
icon
''
Path to icon.
port
32340
Port to bind.
meta
{
charset: 'utf-8',
viewport: 'width=device-width, user-scalable=no',
}
Meta tags.
public
'localhost:32340'
Public path to server.
stats
{
colors: true,
errorDetails: true,
}
Webpack stats configuration.
title
'[@flecks/core.id]'
HTML title.
trust
false
Proxies to trust. See: https://www.npmjs.com/package/proxy-addr
+
NameDefaultDescription
appMountId
'root'
The ID of the root element on the page.
base
'/'
Base tag path.
devDisableHostCheck
false
(webpack-dev-server) Disable the host check. See: https://github.com/webpack/webpack-dev-server/issues/887
devHost
'localhost'
(webpack-dev-server) Host to bind.
devPort
undefined
(webpack-dev-server) Port to bind.
devPublic
undefined
(webpack-dev-server) Public path to serve. Defaults to flecks.get('@flecks/web.public').
devStats
{
colors: true,
errorDetails: true,
}
(webpack-dev-server) Webpack stats output.
dll
[]
Modules to externalize using webpack.DllPlugin.
host
'0.0.0.0'
Host to bind.
icon
''
Path to icon.
port
32340
Port to bind.
meta
{
charset: 'utf-8',
viewport: 'width=device-width, user-scalable=no',
}
Meta tags.
public
'localhost:32340'
Public path to server.
stats
{
colors: true,
errorDetails: true,
}
Webpack stats configuration.
title
'[@flecks/core.id]'
HTML title.
trust
false
Proxies to trust. See: https://www.npmjs.com/package/proxy-addr
\ No newline at end of file diff --git a/docs/flecks/hooks/index.html b/docs/flecks/hooks/index.html index 2ffecfd7..d50bef45 100644 --- a/docs/flecks/hooks/index.html +++ b/docs/flecks/hooks/index.html @@ -4,7 +4,7 @@ Hooks | flecks - + @@ -54,6 +54,7 @@

@flec

Example usage

export const hooks = {
'@flecks/build.files': () => [
/**
* If you document your build files like this, documentation will be automatically generated.
*/
'.myrc.js',
]
};
Implementations
+
Invocations

@flecks/build.processAssets

Process assets during a compilation.

Example usage

@@ -70,6 +71,7 @@

@fl

Example usage

export const hooks = {
'@flecks/build.targets': () => ['sometarget']
};
Implementations
+
Invocations

@flecks/build.targets.alter

Alter defined build targets.

Example usage

@@ -77,16 +79,19 @@

Example usag

targets: Set<string>

The targets to build.

Implementations
+
Invocations

@flecks/core.babel

Babel configuration.

Example usage

export const hooks = {
'@flecks/core.babel': () => ({
plugins: ['...'],
})
};
Implementations
+
Invocations

@flecks/core.config

Define configuration.

Example usage

export const hooks = {
'@flecks/core.config': () => ({
whatever: 'configuration',
your: 1337,
fleck: 'needs',
/**
* Also, comments like this will be used to automatically generate documentation.
*/
though: 'you should keep the values serializable',
})
};
-
Implementations
+
Implementations
+
Invocations

@flecks/core.hmr

Invoked when a fleck is HMR'd

Example usage

@@ -104,6 +109,7 @@

g

hook: string

The gather hook; e.g. @flecks/db/server.models.

Implementations
+
Invocations

@flecks/core.hmr.gathered.class

Invoked when a gathered class is HMR'd.

Example usage

@@ -112,6 +118,7 @@

Clas

The class.

hook: string

The gather hook; e.g. @flecks/db/server.models.

+
Invocations

@flecks/core.priority

Invoked when flecks is building a fleck dependency graph.

Example usage

@@ -121,9 +128,19 @@

graph: D

hook: string

The hook; e.g. @flecks/db/server.

Implementations
+
Invocations
+

@flecks/core.registered

+

Invoked when a fleck is registered.

+

Example usage

+
export const hooks = {
'@flecks/core.registered': (fleck, M) => {
if ('@something/or-other' === fleck) {
doSomethingWith(M);
}
}
};
+

fleck: string

+

+

M: Module

+

+
Invocations

@flecks/core.starting

Invoked when the application is starting. Use for order-independent initialization tasks.

-

Example usage

+

Example usage

export const hooks = {
'@flecks/core.starting': () => {
console.log('starting!');
}
};
Implementations
Invocations
@@ -132,22 +149,23 @@

@

In the example below, your fleck would have a models subdirectory, and each model would be defined in its own file. See: https://github.com/cha0s/flecks/tree/master/packages/user/src/server/models

-

Example usage

+

Example usage

export const hooks = {
'@flecks/db/server.models': Flecks.provide(require.context('./models', false, /\.js$/))
};
-
Implementations
+
Implementations
Invocations

@flecks/db/server.models.decorate

Decorate database models.

In the example below, your fleck would have a models/decorators subdirectory, and each decorator would be defined in its own file. See: https://github.com/cha0s/flecks/tree/master/packages/user/src/local/server/models/decorators

-

Example usage

+

Example usage

export const hooks = {
'@flecks/db/server.models.decorate': Flecks.decorate(require.context('./models/decorators', false, /\.js$/))
};

Model: constructor

The model to decorate.

+
Implementations
Invocations

@flecks/docker.Dockerfile

-

Example usage

+

Example usage

export const hooks = {
'@flecks/docker.Dockerfile': (dockerfile) => (
dockerfile.replace('DEBUG=*', 'DEBUG=*,-*:silly')
)
};

dockerfile: string

The content of the Dockerfile.

@@ -156,26 +174,26 @@

Define docker containers.

warning

The user running the server must have Docker privileges. See: https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user

-

Example usage

+

Example usage

export const hooks = {
'@flecks/docker.containers': () => ({
someContainer: {
// Environment variables.
environment: {
SOME_CONTAINER_VAR: 'hello',
},
// The docker image.
image: 'some-image:latest',
// Some container path you'd like to persist. Flecks handles the host path.
mount: '/some/container/path',
// Expose ports.
ports: {3000: 3000},
},
})
};
Implementations
Invocations

@flecks/docker.docker-compose.yml

-

Example usage

+

Example usage

export const hooks = {
'@flecks/docker.docker-compose.yml': (config) => {
config.version = '3.1';
}
};

config: Object

The object representing the docker compose configuration.

Invocations

@flecks/electron/server.browserWindowOptions.alter

Alter the options for initialization of the Electron browser window.

-

Example usage

+

Example usage

export const hooks = {
'@flecks/electron/server.browserWindowOptions.alter': (browserWindowOptions) => {
browserWindowOptions.icon = 'cute-kitten.png';
}
};

browserWindowOptions: BrowserWindowConstructorOptions

The options.

Invocations

@flecks/electron/server.extensions

Extensions to install.

-

Example usage

+

Example usage

export const hooks = {
'@flecks/electron/server.extensions': (installer) => [
// Some defaults provided...
installer.BACKBONE_DEBUGGER,
// By ID (Tamper Monkey):
'dhdgffkkebhmkfjojejmpbldmpobfkfo',
]
};

installer: Installer

The installer.

@@ -183,7 +201,7 @@

in
Invocations

@flecks/electron/server.initialize

Invoked when electron is initializing.

-

Example usage

+

Example usage

export const hooks = {
'@flecks/electron/server.initialize': (electron) => {
electron.app.on('will-quit', () => {
// ...
});
}
};

electron: Electron

The electron module.

@@ -191,7 +209,7 @@

elec
Invocations

@flecks/electron/server.window

Invoked when a window is created

-

Example usage

+

Example usage

export const hooks = {
'@flecks/electron/server.window': (win) => {
win.maximize();
}
};

win: Electron.BrowserWindow

The electron browser window. See: https://www.electronjs.org/docs/latest/api/browser-window

@@ -199,7 +217,7 @@

Invocations

@flecks/fleck.packageJson

Process the package.json for a built fleck.

-

Example usage

+

Example usage

export const hooks = {
'@flecks/fleck.packageJson': (json, compilation) => {
json.files.push('something');
}
};

json: Object

The JSON.

@@ -208,11 +226,22 @@

Implementations
Invocations

@flecks/passport-react.strategies

-
Implementations
+

Define React components for login strategies.

+

Example usage

+
export const hooks = {
'@flecks/passport-react.strategies': () => ({
MyService: SomeBeautifulComponent,
})
};
+
Implementations
+

@flecks/passport.strategies

+

Define passport login strategies. See: https://www.passportjs.org/concepts/authentication/strategies/

+

Example usage

+
export const hooks = {
'@flecks/passport.strategies': (passport) => ({
MyService: SomeStrategy,
})
};
+

passport: Passport

+

The passport instance.

+
Implementations
+
Invocations

@flecks/react.providers

Define React Providers.

Note: req will be only be defined when server-side rendering.

-

Example usage

+

Example usage

export const hooks = {
'@flecks/react.providers': (req) => {
// Generally it makes more sense to separate client and server concerns using platform
// naming conventions, but this is just a small contrived example.
return req ? serverSideProvider(req) : clientSideProvider();
}
};

req: http.ClientRequest

The HTTP request object.

@@ -224,31 +253,31 @@

@flec

Return either a React component or an array whose elements must either be a React component or an array of two elements where the first element is the component and the second element is the props passed to the component.

-

Example usage

+

Example usage

export const hooks = {
'@flecks/react.roots': (req) => {
// Note that we're not returning `<Component />`, but `Component`.
return [
Component,
[SomeOtherComponent, {prop: 'value'}]
];
// You can also just:
return Component;
}
};

req: http.ClientRequest

The HTTP request object.

Invocations

@flecks/redux.effects

Define side-effects to run against Redux actions.

-

Example usage

+

Example usage

export const hooks = {
'@flecks/redux.effects': () => ({
someActionName: (store, action) => {
// Runs when `someActionName` actions are dispatched.
},
})
};
Invocations

@flecks/redux.reducers

Define root-level reducers for the Redux store.

-

Example usage

+

Example usage

export const hooks = {
'@flecks/redux.reducers': () => {
return (state, action) => {
// Whatever you'd like.
return state;
};
}
};
Invocations

@flecks/redux.slices

Define Redux slices.

See: https://redux-toolkit.js.org/api/createSlice

-

Example usage

+

Example usage

export const hooks = {
'@flecks/redux.slices': () => {
const something = createSlice(
// ...
);
return {
something: something.reducer,
};
}
};
-
Implementations
+
Implementations
Invocations

@flecks/redux.store

Modify Redux store configuration.

-

Example usage

+

Example usage

export const hooks = {
'@flecks/redux.store': (options) => {
options.enhancers.splice(someIndex, 1);
options.middleware.push(mySpecialMiddleware);
}
};

options: Object

A mutable object with keys for enhancers and middleware.

@@ -257,42 +286,44 @@

options

@flecks/repl.commands

Define REPL commands.

Note: commands will be prefixed with a period in the Node REPL.

-

Example usage

+

Example usage

export const hooks = {
'@flecks/repl.commands': () => ({
someCommand: (...args) => {
// args are passed from the Node REPL. So, you could invoke it like:
// .someCommand foo bar
// and `args` would be `['foo', 'bar']`.
},
})
};
+
Implementations
Invocations

@flecks/repl.context

Provide global context to the REPL.

-

Example usage

+

Example usage

export const hooks = {
'@flecks/repl.context': () => {
// Now you'd be able to do like:
// `node> someValue;`
// and the REPL would evaluate it to `'foobar'`.
return {
someValue: 'foobar',
};
}
};
Implementations
Invocations

@flecks/server.runtime

Pass information to the runtime.

-

Example usage

+

Example usage

export const hooks = {
'@flecks/server.runtime': async () => ({
something: '...',
})
};
Implementations
Invocations

@flecks/server.up

Define sequential actions to run when the server comes up.

-

Example usage

+

Example usage

export const hooks = {
'@flecks/server.up': async () => {
await youCanDoAsyncThingsHere();
}
};
-
Implementations
+
Implementations

@flecks/session.config

Configure the session. See: https://github.com/expressjs/session#sessionoptions

-

Example usage

+

Example usage

export const hooks = {
'@flecks/session.config': async () => ({
saveUninitialized: true,
})
};
Implementations
Invocations

@flecks/socket.client

Modify Socket.io client configuration.

See: https://socket.io/docs/v4/client-options/

-

Example usage

+

Example usage

export const hooks = {
'@flecks/socket.client': () => ({
timeout: Infinity,
})
};
Implementations

@flecks/socket.intercom

Define server-side intercom channels.

-

Example usage

+

Example usage

export const hooks = {
'@flecks/socket.intercom': (req) => ({
// This would have been called like:
// `const result = await req.intercom('@my/fleck.key', payload)`.
// `result` will be an `n`-length array, where `n` is the number of server instances. Each
// element in the array will be the result of `someServiceSpecificInformation()` running
// against that server instance.
'@my/fleck.key': async (payload, server) => {
return someServiceSpecificInformation();
},
})
};
+
Implementations
Invocations

@flecks/socket.packets

Define socket packets.

@@ -301,64 +332,64 @@

@f See: https://github.com/cha0s/flecks/tree/master/packages/redux/src/packets

See: https://github.com/cha0s/flecks/tree/master/packages/socket/src/packet/packet.js See: https://github.com/cha0s/flecks/tree/master/packages/socket/src/packet/redirect.js

-

Example usage

+

Example usage

export const hooks = {
'@flecks/socket.packets': Flecks.provide(require.context('./packets', false, /\.js$/))
};
-
Implementations
+
Implementations
Invocations

@flecks/socket.packets.decorate

Decorate database models.

In the example below, your fleck would have a packets/decorators subdirectory, and each decorator would be defined in its own file.

-

Example usage

+

Example usage

export const hooks = {
'@flecks/socket.packets.decorate': Flecks.decorate(require.context('./packets/decorators', false, /\.js$/))
};

Packet: constructor

The packet to decorate.

-
Implementations
+
Implementations
Invocations

@flecks/socket.server

Modify Socket.io server configuration.

See: https://socket.io/docs/v4/server-options/

-

Example usage

+

Example usage

export const hooks = {
'@flecks/socket.server': () => ({
pingTimeout: Infinity,
})
};
Implementations

@flecks/socket/server.request.socket

Define middleware to run when a socket connection is established.

-

Example usage

+

Example usage

export const hooks = {
'@flecks/socket/server.request.socket': () => (socket, next) => {
// Express-style route middleware...
next();
}
};
-
Implementations
+
Implementations

@flecks/web.config

-

Override flecks configuration sent to client flecks.

-

Example usage

-
export const hooks = {
'@flecks/web.config': (req) => ({
someClientFleck: {
someConfig: req.someConfig,
},
})
};
+

Send configuration to clients.

+

Example usage

+
export const hooks = {
'@flecks/web.config': (req) => ({
someConfig: req.someConfig,
})
};

req: http.ClientRequest

The HTTP request object.

Implementations
Invocations

@flecks/web.routes

Define HTTP routes.

-

Example usage

+

Example usage

export const hooks = {
'@flecks/web.routes': () => [
{
method: 'get',
path: '/some-path',
middleware: (req, res, next) => {
// Express-style route middleware...
next();
},
},
]
};
-
Implementations
+
Implementations
Invocations

@flecks/web/client.up

Define sequential actions to run when the client comes up.

-

Example usage

+

Example usage

export const hooks = {
'@flecks/web/client.up': async () => {
await youCanDoAsyncThingsHere();
}
};
Implementations
Invocations

@flecks/web/server.request.route

Define middleware to run when a route is matched.

-

Example usage

+

Example usage

export const hooks = {
'@flecks/web/server.request.route': () => (req, res, next) => {
// Express-style route middleware...
next();
}
};
-
Implementations
+
Implementations

@flecks/web/server.request.socket

Define middleware to run when an HTTP socket connection is established.

-

Example usage

+

Example usage

export const hooks = {
'@flecks/web/server.request.socket': () => (req, res, next) => {
// Express-style route middleware...
next();
}
};
Implementations

@flecks/web/server.stream.html

Define composition functions to run over the HTML stream prepared for the client.

-

Example usage

+

Example usage

export const hooks = {
'@flecks/web/server.stream.html': (stream, req) => {
return stream.pipe(myTransformStream);
}
};

stream: stream.Readable

The HTML stream.

@@ -368,9 +399,9 @@

Invocations

@flecks/web/server.up

Define sequential actions to run when the HTTP server comes up.

-

Example usage

+

Example usage

export const hooks = {
'@flecks/web/server.up': async () => {
await youCanDoAsyncThingsHere();
}
};
Implementations
-
Invocations
+
Invocations
\ No newline at end of file diff --git a/docs/flecks/todo/index.html b/docs/flecks/todo/index.html index 783d70ce..f3f6434a 100644 --- a/docs/flecks/todo/index.html +++ b/docs/flecks/todo/index.html @@ -4,7 +4,7 @@ TODO list | flecks - + diff --git a/docs/flecks/todos/index.html b/docs/flecks/todos/index.html index 054aaaec..8a80a700 100644 --- a/docs/flecks/todos/index.html +++ b/docs/flecks/todos/index.html @@ -4,7 +4,7 @@ TODO list | flecks - + diff --git a/docs/gathering/index.html b/docs/gathering/index.html index c3a69ee5..26fe47d3 100644 --- a/docs/gathering/index.html +++ b/docs/gathering/index.html @@ -4,7 +4,7 @@ Gathering and Providing | flecks - + diff --git a/docs/index.html b/docs/index.html index 7fbdbc7c..df099b87 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ Introduction | flecks - + diff --git a/docs/installation/index.html b/docs/installation/index.html index f99dee19..d867dbed 100644 --- a/docs/installation/index.html +++ b/docs/installation/index.html @@ -4,7 +4,7 @@ Installation | flecks - + diff --git a/docs/isomorphism/index.html b/docs/isomorphism/index.html index 07f9eaa7..414fe154 100644 --- a/docs/isomorphism/index.html +++ b/docs/isomorphism/index.html @@ -4,7 +4,7 @@ Isomorphism | flecks - + diff --git a/docs/ordering/index.html b/docs/ordering/index.html index 00c35b7e..2085a792 100644 --- a/docs/ordering/index.html +++ b/docs/ordering/index.html @@ -4,7 +4,7 @@ Ordering | flecks - + diff --git a/docs/react/index.html b/docs/react/index.html index 71e0abbc..828e881b 100644 --- a/docs/react/index.html +++ b/docs/react/index.html @@ -4,7 +4,7 @@ React | flecks - + diff --git a/docs/redux/index.html b/docs/redux/index.html index d662c34e..6b9de5bf 100644 --- a/docs/redux/index.html +++ b/docs/redux/index.html @@ -4,7 +4,7 @@ Redux | flecks - + diff --git a/docs/repl/index.html b/docs/repl/index.html index bb991ff0..cc0f430e 100644 --- a/docs/repl/index.html +++ b/docs/repl/index.html @@ -4,7 +4,7 @@ REPL | flecks - + diff --git a/docs/sockets/index.html b/docs/sockets/index.html index ff8dcf49..c9f222bd 100644 --- a/docs/sockets/index.html +++ b/docs/sockets/index.html @@ -4,7 +4,7 @@ Sockets | flecks - + diff --git a/docs/testing/index.html b/docs/testing/index.html index 175cdc84..2559b929 100644 --- a/docs/testing/index.html +++ b/docs/testing/index.html @@ -4,7 +4,7 @@ Testing | flecks - + diff --git a/index.html b/index.html index 7cb4c595..54c8c9cd 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ Hello from flecks | flecks - +