Nicholai b20db98051
Some checks failed
CI / build-and-test (pull_request) Failing after 1m19s
feat(ci,flags,ops): ship end-to-end CI, feature-flag framework, gated surfaces, and ops docs
CI (.gitea/workflows/ci.yaml): lint → typecheck → vitest w/ coverage → OpenNext build → preview smoke → bundle-size budgets; Node 20; npm ci; artifacts; safe env; D1 dry-run scaffold.

Budgets: add scripts/budgets.mjs; TOTAL_STATIC_MAX_BYTES and MAX_ASSET_BYTES thresholds; report top offenders; fail on breach; README CI section.

Flags: add lib/flags.ts with typed booleans and safe defaults (ADMIN_ENABLED, ARTISTS_MODULE_ENABLED, UPLOADS_ADMIN_ENABLED, BOOKING_ENABLED, PUBLIC_APPOINTMENT_REQUESTS_ENABLED, REFERENCE_UPLOADS_PUBLIC_ENABLED, DEPOSITS_ENABLED, PUBLIC_DB_ARTISTS_ENABLED, ADVANCED_NAV_SCROLL_ANIMATIONS_ENABLED, STRICT_CI_GATES_ENABLED, ISR_CACHE_R2_ENABLED); robust parsing; client provider; unit tests.

Wiring: gate Admin shell and admin write APIs (503 JSON on uploads and artists writes); disable booking submit and short-circuit booking mutations when off; render static Hero/Artists when advanced animations off; tests for UI and API guards.

Ops: expand docs/prd/rollback-strategy.md with “Feature Flags Operations,” Cloudflare Dashboard and wrangler.toml steps, preview simulation, incident playbook, and post-toggle smoke checklist.

Release: add docs/releases/2025-09-19-feature-flags-rollout.md with last-good commit, preview/production flag matrices, rollback notes, and smoke results; link from rollback doc.

Chore: fix TS issues (gift-cards boolean handling, Lenis options, tailwind darkMode), remove next-on-pages peer conflict, update package.json scripts, configure Gitea act_runner label, open draft PR to trigger CI.

Refs: CI-1, FF-1, FF-2, FF-3, OPS-1
Impact: defaults preserve current behavior; no runtime changes unless flags flipped
2025-09-19 21:33:09 -06:00

1 line
9.5 KiB
JavaScript

