Problem: the hexagonal refactor churns the backend tree for nine more phases; the UI delivery stack (web/ SPA, cmd/desktop Wails wrapper, compose/web image) must move to its own repo first so doc/layout rewrites land once on a backend-only tree. Change: - New repo git.hubris.network/dtoro/oikos-web (v0.33.0): web/, desktop/ (updateURL repointed to oikos-web releases), compose/, own CI (web + desktop jobs), own deploy script (CI-green gate, TOCTOU guard, version-tagged images, prune-to-3), own webhook receiver on :9798 + launchd unit, own compose project publishing the same 8091:80. - Cutover executed on mac-mini in order: oikos stack's web service stopped+removed, oikos-web project brought up on 8091; outer Caddy untouched (targets the published port) — serving + Authentik flow + /wails 404 quirk verified post-cutover. - Stripped from oikos: web/, cmd/desktop/, compose/web/, desktop CI workflow, ci.yml web job, Makefile ui/desktop/desktop-package/install targets, the compose web service, oikos-web from deploy.sh's fallback prune list; wails + go-keyring dropped from go.mod, vendor synced. - README / CONTRIBUTING / AGENTS.md / .agents dev+operations docs now point at the new repo; mbse + mascot design docs carry a path note. Risk: production SPA serving depends on the new pipeline now; rollback is versioned-image re-up of the old web service from a pre-split checkout (port 8091). Desktop builds installed before the split still check dtoro/oikos releases — one manual reinstall, noted in the oikos-web release notes. Verification: go vet, make test (race), make generate-check, golangci (no new findings; baseline down 400→365); post-cutover curls — localhost:8091 200, /wails/runtime.js 404, outer Caddy 302 Authentik.
2 lines
8.2 KiB
JavaScript
2 lines
8.2 KiB
JavaScript
var W=(n,r)=>(r=Symbol[n])?r:Symbol.for("Symbol."+n),J=n=>{throw TypeError(n)};var E=(n,r,e)=>{if(r!=null){typeof r!="object"&&typeof r!="function"&&J("Object expected");var t,m;e&&(t=r[W("asyncDispose")]),t===void 0&&(t=r[W("dispose")],e&&(m=t)),typeof t!="function"&&J("Object not disposable"),m&&(t=function(){try{m.call(this)}catch(c){return Promise.reject(c)}}),n.push([e,t,r])}else e&&n.push([e]);return r},F=(n,r,e)=>{var t=typeof SuppressedError=="function"?SuppressedError:function(s,g,R,l){return l=Error(R),l.name="SuppressedError",l.error=s,l.suppressed=g,l},m=s=>r=e?new t(s,r,"An error was suppressed during disposal"):(e=!0,s),c=s=>{for(;s=n.pop();)try{var g=s[1]&&s[1].call(s[2]);if(s[0])return Promise.resolve(g).then(c,R=>(m(R),c()))}catch(R){m(R)}if(e)throw r};return c()};import{compile as A,env as I,Features as b,Instrumentation as N,normalizePath as T,optimize as K,toSourceMap as k}from"@tailwindcss/node";import{clearRequireCache as L}from"@tailwindcss/node/require-cache";import{Scanner as Y}from"@tailwindcss/oxide";import{realpathSync as X}from"fs";import x from"fs/promises";import S from"path";import*as M from"vite";var v=I.DEBUG,D=/[?&](?:worker|sharedworker|raw|url)\b/,B=/\?commonjs-proxy/,_=/[?&]index=\d+\.css$/,Q=/^\.[cm]?[jt]sx?$/;function C(n,r=e=>!0){return async(e,t)=>{let m=S.resolve(t,"__placeholder__.ts");for(let c of n){let s=await c(e,m);if(s&&s!==e&&(s[0]==="."&&(s=S.resolve(t,s)),!!r(s)&&S.isAbsolute(s)))return s}}}function H(n={}){let r=[],e=null,t=new O(l=>new Map),m=new Set,c=!1,s=!0,g=!0;function R(l,i){let d,u;if(l){let p=function(a,h){let w=a.createResolver(h),j;return async(P,G,U,V)=>P.name==="client"||P.name==="ssr"?w(G,U,V,P.name==="ssr"):(j??=M.createIdResolver(a,h),j(P,G,U,V))};var y=p;let f=p(l.config,{...l.config.resolve,extensions:[".css"],mainFields:["style"],conditions:["style","development|production"],tryIndex:!1,preferRelative:!0}),o=p(l.config,l.config.resolve);d=C([(a,h)=>f(l,a,h,!0),(a,h)=>f(l,a,h,!1)],a=>a.endsWith(".css")),u=C([(a,h)=>o(l,a,h,!0),(a,h)=>o(l,a,h,!1)],a=>!a.endsWith(".css"))}else{let p=e.createResolver({...e.resolve,extensions:[".css"],mainFields:["style"],conditions:["style","development|production"],tryIndex:!1,preferRelative:!0}),f=e.createResolver(e.resolve);d=C([(o,a)=>p(o,a,!0,c),(o,a)=>p(o,a,!1,c)],o=>o.endsWith(".css")),u=C([(o,a)=>f(o,a,!0,c),(o,a)=>f(o,a,!1,c)],o=>!o.endsWith(".css"))}return new z(i,e.root,e?.css.devSourcemap??!1,d,u)}return[{name:"@tailwindcss/vite:scan",enforce:"pre",configureServer(l){r.push(l)},async configResolved(l){e=l,c=e.build.ssr!==!1&&e.build.ssr!==void 0,n.optimize!==void 0&&(s=n.optimize!==!1),g=s&&e.build.cssMinify!==!1,typeof n.optimize=="object"&&(g=n.optimize.minify!==!1)}},{name:"@tailwindcss/vite:generate:serve",apply:"serve",enforce:"pre",transform:{filter:{id:{exclude:[/\/\.vite\//,D,B],include:[/\.css(?:\?.*)?$/,/&lang\.css/,_]}},async handler(l,i){var f=[];try{if(!$(i))return;let d=E(f,new N);v&&d.start("[@tailwindcss/vite] Generate CSS (serve)");let u=t.get(this.environment?.name??"default");let y=u.get(i);y||(y??=R(this.environment??null,i),u.set(i,y));let p=await y.generate(l,w=>this.addWatchFile(w),d);if(!p){u.delete(i);return}v&&d.end("[@tailwindcss/vite] Generate CSS (serve)");return p}catch(o){var a=o,h=!0}finally{F(f,a,h)}}},hotUpdate({file:l,modules:i,timestamp:d,server:u}){{if(!(i.length>0&&i.every(f=>f.type==="asset"||f.id===void 0)))return;for(let f of Object.values(u.environments)){if(f.name===this.environment.name)continue;let o=f.moduleGraph.getModulesByFile(l);if(o){for(let a of o)if(a.type!=="asset")return}}let p=S.extname(l);if(Q.test(p)||M.isCSSRequest(l))return;if(p!==""){if(m.has(p))return;for(let f of Object.values(u.environments))for(let o of f.moduleGraph.idToModuleMap.values())if(o.file?.endsWith(p)&&o.type!=="asset"&&o.transformResult!=null&&!(!o.id||o.id.includes("?"))){m.add(p);return}}for(let f of new Set([this.environment.name,"client"])){let o=t.get(f);if(o.size===0||!ee(l,i,o))continue;let a=new Set;for(let h of i)this.environment.moduleGraph.invalidateModule(h,a,d,!0);return f===this.environment.name?this.environment.hot.send({type:"full-reload"}):u.hot.send?u.hot.send({type:"full-reload"}):u.ws.send&&u.ws.send({type:"full-reload"}),[]}}}},{name:"@tailwindcss/vite:generate:build",apply:"build",enforce:"pre",transform:{filter:{id:{exclude:[/\/\.vite\//,D,B],include:[/\.css(?:\?.*)?$/,/&lang\.css/,_]}},async handler(l,i){var f=[];try{if(!$(i))return;let d=E(f,new N);v&&d.start("[@tailwindcss/vite] Generate CSS (build)");let u=t.get(this.environment?.name??"default");let y=u.get(i);y||(y??=R(this.environment??null,i),u.set(i,y));let p=await y.generate(l,w=>this.addWatchFile(w),d);if(!p){u.delete(i);return}v&&d.end("[@tailwindcss/vite] Generate CSS (build)");s&&(v&&d.start("[@tailwindcss/vite] Optimize CSS"),p=K(p.code,{minify:g,map:p.map}),v&&d.end("[@tailwindcss/vite] Optimize CSS"));return p}catch(o){var a=o,h=!0}finally{F(f,a,h)}}}}]}function Z(n){let[r]=n.split("?",2);return S.extname(r).slice(1)}function $(n){return n.includes("/.vite/")||D.test(n)||B.test(n)?!1:Z(n)==="css"||n.includes("&lang.css")||n.match(_)}function q(n){return S.resolve(n.replace(/\?.*$/,""))}var O=class extends Map{constructor(e){super();this.factory=e}factory;get(e){let t=super.get(e);return t===void 0&&(t=this.factory(e,this),this.set(e,t)),t}},z=class{constructor(r,e,t,m,c){this.id=r;this.base=e;this.enableSourceMaps=t;this.customCssResolver=m;this.customJsResolver=c}id;base;enableSourceMaps;customCssResolver;customJsResolver;compiler;scanner;candidates=new Set;buildDependencies=new Map;get scannedFiles(){return this.scanner?.files??[]}async generate(r,e,t){let m=q(this.id);function c(i){i!==m&&(/[#?].*\.svg$/.test(i)||e(i))}let s=this.requiresBuild(),g=S.dirname(S.resolve(m));if(!this.compiler||!this.scanner||await s){L(Array.from(this.buildDependencies.keys())),this.buildDependencies.clear(),this.addBuildDependency(q(m)),v&&t.start("Setup compiler");let i=[];this.compiler=await A(r,{from:this.enableSourceMaps?this.id:void 0,base:g,shouldRewriteUrls:!0,onDependency:u=>{c(u),i.push(this.addBuildDependency(u))},customCssResolver:this.customCssResolver,customJsResolver:this.customJsResolver}),await Promise.all(i),v&&t.end("Setup compiler"),v&&t.start("Setup scanner");let d=(this.compiler.root==="none"?[]:this.compiler.root===null?[{base:this.base,pattern:"**/*",negated:!1}]:[{...this.compiler.root,negated:!1}]).concat(this.compiler.sources);this.scanner=new Y({sources:d}),v&&t.end("Setup scanner")}else for(let i of this.buildDependencies.keys())c(i);if(!(this.compiler.features&(b.AtApply|b.JsPluginCompat|b.ThemeFunction|b.Utilities|b.Variants)))return!1;if(this.compiler.features&b.Utilities){v&&t.start("Scan for candidates");for(let i of this.scanner.scan())this.candidates.add(i);v&&t.end("Scan for candidates")}if(this.compiler.features&b.Utilities){v&&t.start("Register dependency messages");for(let i of this.scanner.files)c(i);for(let i of this.scanner.globs){if(i.pattern[0]==="!")continue;let d=S.relative(this.base,i.base);d[0]!=="."&&(d="./"+d),d=T(d),c(S.posix.join(d,i.pattern));let u=this.compiler.root;if(u!=="none"&&u!==null){let y=T(S.resolve(u.base,u.pattern));if(!await x.stat(y).then(f=>f.isDirectory(),()=>!1))throw new Error(`The path given to \`source(\u2026)\` must be a directory but got \`source(${y})\` instead.`)}}v&&t.end("Register dependency messages")}v&&t.start("Build CSS");let R=this.compiler.build([...this.candidates]);v&&t.end("Build CSS"),v&&t.start("Build Source Map");let l=this.enableSourceMaps?k(this.compiler.buildSourceMap()).raw:void 0;return v&&t.end("Build Source Map"),{code:R,map:l}}async addBuildDependency(r){let e=null;try{e=(await x.stat(r)).mtimeMs}catch{}this.buildDependencies.set(r,e)}async requiresBuild(){for(let[r,e]of this.buildDependencies){if(e===null)return!0;try{if((await x.stat(r)).mtimeMs>e)return!0}catch{return!0}}return!1}};function ee(n,r,e){let t=new Set,m=[...r],c={file:n,get realpath(){try{let s=X(n);return Object.defineProperty(c,"realpath",{value:s}),s}catch{return null}}};for(;m.length>0;){let s=m.shift();if(!t.has(s)){if(t.add(s),s.id){let g=e.get(s.id);if(g&&(g.scannedFiles.includes(c.file)||c.realpath&&g.scannedFiles.includes(c.realpath)))return!0}for(let g of s.importers)m.push(g)}}return!1}export{H as default};
|