diff --git a/examples/wp-vs-tanstack/wordpress/seed/content/post-cooling.html b/examples/wp-vs-tanstack/wordpress/seed/content/post-cooling.html
index fb5de688..db4fd248 100644
--- a/examples/wp-vs-tanstack/wordpress/seed/content/post-cooling.html
+++ b/examples/wp-vs-tanstack/wordpress/seed/content/post-cooling.html
@@ -1,66 +1,151 @@
-
Front Range summers can swing from mild mornings to scorching afternoons, and your AC works hard to keep up. The good news: a few smart habits can shave real money off your cooling bill without leaving you sweating. Here are seven changes our technicians recommend to Denver-metro homeowners.
+ Front Range summers can swing from mild mornings to scorching afternoons, and
+ your AC works hard to keep up. The good news: a few smart habits can shave
+ real money off your cooling bill without leaving you sweating. Here are seven
+ changes our technicians recommend to Denver-metro homeowners.
+
A dirty filter forces your AC to run longer and harder to move the same amount of air. In our dusty climate, checking it monthly and replacing it every 60 to 90 days is the single easiest way to keep efficiency up and energy use down.
+ A dirty filter forces your AC to run longer and harder to move the same amount
+ of air. In our dusty climate, checking it monthly and replacing it every 60 to
+ 90 days is the single easiest way to keep efficiency up and energy use down.
+
Let the house warm up a few degrees while you're at work and cool it back down before you get home. Setting your thermostat just 7 to 10 degrees higher for eight hours a day can meaningfully cut cooling costs over a season — a smart thermostat handles it automatically.
+ Let the house warm up a few degrees while you're at work and cool it back down
+ before you get home. Setting your thermostat just 7 to 10 degrees higher for
+ eight hours a day can meaningfully cut cooling costs over a season — a
+ smart thermostat handles it automatically.
+
Colorado gets intense, high-altitude sun. South- and west-facing windows can pour heat into your home all afternoon. Keeping blinds or curtains closed during the hottest part of the day takes a surprising load off your air conditioner.
+ Colorado gets intense, high-altitude sun. South- and west-facing windows can
+ pour heat into your home all afternoon. Keeping blinds or curtains closed
+ during the hottest part of the day takes a surprising load off your air
+ conditioner.
+
Fans don't cool the air, they cool you — so the wind-chill effect lets you raise the thermostat a few degrees and feel just as comfortable. Set them to spin counter-clockwise in summer, and turn them off when you leave the room to avoid wasting power.
+ Fans don't cool the air, they cool you — so the wind-chill effect lets
+ you raise the thermostat a few degrees and feel just as comfortable. Set them
+ to spin counter-clockwise in summer, and turn them off when you leave the room
+ to avoid wasting power.
+
Cool air escaping through gaps is money out the window — literally. Fresh weatherstripping and a bead of caulk around leaky frames are cheap, and they keep the air you paid to cool inside where it belongs.
+ Cool air escaping through gaps is money out the window — literally.
+ Fresh weatherstripping and a bead of caulk around leaky frames are cheap, and
+ they keep the air you paid to cool inside where it belongs.
+
Your oven, dryer, and dishwasher throw off a lot of heat. On hot days, grill outside or cook in the cooler evening hours, and run heat-generating appliances after sundown so your AC isn't fighting them during peak heat.
+ Your oven, dryer, and dishwasher throw off a lot of heat. On hot days, grill
+ outside or cook in the cooler evening hours, and run heat-generating
+ appliances after sundown so your AC isn't fighting them during peak heat.
+
A well-maintained system can run far more efficiently than a neglected one. During a tune-up we clean the coils, check the refrigerant charge, and catch small problems before they become expensive breakdowns — so your AC uses less energy all summer long.
+ A well-maintained system can run far more efficiently than a neglected one.
+ During a tune-up we clean the coils, check the refrigerant charge, and catch
+ small problems before they become expensive breakdowns — so your AC uses
+ less energy all summer long.
+
Put even a few of these into practice and you'll likely notice the difference on your next bill. Want to squeeze the most out of your system? Let us tune it up before the heat really kicks in.
+ Put even a few of these into practice and you'll likely notice the difference
+ on your next bill. Want to squeeze the most out of your system? Let us tune it
+ up before the heat really kicks in.
+
-
Beat the heat — book a cooling tune-up today.
-
+
+
+
+ Beat the heat — book a cooling tune-up today.
+
+
+
+
+
diff --git a/examples/wp-vs-tanstack/wordpress/seed/content/post-furnace.html b/examples/wp-vs-tanstack/wordpress/seed/content/post-furnace.html
index e4b9a1cc..e897eba5 100644
--- a/examples/wp-vs-tanstack/wordpress/seed/content/post-furnace.html
+++ b/examples/wp-vs-tanstack/wordpress/seed/content/post-furnace.html
@@ -1,52 +1,135 @@
-
🔥 Furnace Won't Turn On? 5 Things to Check First
+
+ 🔥 Furnace Won't Turn On? 5 Things to Check First
+
-
There's nothing worse than waking up to a cold house on a Front Range winter morning. Before you panic — or pay for a service call you might not need — run through these five quick checks. More often than not, the fix is something simple you can handle yourself in a couple of minutes.
+
+ There's nothing worse than waking up to a cold house on a Front Range winter
+ morning. Before you panic — or pay for a service call you might not need
+ — run through these five quick checks. More often than not, the fix is
+ something simple you can handle yourself in a couple of minutes.
+
-
1. Check the thermostat
+
+ 1. Check the thermostat
+
-
It sounds obvious, but start here. Make sure the thermostat is set to "Heat" (not "Cool" or "Off") and that the target temperature is set a few degrees above the current room temperature. If it's a digital model, dead or low batteries are a surprisingly common culprit — swap them out and see if the furnace kicks on. Also double-check that no one bumped the schedule or a "hold" setting.
+
+ It sounds obvious, but start here. Make sure the thermostat is set to "Heat"
+ (not "Cool" or "Off") and that the target temperature is set a few degrees
+ above the current room temperature. If it's a digital model, dead or low
+ batteries are a surprisingly common culprit — swap them out and see if
+ the furnace kicks on. Also double-check that no one bumped the schedule or a
+ "hold" setting.
+
-
2. Check the power and breaker
+
+ 2. Check the power and breaker
+
-
Your furnace needs electricity even if it runs on gas. Head to your electrical panel and look for a tripped breaker labeled for the furnace or HVAC. If one has flipped, switch it fully off and then back on. If it trips again right away, stop — that's a sign of an electrical problem that needs a professional, not a repeated reset.
+
+ Your furnace needs electricity even if it runs on gas. Head to your electrical
+ panel and look for a tripped breaker labeled for the furnace or HVAC. If one
+ has flipped, switch it fully off and then back on. If it trips again right
+ away, stop — that's a sign of an electrical problem that needs a
+ professional, not a repeated reset.
+
-
3. Check the furnace switch
+
+ 3. Check the furnace switch
+
-
Most furnaces have a standard light-switch nearby — often on or next to the unit itself at the top of a basement staircase. It looks just like a regular wall switch, so it's easy for a family member (or a curious kid) to flip it off by accident. Make sure it's in the ON position. While you're there, confirm the furnace door panel is fully seated, since a loose panel can trip a safety switch that keeps the unit from firing.
+
+ Most furnaces have a standard light-switch nearby — often on or next to
+ the unit itself at the top of a basement staircase. It looks just like a
+ regular wall switch, so it's easy for a family member (or a curious kid) to
+ flip it off by accident. Make sure it's in the ON position. While you're
+ there, confirm the furnace door panel is fully seated, since a loose panel can
+ trip a safety switch that keeps the unit from firing.
+
-
4. Check the air filter
+
+ 4. Check the air filter
+
-
A clogged filter restricts airflow, and a badly restricted furnace can overheat and shut itself down as a safety measure. If your filter is gray and caked with dust, replace it with a fresh one. In our dry, dusty climate we recommend checking filters every month and swapping them at least every 90 days. This one simple habit prevents a huge share of no-heat calls.
+
+ A clogged filter restricts airflow, and a badly restricted furnace can
+ overheat and shut itself down as a safety measure. If your filter is gray and
+ caked with dust, replace it with a fresh one. In our dry, dusty climate we
+ recommend checking filters every month and swapping them at least every 90
+ days. This one simple habit prevents a huge share of no-heat calls.
+
-
5. Check the pilot light or ignition
+
+ 5. Check the pilot light or ignition
+
-
Older furnaces have a standing pilot light. If it's out, follow the relighting instructions printed on the unit — and if it won't stay lit, you may have a bad thermocouple. Newer furnaces use electronic ignition instead; if you hear it clicking but it never catches, the ignitor may be worn out. If you ever smell gas, leave the house and call us right away — don't troubleshoot a gas smell yourself.
+
+ Older furnaces have a standing pilot light. If it's out, follow the relighting
+ instructions printed on the unit — and if it won't stay lit, you may
+ have a bad thermocouple. Newer furnaces use electronic ignition instead; if
+ you hear it clicking but it never catches, the ignitor may be worn out. If you
+ ever smell gas, leave the house and call us right away — don't
+ troubleshoot a gas smell yourself.
+
-
Ran through all five and still no heat? That's where we come in. Our technicians diagnose furnace problems quickly, give you an upfront price before any work starts, and get your home warm again — often the same day.
+
+ Ran through all five and still no heat? That's where we come in. Our
+ technicians diagnose furnace problems quickly, give you an upfront price
+ before any work starts, and get your home warm again — often the same
+ day.
+
-
-
No heat? We'll get you warm again fast.
-
+
+
+
+ No heat? We'll get you warm again fast.
+
+
+
+
+
diff --git a/examples/wp-vs-tanstack/wordpress/seed/content/post-waterheater.html b/examples/wp-vs-tanstack/wordpress/seed/content/post-waterheater.html
index 4a15b24e..ecca659c 100644
--- a/examples/wp-vs-tanstack/wordpress/seed/content/post-waterheater.html
+++ b/examples/wp-vs-tanstack/wordpress/seed/content/post-waterheater.html
@@ -1,59 +1,143 @@
-
💧 6 Signs You Need a New Water Heater
+
+ 💧 6 Signs You Need a New Water Heater
+
-
A water heater rarely fails without warning. Most give you plenty of clues that the end is near — if you know what to look for. Catching these signs early lets you replace the unit on your schedule instead of waking up to a cold shower or a flooded utility room. Here are six red flags our plumbers tell Front Range homeowners to watch for.
+
+ A water heater rarely fails without warning. Most give you plenty of clues
+ that the end is near — if you know what to look for. Catching these
+ signs early lets you replace the unit on your schedule instead of waking up to
+ a cold shower or a flooded utility room. Here are six red flags our plumbers
+ tell Front Range homeowners to watch for.
+
-
1. It's more than 10 years old
+
+ 1. It's more than 10 years old
+
-
Most tank water heaters last 8 to 12 years. Check the manufacture date on the label — if yours is past the decade mark, it's living on borrowed time. Replacing it proactively is far cheaper and less stressful than dealing with a sudden failure and the water damage that can come with it.
+
+ Most tank water heaters last 8 to 12 years. Check the manufacture date on the
+ label — if yours is past the decade mark, it's living on borrowed time.
+ Replacing it proactively is far cheaper and less stressful than dealing with a
+ sudden failure and the water damage that can come with it.
+
-
2. The hot water looks rusty
+
+ 2. The hot water looks rusty
+
-
If rusty or brown water comes out of your hot taps — but your cold water runs clear — the inside of the tank is likely corroding. Once rust takes hold inside the tank, a leak usually isn't far behind, and there's no repairing it at that point.
+
+ If rusty or brown water comes out of your hot taps — but your cold water
+ runs clear — the inside of the tank is likely corroding. Once rust takes
+ hold inside the tank, a leak usually isn't far behind, and there's no
+ repairing it at that point.
+
-
3. You hear rumbling or popping
+
+ 3. You hear rumbling or popping
+
-
Over the years, sediment builds up and hardens on the bottom of the tank. When the burner heats that layer, you'll hear rumbling, popping, or banging. That sediment makes the unit work harder, run less efficiently, and wear out faster — a clear sign it's near the end.
+
+ Over the years, sediment builds up and hardens on the bottom of the tank. When
+ the burner heats that layer, you'll hear rumbling, popping, or banging. That
+ sediment makes the unit work harder, run less efficiently, and wear out faster
+ — a clear sign it's near the end.
+
-
4. You're running out of hot water
+
+ 4. You're running out of hot water
+
-
If showers turn cold faster than they used to, or the first person up gets all the hot water, the tank's capacity is effectively shrinking — usually from sediment buildup or a failing heating element. When the hot water just can't keep up with your household anymore, replacement is often the smart move.
+
+ If showers turn cold faster than they used to, or the first person up gets all
+ the hot water, the tank's capacity is effectively shrinking — usually
+ from sediment buildup or a failing heating element. When the hot water just
+ can't keep up with your household anymore, replacement is often the smart
+ move.
+
-
5. There's water around the base
+
+ 5. There's water around the base
+
-
Puddles or dampness around the bottom of the tank point to a crack or leak in the tank itself. As metal heats and cools, small fractures form and widen. A leaking tank can't be patched — and the longer you wait, the higher the risk of a messy, damaging failure.
+
+ Puddles or dampness around the bottom of the tank point to a crack or leak in
+ the tank itself. As metal heats and cools, small fractures form and widen. A
+ leaking tank can't be patched — and the longer you wait, the higher the
+ risk of a messy, damaging failure.
+
-
6. Repairs are piling up
+
+ 6. Repairs are piling up
+
-
A one-time fix is normal, but if you're calling for repairs every few months, those costs add up fast. At some point it makes more sense to put that money toward a new, efficient unit — and a modern tankless system can give you endless hot water and lower energy bills on top of it.
+
+ A one-time fix is normal, but if you're calling for repairs every few months,
+ those costs add up fast. At some point it makes more sense to put that money
+ toward a new, efficient unit — and a modern tankless system can give you
+ endless hot water and lower energy bills on top of it.
+
-
Spotting one or two of these signs? Don't wait for a cold shower or a flooded basement to force the decision. We'll inspect your current unit, walk you through tank and tankless options, and give you an honest, upfront recommendation.
+
+ Spotting one or two of these signs? Don't wait for a cold shower or a flooded
+ basement to force the decision. We'll inspect your current unit, walk you
+ through tank and tankless options, and give you an honest, upfront
+ recommendation.
+
-
-
Time for a new water heater? Let's talk options.
-
+
+
+
+ Time for a new water heater? Let's talk options.
+
+
+
+
+
diff --git a/examples/wp-vs-tanstack/wordpress/seed/content/reviews.html b/examples/wp-vs-tanstack/wordpress/seed/content/reviews.html
index 8a98a300..fdd675cf 100644
--- a/examples/wp-vs-tanstack/wordpress/seed/content/reviews.html
+++ b/examples/wp-vs-tanstack/wordpress/seed/content/reviews.html
@@ -1,85 +1,253 @@
-
-
-
⭐ 4.9 / 5 from 1,200+ Reviews
-
-
-
What Our Neighbors Say
-
-
-
Real reviews from real homeowners across the Denver metro and Front Range.
-
-
+
+
+
+
+
+ ⭐ 4.9 / 5 from 1,200+ Reviews
+
+
+
+
+ What Our Neighbors Say
+
+
+
+
+ Real reviews from real homeowners across the Denver metro and Front Range.
+
+
+
+
-
⭐⭐⭐⭐⭐ Rated 4.9/5
+
+ ⭐⭐⭐⭐⭐ Rated 4.9/5
+
-
Here's a sample of what folks are saying about Summit Home Services.
+
+ Here's a sample of what folks are saying about Summit Home Services.
+
-
-
-
⭐⭐⭐⭐⭐
-
-
Our AC died during the worst heat wave of the summer. Summit had a tech out the same afternoon and we were cool again by dinner. Upfront price, no runaround, no pressure to replace the whole unit.
❄️ Maria G. — Denver
-
-
-
-
-
-
⭐⭐⭐⭐⭐
-
-
Woke up to a flooded basement from a burst pipe. I called at 6am and a plumber was on my doorstep within the hour. He stopped the leak, cleaned up, and walked me through everything. Lifesavers.
💧 Darnell W. — Aurora
-
-
-
-
-
-
⭐⭐⭐⭐⭐
-
-
Our old furnace quit on the first cold night of the year. Summit replaced it with a high-efficiency unit the next day and handled the rebate paperwork for me. The house has never been warmer.
🔥 Karen P. — Lakewood
-
-
-
+
+
+
+
⭐⭐⭐⭐⭐
+
+
+
+
+
+ Our AC died during the worst heat wave of the summer. Summit had a tech
+ out the same afternoon and we were cool again by dinner. Upfront price,
+ no runaround, no pressure to replace the whole unit.
+
+ ❄️ Maria G. — Denver
+
+
+
+
+
+
+
+
⭐⭐⭐⭐⭐
+
+
+
+
+
+ Woke up to a flooded basement from a burst pipe. I called at 6am and a
+ plumber was on my doorstep within the hour. He stopped the leak, cleaned
+ up, and walked me through everything. Lifesavers.
+
+ 💧 Darnell W. — Aurora
+
+
+
+
+
+
+
+
⭐⭐⭐⭐⭐
+
+
+
+
+
+ Our old furnace quit on the first cold night of the year. Summit
+ replaced it with a high-efficiency unit the next day and handled the
+ rebate paperwork for me. The house has never been warmer.
+
+ 🔥 Karen P. — Lakewood
+
+
+
+
-
-
-
⭐⭐⭐⭐⭐
-
-
We had a slow kitchen drain for months. Their tech hydro-jetted the whole line and showed me the camera footage of what was clogging it. Honest work and a fair price — no upsell nonsense.
🚿 Tom R. — Boulder
-
-
-
-
-
-
⭐⭐⭐⭐⭐
-
-
Switched to Summit for our annual AC tune-up after a bad experience elsewhere. The tech was on time, professional, and actually explained what he checked. We signed up for their maintenance plan on the spot.
❄️ Steph L. — Littleton
-
-
-
-
-
-
⭐⭐⭐⭐⭐
-
-
Our water heater was leaking all over the garage. Summit installed a tankless system and now we never run out of hot water. The crew was tidy, respectful, and finished faster than they quoted.
💧 Alan M. — Arvada
-
-
-
+
+
+
+
⭐⭐⭐⭐⭐
+
+
+
+
+
+ We had a slow kitchen drain for months. Their tech hydro-jetted the
+ whole line and showed me the camera footage of what was clogging it.
+ Honest work and a fair price — no upsell nonsense.
+
+ 🚿 Tom R. — Boulder
+
+
+
+
+
+
+
+
⭐⭐⭐⭐⭐
+
+
+
+
+
+ Switched to Summit for our annual AC tune-up after a bad experience
+ elsewhere. The tech was on time, professional, and actually explained
+ what he checked. We signed up for their maintenance plan on the spot.
+
+ ❄️ Steph L. — Littleton
+
+
+
+
+
+
+
+
⭐⭐⭐⭐⭐
+
+
+
+
+
+ Our water heater was leaking all over the garage. Summit installed a
+ tankless system and now we never run out of hot water. The crew was
+ tidy, respectful, and finished faster than they quoted.
+
+ 💧 Alan M. — Arvada
+
+
+
+
-
-
Join 1,200+ happy Front Range homeowners.
-
+
+
+
+ Join 1,200+ happy Front Range homeowners.
+
+
+
+
+
diff --git a/examples/wp-vs-tanstack/wordpress/seed/content/services.html b/examples/wp-vs-tanstack/wordpress/seed/content/services.html
index 3a033f03..37112651 100644
--- a/examples/wp-vs-tanstack/wordpress/seed/content/services.html
+++ b/examples/wp-vs-tanstack/wordpress/seed/content/services.html
@@ -1,169 +1,529 @@
-
-
-
Heating · Cooling · Plumbing
-
-
-
Our Services
-
-
-
One trusted local team for every system in your home. Upfront pricing, licensed techs, same-day service.
-
-
+
+
+
+
+
+ Heating · Cooling · Plumbing
+
+
+
+
+ Our Services
+
+
+
+
+ One trusted local team for every system in your home. Upfront pricing,
+ licensed techs, same-day service.
+
+
+
+
-
What we can do for you
+
+ What we can do for you
+
-
From a dripping faucet to a full system replacement, Summit handles it all across the Front Range.
+
+ From a dripping faucet to a full system replacement, Summit handles it all
+ across the Front Range.
+
-
-
❄️ Air Conditioning
-
When the Front Range heat hits, you want cool air fast. We repair every brand, fine-tune aging systems, and install high-efficiency units sized right for your home.
-
-
-
-
-
AC Repair
-
-
Diagnostics on all makes & models Refrigerant leaks & recharge Compressor & capacitor repair Frozen coils & airflow fixes
-
-
-
-
-
-
Tune-Ups
-
-
Spring maintenance checks Coil cleaning & filter swaps Thermostat calibration Efficiency & safety report
-
-
-
-
-
-
New Installs
-
-
High-efficiency central air Ductless mini-splits Right-sized load calculations Financing available
-
-
-
-
-
+
+
+
+ ❄️ Air Conditioning
+
+
+
+
+ When the Front Range heat hits, you want cool air fast. We repair every
+ brand, fine-tune aging systems, and install high-efficiency units sized
+ right for your home.
+
+
+
+
+
+
+
+
AC Repair
+
+
+
+
+ Diagnostics on all makes & models
+
+ Refrigerant leaks & recharge
+
+ Compressor & capacitor repair
+
+ Frozen coils & airflow fixes
+
+
+
+
+
+
+
+
+
Tune-Ups
+
+
+
+
+ Spring maintenance checks
+
+ Coil cleaning & filter swaps
+
+ Thermostat calibration
+
+ Efficiency & safety report
+
+
+
+
+
+
+
+
+
New Installs
+
+
+
+
+ High-efficiency central air
+
+ Ductless mini-splits
+
+ Right-sized load calculations
+
+ Financing available
+
+
+
+
+
+
+
-
-
🔥 Heating
-
Colorado winters don't wait. We keep furnaces and heat pumps running safely and swap out tired units before the first cold snap.
-
-
-
-
-
Furnaces
-
-
No-heat emergency repair Ignitor & blower replacement High-efficiency gas furnaces
-
-
-
-
-
-
Heat Pumps
-
-
Cold-climate heat pumps Dual-fuel system setups Rebate-qualifying installs
-
-
-
-
-
-
Safety Inspections
-
-
Carbon monoxide testing Heat exchanger inspection Venting & gas-line checks
-
-
-
-
-
+
+
+
+ 🔥 Heating
+
+
+
+
+ Colorado winters don't wait. We keep furnaces and heat pumps running safely
+ and swap out tired units before the first cold snap.
+
+
+
+
+
+
+
+
Furnaces
+
+
+
+
+ No-heat emergency repair
+
+ Ignitor & blower replacement
+
+ High-efficiency gas furnaces
+
+
+
+
+
+
+
+
+
Heat Pumps
+
+
+
+
+ Cold-climate heat pumps
+
+ Dual-fuel system setups
+
+ Rebate-qualifying installs
+
+
+
+
+
+
+
+
+
+ Safety Inspections
+
+
+
+
+
+ Carbon monoxide testing
+
+ Heat exchanger inspection
+
+ Venting & gas-line checks
+
+
+
+
+
+
+
-
-
🚿 Plumbing
-
Licensed plumbers for the jobs you can't put off. We show up on time, protect your floors, and clean up before we leave.
-
-
-
-
-
💧 Leaks
-
-
Hidden & slab leak detection Faucet, toilet & valve repair Burst & frozen pipe fixes
-
-
-
-
-
-
Drains
-
-
Clogged sinks & tubs Garbage disposal service Sewer line clearing
-
-
-
-
-
-
Repipes
-
-
Whole-home repiping PEX & copper upgrades Old galvanized replacement
-
-
-
-
-
+
+
+
+ 🚿 Plumbing
+
+
+
+
+ Licensed plumbers for the jobs you can't put off. We show up on time,
+ protect your floors, and clean up before we leave.
+
+
+
+
+
+
+
+
💧 Leaks
+
+
+
+
+ Hidden & slab leak detection
+
+ Faucet, toilet & valve repair
+
+ Burst & frozen pipe fixes
+
+
+
+
+
+
+
+
+
Drains
+
+
+
+
+ Clogged sinks & tubs
+
+ Garbage disposal service
+
+ Sewer line clearing
+
+
+
+
+
+
+
+
+
Repipes
+
+
+
+
+ Whole-home repiping
+
+ PEX & copper upgrades
+
+ Old galvanized replacement
+
+
+
+
+
+
+
-
-
-
-
-
-
💧 Water Heaters
-
Hot water on demand, repaired or replaced the same day.
-
-
Tank water heater repair & install Tankless (on-demand) systems Flushes, anode rods & T&P valves Gas & electric models
-
-
-
-
-
-
🛠️ Drain Cleaning
-
Slow or stubborn drains cleared without the mess.
-
-
Professional drain snaking Hydro-jetting for tough clogs Camera sewer inspections Root intrusion removal
-
-
-
-
-
-
✅ Indoor Air Quality
-
Breathe easier in Colorado's dry, dusty air.
-
-
Whole-home humidifiers HEPA & media air filtration UV germicidal lights Duct cleaning & sealing
-
-
-
-
-
+
+
+
+
+
+
+
💧 Water Heaters
+
+
+
+ Hot water on demand, repaired or replaced the same day.
+
+
+
+
+
+ Tank water heater repair & install
+
+ Tankless (on-demand) systems
+
+ Flushes, anode rods & T&P valves
+
+ Gas & electric models
+
+
+
+
+
+
+
+
+
+ 🛠️ Drain Cleaning
+
+
+
+
+ Slow or stubborn drains cleared without the mess.
+
+
+
+
+
+ Professional drain snaking
+
+ Hydro-jetting for tough clogs
+
+ Camera sewer inspections
+
+ Root intrusion removal
+
+
+
+
+
+
+
+
+
+ ✅ Indoor Air Quality
+
+
+
+
Breathe easier in Colorado's dry, dusty air.
+
+
+
+
+ Whole-home humidifiers
+
+ HEPA & media air filtration
+
+ UV germicidal lights
+
+ Duct cleaning & sealing
+
+
+
+
+
+
+
-
-
Not sure what you need? Let's figure it out together.
-
Tell us what's going on and we'll give you an honest recommendation and an upfront price.
-
+
+
+
+ Not sure what you need? Let's figure it out together.
+
+
+
+
+ Tell us what's going on and we'll give you an honest recommendation and an
+ upfront price.
+
+
+
+
+
diff --git a/examples/wp-vs-tanstack/wordpress/seed/custom.css b/examples/wp-vs-tanstack/wordpress/seed/custom.css
index eedcbff3..31f8abac 100644
--- a/examples/wp-vs-tanstack/wordpress/seed/custom.css
+++ b/examples/wp-vs-tanstack/wordpress/seed/custom.css
@@ -15,11 +15,17 @@ button,
input,
textarea,
select {
- font-family: 'Inter', -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif;
+ font-family:
+ 'Inter', -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif;
color: #475569;
}
-h1, h2, h3, h4, h5, h6,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
.wp-block-heading,
.ast-site-title,
.site-title,
diff --git a/kody/headless-api/AGENTS.md b/kody/headless-api/AGENTS.md
index 157c246b..5c82718c 100644
--- a/kody/headless-api/AGENTS.md
+++ b/kody/headless-api/AGENTS.md
@@ -45,11 +45,16 @@ write; `GET` reads it back after approval; `POST /api/mcp` lists tools.
`viewer` is denied (403). API-key/token issuance (`createApiKey`) is a
separate path.
- **Writes stage into governance** — they are invisible until `approve()`.
-- **`kody.jobs` field schema is best-effort** (`entry` + cron `schedule`).
- Confirm exact field names with `repoRunChecks` / the jobs guide on go-day;
- the handlers themselves are verified.
-- **`pg` over workerd TCP is unproven (U2).** If egress fails on Kody, swap the
- pool for a Neon serverless driver — config-side only, because the store types
- `PgPoolLike` as a structural interface (no package change).
+- **`kody.jobs` schema is confirmed** (validated by `kody dev`): `entry:
+ "./src/jobs.ts#
"`, `schedule: { "type": "interval", "every": "5m" }` (or
+ `{ "type": "cron", "expression": "<5-field>" }`). Bare cron strings and
+ `type: "once"` are rejected.
+- **`pg` does NOT load under Kody workerd (U2, confirmed via `kody dev`):**
+ a DB request fails with `No such module "pg"`. Swap the pool for Neon's
+ serverless driver behind the store's `PgPoolLike` interface — config-side
+ only, no store-postgres change. Everything else bundles + runs under workerd.
+- **Run `kody dev` from a standalone checkout, not nested in the monorepo** —
+ nesting fails the snapshot with a misleading `bundle target(s) missing` error.
+ See GO-DAY.md.
- `node_modules/` here is local symlink scaffolding for the smoke only; the real
deps resolve from the pkg-pr-new URLs in `package.json` on Kody.
diff --git a/kody/headless-api/GO-DAY.md b/kody/headless-api/GO-DAY.md
index 7a56619d..903d0a9f 100644
--- a/kody/headless-api/GO-DAY.md
+++ b/kody/headless-api/GO-DAY.md
@@ -1,40 +1,58 @@
# Go-day deltas — headless-api
-Everything in this package is built and **locally validated** (real Postgres,
-`scripts/local-smoke.mts` → SMOKE PASS) against the workspace packages. What
-remains is only what requires the external blockers to clear.
+Built and validated two ways: (1) node + real Postgres via
+`scripts/local-smoke.mts` → SMOKE PASS (CMS logic, auth, governance, jobs);
+(2) **`kody dev` (local workerd)** — see "What kody dev proved" below.
+
+## What `kody dev` already proved (local workerd, no publish)
+
+- ✅ **The CMS graph bundles and boots under workerd** (same esbuild path as
+ publish). The `{ fetch }` entry loads and the CMS API handler serves — `GET /`
+ returns the CMS's own `404 {"code":"NOT_FOUND"}`.
+- ✅ **`kody.jobs` manifest schema confirmed** (kody dev validated it):
+ `"schedule": { "type": "interval", "every": "5m" }` (or
+ `{ "type": "cron", "expression": "<5-field>" }`), `entry:
+ "./src/jobs.ts#"`. A bare cron string and `schedule.type: "once"` are
+ rejected.
+- ⚠️ **U2 answer (local):** the first DB-touching request fails under workerd
+ with **`Error: No such module "pg"`** during `migrateTo`. The stock `pg`
+ driver does not load under Kody workerd. Everything upstream of the DB works.
+
+## Must run `kody dev` from a STANDALONE checkout
+
+`kody dev` snapshots the package via its git repo. Run inside this monorepo it
+fails with `Package bundle target(s) missing from the repo session snapshot:
+src/jobs.ts#...` — a **nesting artifact, not a real error**. In a standalone
+git repo (how the go-day git lane works) the same files build cleanly. For local
+iteration, copy the package to its own dir + `git init` (see the scratch at
+`/tmp/kody-standalone` used during the spike), with `node_modules/@tanstack/*`
+symlinked to the workspace packages and `node_modules/pg` to the pnpm store.
## Blocked until the Preview builds land
1. **Pin dependency URLs.** Replace `@REF` in `package.json` for the four
- `@tanstack/cms-*` deps with the pkg-pr-new refs the Preview CI job reports
- (spec §7-1). `pg` stays an npm dep.
+ `@tanstack/cms-*` deps with the pkg-pr-new refs. `pg` stays declared.
## Blocked on Kody (App install + `package:write` in the tanstack org)
-2. **Publish via the git lane** (D3): `packageGetGitRemote({ create: true,
- name: '@tanstack/cms-starter-headless-api' })` → clone → copy this package in
- → push → `packagePublishExternalPush`. If it returns `locked`, open the
- `approval_url`.
-3. **Set the `CMS_DATABASE_URL` package secret** to the prod Postgres string.
-4. **Resolve U1 (secret accessor).** Fill `src/secrets.ts#getDatabaseUrl` with
- the synchronous `kody:runtime` package-secret read. Confirm whether the value
- is available synchronously at module scope; if only request-scoped, capture
- it into the module cache on the first request (the resolver is sync by
- design — store types.ts:85).
-5. **Confirm `kody.jobs` field schema** via `repoRunChecks` (the manifest
- validator). Current best-effort shape: `{ entry: "./src/jobs.ts#",
- schedule: "*/5 * * * *" }`.
-6. **Run U2 test** (spec §7-5): the first REST call on the published app is the
- pg-over-workerd-TCP test. If egress fails, swap the pool for Neon's serverless
- driver — config-side only (`PgPoolLike` is a structural interface).
+2. **Resolve U2 — swap `pg` for a workerd-native driver.** Confirmed required
+ (above). Use Neon's serverless driver behind the store's `PgPoolLike`
+ interface — config-side only, no store-postgres change (the store types the
+ pool structurally). Then re-run `kody dev` against a reachable Postgres and
+ confirm a DB-backed request + a job succeed.
+3. **Resolve U1 — secret accessor.** Fill `src/secrets.ts#getDatabaseUrl` with a
+ synchronous `kody:runtime` package-secret read. NB under `kody dev --target
+ mock` package secrets are **placeholders** by design, so a real DB URL can't
+ flow through them locally — test U1 against the published app or with a
+ `.kody/mocks.ts`-style stand-in.
+4. **Publish via the git lane** (D3) and set the `CMS_DATABASE_URL` package
+ secret.
+5. **Public read for §8.** Grant anonymous read on `contentItem` so the seeded
+ doc is readable over REST with no `x-cms-role` header (the `seed` itself is
+ in place and validated).
## Post-publish acceptance (spec §8)
`appFetch` (`synthetic: true`): seeded doc readable over REST with no auth;
`x-cms-role` write succeeds and is attributed; MCP tool list answers; a second
package importing `@tanstack/cms-client` reads the same document.
-
-> Note: the §8 "seeded document readable with **no auth**" check needs a seed +
-> public read access — not yet added here (the smoke uses authenticated writes).
-> Add a small `seed` and confirm anonymous read on go-day.
diff --git a/kody/headless-api/package.json b/kody/headless-api/package.json
index 0135b714..a230aece 100644
--- a/kody/headless-api/package.json
+++ b/kody/headless-api/package.json
@@ -29,11 +29,17 @@
"jobs": {
"cms-outbox-drain": {
"entry": "./src/jobs.ts#outboxDrain",
- "schedule": "*/5 * * * *"
+ "schedule": {
+ "type": "interval",
+ "every": "5m"
+ }
},
"cms-scheduler-tick": {
"entry": "./src/jobs.ts#schedulerTick",
- "schedule": "*/5 * * * *"
+ "schedule": {
+ "type": "interval",
+ "every": "5m"
+ }
}
}
}
diff --git a/kody/headless-api/scripts/local-smoke.mts b/kody/headless-api/scripts/local-smoke.mts
index 752f84a7..8bd6288c 100644
--- a/kody/headless-api/scripts/local-smoke.mts
+++ b/kody/headless-api/scripts/local-smoke.mts
@@ -19,7 +19,9 @@ import {
const ops = 'http://localhost/api/cms/v1/ops'
let failures = 0
function check(label: string, ok: boolean, detail?: unknown) {
- console.log(`${ok ? '✅' : '❌'} ${label}${detail !== undefined && !ok ? ` — ${JSON.stringify(detail)}` : ''}`)
+ console.log(
+ `${ok ? '✅' : '❌'} ${label}${detail !== undefined && !ok ? ` — ${JSON.stringify(detail)}` : ''}`,
+ )
if (!ok) failures++
}
@@ -33,6 +35,23 @@ async function post(op: string, role: string, body: unknown) {
)
}
+// 0. Seed: a fresh store is seeded on first registration (spec §8).
+await entry.fetch(new Request(`${ops}/noop`, { method: 'GET' })).catch(() => {})
+const seeded =
+ (
+ await getAs(systemContext('smoke'), {
+ collection: 'contentItem',
+ id: 'welcome',
+ staged: false,
+ populate: false,
+ })
+ )?.doc ?? null
+check(
+ 'seed document present on fresh store',
+ seeded?.title === 'Welcome',
+ seeded,
+)
+
// 1. Editor stages a write over REST (header-role auth) through the fetch entry.
const writeRes = await post('save_document', 'editor', {
collection: 'contentItem',
@@ -53,26 +72,38 @@ check('viewer write denied (403)', viewerRes.status === 403, viewerRes.status)
// 3. Governance: the editor write is staged, invisible before approval.
const pending = await listPending()
-check('write is staged in governance (>=1 pending)', pending.length >= 1, pending.length)
+check(
+ 'write is staged in governance (>=1 pending)',
+ pending.length >= 1,
+ pending.length,
+)
const beforeApprove =
- (await getAs(systemContext('smoke'), {
- collection: 'contentItem',
- id: 'item-smoke',
- staged: false,
- populate: false,
- }))?.doc ?? null
+ (
+ await getAs(systemContext('smoke'), {
+ collection: 'contentItem',
+ id: 'item-smoke',
+ staged: false,
+ populate: false,
+ })
+ )?.doc ?? null
check('staged doc invisible before approval', beforeApprove === null)
// 4. Approve, then the doc is readable from Postgres.
for (const p of pending) await approve(p.id)
const committed =
- (await getAs(systemContext('smoke'), {
- collection: 'contentItem',
- id: 'item-smoke',
- staged: false,
- populate: false,
- }))?.doc ?? null
-check('doc readable after approval', committed?.title === 'Smoke Item', committed)
+ (
+ await getAs(systemContext('smoke'), {
+ collection: 'contentItem',
+ id: 'item-smoke',
+ staged: false,
+ populate: false,
+ })
+ )?.doc ?? null
+check(
+ 'doc readable after approval',
+ committed?.title === 'Smoke Item',
+ committed,
+)
// 5. The two Kody jobs run without throwing (they resolve storage internally).
try {
diff --git a/kody/headless-api/src/cms.config.ts b/kody/headless-api/src/cms.config.ts
index a79b2953..d941388a 100644
--- a/kody/headless-api/src/cms.config.ts
+++ b/kody/headless-api/src/cms.config.ts
@@ -3,6 +3,7 @@ import type { CmsConfig } from '@tanstack/cms-core'
import { createPostgresStorage } from '@tanstack/cms-store-postgres'
import { definition } from './cms.definition'
import { getDatabaseUrl } from './secrets'
+import { seed } from './seed'
// Kody variant of starters/headless-api. Differences from the monorepo starter
// (spec §3.1): no `dataDir`/embedded storage — external Postgres via the
@@ -22,9 +23,12 @@ export function registerHeadlessCms() {
return defineCms(definition, {
blockTypes: [],
auth,
+ seed,
// `connectionString` accepts a resolver, so the secret stays out of the
// build and is read at connect time (store-postgres types.ts:85).
- storage: createPostgresStorage({ connectionString: () => getDatabaseUrl() }),
+ storage: createPostgresStorage({
+ connectionString: () => getDatabaseUrl(),
+ }),
})
}
diff --git a/kody/headless-api/src/seed.ts b/kody/headless-api/src/seed.ts
new file mode 100644
index 00000000..d745e5a7
--- /dev/null
+++ b/kody/headless-api/src/seed.ts
@@ -0,0 +1,19 @@
+import type { SeedStore } from '@tanstack/cms-core'
+
+// Content written on first run against an empty store, so a freshly-published
+// app isn't empty (spec §8). Published so it is live immediately. Public (no
+// auth) read access is still a go-day item — see GO-DAY.md.
+export const seed: SeedStore = {
+ documents: {
+ contentItem: {
+ welcome: {
+ title: 'Welcome',
+ slug: 'welcome',
+ channel: 'web',
+ priority: 1,
+ body: 'This headless CMS serves one schema over REST, a typed client, and MCP.',
+ published: true,
+ },
+ },
+ },
+}
diff --git a/onboarding/apps/demo/src/styles.css b/onboarding/apps/demo/src/styles.css
index 7e8c9331..fa163405 100644
--- a/onboarding/apps/demo/src/styles.css
+++ b/onboarding/apps/demo/src/styles.css
@@ -152,7 +152,9 @@ button {
}
.mode.on,
-button:not(.secondary):not(.onboarding-secondary):not(.team):not(.mode):not(.chip):not(.poster-card) {
+button:not(.secondary):not(.onboarding-secondary):not(.team):not(.mode):not(
+ .chip
+ ):not(.poster-card) {
background: var(--accent);
border-color: var(--accent);
color: var(--accent-ink);
diff --git a/onboarding/apps/demo/tests/demo.test.ts b/onboarding/apps/demo/tests/demo.test.ts
index 3abde163..1305a93a 100644
--- a/onboarding/apps/demo/tests/demo.test.ts
+++ b/onboarding/apps/demo/tests/demo.test.ts
@@ -1,5 +1,8 @@
import { describe, expect, it } from 'vitest'
-import { createOnboardingMachine, listNamespaces } from '@tanstack/onboarding-core'
+import {
+ createOnboardingMachine,
+ listNamespaces,
+} from '@tanstack/onboarding-core'
import {
ONBOARDING_SYSTEM_TOOLS,
buildOnboardingSystemPrompt,
@@ -20,7 +23,6 @@ describe('onboarding-demo flows', () => {
it('supports namespaced validate on a merged flow', async () => {
const machine = createOnboardingMachine(mergedDemo, {
-
controls: [teamPickerControl],
tools: [setInterestsTool],
submits: { 'demo.createAccount': async () => {} },
@@ -42,7 +44,6 @@ describe('onboarding-demo flows', () => {
expect(prompt).toContain('sports interests')
const machine = createOnboardingMachine(productSetup, {
-
onComplete: async () => {},
controls: [teamPickerControl],
tools: [setInterestsTool],
diff --git a/onboarding/apps/demo/tests/entertainment.test.ts b/onboarding/apps/demo/tests/entertainment.test.ts
index 1fd831d9..b92ad80f 100644
--- a/onboarding/apps/demo/tests/entertainment.test.ts
+++ b/onboarding/apps/demo/tests/entertainment.test.ts
@@ -112,7 +112,6 @@ function createEntertainmentMachine(
) {
const search = options.search ?? createMockSearch()
return createOnboardingMachine(entertainmentDemo, {
-
controls: [genrePickerControl, titlePickerControl],
tools: [
createSearchTitlesTool(search),
diff --git a/onboarding/apps/demo/tests/tanstack-ai.test.ts b/onboarding/apps/demo/tests/tanstack-ai.test.ts
index 2b638f11..238e4829 100644
--- a/onboarding/apps/demo/tests/tanstack-ai.test.ts
+++ b/onboarding/apps/demo/tests/tanstack-ai.test.ts
@@ -253,9 +253,20 @@ describe('TanStack AI onboarding binding (demo reference example)', () => {
])
const second = seen[1]!.messages
- expect(second.map((m) => m.role)).toEqual(['user', 'assistant', 'tool', 'tool'])
- expect(second[1]!.toolCalls?.map((c) => c.id)).toEqual(['toolu_a', 'toolu_b'])
- expect(second.slice(2).map((m) => m.toolCallId)).toEqual(['toolu_a', 'toolu_b'])
+ expect(second.map((m) => m.role)).toEqual([
+ 'user',
+ 'assistant',
+ 'tool',
+ 'tool',
+ ])
+ expect(second[1]!.toolCalls?.map((c) => c.id)).toEqual([
+ 'toolu_a',
+ 'toolu_b',
+ ])
+ expect(second.slice(2).map((m) => m.toolCallId)).toEqual([
+ 'toolu_a',
+ 'toolu_b',
+ ])
expect(JSON.stringify(seen[1]!.systemPrompts)).toContain('basketball')
})
@@ -294,7 +305,11 @@ describe('TanStack AI onboarding binding (demo reference example)', () => {
const chunks = [
{ type: 'TEXT_MESSAGE_CONTENT', delta: 'Saving.' },
{ type: 'TOOL_CALL_START', toolCallId: 'a', toolName: 'set_field' },
- { type: 'TOOL_CALL_ARGS', toolCallId: 'a', delta: '{"path":"interests",' },
+ {
+ type: 'TOOL_CALL_ARGS',
+ toolCallId: 'a',
+ delta: '{"path":"interests",',
+ },
{ type: 'TOOL_CALL_ARGS', toolCallId: 'a', delta: '"value":["hiking"]}' },
{ type: 'TOOL_CALL_END', toolCallId: 'a' },
{ type: 'TOOL_CALL_START', toolCallId: 'b', toolCallName: 'validate' },
@@ -308,7 +323,10 @@ describe('TanStack AI onboarding binding (demo reference example)', () => {
const ai = {
maxIterations: (n: number) => ({ max: n }),
toolDefinition: (config: { name: string; description: string }) => ({
- server: (execute: (input: unknown) => unknown) => ({ ...config, execute }),
+ server: (execute: (input: unknown) => unknown) => ({
+ ...config,
+ execute,
+ }),
}),
chat: () =>
(async function* () {
@@ -392,6 +410,8 @@ describe('TanStack AI onboarding binding (demo reference example)', () => {
expect(turn.message).toContain('hiking')
expect(machine.state.values.interests).toEqual(['hiking'])
- expect(turn.toolResults.some((r) => r.name === 'set_field' && r.ok)).toBe(true)
+ expect(turn.toolResults.some((r) => r.name === 'set_field' && r.ok)).toBe(
+ true,
+ )
})
})
diff --git a/onboarding/packages/ai/src/tools.ts b/onboarding/packages/ai/src/tools.ts
index 2e82ca16..ae3f91a5 100644
--- a/onboarding/packages/ai/src/tools.ts
+++ b/onboarding/packages/ai/src/tools.ts
@@ -273,7 +273,10 @@ export async function executeSystemTool(
ok: false,
result: {
error: `set_field: value for "${path}" is invalid — not written.`,
- issues: issues.map((i) => ({ path: i.path, message: i.message })),
+ issues: issues.map((i) => ({
+ path: i.path,
+ message: i.message,
+ })),
},
}
}
diff --git a/onboarding/packages/ai/src/turn.ts b/onboarding/packages/ai/src/turn.ts
index f898b6da..53a5497a 100644
--- a/onboarding/packages/ai/src/turn.ts
+++ b/onboarding/packages/ai/src/turn.ts
@@ -3,7 +3,11 @@ import {
assembleOnboardingMessages,
assembleOnboardingSystemPrompt,
} from './assembly'
-import { executeToolCall, resolveAllowedTools, resolveToolApproval } from './tools'
+import {
+ executeToolCall,
+ resolveAllowedTools,
+ resolveToolApproval,
+} from './tools'
import type { ToolApprovalRequest, ToolCall, ToolResult } from './tools'
export type ChatMessage = {
diff --git a/onboarding/packages/ai/tests/ai.test.ts b/onboarding/packages/ai/tests/ai.test.ts
index c271e0b9..39f7a32d 100644
--- a/onboarding/packages/ai/tests/ai.test.ts
+++ b/onboarding/packages/ai/tests/ai.test.ts
@@ -58,7 +58,6 @@ describe('onboarding-ai', () => {
],
})
const machine = createOnboardingMachine(flow, {
-
onComplete: async () => {},
tools: [
{
@@ -119,7 +118,6 @@ describe('onboarding-ai', () => {
],
})
const machine = createOnboardingMachine(flow, {
-
tools: [
{
name: 'set_interests',
@@ -179,7 +177,6 @@ describe('onboarding-ai', () => {
],
})
const machine = createOnboardingMachine(flow, {
-
controls: [{ id: 'sports.teamPicker' }],
})
@@ -306,7 +303,9 @@ describe('onboarding-ai', () => {
}),
],
})
- const machine = createOnboardingMachine(flow, { onComplete: async () => {} })
+ const machine = createOnboardingMachine(flow, {
+ onComplete: async () => {},
+ })
const approvals: Array = []
// Provider asks to complete the flow; complete_flow is gated this turn.
diff --git a/onboarding/packages/core/src/define.ts b/onboarding/packages/core/src/define.ts
index 28220be6..c098297e 100644
--- a/onboarding/packages/core/src/define.ts
+++ b/onboarding/packages/core/src/define.ts
@@ -187,9 +187,7 @@ export function writableFieldPaths(flow: OnboardingFlowDef): Set {
}
// Conversation-embedded controls contribute their value path (F6.6).
for (const ref of step.controls ?? []) {
- paths.add(
- typeof ref === 'string' ? ref : (ref.path ?? ref.control),
- )
+ paths.add(typeof ref === 'string' ? ref : (ref.path ?? ref.control))
}
}
}
diff --git a/onboarding/packages/core/src/machine.ts b/onboarding/packages/core/src/machine.ts
index 6d6a747b..c820a3b0 100644
--- a/onboarding/packages/core/src/machine.ts
+++ b/onboarding/packages/core/src/machine.ts
@@ -316,7 +316,10 @@ export function createOnboardingMachine<
// the step id and the missing registration — the guaranteed floor where
// TypeScript can't express it.
const submitNames = options.submits ?? {}
- const knownToolNames = new Set([...SYSTEM_TOOL_NAMES, ...tools.keys()])
+ const knownToolNames = new Set([
+ ...SYSTEM_TOOL_NAMES,
+ ...tools.keys(),
+ ])
for (const step of flow.steps) {
if (step.type === 'form' && step.submit && !(step.submit in submitNames)) {
throw new Error(
@@ -600,9 +603,7 @@ export function createOnboardingMachine<
return { ok: true, issues: [] }
} catch (error) {
const message =
- error instanceof Error
- ? error.message
- : 'Could not complete onboarding'
+ error instanceof Error ? error.message : 'Could not complete onboarding'
publish({ status: 'error', error: message })
return { ok: false, issues: [{ path: '', message }] }
}
@@ -666,7 +667,9 @@ export function createOnboardingMachine<
if (!submit.ok) {
return {
ok: false,
- issues: [{ path: step.id, message: submit.message ?? 'Submit failed' }],
+ issues: [
+ { path: step.id, message: submit.message ?? 'Submit failed' },
+ ],
}
}
const target = nextVisibleStep(step.id, activeSteps())
diff --git a/onboarding/packages/core/tests/core.test.ts b/onboarding/packages/core/tests/core.test.ts
index 811e3b28..dc867801 100644
--- a/onboarding/packages/core/tests/core.test.ts
+++ b/onboarding/packages/core/tests/core.test.ts
@@ -209,7 +209,7 @@ describe('createOnboardingMachine', () => {
it('initializes values from initialValues (F2.5 — the one app source)', () => {
const machine = createOnboardingMachine(makeAccountFlow(), {
initialValues: { email: 'jack@example.com', firstName: 'Jack' },
-
+
submits: accountSubmits,
})
expect(machine.state.values.email).toBe('jack@example.com')
@@ -218,7 +218,6 @@ describe('createOnboardingMachine', () => {
it('exposes reactive state through a @tanstack/store Store', () => {
const machine = createOnboardingMachine(makeAccountFlow(), {
-
submits: accountSubmits,
})
const seen: Array = []
@@ -236,7 +235,6 @@ describe('createOnboardingMachine', () => {
it('scopes controls and tools to the machine instance', () => {
const machine = createOnboardingMachine(makeProductFlow(), {
-
...withTeamPicker,
})
expect(machine.getControl('sports.teamPicker')).toBe(teamPickerControl)
@@ -249,9 +247,11 @@ describe('createOnboardingMachine', () => {
// A reference-free flow needs no registrations.
const bareFlow = defineOnboarding({
id: 'bare',
- steps: [formStep({ id: 'only', fields: [{ name: 'x', required: false }] })],
+ steps: [
+ formStep({ id: 'only', fields: [{ name: 'x', required: false }] }),
+ ],
})
- const bare = createOnboardingMachine(bareFlow, { })
+ const bare = createOnboardingMachine(bareFlow, {})
expect(bare.getControl('sports.teamPicker')).toBeUndefined()
expect(bare.listTools()).toEqual([])
})
@@ -263,25 +263,25 @@ describe('createOnboardingMachine', () => {
formStep({ id: 'profile', fields: [{ name: 'x' }], submit: 'save' }),
],
})
- expect(() =>
- createOnboardingMachine(submitFlow, { }),
- ).toThrow(/step "profile" references submit handler "save"/)
+ expect(() => createOnboardingMachine(submitFlow, {})).toThrow(
+ /step "profile" references submit handler "save"/,
+ )
const controlFlow = defineOnboarding({
id: 'needs-control',
steps: [controlStep({ id: 'pick', control: 'demo.picker' })],
})
- expect(() =>
- createOnboardingMachine(controlFlow, { }),
- ).toThrow(/step "pick" references control "demo.picker"/)
+ expect(() => createOnboardingMachine(controlFlow, {})).toThrow(
+ /step "pick" references control "demo.picker"/,
+ )
const toolFlow = defineOnboarding({
id: 'needs-tool',
steps: [conversationStep({ id: 'chat', tools: ['do_thing'] })],
})
- expect(() =>
- createOnboardingMachine(toolFlow, { }),
- ).toThrow(/step "chat" references tool "do_thing"/)
+ expect(() => createOnboardingMachine(toolFlow, {})).toThrow(
+ /step "chat" references tool "do_thing"/,
+ )
})
it('throws on duplicate control ids, duplicate tool names, and system-tool collisions (F2.6)', () => {
@@ -291,14 +291,12 @@ describe('createOnboardingMachine', () => {
})
expect(() =>
createOnboardingMachine(flow, {
-
controls: [{ id: 'dup' }, { id: 'dup' }],
}),
).toThrow(/duplicate control id "dup"/)
expect(() =>
createOnboardingMachine(flow, {
-
tools: [
{ name: 'a', description: '' },
{ name: 'a', description: '' },
@@ -308,7 +306,6 @@ describe('createOnboardingMachine', () => {
expect(() =>
createOnboardingMachine(flow, {
-
tools: [{ name: 'set_field', description: 'collides' }],
}),
).toThrow(/collides with a built-in system tool/)
@@ -326,7 +323,6 @@ describe('createOnboardingMachine', () => {
],
})
const machine = createOnboardingMachine(flow, {
-
...withTeamPicker,
})
machine.setValue('teamIds', [])
@@ -337,7 +333,6 @@ describe('createOnboardingMachine', () => {
it('validates the whole flow by default with schemas', async () => {
const machine = createOnboardingMachine(makeAccountFlow(), {
-
submits: accountSubmits,
})
const result = await machine.validate()
@@ -351,7 +346,6 @@ describe('createOnboardingMachine', () => {
makeProductFlow(),
])
const machine = createOnboardingMachine(merged, {
-
...withTeamPicker,
initialValues: {
firstName: 'Jack',
@@ -370,7 +364,6 @@ describe('createOnboardingMachine', () => {
it('gates next() on current-step validation and supports back stack', async () => {
const product = makeProductFlow()
const machine = createOnboardingMachine(product, {
-
...withTeamPicker,
})
const blocked = await machine.next()
@@ -387,7 +380,6 @@ describe('createOnboardingMachine', () => {
it('skips optional steps and completes', async () => {
const product = makeProductFlow()
const machine = createOnboardingMachine(product, {
-
...withTeamPicker,
onComplete: async () => {},
})
@@ -472,9 +464,7 @@ describe('createOnboardingMachine', () => {
})
it('keeps the current step when a when-gated earlier step toggles mid-flow', async () => {
- const machine = createOnboardingMachine(makeGatedFlow(), {
-
- })
+ const machine = createOnboardingMachine(makeGatedFlow(), {})
// wantsExtras is false: active steps are [basics, wrap-up].
await machine.next()
expect(machine.currentStep?.id).toBe('wrap-up')
@@ -495,9 +485,7 @@ describe('createOnboardingMachine', () => {
})
it('back() skips history entries that are no longer visible', async () => {
- const machine = createOnboardingMachine(makeGatedFlow(), {
-
- })
+ const machine = createOnboardingMachine(makeGatedFlow(), {})
machine.setValue('wantsExtras', true)
await machine.next() // basics -> extras
await machine.next() // extras -> wrap-up
@@ -513,9 +501,7 @@ describe('createOnboardingMachine', () => {
})
it('back() reports when there is nowhere to go', () => {
- const machine = createOnboardingMachine(makeGatedFlow(), {
-
- })
+ const machine = createOnboardingMachine(makeGatedFlow(), {})
expect(machine.back()).toEqual({ moved: false, stepId: 'basics' })
})
@@ -568,7 +554,9 @@ describe('createOnboardingMachine', () => {
// Live state is untouched — only the snapshot is stripped.
expect(machine.state.values.password).toBe('hunter2ok')
- const restored = createOnboardingMachine(flow, { initialSnapshot: snapshot })
+ const restored = createOnboardingMachine(flow, {
+ initialSnapshot: snapshot,
+ })
expect(restored.state.values.password).toBe('')
expect(restored.state.values.pin).toBe('1234')
})
@@ -587,7 +575,7 @@ describe('createOnboardingMachine', () => {
}),
],
})
- const machine = createOnboardingMachine(flow, { })
+ const machine = createOnboardingMachine(flow, {})
machine.setValues({
email: 'jack@example.com',
password: 'hunter2ok',
@@ -602,9 +590,7 @@ describe('createOnboardingMachine', () => {
})
it('goTo preserves real history so back() returns to the jump origin', () => {
- const machine = createOnboardingMachine(makeGatedFlow(), {
-
- })
+ const machine = createOnboardingMachine(makeGatedFlow(), {})
machine.goTo('wrap-up')
expect(machine.currentStep?.id).toBe('wrap-up')
expect(machine.state.history).toEqual(['basics'])
@@ -667,7 +653,6 @@ describe('createOnboardingMachine', () => {
],
})
const machine = createOnboardingMachine(flow, {
-
onComplete: async () => {},
})
machine.setValue('handle', 'jack')
@@ -703,7 +688,7 @@ describe('createOnboardingMachine', () => {
}),
],
})
- const machine = createOnboardingMachine(flow, { })
+ const machine = createOnboardingMachine(flow, {})
expect(machine.state.values.nickname).toBe('')
expect(machine.state.values.newsletter).toBe(false)
expect('seats' in machine.state.values).toBe(false)
@@ -737,7 +722,7 @@ describe('createOnboardingMachine', () => {
}),
],
})
- const machine = createOnboardingMachine(flow, { })
+ const machine = createOnboardingMachine(flow, {})
machine.setValues({ password: 'hunter2ok', confirm: 'different1' })
const result = await machine.validate()
expect(result.ok).toBe(false)
@@ -763,7 +748,6 @@ describe('createOnboardingMachine', () => {
})
const completed: Array = []
const machine = createOnboardingMachine(flow, {
-
onComplete: (values) => {
completed.push(values.age)
},
@@ -809,7 +793,11 @@ describe('fieldValidationSchema (F3.2 — declared schema only)', () => {
it('returns undefined for readOnly fields and schemaless fields', () => {
expect(
- fieldValidationSchema({ name: 'email', readOnly: true, schema: emailSchema }),
+ fieldValidationSchema({
+ name: 'email',
+ readOnly: true,
+ schema: emailSchema,
+ }),
).toBeUndefined()
expect(fieldValidationSchema({ name: 'nickname' })).toBeUndefined()
// required is a UI hint only — a schemaless field is never validated.
@@ -843,7 +831,6 @@ describe('fieldValidationSchema (F3.2 — declared schema only)', () => {
],
})
const machine = createOnboardingMachine(flow, {
-
onComplete: async () => {},
})
expect(machine.state.values.nickname).toBe('')
@@ -855,9 +842,9 @@ describe('fieldValidationSchema (F3.2 — declared schema only)', () => {
describe('validateStandardSchemaSync (F3.4 — sync contract)', () => {
it('returns sync issues for a sync schema', () => {
- expect(validateStandardSchemaSync(emailSchema, 'nope', 'email').length).toBe(
- 1,
- )
+ expect(
+ validateStandardSchemaSync(emailSchema, 'nope', 'email').length,
+ ).toBe(1)
expect(
validateStandardSchemaSync(emailSchema, 'jack@example.com', 'email'),
).toEqual([])
@@ -867,9 +854,9 @@ describe('validateStandardSchemaSync (F3.4 — sync contract)', () => {
const asyncSchema = z
.string()
.refine(async (v) => v.startsWith('@'), 'must start with @')
- expect(() => validateStandardSchemaSync(asyncSchema, 'jack', 'handle')).toThrow(
- /"handle" is asynchronous/,
- )
+ expect(() =>
+ validateStandardSchemaSync(asyncSchema, 'jack', 'handle'),
+ ).toThrow(/"handle" is asynchronous/)
})
it('dot-joins nested schema issue paths (A5 path semantics)', () => {
@@ -905,7 +892,6 @@ describe('typed flows (flow-level schema)', () => {
const completed: Array = []
const machine = createOnboardingMachine(flow, {
-
initialValues: { email: 'seed@example.com', marketingOptIn: true },
onComplete: (values) => {
// `values.email` is `string` — typed by the flow-level schema.
diff --git a/onboarding/packages/react/src/Wizard.tsx b/onboarding/packages/react/src/Wizard.tsx
index c8062849..777f9abe 100644
--- a/onboarding/packages/react/src/Wizard.tsx
+++ b/onboarding/packages/react/src/Wizard.tsx
@@ -35,7 +35,11 @@ export type OnboardingLabels = {
completeBody: string
restart: string
/** Progress line; receives 1-based current step, total, and the step's display title. */
- stepStatus: (current: number, total: number, title: string | undefined) => string
+ stepStatus: (
+ current: number,
+ total: number,
+ title: string | undefined,
+ ) => string
/** Shown when a conversation step has no injected renderer. */
missingConversationRenderer: ReactNode
}
@@ -84,7 +88,9 @@ type StepViewProps = {
}
function labelsWith(partial?: Partial): OnboardingLabels {
- return partial ? { ...defaultOnboardingLabels, ...partial } : defaultOnboardingLabels
+ return partial
+ ? { ...defaultOnboardingLabels, ...partial }
+ : defaultOnboardingLabels
}
/**
@@ -152,9 +158,7 @@ export function OnboardingStepView<
fieldComponents={fieldComponents}
labels={l}
className={className}
- onSubmit={
- onFormSubmit ? () => onFormSubmit(step, machine) : undefined
- }
+ onSubmit={onFormSubmit ? () => onFormSubmit(step, machine) : undefined}
/>
)
}
@@ -171,7 +175,11 @@ export function OnboardingStepView<
>
{step.title ? {step.title} : null}
{step.description ? {step.description}
: null}
-
+
{conversation ? conversation(step, machine) : l.missingConversationRenderer}>
+ return (
+ <>
+ {conversation
+ ? conversation(step, machine)
+ : l.missingConversationRenderer}
+ >
+ )
}
return null
@@ -309,7 +323,9 @@ function OnboardingWizardInner<
return (
))}
@@ -372,12 +390,17 @@ function OnboardingWizardInner<
{step?.type !== 'form' && state.issues.length ? (
{state.issues.map((issue) => (
- {issue.message}
+
+ {issue.message}
+
))}
) : null}
{state.error ? (
-
+
{state.error}
) : null}
diff --git a/onboarding/packages/react/src/chat.tsx b/onboarding/packages/react/src/chat.tsx
index 8c21ee31..abfdb84b 100644
--- a/onboarding/packages/react/src/chat.tsx
+++ b/onboarding/packages/react/src/chat.tsx
@@ -106,12 +106,7 @@ export function OnboardingChatStep({
const id = typeof ref === 'string' ? ref : ref.control
const path = typeof ref === 'string' ? undefined : ref.path
return (
-
+
)
})}
diff --git a/onboarding/packages/react/src/controls.tsx b/onboarding/packages/react/src/controls.tsx
index 78f10792..79b8f393 100644
--- a/onboarding/packages/react/src/controls.tsx
+++ b/onboarding/packages/react/src/controls.tsx
@@ -152,8 +152,9 @@ export function OnboardingControl
({
const valuePath = path ?? id
const value = useStore(machine.store, (s) => s.values[valuePath]) as TValue
const status = useStore(machine.store, (s) => s.status)
- const Component = (component ??
- registry[id]) as ControlComponent | undefined
+ const Component = (component ?? registry[id]) as
+ | ControlComponent
+ | undefined
if (!Component) {
return (
fallback ?? (
diff --git a/onboarding/packages/react/src/onboarding.css b/onboarding/packages/react/src/onboarding.css
index 02d6d4d0..5e670621 100644
--- a/onboarding/packages/react/src/onboarding.css
+++ b/onboarding/packages/react/src/onboarding.css
@@ -161,7 +161,11 @@
min-height: 8rem;
padding: 1rem;
border-radius: 1rem;
- background: color-mix(in srgb, var(--onboarding-surface) 80%, var(--onboarding-line));
+ background: color-mix(
+ in srgb,
+ var(--onboarding-surface) 80%,
+ var(--onboarding-line)
+ );
}
.onboarding-chat-bubble {
diff --git a/onboarding/packages/react/tests/form.test.tsx b/onboarding/packages/react/tests/form.test.tsx
index 8b4d2002..1d496c57 100644
--- a/onboarding/packages/react/tests/form.test.tsx
+++ b/onboarding/packages/react/tests/form.test.tsx
@@ -55,9 +55,7 @@ const prefsFlow = defineOnboarding({
describe('default field components', () => {
it('renders field components by inputType with typed defaults', () => {
- render(
- ,
- )
+ render( )
expect(screen.getByLabelText('Bio').tagName).toBe('TEXTAREA')
const checkbox = screen.getByLabelText('Newsletter') as HTMLInputElement
expect(checkbox.type).toBe('checkbox')
@@ -70,7 +68,6 @@ describe('default field components', () => {
it('commits typed values to the machine on submit, not per keystroke (A1)', async () => {
const machine = createOnboardingMachine(prefsFlow, {
-
onComplete: async () => {},
})
const step = prefsFlow.steps[0] as FormStepDef
@@ -133,7 +130,7 @@ describe('default field components', () => {
,
)
const input = screen.getByTestId('shout') as HTMLInputElement
@@ -152,20 +149,20 @@ describe('stacking (A2 — one validation pass)', () => {
formStep({
id: 'only',
title: 'Only',
- fields: [
- { name: 'name', label: 'Name', schema: z.string().min(1) },
- ],
+ fields: [{ name: 'name', label: 'Name', schema: z.string().min(1) }],
}),
],
})
const machine = createOnboardingMachine(flow, {
-
onComplete: async () => {},
})
const validateSpy = vi.spyOn(machine, 'validate')
const nextSpy = vi.spyOn(machine, 'next')
render(
- ,
+ ,
)
fireEvent.change(screen.getByLabelText('Name'), {
target: { value: 'Jack' },
@@ -204,7 +201,7 @@ describe('validator wiring', () => {
}),
],
})
- const machine = createOnboardingMachine(flow, { })
+ const machine = createOnboardingMachine(flow, {})
render(
{
{
completed.current = true
},
diff --git a/onboarding/packages/react/tests/react.test.tsx b/onboarding/packages/react/tests/react.test.tsx
index 33856a71..69b6a890 100644
--- a/onboarding/packages/react/tests/react.test.tsx
+++ b/onboarding/packages/react/tests/react.test.tsx
@@ -50,7 +50,6 @@ describe('OnboardingWizard', () => {
{} },
onComplete: async () => {},
}}
@@ -69,7 +68,6 @@ describe('OnboardingWizard', () => {
{
created.current = values
@@ -121,7 +119,6 @@ describe('OnboardingWizard', () => {
flow={controlFlow}
controls={{ 'demo.colorPicker': ColorPicker }}
options={{
-
controls: [{ id: 'demo.colorPicker', schema: z.string().min(1) }],
onComplete: async () => {},
}}
@@ -167,7 +164,9 @@ describe('OnboardingWizard', () => {
options={{ controls: [{ id: 'demo.colorPicker' }] }}
/>,
),
- ).toThrow(/no control component provided for control "demo.colorPicker".*step "color"/)
+ ).toThrow(
+ /no control component provided for control "demo.colorPicker".*step "color"/,
+ )
})
it('renders conversation steps through the injected conversation renderer', async () => {
@@ -187,7 +186,7 @@ describe('OnboardingWizard', () => {
render(
(
{
it('renders an externally created machine via the machine prop (controlled mode)', async () => {
const machine = createOnboardingMachine(flow, {
-
submits: { 'app.createAccount': async () => {} },
onComplete: async () => {},
})
@@ -265,9 +263,7 @@ describe('OnboardingWizard', () => {
],
})
- render(
- ,
- )
+ render( )
// Step 1: fill and advance.
expect(screen.getByText(/Step 1 of 2: Profile/)).toBeTruthy()
@@ -292,7 +288,7 @@ describe('OnboardingWizard', () => {
id: 'chat-missing',
steps: [conversationStep({ id: 'interests' })],
})
- render( )
+ render( )
expect(screen.getByRole('alert').textContent).toContain(
'@tanstack/react-onboarding/chat',
)
diff --git a/packages/api/src/markdown.ts b/packages/api/src/markdown.ts
index 4f63f9f0..5989b73a 100644
--- a/packages/api/src/markdown.ts
+++ b/packages/api/src/markdown.ts
@@ -29,10 +29,7 @@
*/
import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs'
import { join } from 'node:path'
-import {
- parseFrontmatter,
- parseMarkdownFile,
-} from '@tanstack/cms-core/storage'
+import { parseFrontmatter, parseMarkdownFile } from '@tanstack/cms-core/storage'
import type { MarkdownDoc } from '@tanstack/cms-core/storage'
import type { z } from 'zod'
diff --git a/packages/api/src/ops.ts b/packages/api/src/ops.ts
index 17050fea..ef8ad9cf 100644
--- a/packages/api/src/ops.ts
+++ b/packages/api/src/ops.ts
@@ -248,9 +248,7 @@ const rollbackInput = z.object({ releaseId: z.string().min(1) })
/** The release's actor: the human (or agent) behind the call, for audit. */
function releaseActor(ctx: CmsOpContext): string {
- return (
- ctx.session.user?.name ?? ctx.session.user?.id ?? ctx.actor ?? 'human'
- )
+ return ctx.session.user?.name ?? ctx.session.user?.id ?? ctx.actor ?? 'human'
}
const docRef = z.object({ collection: z.string(), id: z.string() })
const restoreDocRevisionInput = docRef.extend({ revisionId: z.string() })
@@ -589,8 +587,7 @@ const _ops = {
releasesRollback: {
method: 'POST',
access: 'content.publish',
- description:
- 'Roll back the current live release (released publishing).',
+ description: 'Roll back the current live release (released publishing).',
input: rollbackInput,
output: releaseOutput,
run: async (input: z.infer, ctx: CmsOpContext) =>
diff --git a/packages/api/src/start.ts b/packages/api/src/start.ts
index 9f5dfc6e..4b32407d 100644
--- a/packages/api/src/start.ts
+++ b/packages/api/src/start.ts
@@ -138,9 +138,7 @@ export const releasesGoLive = createServerFn({ method: 'POST' })
export const releasesRollback = createServerFn({ method: 'POST' })
.validator(ops.releasesRollback.input)
- .handler(async ({ data }) =>
- invokeOp('releasesRollback', data, await req()),
- )
+ .handler(async ({ data }) => invokeOp('releasesRollback', data, await req()))
export const save = createServerFn({ method: 'POST' })
.validator(ops.save.input)
diff --git a/packages/api/tests/health.test.ts b/packages/api/tests/health.test.ts
index 783930ab..da22cb64 100644
--- a/packages/api/tests/health.test.ts
+++ b/packages/api/tests/health.test.ts
@@ -145,30 +145,34 @@ describe('per-process state warning', () => {
// Three setups each spin up an embedded PGlite instance (WASM); give the
// three inits headroom under full-suite load (D12).
- it('stays quiet with a shared rate-limit store, without opt-ins, or outside production', { timeout: 20000 }, async () => {
- vi.stubEnv('NODE_ENV', 'production')
- const shared = logger()
- setupCms({
- logger: shared,
- security: {
- rateLimits: { ai: { limit: 5, windowMs: 1000 } },
- rateLimitStore: { hit: () => 1 },
- },
- })
- await handler(req('/api/cms/v1/health'))
- const plain = logger()
- setupCms({ logger: plain })
- await handler(req('/api/cms/v1/health'))
- vi.stubEnv('NODE_ENV', 'test')
- const dev = logger()
- setupCms({ logger: dev, webhooks: [{ url: 'https://hooks.test/cms' }] })
- await handler(req('/api/cms/v1/health'))
- for (const log of [shared, plain, dev]) {
- expect(
- log.warn.mock.calls.filter(([m]) => perProcess.test(m)),
- ).toHaveLength(0)
- }
- })
+ it(
+ 'stays quiet with a shared rate-limit store, without opt-ins, or outside production',
+ { timeout: 20000 },
+ async () => {
+ vi.stubEnv('NODE_ENV', 'production')
+ const shared = logger()
+ setupCms({
+ logger: shared,
+ security: {
+ rateLimits: { ai: { limit: 5, windowMs: 1000 } },
+ rateLimitStore: { hit: () => 1 },
+ },
+ })
+ await handler(req('/api/cms/v1/health'))
+ const plain = logger()
+ setupCms({ logger: plain })
+ await handler(req('/api/cms/v1/health'))
+ vi.stubEnv('NODE_ENV', 'test')
+ const dev = logger()
+ setupCms({ logger: dev, webhooks: [{ url: 'https://hooks.test/cms' }] })
+ await handler(req('/api/cms/v1/health'))
+ for (const log of [shared, plain, dev]) {
+ expect(
+ log.warn.mock.calls.filter(([m]) => perProcess.test(m)),
+ ).toHaveLength(0)
+ }
+ },
+ )
})
describe('logger', () => {
diff --git a/packages/api/tests/releases.test.ts b/packages/api/tests/releases.test.ts
index 63a77a9a..8b4ecef1 100644
--- a/packages/api/tests/releases.test.ts
+++ b/packages/api/tests/releases.test.ts
@@ -79,7 +79,12 @@ function base(extra: Partial = {}): Partial {
fields: [
{ name: 'title', label: 'Title', type: 'text' },
{ name: 'slug', label: 'Slug', type: 'text' },
- { name: 'author', label: 'Author', type: 'relation', collection: 'author' },
+ {
+ name: 'author',
+ label: 'Author',
+ type: 'relation',
+ collection: 'author',
+ },
],
},
{
@@ -117,18 +122,26 @@ describe('released publishing', () => {
setupCms({ publishing: livePublishing(), ...base() })
const saved = await call(
'save',
- { collection: 'post', id: 'p1', doc: { title: 'Hello', published: true }, publish: true },
+ {
+ collection: 'post',
+ id: 'p1',
+ doc: { title: 'Hello', published: true },
+ publish: true,
+ },
{ role: 'admin' },
)
expect(saved.status).toBe(200)
- expect(await live('post', 'p1')).toEqual({ published: true, title: 'Hello' })
+ expect(await live('post', 'p1')).toEqual({
+ published: true,
+ title: 'Hello',
+ })
expect((await call('releasesList', {}, { role: 'admin' })).result).toEqual({
releases: [],
})
- expect((await call('releasesPending', {}, { role: 'admin' })).result).toEqual(
- { changes: [] },
- )
+ expect(
+ (await call('releasesPending', {}, { role: 'admin' })).result,
+ ).toEqual({ changes: [] })
expect((await call('releasesGoLive', {}, { role: 'admin' })).code).toBe(
'PUBLISHING_LIVE_MODE',
)
@@ -143,7 +156,12 @@ describe('released publishing', () => {
setupReleased()
const saved = await call(
'save',
- { collection: 'post', id: 'p1', doc: { title: 'Hello', published: true }, publish: true },
+ {
+ collection: 'post',
+ id: 'p1',
+ doc: { title: 'Hello', published: true },
+ publish: true,
+ },
{ role: 'admin' },
)
expect(saved.status).toBe(200)
@@ -152,7 +170,8 @@ describe('released publishing', () => {
const flags = await pendingFlags('post', 'p1')
expect(flags.revision).not.toBeNull()
expect(flags.unpublish).toBe(false)
- const pending = (await call('releasesPending', {}, { role: 'admin' })).result
+ const pending = (await call('releasesPending', {}, { role: 'admin' }))
+ .result
expect(pending.changes).toEqual([
{
collection: 'post',
@@ -170,7 +189,12 @@ describe('released publishing', () => {
// Make p1 genuinely live through a first release.
await call(
'save',
- { collection: 'post', id: 'p1', doc: { title: 'Old', published: true }, publish: true },
+ {
+ collection: 'post',
+ id: 'p1',
+ doc: { title: 'Old', published: true },
+ publish: true,
+ },
{ role: 'admin' },
)
await call('releasesGoLive', {}, { role: 'admin' })
@@ -178,12 +202,18 @@ describe('released publishing', () => {
await call(
'save',
- { collection: 'post', id: 'p1', doc: { title: 'New', published: true }, publish: true },
+ {
+ collection: 'post',
+ id: 'p1',
+ doc: { title: 'New', published: true },
+ publish: true,
+ },
{ role: 'admin' },
)
// Public read still serves the old revision.
expect(await live('post', 'p1')).toEqual({ published: true, title: 'Old' })
- const pending = (await call('releasesPending', {}, { role: 'admin' })).result
+ const pending = (await call('releasesPending', {}, { role: 'admin' }))
+ .result
expect(pending.changes[0]).toMatchObject({
collection: 'post',
id: 'p1',
@@ -196,7 +226,12 @@ describe('released publishing', () => {
setupReleased()
await call(
'save',
- { collection: 'post', id: 'p1', doc: { title: 'Live', published: true }, publish: true },
+ {
+ collection: 'post',
+ id: 'p1',
+ doc: { title: 'Live', published: true },
+ publish: true,
+ },
{ role: 'admin' },
)
await call('releasesGoLive', {}, { role: 'admin' })
@@ -204,12 +239,18 @@ describe('released publishing', () => {
// An unpublish is a save that clears `published`.
await call(
'save',
- { collection: 'post', id: 'p1', doc: { title: 'Live', published: false }, publish: true },
+ {
+ collection: 'post',
+ id: 'p1',
+ doc: { title: 'Live', published: false },
+ publish: true,
+ },
{ role: 'admin' },
)
expect((await live('post', 'p1'))?.published).toBe(true)
expect((await pendingFlags('post', 'p1')).unpublish).toBe(true)
- const pending = (await call('releasesPending', {}, { role: 'admin' })).result
+ const pending = (await call('releasesPending', {}, { role: 'admin' }))
+ .result
expect(pending.changes[0]).toMatchObject({ id: 'p1', action: 'unpublish' })
})
@@ -218,12 +259,22 @@ describe('released publishing', () => {
setupReleased()
await call(
'save',
- { collection: 'post', id: 'p1', doc: { title: 'Post one', published: true }, publish: true },
+ {
+ collection: 'post',
+ id: 'p1',
+ doc: { title: 'Post one', published: true },
+ publish: true,
+ },
{ role: 'admin' },
)
await call(
'save',
- { collection: 'author', id: 'a1', doc: { name: 'Ada', published: true }, publish: true },
+ {
+ collection: 'author',
+ id: 'a1',
+ doc: { name: 'Ada', published: true },
+ publish: true,
+ },
{ role: 'admin' },
)
@@ -236,13 +287,16 @@ describe('released publishing', () => {
expect((await live('post', 'p1'))?.published).toBe(true)
expect((await live('author', 'a1'))?.published).toBe(true)
// Pending cleared.
- expect((await call('releasesPending', {}, { role: 'admin' })).result.changes)
- .toEqual([])
+ expect(
+ (await call('releasesPending', {}, { role: 'admin' })).result.changes,
+ ).toEqual([])
// AC5: the stored checksum equals a recomputed sha256 of the sorted manifest.
const { createHash } = await import('node:crypto')
expect(release.checksum).toBe(
- createHash('sha256').update(JSON.stringify(release.manifest)).digest('hex'),
+ createHash('sha256')
+ .update(JSON.stringify(release.manifest))
+ .digest('hex'),
)
// AC12: exactly one release.live event, attributed via audit to the caller.
@@ -250,13 +304,19 @@ describe('released publishing', () => {
expect(released).toHaveLength(1)
expect(released[0]).toMatchObject({ releaseId: release.id, changeCount: 2 })
const audit = await (await getStorage()).listAudit()
- expect(audit.some((a) => a.action === 'release.publish' && a.actor === 'admin'))
- .toBe(true)
+ expect(
+ audit.some((a) => a.action === 'release.publish' && a.actor === 'admin'),
+ ).toBe(true)
// AC6: a second release marks the first replaced.
await call(
'save',
- { collection: 'post', id: 'p1', doc: { title: 'Post two', published: true }, publish: true },
+ {
+ collection: 'post',
+ id: 'p1',
+ doc: { title: 'Post two', published: true },
+ publish: true,
+ },
{ role: 'admin' },
)
const second = await call('releasesGoLive', {}, { role: 'admin' })
@@ -274,8 +334,9 @@ describe('released publishing', () => {
setupReleased()
const res = await call('releasesGoLive', {}, { role: 'admin' })
expect(res.code).toBe('RELEASE_EMPTY')
- expect((await call('releasesList', {}, { role: 'admin' })).result.releases)
- .toEqual([])
+ expect(
+ (await call('releasesList', {}, { role: 'admin' })).result.releases,
+ ).toEqual([])
})
// AC8 — relation-integrity preflight. --------------------------------------
@@ -285,7 +346,12 @@ describe('released publishing', () => {
await commitDocument('author', 'a1', { name: 'Ada', published: false })
await call(
'save',
- { collection: 'post', id: 'p1', doc: { title: 'Post', author: 'a1', published: true }, publish: true },
+ {
+ collection: 'post',
+ id: 'p1',
+ doc: { title: 'Post', author: 'a1', published: true },
+ publish: true,
+ },
{ role: 'admin' },
)
const bad = await call('releasesGoLive', {}, { role: 'admin' })
@@ -298,7 +364,12 @@ describe('released publishing', () => {
// Add the author to the same release → goLive succeeds.
await call(
'save',
- { collection: 'author', id: 'a1', doc: { name: 'Ada', published: true }, publish: true },
+ {
+ collection: 'author',
+ id: 'a1',
+ doc: { name: 'Ada', published: true },
+ publish: true,
+ },
{ role: 'admin' },
)
const ok = await call('releasesGoLive', {}, { role: 'admin' })
@@ -313,19 +384,34 @@ describe('released publishing', () => {
// p2 is genuinely live (pre-release content) through an earlier release.
await call(
'save',
- { collection: 'post', id: 'p2', doc: { title: 'P2 old', published: true }, publish: true },
+ {
+ collection: 'post',
+ id: 'p2',
+ doc: { title: 'P2 old', published: true },
+ publish: true,
+ },
{ role: 'admin' },
)
await call('releasesGoLive', {}, { role: 'admin' })
// p1 first published by this release; p2 updated by it.
await call(
'save',
- { collection: 'post', id: 'p1', doc: { title: 'P1 new', published: true }, publish: true },
+ {
+ collection: 'post',
+ id: 'p1',
+ doc: { title: 'P1 new', published: true },
+ publish: true,
+ },
{ role: 'admin' },
)
await call(
'save',
- { collection: 'post', id: 'p2', doc: { title: 'P2 new', published: true }, publish: true },
+ {
+ collection: 'post',
+ id: 'p2',
+ doc: { title: 'P2 new', published: true },
+ publish: true,
+ },
{ role: 'admin' },
)
const release = (await call('releasesGoLive', {}, { role: 'admin' })).result
@@ -336,7 +422,12 @@ describe('released publishing', () => {
// A pending change not in the release.
await call(
'save',
- { collection: 'post', id: 'p3', doc: { title: 'P3', published: true }, publish: true },
+ {
+ collection: 'post',
+ id: 'p3',
+ doc: { title: 'P3', published: true },
+ publish: true,
+ },
{ role: 'admin' },
)
@@ -363,30 +454,40 @@ describe('released publishing', () => {
setupReleased()
await call(
'save',
- { collection: 'post', id: 'p1', doc: { title: 'One', published: true }, publish: true },
+ {
+ collection: 'post',
+ id: 'p1',
+ doc: { title: 'One', published: true },
+ publish: true,
+ },
{ role: 'admin' },
)
const first = (await call('releasesGoLive', {}, { role: 'admin' })).result
.release
await call(
'save',
- { collection: 'post', id: 'p1', doc: { title: 'Two', published: true }, publish: true },
+ {
+ collection: 'post',
+ id: 'p1',
+ doc: { title: 'Two', published: true },
+ publish: true,
+ },
{ role: 'admin' },
)
await call('releasesGoLive', {}, { role: 'admin' })
- expect(
- (await call('releasesRollback', { releaseId: first.id }, { role: 'admin' }))
- .code,
- ).toBe('RELEASE_NOT_LATEST')
expect(
(
await call(
'releasesRollback',
- { releaseId: 'nope' },
+ { releaseId: first.id },
{ role: 'admin' },
)
).code,
+ ).toBe('RELEASE_NOT_LATEST')
+ expect(
+ (await call('releasesRollback', { releaseId: 'nope' }, { role: 'admin' }))
+ .code,
).toBe('RELEASE_NOT_FOUND')
})
@@ -395,13 +496,20 @@ describe('released publishing', () => {
setupReleased()
await call(
'save',
- { collection: 'post', id: 'p1', doc: { title: 'One', published: true }, publish: true },
+ {
+ collection: 'post',
+ id: 'p1',
+ doc: { title: 'One', published: true },
+ publish: true,
+ },
{ role: 'admin' },
)
const viewer = await call('releasesGoLive', {}, { role: 'viewer' })
expect(viewer.status).toBeGreaterThanOrEqual(401)
expect(viewer.status).toBeLessThan(404)
// A publisher can.
- expect((await call('releasesGoLive', {}, { role: 'admin' })).status).toBe(200)
+ expect((await call('releasesGoLive', {}, { role: 'admin' })).status).toBe(
+ 200,
+ )
})
})
diff --git a/packages/cli/tests/cli.test.ts b/packages/cli/tests/cli.test.ts
index ec7b64a5..be9f2d4c 100644
--- a/packages/cli/tests/cli.test.ts
+++ b/packages/cli/tests/cli.test.ts
@@ -289,7 +289,9 @@ describe('tanstack-cms init', () => {
// Locator era: publicPrefix, no hand-written `path:` arrow (D13).
expect(DEFINITION_TEMPLATE).toContain('publicPrefix')
expect(DEFINITION_TEMPLATE).not.toMatch(/\bpath:\s*\(/)
- expect(DEFINITION_TEMPLATE).toContain("from '@tanstack/cms-core/definition'")
+ expect(DEFINITION_TEMPLATE).toContain(
+ "from '@tanstack/cms-core/definition'",
+ )
// No retired dialect markers leak back into the scaffold.
for (const retired of ['cmsVirtualRoutes', 'createRoutes(', 'publicRead'])
expect(`${DEFINITION_TEMPLATE}${CONFIG_TEMPLATE}`).not.toContain(retired)
diff --git a/packages/cms-compat-wp/README.md b/packages/cms-compat-wp/README.md
index d5193383..7e9c1d16 100644
--- a/packages/cms-compat-wp/README.md
+++ b/packages/cms-compat-wp/README.md
@@ -15,7 +15,7 @@ npm install @tanstack/cms-compat-wp @tanstack/cms-migrate-wp
The plugin contributes an admin route (which belongs in the definition) and a
server op (which belongs in the runtime). Build the definition once, register it,
-then wrap that *same object* into the runtime plugin. Import the definition from
+then wrap that _same object_ into the runtime plugin. Import the definition from
the `/definition` subpath so it stays load-safe in the Vite config:
```ts
@@ -43,7 +43,9 @@ import { defineCms } from '@tanstack/cms-core'
import { createCompatWpPlugin } from '@tanstack/cms-compat-wp'
import { definition, wp } from './cms.definition'
-export const cms = defineCms(definition, { plugins: [createCompatWpPlugin(wp)] })
+export const cms = defineCms(definition, {
+ plugins: [createCompatWpPlugin(wp)],
+})
```
## What you get
diff --git a/packages/cms-compat-wp/src/connector.ts b/packages/cms-compat-wp/src/connector.ts
index 47baf1f5..1c08542d 100644
--- a/packages/cms-compat-wp/src/connector.ts
+++ b/packages/cms-compat-wp/src/connector.ts
@@ -15,7 +15,11 @@ import { DEFAULT_COMMENTS_COLLECTION } from './features/comments.ts'
import { formOps } from './features/form-ops.ts'
import { DEFAULT_FORMS_COLLECTION } from './features/forms.ts'
import { redirectOps } from './features/redirect-ops.ts'
-import type { CmsOpDefinition, CmsPlugin, CmsPluginDefinition } from '@tanstack/cms-core'
+import type {
+ CmsOpDefinition,
+ CmsPlugin,
+ CmsPluginDefinition,
+} from '@tanstack/cms-core'
export { createCompatWpDefinition, DEFAULT_IMPORT_ROUTE } from './definition.ts'
diff --git a/packages/cms-compat-wp/src/definition.ts b/packages/cms-compat-wp/src/definition.ts
index abb34435..d80e951c 100644
--- a/packages/cms-compat-wp/src/definition.ts
+++ b/packages/cms-compat-wp/src/definition.ts
@@ -14,7 +14,10 @@ import { route } from '@tanstack/virtual-file-routes'
import { commentsCollection } from './features/comments.ts'
import { formSubmissionsCollection } from './features/forms.ts'
import { taxonomyCollection } from './features/taxonomy.ts'
-import type { Collection, CmsPluginDefinition } from '@tanstack/cms-core/definition'
+import type {
+ Collection,
+ CmsPluginDefinition,
+} from '@tanstack/cms-core/definition'
import type { CompatWpPluginConfig } from './types.ts'
/** Default admin route (under the admin base) for the import wizard. */
diff --git a/packages/cms-compat-wp/src/features/comments.ts b/packages/cms-compat-wp/src/features/comments.ts
index d299981f..6c6dec88 100644
--- a/packages/cms-compat-wp/src/features/comments.ts
+++ b/packages/cms-compat-wp/src/features/comments.ts
@@ -10,7 +10,12 @@
import { defineCollection } from '@tanstack/cms-core/definition'
/** The moderation states a comment moves through. */
-export const COMMENT_STATUSES = ['pending', 'approved', 'spam', 'trash'] as const
+export const COMMENT_STATUSES = [
+ 'pending',
+ 'approved',
+ 'spam',
+ 'trash',
+] as const
export type CommentStatus = (typeof COMMENT_STATUSES)[number]
/** Default collection name for public comments. */
@@ -30,7 +35,9 @@ export function moderatedStatus(action: string): CommentStatus | null {
}
/** Build the public-comments collection (status field drives moderation). */
-export function commentsCollection(config: { name?: string; label?: string } = {}) {
+export function commentsCollection(
+ config: { name?: string; label?: string } = {},
+) {
return defineCollection({
name: config.name ?? DEFAULT_COMMENTS_COLLECTION,
label: config.label ?? 'Comments',
@@ -46,7 +53,12 @@ export function commentsCollection(config: { name?: string; label?: string } = {
type: 'text',
defaultValue: '',
},
- { name: 'targetId', label: 'On Document', type: 'text', defaultValue: '' },
+ {
+ name: 'targetId',
+ label: 'On Document',
+ type: 'text',
+ defaultValue: '',
+ },
{ name: 'targetPath', label: 'On Path', type: 'text', defaultValue: '' },
{
name: 'status',
diff --git a/packages/cms-compat-wp/src/index.ts b/packages/cms-compat-wp/src/index.ts
index c48399ea..686e6e45 100644
--- a/packages/cms-compat-wp/src/index.ts
+++ b/packages/cms-compat-wp/src/index.ts
@@ -51,7 +51,11 @@ export {
taxonomyCollection,
DEFAULT_TAXONOMY_COLLECTION,
} from './features/taxonomy.ts'
-export { applyRedirectsOp, redirectOps, APPLY_REDIRECTS_OP } from './features/redirect-ops.ts'
+export {
+ applyRedirectsOp,
+ redirectOps,
+ APPLY_REDIRECTS_OP,
+} from './features/redirect-ops.ts'
export type {
CompatWpPluginConfig,
diff --git a/packages/cms-compat-wp/tests/features.test.ts b/packages/cms-compat-wp/tests/features.test.ts
index ba66626e..90be8bee 100644
--- a/packages/cms-compat-wp/tests/features.test.ts
+++ b/packages/cms-compat-wp/tests/features.test.ts
@@ -60,8 +60,9 @@ describe('createCompatWpDefinition feature collections', () => {
describe('createCompatWpPlugin op attachment', () => {
it('always attaches import-preview and apply-redirects, not submit ops', () => {
const names =
- createCompatWpPlugin(createCompatWpDefinition()).ops?.map((o) => o.name) ??
- []
+ createCompatWpPlugin(createCompatWpDefinition()).ops?.map(
+ (o) => o.name,
+ ) ?? []
expect(names).toContain(APPLY_REDIRECTS_OP)
expect(names).not.toContain(SUBMIT_COMMENT_OP)
expect(names).not.toContain(SUBMIT_FORM_OP)
diff --git a/packages/cms-compat-wp/tests/summarize.test.ts b/packages/cms-compat-wp/tests/summarize.test.ts
index 4ea4274c..112a0291 100644
--- a/packages/cms-compat-wp/tests/summarize.test.ts
+++ b/packages/cms-compat-wp/tests/summarize.test.ts
@@ -59,12 +59,17 @@ describe('summarizeEvacuation', () => {
expect(s.detectedPlugins).toEqual(['contact-form-7', 'wordpress-seo'])
expect(s.reportMarkdown).toBe('# Review report')
- expect(s.collections.find((c) => c.collectionName === 'post')).toMatchObject(
- { label: 'Posts', postType: 'post', fieldCount: 3, documentCount: 2 },
- )
- expect(s.collections.find((c) => c.collectionName === 'page')).toMatchObject(
- { fieldCount: 1, documentCount: 1 },
- )
+ expect(
+ s.collections.find((c) => c.collectionName === 'post'),
+ ).toMatchObject({
+ label: 'Posts',
+ postType: 'post',
+ fieldCount: 3,
+ documentCount: 2,
+ })
+ expect(
+ s.collections.find((c) => c.collectionName === 'page'),
+ ).toMatchObject({ fieldCount: 1, documentCount: 1 })
})
it('reports zero documents for an inferred collection with none', () => {
diff --git a/packages/cms-compat-wp/tsconfig.json b/packages/cms-compat-wp/tsconfig.json
index 71d983ce..85ec5a07 100644
--- a/packages/cms-compat-wp/tsconfig.json
+++ b/packages/cms-compat-wp/tsconfig.json
@@ -1,6 +1,11 @@
{
"extends": "../../tsconfig.base.json",
- "include": ["src/**/*.ts", "src/**/*.tsx", "tests/**/*.ts", "vitest.config.ts"],
+ "include": [
+ "src/**/*.ts",
+ "src/**/*.tsx",
+ "tests/**/*.ts",
+ "vitest.config.ts"
+ ],
// The admin route uses `createFileRoute('/wp-import')`, whose path types come
// from the route tree generated in the *consuming* app. In isolation that
// augmentation is absent, so the route is excluded here (same as cms-ui-react).
diff --git a/packages/cms-connect-atproto/README.md b/packages/cms-connect-atproto/README.md
index 9816ba32..19189134 100644
--- a/packages/cms-connect-atproto/README.md
+++ b/packages/cms-connect-atproto/README.md
@@ -26,7 +26,9 @@ export const cms = defineCms(definition, {
plugins: [
createAtprotoConnector({
// Outbound: syndicate the `post` collection.
- publish: { post: { enabled: true, linkBase: 'https://your-site.com/blog' } },
+ publish: {
+ post: { enabled: true, linkBase: 'https://your-site.com/blog' },
+ },
// Inbound: mirror an account into `atproto_posts` every 15 minutes.
sync: [{ actor: 'alice.bsky.social', collection: 'atproto_posts' }],
}),
@@ -38,12 +40,12 @@ Publishing needs a Bluesky app password (Settings, App Passwords). Set `ATP_IDEN
## Credentials
-| Variable | Used for | Default |
-| --- | --- | --- |
-| `ATP_IDENTIFIER` | Login handle or email (publishing) | none (anonymous) |
-| `ATP_APP_PASSWORD` | Bluesky app password (publishing) | none (anonymous) |
-| `ATP_SERVICE` | PDS or entryway URL | `https://bsky.social` |
-| `ATP_LINK_BASE` | Canonical URL base for the link back | none |
+| Variable | Used for | Default |
+| ------------------ | ------------------------------------ | --------------------- |
+| `ATP_IDENTIFIER` | Login handle or email (publishing) | none (anonymous) |
+| `ATP_APP_PASSWORD` | Bluesky app password (publishing) | none (anonymous) |
+| `ATP_SERVICE` | PDS or entryway URL | `https://bsky.social` |
+| `ATP_LINK_BASE` | Canonical URL base for the link back | none |
## CLI
diff --git a/packages/core/README.md b/packages/core/README.md
index 6d15874c..90e908b0 100644
--- a/packages/core/README.md
+++ b/packages/core/README.md
@@ -42,14 +42,14 @@ model is registered on both client and server.
## Entry points
-| Import | Runs on | Contents |
-| ---------------------------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
-| `@tanstack/cms-core` | client + server | `defineCms`, schema helpers, `opSchemas`, auth types, theme |
-| `@tanstack/cms-core/server` | server | store (`getAs`, `listAs`, `commitDocument`, `stageWrite`, `approve`, …), media library, `runOp`, auth guards, `CmsError` |
-| `@tanstack/cms-core/storage` | config | `StorageAdapter` contract, query/frontmatter utilities (the Postgres engine ships in `@tanstack/cms-store-postgres`) |
-| `@tanstack/cms-core/storage/conformance` | tests | `runStorageConformance()` for custom storage adapters |
-| `@tanstack/cms-core/media` | config | `MediaAdapter` contract, `createLocalMedia()`, image sniffing |
-| `@tanstack/cms-core/media/conformance` | tests | `runMediaConformance()` for custom media adapters |
+| Import | Runs on | Contents |
+| ---------------------------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------ |
+| `@tanstack/cms-core` | client + server | `defineCms`, schema helpers, `opSchemas`, auth types, theme |
+| `@tanstack/cms-core/server` | server | store (`getAs`, `listAs`, `commitDocument`, `stageWrite`, `approve`, …), media library, `runOp`, auth guards, `CmsError` |
+| `@tanstack/cms-core/storage` | config | `StorageAdapter` contract, query/frontmatter utilities (the Postgres engine ships in `@tanstack/cms-store-postgres`) |
+| `@tanstack/cms-core/storage/conformance` | tests | `runStorageConformance()` for custom storage adapters |
+| `@tanstack/cms-core/media` | config | `MediaAdapter` contract, `createLocalMedia()`, image sniffing |
+| `@tanstack/cms-core/media/conformance` | tests | `runMediaConformance()` for custom media adapters |
## Storage
diff --git a/packages/core/src/config.ts b/packages/core/src/config.ts
index 925f805c..d4db6b53 100644
--- a/packages/core/src/config.ts
+++ b/packages/core/src/config.ts
@@ -1553,7 +1553,6 @@ export function getCmsConfig(): ResolvedCmsConfig {
export function isDemoMode(): boolean {
const config = getCmsConfig()
if (config.dev !== undefined) return config.dev
- const env =
- typeof process !== 'undefined' ? process.env.NODE_ENV : undefined
+ const env = typeof process !== 'undefined' ? process.env.NODE_ENV : undefined
return env === 'development' || env === 'test'
}
diff --git a/packages/core/src/server.ts b/packages/core/src/server.ts
index d9e5a16b..04515374 100644
--- a/packages/core/src/server.ts
+++ b/packages/core/src/server.ts
@@ -214,10 +214,7 @@ export {
pendingReleaseChanges,
rollbackRelease,
} from './server/releases'
-export type {
- PendingChange,
- ReleasePreflightIssue,
-} from './server/releases'
+export type { PendingChange, ReleasePreflightIssue } from './server/releases'
export { parseCron, cronMatches, nextCronRun } from './lib/cron'
export type { CronExpr } from './lib/cron'
export type {
diff --git a/packages/core/src/server/auth.ts b/packages/core/src/server/auth.ts
index cf07232c..95b8050d 100644
--- a/packages/core/src/server/auth.ts
+++ b/packages/core/src/server/auth.ts
@@ -419,10 +419,7 @@ const AGENT_SLUG_RE = /^[a-zA-Z0-9][a-zA-Z0-9._-]{0,63}$/
* self-asserted request header (D3: review-queue attribution must be
* trustworthy by construction).
*/
-function bindCredentialAgent(
- session: CmsSession,
- label?: string,
-): CmsSession {
+function bindCredentialAgent(session: CmsSession, label?: string): CmsSession {
return label && AGENT_SLUG_RE.test(label)
? { ...session, agent: label }
: session
@@ -477,7 +474,8 @@ export async function verifyMcpAccess(
await rateLimit('auth', request)
return {
allowed: false,
- reason: 'Unauthorized: the presented MCP credential is not recognized.',
+ reason:
+ 'Unauthorized: the presented MCP credential is not recognized.',
}
}
const role = matched.role
@@ -499,7 +497,10 @@ export async function verifyMcpAccess(
}
// Agent identity is bound to the credential (the key's label), never to a
// self-asserted request header.
- return { allowed: true, session: bindCredentialAgent(session, matched.label) }
+ return {
+ allowed: true,
+ session: bindCredentialAgent(session, matched.label),
+ }
}
}
const session = await resolveSession(request)
diff --git a/packages/core/src/server/content-migrations.ts b/packages/core/src/server/content-migrations.ts
index 422c2aa9..55c3b612 100644
--- a/packages/core/src/server/content-migrations.ts
+++ b/packages/core/src/server/content-migrations.ts
@@ -13,7 +13,11 @@ import { getCmsConfig } from '../config'
import { CmsError } from '../errors'
import { collections, isCollectionReadOnly, schemaFor } from '../schema'
import { denormalize } from './indexing'
-import { ensureDefaultAdapter, getStorage, resolveStorageAdapter } from './storage'
+import {
+ ensureDefaultAdapter,
+ getStorage,
+ resolveStorageAdapter,
+} from './storage'
import type { Collection, ContentMigration, Doc } from '../schema'
import type { PendingRecord, StorageOps } from '../storage/types'
import type { WhereClause } from '../storage/where'
diff --git a/packages/core/src/server/releases.ts b/packages/core/src/server/releases.ts
index d9ae972d..dc04ce14 100644
Binary files a/packages/core/src/server/releases.ts and b/packages/core/src/server/releases.ts differ
diff --git a/packages/core/src/server/storage.ts b/packages/core/src/server/storage.ts
index 93303ebe..4d9cec46 100644
--- a/packages/core/src/server/storage.ts
+++ b/packages/core/src/server/storage.ts
@@ -126,9 +126,8 @@ async function getDefaultAdapter(): Promise {
if (!adapter) {
let createPgliteStorage
try {
- ;({ createPgliteStorage } = await import(
- '@tanstack/cms-store-postgres/pglite'
- ))
+ ;({ createPgliteStorage } =
+ await import('@tanstack/cms-store-postgres/pglite'))
} catch {
throw new Error(
'No `storage` configured and the embedded engine is unavailable. ' +
diff --git a/packages/core/src/server/store/document-state.ts b/packages/core/src/server/store/document-state.ts
index b90fccde..a43a00d6 100644
--- a/packages/core/src/server/store/document-state.ts
+++ b/packages/core/src/server/store/document-state.ts
@@ -957,8 +957,7 @@ export async function executeStrategyWrite(
const releasedMode =
(getCmsConfig().publishing?.kind ?? 'live') === 'released'
const pendingPublish = releasedMode && has('publish')
- const pendingUnpublish =
- releasedMode && has('unpublish') && !has('publish')
+ const pendingUnpublish = releasedMode && has('unpublish') && !has('publish')
const pendingRelease = pendingPublish || pendingUnpublish
const stagesFirst =
has('stage') &&
@@ -1374,7 +1373,8 @@ export async function executeStrategyWrite(
_revision: revision,
_updatedAt: now,
}
- if (!live) await writeDocument(tx, write.collection, write.docId, final, now)
+ if (!live)
+ await writeDocument(tx, write.collection, write.docId, final, now)
// Consume the staged change set exactly as a commit would.
if (consumed && (!write.incoming || stagesFirst)) {
await tx.deletePending(consumed.id)
diff --git a/packages/core/src/storage/conformance.ts b/packages/core/src/storage/conformance.ts
index 880b12b2..cb7f470f 100644
--- a/packages/core/src/storage/conformance.ts
+++ b/packages/core/src/storage/conformance.ts
@@ -1251,7 +1251,12 @@ export function runStorageConformance(
withStorage(async (s) => {
await seedPosts(s)
await s.putDocument(
- { collection: 'page', id: 'p', doc: { title: 'Pg' } as never, updatedAt: now },
+ {
+ collection: 'page',
+ id: 'p',
+ doc: { title: 'Pg' } as never,
+ updatedAt: now,
+ },
index('Pg'),
)
expect(await s.listPendingReleaseChanges()).toEqual([])
@@ -1293,10 +1298,17 @@ export function runStorageConformance(
// A content write must not clobber pending state.
await s.putDocument(
- { collection: 'post', id: 'a', doc: { title: 'A2' } as never, updatedAt: now },
+ {
+ collection: 'post',
+ id: 'a',
+ doc: { title: 'A2' } as never,
+ updatedAt: now,
+ },
index('A2', { published: true }),
)
- expect((await s.getDocument('post', 'a'))?.pendingReleaseRevision).toBe(4)
+ expect((await s.getDocument('post', 'a'))?.pendingReleaseRevision).toBe(
+ 4,
+ )
await s.setPendingRelease('post', 'a', null)
const after = await s.listPendingReleaseChanges()
diff --git a/packages/core/tests/access-context.test.ts b/packages/core/tests/access-context.test.ts
index 2ceb7467..5644b1ad 100644
--- a/packages/core/tests/access-context.test.ts
+++ b/packages/core/tests/access-context.test.ts
@@ -320,10 +320,10 @@ describe('derivation', () => {
expect(viewerRelations.items[0]?.relations?.author).toMatchObject({
title: 'Published memo',
})
- const bySlug = await cmsAs(
- cms,
- siteReadContext(as('viewer')),
- ).get({ collection: 'post', locator: 'live' })
+ const bySlug = await cmsAs(cms, siteReadContext(as('viewer'))).get({
+ collection: 'post',
+ locator: 'live',
+ })
expect(bySlug?.relations?.author).toMatchObject({ title: 'Published memo' })
const ruled = await cmsAs(
cms,
diff --git a/packages/core/tests/readiness.test.ts b/packages/core/tests/readiness.test.ts
index d88ecbbf..ee75c77c 100644
--- a/packages/core/tests/readiness.test.ts
+++ b/packages/core/tests/readiness.test.ts
@@ -69,9 +69,7 @@ describe('1.0 workflow invariants', () => {
it('keeps per-collection writable adapters inside their own transaction', async () => {
await setup({
- collections: [
- { ...post, storage: createPgliteStorage() },
- ],
+ collections: [{ ...post, storage: createPgliteStorage() }],
})
const proposals = await Promise.all(
['First', 'Second'].map((title) =>
diff --git a/packages/core/tests/store.test.ts b/packages/core/tests/store.test.ts
index ea28dd74..b773df21 100644
--- a/packages/core/tests/store.test.ts
+++ b/packages/core/tests/store.test.ts
@@ -1,9 +1,4 @@
-import {
- mkdirSync,
- mkdtempSync,
- rmSync,
- writeFileSync,
-} from 'node:fs'
+import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { afterEach, describe, expect, it, vi } from 'vitest'
diff --git a/packages/core/tests/transfer.test.ts b/packages/core/tests/transfer.test.ts
index 6c010626..319cec58 100644
--- a/packages/core/tests/transfer.test.ts
+++ b/packages/core/tests/transfer.test.ts
@@ -239,30 +239,36 @@ describe('export / import', () => {
).toBeNull()
})
- it('replace deletes every missing document past the first page', { timeout: 20000 }, async () => {
- setup()
- const many = parseCmsExport({
- format: 'tanstack-cms-export',
- version: 1,
- exportedAt: new Date().toISOString(),
- documents: Array.from({ length: 1201 }, (_, i) => ({
- collection: 'post',
- id: `p${String(i).padStart(4, '0')}`,
- doc: { title: `P${i}` },
- })),
- })
- await importContent(many)
- const keepOne = parseCmsExport({
- format: 'tanstack-cms-export',
- version: 1,
- exportedAt: new Date().toISOString(),
- documents: [{ collection: 'post', id: 'p0600', doc: { title: 'Kept' } }],
- })
- const result = await importContent(keepOne, { mode: 'replace' })
- expect(result).toMatchObject({ updated: 1, deleted: 1200 })
- const left = await exportContent()
- expect(left.documents.map((d) => d.id)).toEqual(['p0600'])
- })
+ it(
+ 'replace deletes every missing document past the first page',
+ { timeout: 20000 },
+ async () => {
+ setup()
+ const many = parseCmsExport({
+ format: 'tanstack-cms-export',
+ version: 1,
+ exportedAt: new Date().toISOString(),
+ documents: Array.from({ length: 1201 }, (_, i) => ({
+ collection: 'post',
+ id: `p${String(i).padStart(4, '0')}`,
+ doc: { title: `P${i}` },
+ })),
+ })
+ await importContent(many)
+ const keepOne = parseCmsExport({
+ format: 'tanstack-cms-export',
+ version: 1,
+ exportedAt: new Date().toISOString(),
+ documents: [
+ { collection: 'post', id: 'p0600', doc: { title: 'Kept' } },
+ ],
+ })
+ const result = await importContent(keepOne, { mode: 'replace' })
+ expect(result).toMatchObject({ updated: 1, deleted: 1200 })
+ const left = await exportContent()
+ expect(left.documents.map((d) => d.id)).toEqual(['p0600'])
+ },
+ )
it('rejects files that are not CMS exports or name unknown collections', async () => {
setup()
diff --git a/packages/search-cms/tests/cms.test.ts b/packages/search-cms/tests/cms.test.ts
index 0b5ea17f..ea0d8c41 100644
--- a/packages/search-cms/tests/cms.test.ts
+++ b/packages/search-cms/tests/cms.test.ts
@@ -295,10 +295,7 @@ it('characterizes cmsSearchFields for each field type × searchable/facet', () =
...collection,
titleField: 'name',
search: { fields: searchFields },
- fields: [
- { name: 'name', label: 'Name', type: 'text' },
- f as never,
- ],
+ fields: [{ name: 'name', label: 'Name', type: 'text' }, f as never],
})
return Object.hasOwn(reg, 'f') ? reg.f : 'skip'
} catch {
@@ -340,16 +337,23 @@ it('characterizes cmsSearchFields for each field type × searchable/facet', () =
// non-searchable facet; a plain one (no facet, not searchable) is skipped.
expect(
run(
- { name: 'f', label: 'F', type: 'relation', collection: 'x', many: true, facet: true },
+ {
+ name: 'f',
+ label: 'F',
+ type: 'relation',
+ collection: 'x',
+ many: true,
+ facet: true,
+ },
['name'],
),
).toEqual({ type: 'string', facet: true, scalar: false, searchable: false })
expect(
run({ name: 'f', label: 'F', type: 'multiselect', facet: true }, ['name']),
).toEqual({ type: 'string', facet: true, scalar: false, searchable: false })
- expect(
- run({ name: 'f', label: 'F', type: 'multiselect' }, ['name']),
- ).toBe('skip')
+ expect(run({ name: 'f', label: 'F', type: 'multiselect' }, ['name'])).toBe(
+ 'skip',
+ )
// A multiselect/relation-many as a searchable field is rejected.
expect(
run({ name: 'f', label: 'F', type: 'multiselect', facet: true }, [
diff --git a/packages/store-postgres/package.json b/packages/store-postgres/package.json
index e14a07bd..2fbde352 100644
--- a/packages/store-postgres/package.json
+++ b/packages/store-postgres/package.json
@@ -42,7 +42,7 @@
"types": "./dist/pglite.d.ts",
"import": "./dist/pglite.js"
},
- "./package.json": "./package.json"
+ "./package.json": "./package.json"
},
"main": "./dist/index.js",
"types": "./dist/index.d.ts"
diff --git a/packages/store-postgres/src/index.ts b/packages/store-postgres/src/index.ts
index b4d3fc07..a3cddbc8 100644
--- a/packages/store-postgres/src/index.ts
+++ b/packages/store-postgres/src/index.ts
@@ -721,10 +721,12 @@ export function createPostgresStorage(
},
async getLiveRelease() {
return (
- await records(
- `SELECT record FROM ${t('releases')} WHERE status = 'live' ORDER BY sequence DESC LIMIT 1`,
- )
- )[0] ?? null
+ (
+ await records(
+ `SELECT record FROM ${t('releases')} WHERE status = 'live' ORDER BY sequence DESC LIMIT 1`,
+ )
+ )[0] ?? null
+ )
},
async updateReleaseStatus(id, status) {
await q(
diff --git a/packages/store-postgres/src/pglite.ts b/packages/store-postgres/src/pglite.ts
index 0690f006..6a3a48c0 100644
--- a/packages/store-postgres/src/pglite.ts
+++ b/packages/store-postgres/src/pglite.ts
@@ -26,7 +26,9 @@ export interface PgliteStorageOptions {
* serializes queries internally; this serializes transaction boundaries so two
* `BEGIN`s never overlap on the single connection.
*/
-export function createPglitePool(options: { dataDir?: string } = {}): PgPoolLike {
+export function createPglitePool(
+ options: { dataDir?: string } = {},
+): PgPoolLike {
let db: PGlite | undefined
let tail: Promise = Promise.resolve()
diff --git a/packages/store-postgres/tests/pglite.test.ts b/packages/store-postgres/tests/pglite.test.ts
index 4ef7148b..67089784 100644
--- a/packages/store-postgres/tests/pglite.test.ts
+++ b/packages/store-postgres/tests/pglite.test.ts
@@ -4,8 +4,12 @@ import { createPgliteStorage } from '../src/pglite'
// The embedded Postgres engine (PGlite) runs the shared storage conformance
// suite in-process — no external Postgres needed, so this always runs (D12).
-runStorageConformance('pglite (embedded Postgres)', () => createPgliteStorage(), {
- describe,
- it,
- expect,
-})
+runStorageConformance(
+ 'pglite (embedded Postgres)',
+ () => createPgliteStorage(),
+ {
+ describe,
+ it,
+ expect,
+ },
+)
diff --git a/packages/ui-react/src/routes/dashboard.tsx b/packages/ui-react/src/routes/dashboard.tsx
index fdc55ef6..2e4472fc 100644
--- a/packages/ui-react/src/routes/dashboard.tsx
+++ b/packages/ui-react/src/routes/dashboard.tsx
@@ -197,7 +197,9 @@ function DashboardPage() {
>
- {adminT(DECISION_LABELS[a.decision] ?? TYPE_LABELS.update)}
+ {adminT(
+ DECISION_LABELS[a.decision] ?? TYPE_LABELS.update,
+ )}
{adminT(TYPE_LABELS[a.type] ?? TYPE_LABELS.update)}
diff --git a/packages/ui-react/src/routes/media.tsx b/packages/ui-react/src/routes/media.tsx
index 33af1385..f975f613 100644
--- a/packages/ui-react/src/routes/media.tsx
+++ b/packages/ui-react/src/routes/media.tsx
@@ -353,7 +353,11 @@ function MediaDetail({
const message = inUse
? adminT('media.inUseCount', { count: usage ?? 0 })
: adminT('media.deleteConfirm')
- if (!window.confirm(inUse ? adminT('media.confirmForceDelete', { message }) : message)) {
+ if (
+ !window.confirm(
+ inUse ? adminT('media.confirmForceDelete', { message }) : message,
+ )
+ ) {
return
}
setBusy(true)
@@ -407,7 +411,11 @@ function MediaDetail({
/>
) : (
- {item.kind === 'video' ? '▶' : item.kind === 'audio' ? '♪' : '📄'}
+ {item.kind === 'video'
+ ? '▶'
+ : item.kind === 'audio'
+ ? '♪'
+ : '📄'}
)}
diff --git a/packages/ui-react/src/routes/profile.tsx b/packages/ui-react/src/routes/profile.tsx
index ec02f684..8afcb35a 100644
--- a/packages/ui-react/src/routes/profile.tsx
+++ b/packages/ui-react/src/routes/profile.tsx
@@ -45,9 +45,7 @@ function ProfilePage() {
{adminT('profile.email')}
{user.email ?? '—'}
{adminT('profile.userId')}
-
- {user.id}
-
+ {user.id}
) : (
{adminT('profile.anon')}
diff --git a/packages/ui-react/tests/virtual-routes.test.ts b/packages/ui-react/tests/virtual-routes.test.ts
index 503af9bf..ad35d7df 100644
--- a/packages/ui-react/tests/virtual-routes.test.ts
+++ b/packages/ui-react/tests/virtual-routes.test.ts
@@ -253,7 +253,8 @@ describe('createRoutes', () => {
it('omits the admin index when there is no admin base', () => {
const root = createRoutes(definition())
const dash = (root.children ?? []).find(
- (c) => c.type === 'route' && 'file' in c && /dashboard/.test(c.file ?? ''),
+ (c) =>
+ c.type === 'route' && 'file' in c && /dashboard/.test(c.file ?? ''),
)
expect(dash).toBeUndefined()
// Only the public index remains at root; no second index is introduced.