exports.id=2222,exports.ids=[2222],exports.modules={10232:(e,t,r)=>{Promise.resolve().then(r.bind(r,71572))},403:(e,t,r)=>{Promise.resolve().then(r.bind(r,54528))},15784:(e,t,r)=>{Promise.resolve().then(r.bind(r,37614))},36033:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,63642,23)),Promise.resolve().then(r.t.bind(r,87586,23)),Promise.resolve().then(r.t.bind(r,47838,23)),Promise.resolve().then(r.t.bind(r,58057,23)),Promise.resolve().then(r.t.bind(r,77741,23)),Promise.resolve().then(r.t.bind(r,13118,23))},71572:(e,t,r)=>{"use strict";r.d(t,{default:()=>x});var n=r(97247),s=r(19898),o=r(58797),i=r(41755),a=r(36634),d=r(28964),l=r(58579);function c({children:e}){return n.jsx(n.Fragment,{children:e})}var u=r(57797),f=r(17818);let v=({...e})=>{let{theme:t="system"}=(0,u.F)();return n.jsx(f.x7,{theme:t,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...e})};function x({children:e,initialFlags:t}){let[r]=(0,d.useState)(()=>new o.S({defaultOptions:{queries:{staleTime:6e4,retry:(e,t)=>!(t?.status>=400&&t?.status<500)&&e<3}}}));return n.jsx(s.SessionProvider,{children:(0,n.jsxs)(i.aH,{client:r,children:[n.jsx(l.OH,{value:t,children:n.jsx(d.Suspense,{fallback:n.jsx("div",{children:"Loading..."}),children:(0,n.jsxs)(c,{children:[e,n.jsx(v,{})]})})}),n.jsx(a.t,{initialIsOpen:!1})]})})}r(4047)},54528:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(97247);function s({error:e,reset:t}){return n.jsx("div",{className:"min-h-[50vh] flex items-center justify-center p-8",children:(0,n.jsxs)("div",{className:"text-center space-y-3",children:[n.jsx("h2",{className:"text-xl font-semibold",children:"Something went wrong"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:e?.message||"An unexpected error occurred."}),n.jsx("button",{onClick:()=>t(),className:"inline-flex items-center rounded-md border px-3 py-1.5 text-sm hover:bg-accent",children:"Try again"})]})})}r(28964)},37614:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(97247);function s(){return n.jsx("div",{className:"min-h-[50vh] flex items-center justify-center p-8",children:(0,n.jsxs)("div",{className:"text-center space-y-3",children:[n.jsx("h2",{className:"text-xl font-semibold",children:"404 - Page Not Found"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"The page you are looking for does not exist or has been moved."}),n.jsx("a",{href:"/",className:"inline-flex items-center rounded-md border px-3 py-1.5 text-sm hover:bg-accent",children:"Go home"})]})})}},58579:(e,t,r)=>{"use strict";r.d(t,{OH:()=>f,ye:()=>v});var n=r(97247),s=r(28964);let o=Object.freeze({ADMIN_ENABLED:!0,ARTISTS_MODULE_ENABLED:!0,UPLOADS_ADMIN_ENABLED:!0,BOOKING_ENABLED:!0,PUBLIC_APPOINTMENT_REQUESTS_ENABLED:!1,REFERENCE_UPLOADS_PUBLIC_ENABLED:!1,DEPOSITS_ENABLED:!1,PUBLIC_DB_ARTISTS_ENABLED:!1,ADVANCED_NAV_SCROLL_ANIMATIONS_ENABLED:!0,STRICT_CI_GATES_ENABLED:!0,ISR_CACHE_R2_ENABLED:!0}),i=Object.keys(o),a=new Set(i),d=new Set,l=null;function c(e={}){if(e.refresh&&(l=null),l)return l;let t=function(){let e={};for(let t of i){let r=function(e){let t=function(){if("undefined"!=typeof globalThis)return globalThis.__UNITED_TATTOO_RUNTIME_FLAGS__}();return t&&void 0!==t[e]?t[e]:"undefined"!=typeof process&&process.env&&void 0!==process.env[e]?process.env[e]:void 0}(t),n=function(e,t){if("boolean"==typeof e)return e;if("string"==typeof e){let t=e.trim().toLowerCase();if("true"===t||"1"===t)return!0;if("false"===t||"0"===t)return!1}return t}(r,o[t]);null!=r&&("string"!=typeof r||""!==r.trim())||d.has(t)||(d.add(t),"undefined"!=typeof console&&console.warn(`[flags] ${t} not provided; defaulting to ${n}. Set env var to override.`)),e[t]=n}return Object.freeze(e)}();return l=t,t}new Proxy({},{get:(e,t)=>{if(a.has(t))return c()[t]},ownKeys:()=>i,getOwnPropertyDescriptor:(e,t)=>{if(a.has(t))return{configurable:!0,enumerable:!0,value:c()[t]}}});let u=(0,s.createContext)(o);function f({value:e,children:t}){return n.jsx(u.Provider,{value:e,children:t})}function v(e){return(0,s.useContext)(u)[e]}},58053:(e,t,r)=>{"use strict";r.d(t,{d:()=>a,z:()=>d});var n=r(97247);r(28964);var s=r(69008),o=r(87972),i=r(25008);let a=(0,o.j)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function d({className:e,variant:t,size:r,asChild:o=!1,...d}){let l=o?s.g7:"button";return n.jsx(l,{"data-slot":"button",className:(0,i.cn)(a({variant:t,size:r,className:e})),...d})}},27757:(e,t,r)=>{"use strict";r.d(t,{Ol:()=>i,SZ:()=>d,Zb:()=>o,aY:()=>l,eW:()=>c,ll:()=>a});var n=r(97247);r(28964);var s=r(25008);function o({className:e,...t}){return n.jsx("div",{"data-slot":"card",className:(0,s.cn)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function i({className:e,...t}){return n.jsx("div",{"data-slot":"card-header",className:(0,s.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function a({className:e,...t}){return n.jsx("div",{"data-slot":"card-title",className:(0,s.cn)("leading-none font-semibold",e),...t})}function d({className:e,...t}){return n.jsx("div",{"data-slot":"card-description",className:(0,s.cn)("text-muted-foreground text-sm",e),...t})}function l({className:e,...t}){return n.jsx("div",{"data-slot":"card-content",className:(0,s.cn)("px-6",e),...t})}function c({className:e,...t}){return n.jsx("div",{"data-slot":"card-footer",className:(0,s.cn)("flex items-center px-6 [.border-t]:pt-6",e),...t})}},25008:(e,t,r)=>{"use strict";r.d(t,{cn:()=>o});var n=r(61929),s=r(35770);function o(...e){return(0,s.m6)((0,n.W)(e))}},40509:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});let n=(0,r(45347).createProxy)(String.raw`/home/Nicholai/Documents/Dev/united_v03/united-tattoo/united-tattoo/app/error.tsx#default`)},40656:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>v,dynamic:()=>f,metadata:()=>u});var n=r(72051),s=r(54233),o=r.n(s),i=r(73372),a=r.n(i),d=r(26269);let l=(0,r(45347).createProxy)(String.raw`/home/Nicholai/Documents/Dev/united_v03/united-tattoo/united-tattoo/app/ClientLayout.tsx#default`);var c=r(93470);r(67272);let u={title:"United Tattoo - Professional Tattoo Studio",description:"Book appointments with our talented artists and explore stunning tattoo portfolios at United Tattoo.",generator:"v0.app"},f="force-dynamic";function v({children:e}){let t=(0,c.L6)({refresh:!0});return n.jsx("html",{lang:"en",className:`${o().variable} ${a().variable}`,children:n.jsx("body",{className:"font-sans antialiased",children:n.jsx(d.Suspense,{fallback:null,children:n.jsx(l,{initialFlags:t,children:e})})})})}},70546:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});let n=(0,r(45347).createProxy)(String.raw`/home/Nicholai/Documents/Dev/united_v03/united-tattoo/united-tattoo/app/not-found.tsx#default`)},93470:(e,t,r)=>{"use strict";r.d(t,{L6:()=>d,vU:()=>l});let n=Object.freeze({ADMIN_ENABLED:!0,ARTISTS_MODULE_ENABLED:!0,UPLOADS_ADMIN_ENABLED:!0,BOOKING_ENABLED:!0,PUBLIC_APPOINTMENT_REQUESTS_ENABLED:!1,REFERENCE_UPLOADS_PUBLIC_ENABLED:!1,DEPOSITS_ENABLED:!1,PUBLIC_DB_ARTISTS_ENABLED:!1,ADVANCED_NAV_SCROLL_ANIMATIONS_ENABLED:!0,STRICT_CI_GATES_ENABLED:!0,ISR_CACHE_R2_ENABLED:!0}),s=Object.keys(n),o=new Set(s),i=new Set,a=null;function d(e={}){if(e.refresh&&(a=null),a)return a;let t=function(){let e={};for(let t of s){let r=function(e){let t=function(){if("undefined"!=typeof globalThis)return globalThis.__UNITED_TATTOO_RUNTIME_FLAGS__}();return t&&void 0!==t[e]?t[e]:"undefined"!=typeof process&&process.env&&void 0!==process.env[e]?process.env[e]:void 0}(t),s=function(e,t){if("boolean"==typeof e)return e;if("string"==typeof e){let t=e.trim().toLowerCase();if("true"===t||"1"===t)return!0;if("false"===t||"0"===t)return!1}return t}(r,n[t]);null!=r&&("string"!=typeof r||""!==r.trim())||i.has(t)||(i.add(t),"undefined"!=typeof console&&console.warn(`[flags] ${t} not provided; defaulting to ${s}. Set env var to override.`)),e[t]=s}return Object.freeze(e)}();return a=t,t}let l=new Proxy({},{get:(e,t)=>{if(o.has(t))return d()[t]},ownKeys:()=>s,getOwnPropertyDescriptor:(e,t)=>{if(o.has(t))return{configurable:!0,enumerable:!0,value:d()[t]}}})},57481:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(54564);let s=e=>[{type:"image/x-icon",sizes:"16x16",url:(0,n.fillMetadataSegment)(".",e.params,"favicon.ico")+""}]},67272:()=>{},4047:()=>{}};