[{"data":1,"prerenderedAt":698},["ShallowReactive",2],{"fougere:post.list:{}":3,"docs:\u002Fdocs\u002Fextending\u002Fboot":6,"docs-uses":384,"docs-nav":560},{"items":4,"hasMore":5},[],false,{"id":7,"title":8,"body":9,"description":375,"extension":376,"forms":377,"kind":378,"meta":379,"navigation":292,"path":380,"seo":381,"stem":382,"step":377,"uses":377,"__hash__":383},"docs\u002Fdocs\u002F8.extending\u002F2.boot.md","The boot, step by step",{"type":10,"value":11,"toc":373},"minimark",[12,21,113,135,138,190,200,327,330,354,369],[13,14,15,16,20],"p",{},"A boot rises in steps, and a release goes down them in reverse. An ",[17,18,19],"strong",{},"extension"," states what it does to an app and what it undoes:",[22,23,28],"pre",{"className":24,"code":25,"language":26,"meta":27,"style":27},"language-ts shiki shiki-themes material-theme-lighter fougere-pastel material-theme-palenight","const app = await createApp({\n  root,\n  createContainer,\n  extensions: [observability()],\n});\n","ts","",[29,30,31,63,72,80,101],"code",{"__ignoreMap":27},[32,33,36,40,44,48,52,56,60],"span",{"class":34,"line":35},"line",1,[32,37,39],{"class":38},"s76I7","const",[32,41,43],{"class":42},"sPEhv"," app ",[32,45,47],{"class":46},"s15xx","=",[32,49,51],{"class":50},"sK6XW"," await",[32,53,55],{"class":54},"s4mR9"," createApp",[32,57,59],{"class":58},"srlTG","(",[32,61,62],{"class":46},"{\n",[32,64,66,69],{"class":34,"line":65},2,[32,67,68],{"class":42},"  root",[32,70,71],{"class":46},",\n",[32,73,75,78],{"class":34,"line":74},3,[32,76,77],{"class":42},"  createContainer",[32,79,71],{"class":46},[32,81,83,87,90,93,96,99],{"class":34,"line":82},4,[32,84,86],{"class":85},"sHtqg","  extensions",[32,88,89],{"class":46},":",[32,91,92],{"class":58}," [",[32,94,95],{"class":54},"observability",[32,97,98],{"class":58},"()]",[32,100,71],{"class":46},[32,102,104,107,110],{"class":34,"line":103},5,[32,105,106],{"class":46},"}",[32,108,109],{"class":58},")",[32,111,112],{"class":46},";\n",[13,114,115,118,119,122,123,126,127,130,131,134],{},[29,116,117],{},"up"," runs before ",[29,120,121],{},"createApp"," returns, in declaration order; ",[29,124,125],{},"down"," runs inside ",[29,128,129],{},"dispose()",",\nin reverse. It is also the one point in the boot that may ",[17,132,133],{},"await",", which is where a\nprovider that has to open something belongs — a constructor cannot.",[13,136,137],{},"Two members are the framework's own, and they are ordinary members:",[139,140,141,154],"table",{},[142,143,144],"thead",{},[145,146,147,151],"tr",{},[148,149,150],"th",{},"name",[148,152,153],{},"what it does",[155,156,157,176],"tbody",{},[145,158,159,165],{},[160,161,162],"td",{},[29,163,164],{},"schema",[160,166,167,168,171,172,175],{},"reads the database against the entities and refuses the boot when it is behind, naming each missing table and column. It writes nothing: that is ",[29,169,170],{},"fougere migrate --apply",". A process whose database is born with it replaces the member with ",[29,173,174],{},"migrating(storage.migrate)",", which writes instead",[145,177,178,183],{},[160,179,180],{},[29,181,182],{},"seeds",[160,184,185,186,189],{},"plants what ",[29,187,188],{},"seeds\u002F"," declares, in dependency order",[13,191,192,195,196,89],{},[17,193,194],{},"A name already declared is replaced, not refused."," That is how a host says ",[197,198,199],"em",{},"the seeding,\nbut mine",[22,201,203],{"className":24,"code":202,"language":26,"meta":27,"style":27},"\u002F\u002F what @fougere\u002Fnuxt generates: a bundler needs its seed modules as static imports\nextensions: [\n  { name: 'seeds', up: (app) => runSeeds(app, [\u002F* imported above *\u002F]) },\n]\n\n\u002F\u002F a test, whose `:memory:` database is born with it and has nobody else to migrate it\nextensions: [migrating(storage.migrate)]\n",[29,204,205,211,222,283,288,294,300],{"__ignoreMap":27},[32,206,207],{"class":34,"line":35},[32,208,210],{"class":209},"skXKP","\u002F\u002F what @fougere\u002Fnuxt generates: a bundler needs its seed modules as static imports\n",[32,212,213,217,219],{"class":34,"line":65},[32,214,216],{"class":215},"sWI7z","extensions",[32,218,89],{"class":46},[32,220,221],{"class":58}," [\n",[32,223,224,227,230,232,236,239,242,245,248,250,253,257,259,263,266,268,270,272,274,277,280],{"class":34,"line":74},[32,225,226],{"class":46},"  {",[32,228,229],{"class":85}," name",[32,231,89],{"class":46},[32,233,235],{"class":234},"sDDC1"," '",[32,237,182],{"class":238},"sN-8n",[32,240,241],{"class":234},"'",[32,243,244],{"class":46},",",[32,246,247],{"class":54}," up",[32,249,89],{"class":46},[32,251,252],{"class":46}," (",[32,254,256],{"class":255},"shDUQ","app",[32,258,109],{"class":46},[32,260,262],{"class":261},"scTuO"," =>",[32,264,265],{"class":54}," runSeeds",[32,267,59],{"class":58},[32,269,256],{"class":42},[32,271,244],{"class":46},[32,273,92],{"class":58},[32,275,276],{"class":209},"\u002F* imported above *\u002F",[32,278,279],{"class":58},"])",[32,281,282],{"class":46}," },\n",[32,284,285],{"class":34,"line":82},[32,286,287],{"class":58},"]\n",[32,289,290],{"class":34,"line":103},[32,291,293],{"emptyLinePlaceholder":292},true,"\n",[32,295,297],{"class":34,"line":296},6,[32,298,299],{"class":209},"\u002F\u002F a test, whose `:memory:` database is born with it and has nobody else to migrate it\n",[32,301,303,305,307,309,312,314,317,320,324],{"class":34,"line":302},7,[32,304,216],{"class":215},[32,306,89],{"class":46},[32,308,92],{"class":58},[32,310,311],{"class":54},"migrating",[32,313,59],{"class":58},[32,315,316],{"class":42},"storage",[32,318,319],{"class":46},".",[32,321,323],{"class":322},"sy9f4","migrate",[32,325,326],{"class":58},")]\n",[13,328,329],{},"The ascent and the descent refuse in opposite ways, on purpose:",[331,332,333,342],"ul",{},[334,335,336,341],"li",{},[17,337,338,340],{},[29,339,117],{}," stops at the first refusal."," A seed must not run against a database the schema\ncheck just refused, and a half-started app must not be handed out.",[334,343,344,349,350,353],{},[17,345,346,348],{},[29,347,125],{}," releases every member even when one throws",", and the refusals leave together in\nan ",[29,351,352],{},"AggregateError"," — a release that gives up on the first failure leaks everything after it.",[13,355,356,357,360,361,364,365,368],{},"An extension is not a frond and cannot become one: a frond has entities and may move behind\n",[29,358,359],{},"fronds:",", while an extension belongs to the ",[17,362,363],{},"process"," that hosts them. ",[29,366,367],{},"observability()","\nis the case that proves it — moved, it would report the observer instead of the observed.",[370,371,372],"style",{},"html pre.shiki code .s76I7, html code.shiki .s76I7{--shiki-light:#9C3EDA;--shiki-default:#8FCF86;--shiki-dark:#C792EA}html pre.shiki code .sPEhv, html code.shiki .sPEhv{--shiki-light:#90A4AE;--shiki-default:#DDE5DA;--shiki-dark:#BABED8}html pre.shiki code .s15xx, html code.shiki .s15xx{--shiki-light:#39ADB5;--shiki-default:#A3B0A5;--shiki-dark:#89DDFF}html pre.shiki code .sK6XW, html code.shiki .sK6XW{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#8FCF86;--shiki-default-font-style:inherit;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .s4mR9, html code.shiki .s4mR9{--shiki-light:#6182B8;--shiki-default:#C9B6EA;--shiki-dark:#82AAFF}html pre.shiki code .srlTG, html code.shiki .srlTG{--shiki-light:#90A4AE;--shiki-default:#A3B0A5;--shiki-dark:#BABED8}html pre.shiki code .sHtqg, html code.shiki .sHtqg{--shiki-light:#E53935;--shiki-default:#93CFC0;--shiki-dark:#F07178}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .skXKP, html code.shiki .skXKP{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#7D8C80;--shiki-default-font-style:inherit;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sWI7z, html code.shiki .sWI7z{--shiki-light:#E2931D;--shiki-default:#93CFC0;--shiki-dark:#FFCB6B}html pre.shiki code .sDDC1, html code.shiki .sDDC1{--shiki-light:#39ADB5;--shiki-default:#EE9F6B;--shiki-dark:#89DDFF}html pre.shiki code .sN-8n, html code.shiki .sN-8n{--shiki-light:#91B859;--shiki-default:#EE9F6B;--shiki-dark:#C3E88D}html pre.shiki code .shDUQ, html code.shiki .shDUQ{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#DDE5DA;--shiki-default-font-style:inherit;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .scTuO, html code.shiki .scTuO{--shiki-light:#9C3EDA;--shiki-default:#A3B0A5;--shiki-dark:#C792EA}html pre.shiki code .sy9f4, html code.shiki .sy9f4{--shiki-light:#90A4AE;--shiki-default:#93CFC0;--shiki-dark:#BABED8}",{"title":27,"searchDepth":65,"depth":65,"links":374},[],"What happens between the statement and the first call, and what each step refuses.","md",null,"extending",{},"\u002Fdocs\u002Fextending\u002Fboot",{"title":8,"description":375},"docs\u002F8.extending\u002F2.boot","pKAwRB5vehqnF0Peq3DsZu_8Q_PByhComFsfsQLDj2Y",[385,388,391,394,397,400,403,406,409,415,421,426,430,434,438,442,446,451,455,459,464,468,473,477,481,485,489,493,497,501,505,509,513,517,521,525,529,532,535,536,539,542,545,548,551,554,557],{"path":386,"title":387,"uses":377},"\u002Fdocs\u002Fconcepts\u002Fentity","Entity",{"path":389,"title":390,"uses":377},"\u002Fdocs\u002Fconcepts\u002Fhandler","Handler",{"path":392,"title":393,"uses":377},"\u002Fdocs\u002Fconcepts\u002Frepository","Repository",{"path":395,"title":396,"uses":377},"\u002Fdocs\u002Fconcepts\u002Ffrond","Frond",{"path":398,"title":399,"uses":377},"\u002Fdocs\u002Fconcepts\u002Ffacade","Facade",{"path":401,"title":402,"uses":377},"\u002Fdocs\u002Fconcepts\u002Ffact","Fact",{"path":404,"title":405,"uses":377},"\u002Fdocs\u002Fconcepts\u002Fport","Port",{"path":407,"title":408,"uses":377},"\u002Fdocs\u002Fconcepts\u002Fconfiguration","Configuration",{"path":410,"title":411,"uses":412},"\u002Fdocs\u002Faccess\u002Fauthentication","Authentication",[413,414],"port","frond",{"path":416,"title":417,"uses":418},"\u002Fdocs\u002Faccess\u002Fstate","Keep a caller's state",[419,420],"configuration","handler",{"path":422,"title":423,"uses":424},"\u002Fdocs\u002Fdata\u002Fsql","SQLite or Postgres",[425,419],"entity",{"path":427,"title":428,"uses":429},"\u002Fdocs\u002Fdata\u002Fseveral-databases","Several databases",[419,425],{"path":431,"title":432,"uses":433},"\u002Fdocs\u002Fdata\u002Fcomputed-field","A computed field",[425,413],{"path":435,"title":436,"uses":437},"\u002Fdocs\u002Fdata\u002Fevolve","Evolve a schema",[425],{"path":439,"title":440,"uses":441},"\u002Fdocs\u002Fdata\u002Fseeds","Seed data",[425],{"path":443,"title":444,"uses":445},"\u002Fdocs\u002Fdata\u002Fvalues","Read settings and secrets",[425,419],{"path":447,"title":448,"uses":449},"\u002Fdocs\u002Fdata\u002Fmirror","Mirror a source you cannot query",[450],"repository",{"path":452,"title":453,"uses":454},"\u002Fdocs\u002Fdata\u002Ftogether","Two writes as one",[450],{"path":456,"title":457,"uses":458},"\u002Fdocs\u002Fbehaviour\u002Faround-every-call","Around every call",[413,414],{"path":460,"title":461,"uses":462},"\u002Fdocs\u002Fbehaviour\u002Ffinish-a-fact","Finish a fact",[463],"fact",{"path":465,"title":466,"uses":467},"\u002Fdocs\u002Fserve\u002Frest-graphql","REST, OpenAPI, GraphQL",[420,419],{"path":469,"title":470,"uses":471},"\u002Fdocs\u002Fserve\u002Fpages","Pages: queries and commands",[420,472],"facade",{"path":474,"title":475,"uses":476},"\u002Fdocs\u002Fserve\u002Fforms","A form",[425],{"path":478,"title":479,"uses":480},"\u002Fdocs\u002Fserve\u002Fadmin","An admin panel",[420],{"path":482,"title":483,"uses":484},"\u002Fdocs\u002Frun\u002Fdeploy","Deploy a split",[419,414],{"path":486,"title":487,"uses":488},"\u002Fdocs\u002Frun\u002Fsecure","Secure calls between processes",[419,414],{"path":490,"title":491,"uses":492},"\u002Fdocs\u002Frun\u002Flifecycle","Reload and shut down",[419],{"path":494,"title":495,"uses":496},"\u002Fdocs\u002Frun\u002Fobserve","Observe",[419,420],{"path":498,"title":499,"uses":500},"\u002Fdocs\u002Frun\u002Fdev-panel","The dev panel",[420],{"path":502,"title":503,"uses":504},"\u002Fdocs\u002Frun\u002Ftest","Test",[425,413],{"path":506,"title":507,"uses":508},"\u002Fdocs\u002Fadopt\u002Fnew-project","Start a project",[414,419],{"path":510,"title":511,"uses":512},"\u002Fdocs\u002Fadopt\u002Fexisting-app","Add Fougere to an existing app",[414,419],{"path":514,"title":515,"uses":516},"\u002Fdocs\u002Fadopt\u002Fbring-your-schema","Bring your schema",[425],{"path":518,"title":519,"uses":520},"\u002Fdocs\u002Fadopt\u002Fhosts","Pick a host",[419],{"path":522,"title":523,"uses":524},"\u002Fdocs\u002Fadopt\u002Fanother-repository","A frond from another repository",[472,414],{"path":526,"title":527,"uses":528},"\u002Fdocs\u002Fadopt\u002Fdemos","Demos",[],{"path":530,"title":531,"uses":377},"\u002Fdocs\u002Fextending\u002Fscan","How the scan reads a project",{"path":533,"title":534,"uses":377},"\u002Fdocs\u002Fextending\u002Fwithout-compiler","Boot without the compiler",{"path":380,"title":8,"uses":377},{"path":537,"title":538,"uses":377},"\u002Fdocs\u002Fextending\u002Fcard-and-wire","The card and the wire",{"path":540,"title":541,"uses":377},"\u002Fdocs\u002Fextending\u002Fextension-points","Registries and extension points",{"path":543,"title":544,"uses":377},"\u002Fdocs\u002Fextending\u002Fvocabulary","Teach a word",{"path":546,"title":547,"uses":377},"\u002Fdocs\u002Fextending\u002Fextensions","Run code at boot and shutdown",{"path":549,"title":550,"uses":377},"\u002Fdocs\u002Fextending\u002Fsource-adapter","Write a source adapter",{"path":552,"title":553,"uses":377},"\u002Fdocs\u002Fextending\u002Fsurface","Write a surface",{"path":555,"title":556,"uses":377},"\u002Fdocs\u002Fextending\u002Fforeign-frond","A frond in another language",{"path":558,"title":559,"uses":377},"\u002Fdocs","What is Fougere",[561],{"title":562,"path":558,"stem":563,"children":564,"page":-1},"Docs","docs",[565,567,588,597,618,627,640,657,674],{"title":559,"path":558,"stem":566},"docs\u002Findex",{"title":568,"path":569,"stem":570,"children":571,"page":5},"Concepts","\u002Fdocs\u002Fconcepts","docs\u002F1.concepts",[572,574,576,578,580,582,584,586],{"title":387,"path":386,"stem":573},"docs\u002F1.concepts\u002F1.entity",{"title":390,"path":389,"stem":575},"docs\u002F1.concepts\u002F2.handler",{"title":393,"path":392,"stem":577},"docs\u002F1.concepts\u002F3.repository",{"title":396,"path":395,"stem":579},"docs\u002F1.concepts\u002F4.frond",{"title":399,"path":398,"stem":581},"docs\u002F1.concepts\u002F5.facade",{"title":402,"path":401,"stem":583},"docs\u002F1.concepts\u002F6.fact",{"title":405,"path":404,"stem":585},"docs\u002F1.concepts\u002F7.port",{"title":408,"path":407,"stem":587},"docs\u002F1.concepts\u002F8.configuration",{"title":589,"path":590,"stem":591,"children":592,"page":5},"Access","\u002Fdocs\u002Faccess","docs\u002F2.access",[593,595],{"title":411,"path":410,"stem":594},"docs\u002F2.access\u002F1.authentication",{"title":417,"path":416,"stem":596},"docs\u002F2.access\u002F2.state",{"title":598,"path":599,"stem":600,"children":601,"page":5},"Data","\u002Fdocs\u002Fdata","docs\u002F3.data",[602,604,606,608,610,612,614,616],{"title":423,"path":422,"stem":603},"docs\u002F3.data\u002F1.sql",{"title":428,"path":427,"stem":605},"docs\u002F3.data\u002F2.several-databases",{"title":432,"path":431,"stem":607},"docs\u002F3.data\u002F3.computed-field",{"title":436,"path":435,"stem":609},"docs\u002F3.data\u002F4.evolve",{"title":440,"path":439,"stem":611},"docs\u002F3.data\u002F5.seeds",{"title":444,"path":443,"stem":613},"docs\u002F3.data\u002F6.values",{"title":448,"path":447,"stem":615},"docs\u002F3.data\u002F7.mirror",{"title":453,"path":452,"stem":617},"docs\u002F3.data\u002F8.together",{"title":619,"path":620,"stem":621,"children":622,"page":5},"Behaviour","\u002Fdocs\u002Fbehaviour","docs\u002F4.behaviour",[623,625],{"title":457,"path":456,"stem":624},"docs\u002F4.behaviour\u002F1.around-every-call",{"title":461,"path":460,"stem":626},"docs\u002F4.behaviour\u002F2.finish-a-fact",{"title":628,"path":629,"stem":630,"children":631,"page":5},"Serve","\u002Fdocs\u002Fserve","docs\u002F5.serve",[632,634,636,638],{"title":466,"path":465,"stem":633},"docs\u002F5.serve\u002F1.rest-graphql",{"title":470,"path":469,"stem":635},"docs\u002F5.serve\u002F2.pages",{"title":475,"path":474,"stem":637},"docs\u002F5.serve\u002F3.forms",{"title":479,"path":478,"stem":639},"docs\u002F5.serve\u002F4.admin",{"title":641,"path":642,"stem":643,"children":644,"page":5},"Run","\u002Fdocs\u002Frun","docs\u002F6.run",[645,647,649,651,653,655],{"title":483,"path":482,"stem":646},"docs\u002F6.run\u002F1.deploy",{"title":487,"path":486,"stem":648},"docs\u002F6.run\u002F2.secure",{"title":491,"path":490,"stem":650},"docs\u002F6.run\u002F3.lifecycle",{"title":495,"path":494,"stem":652},"docs\u002F6.run\u002F4.observe",{"title":499,"path":498,"stem":654},"docs\u002F6.run\u002F5.dev-panel",{"title":503,"path":502,"stem":656},"docs\u002F6.run\u002F6.test",{"title":658,"path":659,"stem":660,"children":661,"page":5},"Adopt","\u002Fdocs\u002Fadopt","docs\u002F7.adopt",[662,664,666,668,670,672],{"title":507,"path":506,"stem":663},"docs\u002F7.adopt\u002F1.new-project",{"title":511,"path":510,"stem":665},"docs\u002F7.adopt\u002F2.existing-app",{"title":515,"path":514,"stem":667},"docs\u002F7.adopt\u002F3.bring-your-schema",{"title":519,"path":518,"stem":669},"docs\u002F7.adopt\u002F4.hosts",{"title":523,"path":522,"stem":671},"docs\u002F7.adopt\u002F5.another-repository",{"title":527,"path":526,"stem":673},"docs\u002F7.adopt\u002F6.demos",{"title":675,"path":676,"stem":677,"children":678,"page":5},"Extending","\u002Fdocs\u002Fextending","docs\u002F8.extending",[679,681,683,684,686,688,690,692,694,696],{"title":531,"path":530,"stem":680},"docs\u002F8.extending\u002F1.scan",{"title":534,"path":533,"stem":682},"docs\u002F8.extending\u002F10.without-compiler",{"title":8,"path":380,"stem":382},{"title":538,"path":537,"stem":685},"docs\u002F8.extending\u002F3.card-and-wire",{"title":541,"path":540,"stem":687},"docs\u002F8.extending\u002F4.extension-points",{"title":544,"path":543,"stem":689},"docs\u002F8.extending\u002F5.vocabulary",{"title":547,"path":546,"stem":691},"docs\u002F8.extending\u002F6.extensions",{"title":550,"path":549,"stem":693},"docs\u002F8.extending\u002F7.source-adapter",{"title":553,"path":552,"stem":695},"docs\u002F8.extending\u002F8.surface",{"title":556,"path":555,"stem":697},"docs\u002F8.extending\u002F9.foreign-frond",1794396615318]