@vercel/geistdocs 1.17.0 → 1.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"logo-ai-sdk.d.ts","sourceRoot":"","sources":["../../../src/assets/logos/logo-ai-sdk.tsx"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,EACxB,MAAW,EACX,SAAS,GACV,EAAE;IACD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,2CA4BA"}
1
+ {"version":3,"file":"logo-ai-sdk.d.ts","sourceRoot":"","sources":["../../../src/assets/logos/logo-ai-sdk.tsx"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,EACxB,MAAc,EACd,SAAS,GACV,EAAE;IACD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,2CAmBA"}
@@ -1,5 +1,5 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- export function LogoAiSdk({ height = 22, className, }) {
3
- const width = (280 / 77) * height;
4
- return (_jsxs("svg", { "aria-hidden": "true", className: className, fill: "none", height: height, role: "img", viewBox: "0 0 280 77", width: width, xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M.88 75.21 27.79.58h16.7l26.92 74.63h-14.3l-6.18-17.66H21.39l-6.21 17.66zm24.5-29.32h21.54L36.2 14.35zM116.8.58v11.87h-11.98v50.89h12.6v11.87h-39V63.34h12.73V12.45H79.06V.58z", fill: "currentColor" }), _jsx("path", { d: "M242.4 4.08h-71.6a33.98 33.98 0 0 0 0 67.96h71.6a33.98 33.98 0 1 0 0-67.96Z", stroke: "currentColor", strokeWidth: "7.249" }), _jsx("path", { d: "M164.56 44.27c.72 4.18 3.7 6.94 8.6 6.94 3.74 0 6.28-1.49 6.22-4.35-.05-2.88-2.48-4.53-8.6-6.01-8.48-2.04-13.94-5.46-13.94-11.74 0-7.1 5.96-11.57 14.88-11.57 8.7 0 14.66 5.35 15.59 13.23l-8.37.44c-.44-4.13-3.31-6.73-7.43-6.73-3.65 0-6.24 1.88-6.07 4.74.11 3.31 3.96 4.4 8.15 5.46 8.76 1.93 14.33 5.67 14.33 11.9 0 7.43-6.55 11.62-14.98 11.62-9.53 0-16.26-5.29-16.81-13.55zm39.12-25.85c12.67 0 19.78 7.05 19.78 19.62 0 12.5-7 19.5-19.45 19.5h-13.83V18.42zm-5.12 32.07h5.12c7.6 0 11.23-4.02 11.23-12.5 0-8.5-3.62-12.5-11.23-12.5h-5.12zm26.55-32.07h8.38V35.5l14.22-17.08h9.74l-14.38 17.25 15.27 21.87h-9.52l-11.24-16.26-4.08 4.74v11.52h-8.38V18.42", fill: "currentColor" })] }));
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export function LogoAiSdk({ height = 15.51, className, }) {
3
+ const width = (146 / 40) * height;
4
+ return (_jsx("svg", { "aria-hidden": "true", className: className, fill: "none", height: height, role: "img", viewBox: "0 0 146 40", width: width, xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M37.7793 39.9746H30.1221L26.8008 30.5166H10.9795L7.65723 39.9746H0L14.4141 0H23.3662L37.7793 39.9746ZM61.5264 6.3623H55.1074V33.6133H61.8643V39.9746H40.9756V33.6133H47.7881V6.3623H41.3135V0H61.5264V6.3623ZM125.626 0C136.664 0.000162345 145.613 8.94892 145.613 19.9873C145.613 31.0259 136.665 39.9744 125.626 39.9746H88.5068C77.4681 39.9746 68.5195 31.026 68.5195 19.9873C68.5198 8.94882 77.4683 0 88.5068 0H125.626ZM88.5068 4.2832C79.8337 4.2832 72.802 11.3143 72.8018 19.9873C72.8018 28.6606 79.8336 35.6924 88.5068 35.6924H125.626C134.299 35.6922 141.33 28.6605 141.33 19.9873C141.33 11.3144 134.299 4.28337 125.626 4.2832H88.5068ZM89.04 9.99023C93.319 9.99023 96.2445 12.6176 96.7051 16.4902L92.5879 16.707C92.3711 14.6761 90.9635 13.4035 88.9326 13.4033C87.1451 13.4033 85.8719 14.3241 85.9531 15.7324C86.0074 17.3572 87.9029 17.8986 89.9609 18.4131C94.2671 19.361 97.0029 21.2033 97.0029 24.2637C97.0028 27.9196 93.7802 29.9774 89.6367 29.9775C84.9513 29.9775 81.6468 27.3779 81.376 23.3154L85.5195 23.126C85.8716 25.1843 87.3347 26.5381 89.7451 26.5381C91.5865 26.538 92.8318 25.8066 92.8047 24.3984C92.7774 22.9904 91.5859 22.1784 88.5801 21.4473C84.4093 20.4452 81.7285 18.7652 81.7285 15.6777C81.7287 12.1844 84.653 9.99038 89.04 9.99023ZM105.917 10.4238C112.146 10.4238 115.64 13.8906 115.64 20.0654C115.64 26.2131 112.201 29.6531 106.08 29.6533H99.2822V10.4238H105.917ZM121.985 18.8193L128.973 10.4238H133.767L126.697 18.9014L134.199 29.6533H129.515L123.989 21.6631L121.985 23.9922V29.6533H117.682V10.4238H121.985V18.8193ZM103.398 26.1865H105.917C109.654 26.1865 111.442 24.2089 111.442 20.0381C111.442 15.8676 109.654 13.8906 105.917 13.8906H103.398V26.1865ZM13.1191 24.2666H24.6611L18.918 7.37598L13.1191 24.2666Z", fill: "currentColor" }) }));
5
5
  }
@@ -1 +1 @@
1
- {"version":3,"file":"logo-chat-sdk.d.ts","sourceRoot":"","sources":["../../../src/assets/logos/logo-chat-sdk.tsx"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,EAC1B,MAAW,EACX,SAAS,GACV,EAAE;IACD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,2CAgCA"}
1
+ {"version":3,"file":"logo-chat-sdk.d.ts","sourceRoot":"","sources":["../../../src/assets/logos/logo-chat-sdk.tsx"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,EAC1B,MAAa,EACb,SAAS,GACV,EAAE;IACD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,2CAmBA"}
@@ -1,5 +1,5 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- export function LogoChatSdk({ height = 22, className, }) {
3
- const width = (69 / 22) * height;
4
- return (_jsxs("svg", { "aria-hidden": "true", className: className, fill: "none", height: height, role: "img", viewBox: "0 0 69 22", width: width, xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M12.204 12.788C11.682 15.47 9.828 17.288 6.804 17.288C3.06 17.288 0.792 14.372 0.792 10.628C0.792 6.866 3.06 3.932 6.804 3.932C9.666 3.932 11.538 5.642 12.132 8.198L9.774 8.324C9.414 6.884 8.388 5.93 6.786 5.93C4.248 5.93 3.132 8.036 3.132 10.628C3.132 13.202 4.266 15.29 6.786 15.29C8.46 15.29 9.504 14.21 9.828 12.662L12.204 12.788ZM13.7299 4.22H15.9619V8.72C16.5199 7.676 17.5819 7.244 18.7339 7.244C20.8399 7.244 21.9379 8.81 21.9379 10.862V17H19.7059V11.636C19.7059 10.034 19.2739 9.152 18.0319 9.152C16.7359 9.152 15.9619 10.034 15.9619 11.636V17H13.7299V4.22ZM23.5685 10.358C23.9465 8.396 25.4765 7.244 27.7805 7.244C30.5165 7.244 31.9565 8.666 31.9565 11.33V14.66C31.9565 15.2 32.1725 15.344 32.5505 15.344H32.9105V17L32.3525 17.018C31.5785 17.018 30.1385 17 29.9945 15.542C29.5445 16.478 28.4825 17.216 26.8445 17.216C24.9365 17.216 23.4065 16.19 23.4065 14.498C23.4065 12.626 24.7925 12.032 27.0245 11.6L29.7065 11.06C29.6885 9.602 29.0765 8.9 27.7805 8.9C26.7545 8.9 26.0885 9.44 25.8545 10.484L23.5685 10.358ZM25.7105 14.426C25.7105 15.092 26.2685 15.614 27.4205 15.614C28.7525 15.614 29.7425 14.66 29.7425 12.716V12.626L27.9065 12.95C26.6645 13.184 25.7105 13.31 25.7105 14.426ZM34.5064 5.3H36.7384V7.46H39.2584V9.206H36.7384V14.102C36.7384 14.858 37.0984 15.236 37.8184 15.236H39.2584V17H37.4764C35.5324 17 34.5064 16.01 34.5064 14.102V9.206H33.0124V7.46H34.5064V5.3Z", fill: "currentColor" }), _jsx("rect", { height: "12.1517", rx: "6.07585", stroke: "currentColor", strokeWidth: "1.28793", width: "24.7957", x: "42.644", y: "4.92414" }), _jsx("path", { d: "M47.5852 12.141C47.732 12.9143 48.2606 13.4135 49.1611 13.4135C49.8463 13.4135 50.3063 13.1394 50.2966 12.6207C50.2966 12.0823 49.8365 11.7887 48.7207 11.5048C47.2622 11.1622 46.2932 10.5553 46.2932 9.42969C46.2932 8.1768 47.3307 7.39374 48.8773 7.39374C50.4336 7.39374 51.4809 8.3432 51.6375 9.73313L50.2183 9.80165C50.1204 9.05774 49.6114 8.59769 48.8479 8.59769C48.1921 8.59769 47.7223 8.93049 47.7418 9.44927C47.7614 10.0757 48.5053 10.2715 49.2492 10.4477C50.7566 10.7903 51.755 11.4559 51.755 12.5619C51.755 13.8833 50.5804 14.6175 49.1122 14.6175C47.4384 14.6175 46.2638 13.6876 46.1561 12.2193L47.5852 12.141ZM54.5555 7.55035C56.797 7.55035 58.0499 8.80325 58.0499 11.035C58.0499 13.2569 56.8264 14.5 54.6142 14.5H52.1868V7.55035H54.5555ZM53.6158 13.2863H54.5555C55.9357 13.2863 56.6013 12.5521 56.6013 11.035C56.6013 9.49821 55.9357 8.76409 54.5555 8.76409H53.6158V13.2863ZM58.3839 7.55035H59.813V10.6141L62.3873 7.55035H63.9926L61.4281 10.6141L64.159 14.5H62.5929L60.5373 11.5733L59.813 12.4249V14.5H58.3839V7.55035Z", fill: "currentColor" })] }));
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export function LogoChatSdk({ height = 16.4, className, }) {
3
+ const width = (201 / 42) * height;
4
+ return (_jsx("svg", { "aria-hidden": "true", className: className, fill: "none", height: height, role: "img", viewBox: "0 0 201 42", width: width, xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M18.457 0C28.5803 0 34.0054 5.31364 35.7393 14.3184L28.1328 14.71C27.1261 9.50848 23.9382 6.32031 18.457 6.32031C11.6897 6.3205 7.49517 11.969 7.49512 20.8057C7.49512 29.7544 11.8017 35.1797 18.4014 35.1797C24.3299 35.1797 27.4625 31.7682 28.3574 26.0635L35.9639 26.4551C34.3978 35.7952 28.4127 41.5 18.4014 41.5C7.551 41.5 0 33.7814 0 20.8057C6.64823e-05 8.05387 7.32721 0.000160109 18.457 0ZM83.3174 10.0674C91.8185 10.0674 96.2372 14.5416 96.2373 22.4834V33.334C96.2373 34.956 96.7964 35.4033 97.915 35.4033H98.8662V40.6055C98.3629 40.7173 97.244 40.8291 96.2373 40.8291C92.9934 40.8291 90.5886 39.654 90.0293 36.0186C88.5192 39.2066 84.7155 41.2764 79.8496 41.2764C73.5855 41.2764 69.4463 38.3118 69.4463 33.1104C69.4463 27.9648 72.6349 25.2239 79.1787 23.9375L89.0781 21.9805C89.0781 17.7858 87.1205 15.6045 83.3174 15.6045C79.8499 15.6045 77.8919 17.2261 77.2207 20.2461L69.9502 19.9111C71.1247 13.647 75.9346 10.0674 83.3174 10.0674ZM181.021 0.914062C191.984 0.914265 200.871 9.80189 200.871 20.7646C200.871 31.7274 191.984 40.6141 181.021 40.6143H144.156C133.194 40.614 124.307 31.7273 124.307 20.7646C124.307 9.80192 133.194 0.914308 144.156 0.914062H181.021ZM47.082 14.71C48.7039 11.578 51.8918 10.0675 55.583 10.0674C62.1827 10.0674 65.707 14.7653 65.707 21.4209V40.6055H58.5479V23.1553C58.5479 18.2894 56.9257 15.8838 53.458 15.8838C49.5431 15.8838 47.0822 18.4567 47.082 23.3223V40.6055H39.9229V0.894531H47.082V14.71ZM109.838 10.7383H117.725V16.2754H109.838V31.377C109.838 34.1731 111.013 35.0683 113.529 35.0684H117.725V40.6055H111.349C105.42 40.6055 102.679 37.9764 102.679 32.0479V16.2754H97.9814V10.7383H102.679V3.74707H109.838V10.7383ZM144.156 5.16797C135.543 5.16821 128.561 12.1511 128.561 20.7646C128.561 29.3782 135.543 36.3611 144.156 36.3613H181.021C189.635 36.3611 196.617 29.3782 196.617 20.7646C196.617 12.1511 189.635 5.16817 181.021 5.16797H144.156ZM81.3594 28.4121C78.1716 29.0274 76.8857 30.3701 76.8857 32.4395C76.8858 34.7884 78.4514 36.0742 81.3037 36.0742C86.0577 36.0742 89.078 33.0546 89.0781 28.5244V26.8467L81.3594 28.4121ZM144.686 10.8389C148.935 10.839 151.84 13.4478 152.297 17.2939L148.209 17.5088C147.994 15.4917 146.594 14.2275 144.577 14.2275C142.802 14.2277 141.538 15.1425 141.619 16.541C141.673 18.1547 143.556 18.6931 145.6 19.2041C149.876 20.1455 152.593 21.9743 152.593 25.0137C152.593 28.6446 149.392 30.6885 145.276 30.6885C140.624 30.6883 137.342 28.1065 137.073 24.0723L141.188 23.8838C141.538 25.9279 142.991 27.2725 145.385 27.2725C147.214 27.2724 148.451 26.546 148.424 25.1475C148.397 23.7491 147.213 22.942 144.228 22.2158C140.086 21.2206 137.423 19.5533 137.423 16.4873C137.423 13.0176 140.328 10.8389 144.686 10.8389ZM161.446 11.2686C167.632 11.2687 171.102 14.7123 171.102 20.8447C171.101 26.9501 167.686 30.3661 161.607 30.3662H154.856V11.2686H161.446ZM177.403 19.6074L184.343 11.2686H189.104L182.084 19.6875L189.534 30.3662H184.881L179.394 22.4316L177.403 24.7441V30.3662H173.13V11.2686H177.403V19.6074ZM158.944 26.9229H161.446C165.158 26.9227 166.933 24.9594 166.933 20.8174C166.933 16.6754 165.158 14.7121 161.446 14.7119H158.944V26.9229Z", fill: "currentColor" }) }));
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- export function LogoEve({ height = 14, className, }) {
2
+ export function LogoEve({ height = 16, className, }) {
3
3
  const width = (169 / 53) * height;
4
4
  return (_jsxs("svg", { "aria-hidden": "true", className: className, fill: "none", height: height, role: "img", viewBox: "0 0 169 53", width: width, xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M169 8.47h-51.39L81.73 53H70.36L113 0H169zM169 44.51v8.47h-45.87V44.5zM45.87 52.98H0V44.5h45.87zM38.66 30.55H0v-8.47h38.66z", fill: "currentColor" }), _jsx("path", { d: "M169 30.55h-38.66v-8.47H169zM75.52 8.47H0V0h75.52z", fill: "currentColor" })] }));
5
5
  }
@@ -1 +1 @@
1
- {"version":3,"file":"logo-flags-sdk.d.ts","sourceRoot":"","sources":["../../../src/assets/logos/logo-flags-sdk.tsx"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAAC,EAC3B,MAAW,EACX,SAAS,GACV,EAAE;IACD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,2CAgCA"}
1
+ {"version":3,"file":"logo-flags-sdk.d.ts","sourceRoot":"","sources":["../../../src/assets/logos/logo-flags-sdk.tsx"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAAC,EAC3B,MAAc,EACd,SAAS,GACV,EAAE;IACD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,2CA2BA"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- export function LogoFlagsSdk({ height = 22, className, }) {
3
- const width = (76 / 22) * height;
4
- return (_jsxs("svg", { "aria-hidden": "true", className: className, fill: "none", height: height, role: "img", viewBox: "0 0 76 22", width: width, xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M1.476 4.22H9.972V6.218H3.744V9.764H9.648V11.726H3.744V17H1.476V4.22ZM11.7114 4.22H13.9434V14.57C13.9434 15.02 14.1774 15.236 14.6094 15.236H15.3654V17H14.0514C12.6474 17 11.7114 16.118 11.7114 14.66V4.22ZM16.379 10.358C16.757 8.396 18.287 7.244 20.591 7.244C23.327 7.244 24.767 8.666 24.767 11.33V14.66C24.767 15.2 24.983 15.344 25.361 15.344H25.721V17L25.163 17.018C24.389 17.018 22.949 17 22.805 15.542C22.355 16.478 21.293 17.216 19.655 17.216C17.747 17.216 16.217 16.19 16.217 14.498C16.217 12.626 17.603 12.032 19.835 11.6L22.517 11.06C22.499 9.602 21.887 8.9 20.591 8.9C19.565 8.9 18.899 9.44 18.665 10.484L16.379 10.358ZM18.521 14.426C18.521 15.092 19.079 15.614 20.231 15.614C21.563 15.614 22.553 14.66 22.553 12.716V12.626L20.717 12.95C19.475 13.184 18.521 13.31 18.521 14.426ZM30.5774 16.532C27.9854 16.532 26.3294 14.642 26.3294 11.96C26.3294 9.188 28.0214 7.244 30.5774 7.244C31.8014 7.244 32.8094 7.892 33.2774 8.918V7.46H35.4554V15.938C35.4554 18.458 33.5834 19.916 30.9014 19.916C28.7414 19.916 27.1034 18.836 26.5994 17.18L28.8854 17.036C29.2094 17.756 29.9114 18.188 30.9194 18.188C32.3594 18.188 33.2054 17.54 33.2054 16.244V15.002C32.6654 16.01 31.6034 16.532 30.5774 16.532ZM28.6334 11.942C28.6334 13.634 29.5334 14.84 30.9734 14.84C32.3774 14.84 33.2594 13.634 33.2774 11.942C33.2954 10.25 32.4134 9.062 30.9734 9.062C29.5154 9.062 28.6334 10.25 28.6334 11.942ZM43.1598 10.502C42.9798 9.53 42.0798 8.954 41.1798 8.954C40.2618 8.954 39.5418 9.422 39.5598 10.196C39.5778 11.006 40.5858 11.33 41.5218 11.51C44.0598 11.942 45.5358 12.608 45.5358 14.462C45.5358 16.352 43.6818 17.216 41.5038 17.216C38.9298 17.216 37.1838 15.992 37.0218 13.976L39.3078 13.85C39.4878 14.858 40.2438 15.488 41.4678 15.488C42.2598 15.488 43.2318 15.2 43.2318 14.39C43.2138 13.454 42.1338 13.31 41.1438 13.094C38.8938 12.644 37.2558 12.05 37.2558 10.25C37.2558 8.378 38.8038 7.226 41.3058 7.226C43.5018 7.226 45.1038 8.45 45.4098 10.394L43.1598 10.502Z", fill: "currentColor" }), _jsx("rect", { height: "12.1517", rx: "6.07585", stroke: "currentColor", strokeWidth: "1.28793", width: "24.7957", x: "49.644", y: "4.92414" }), _jsx("path", { d: "M54.5852 12.141C54.732 12.9143 55.2606 13.4135 56.1611 13.4135C56.8463 13.4135 57.3063 13.1394 57.2966 12.6207C57.2966 12.0823 56.8365 11.7887 55.7207 11.5048C54.2622 11.1622 53.2932 10.5553 53.2932 9.42969C53.2932 8.1768 54.3307 7.39374 55.8773 7.39374C57.4336 7.39374 58.4809 8.3432 58.6375 9.73313L57.2183 9.80165C57.1204 9.05774 56.6114 8.59769 55.8479 8.59769C55.1921 8.59769 54.7223 8.93049 54.7418 9.44927C54.7614 10.0757 55.5053 10.2715 56.2492 10.4477C57.7566 10.7903 58.755 11.4559 58.755 12.5619C58.755 13.8833 57.5804 14.6175 56.1122 14.6175C54.4384 14.6175 53.2638 13.6876 53.1561 12.2193L54.5852 12.141ZM61.5555 7.55035C63.797 7.55035 65.0499 8.80325 65.0499 11.035C65.0499 13.2569 63.8264 14.5 61.6142 14.5H59.1868V7.55035H61.5555ZM60.6158 13.2863H61.5555C62.9357 13.2863 63.6013 12.5521 63.6013 11.035C63.6013 9.49821 62.9357 8.76409 61.5555 8.76409H60.6158V13.2863ZM65.3839 7.55035H66.813V10.6141L69.3873 7.55035H70.9926L68.4281 10.6141L71.159 14.5H69.5929L67.5373 11.5733L66.813 12.4249V14.5H65.3839V7.55035Z", fill: "currentColor" })] }));
2
+ export function LogoFlagsSdk({ height = 18.19, className, }) {
3
+ const width = (223 / 49) * height;
4
+ return (_jsxs("svg", { "aria-hidden": "true", className: className, fill: "none", height: height, role: "img", viewBox: "0 0 223 49", width: width, xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M86.6094 9.21582C90.9362 9.21589 94.1952 11.2955 95.6562 14.5547V9.89062H102.681V37.2568C102.681 44.9552 97.0609 49.001 88.5195 49.001C80.5965 49.0009 76.213 45.5734 74.8643 40.46L82.2822 39.9541C83.0128 42.2579 84.6424 43.5498 88.5195 43.5498C92.9588 43.5498 95.4316 41.6393 95.4316 37.4248V33.6045C94.0267 36.5263 90.5988 38.4365 86.7217 38.4365C79.248 38.4365 73.9659 32.5927 73.9658 23.8828C73.9658 15.2852 79.1918 9.21582 86.6094 9.21582ZM57.4297 9.21582C65.9711 9.21582 70.4102 13.7119 70.4102 21.6914V32.5928C70.4102 34.2222 70.9729 34.6719 72.0967 34.6719H73.0518V39.8975C72.546 40.0098 71.4216 40.1221 70.4102 40.1221C67.2073 40.122 64.791 38.9981 64.1729 35.3457V35.29C62.6556 38.4928 58.8348 40.5721 53.9463 40.5723C47.6528 40.5723 43.4944 37.5939 43.4941 32.3682C43.4941 27.1984 46.6969 24.4448 53.2715 23.1523L63.2178 21.1855C63.2178 16.971 61.2508 14.7793 57.4297 14.7793C53.9458 14.7793 51.979 16.409 51.3047 19.4434L44 19.1064C45.1801 12.8128 50.0122 9.21586 57.4297 9.21582ZM120.289 9.21582C128.943 9.21591 132.764 13.768 133.27 19.3311L125.964 19.668C125.795 16.8584 124.11 14.7228 120.177 14.7227C116.749 14.7227 115.007 16.2402 115.007 18.4316C115.007 20.848 116.412 21.8037 120.907 22.5342C130.179 23.939 133.213 26.5799 133.213 31.5811C133.213 37.369 128.212 40.5722 120.514 40.5723C111.354 40.5723 107.027 36.3573 106.577 30.457L113.938 30.1201C114.444 33.2668 116.243 35.0653 120.569 35.0654C123.885 35.0654 125.739 34.0535 125.739 31.6934C125.739 29.6705 124.728 28.7717 119.39 27.8164C110.286 26.243 107.589 23.7699 107.589 18.6562C107.589 13.0933 111.973 9.21582 120.289 9.21582ZM26.6924 6.35059H7.30566V17.252H25.6807V23.5449H7.30566V39.8975H0V0H26.6924V6.35059ZM37.542 32.0869C37.542 33.6601 38.3283 34.3348 39.7891 34.335H41.9814V39.8975H37.542C33.1589 39.8975 30.3487 37.8186 30.3486 32.8174V0H37.542V32.0869ZM55.4629 27.6475C52.26 28.2656 50.9678 29.6143 50.9678 31.6934C50.9678 34.0535 52.5414 35.3457 55.4072 35.3457C60.1835 35.3455 63.2178 32.3113 63.2178 27.7598V26.0742L55.4629 27.6475ZM88.4072 14.835C84.0243 14.835 81.4395 18.3194 81.4395 23.8262C81.4395 29.3331 84.1366 32.8173 88.4072 32.8174C92.6779 32.8174 95.4311 29.4455 95.4873 23.8262C95.5434 18.2631 92.7341 14.835 88.4072 14.835Z", fill: "currentColor" }), _jsx("path", { d: "M218.276 24.5005C218.276 15.1919 210.73 7.64601 201.421 7.64599H161.674C152.365 7.64602 144.819 15.1919 144.819 24.5005C144.819 33.8091 152.365 41.3555 161.674 41.3556H201.421C210.73 41.3555 218.276 33.8091 218.276 24.5005ZM222.301 24.5005C222.301 36.0321 212.953 45.3805 201.421 45.3805H161.674C150.142 45.3805 140.794 36.0321 140.794 24.5005C140.794 12.9689 150.142 3.62055 161.674 3.62051H201.421C212.953 3.62053 222.301 12.9689 222.301 24.5005Z", fill: "currentColor" }), _jsx("path", { d: "M158.201 27.9469C158.603 30.2714 160.253 31.8009 162.975 31.8009C165.053 31.8009 166.462 30.9758 166.432 29.3859C166.402 27.791 165.053 26.8703 161.657 26.0502C156.948 24.9181 153.919 23.0213 153.919 19.5346C153.919 15.5851 157.225 13.1097 162.18 13.1097C167.01 13.1097 170.316 16.0782 170.834 20.4554L166.185 20.6969C165.944 18.4026 164.349 16.9637 162.06 16.9637C160.037 16.9637 158.598 18.0051 158.689 19.595C158.754 21.4314 160.892 22.0402 163.217 22.6239C168.082 23.6955 171.171 25.7734 171.171 29.2299C171.171 33.3556 167.534 35.6851 162.855 35.6851C157.562 35.6851 153.828 32.7468 153.521 28.1583L158.201 27.9469ZM179.921 13.5977C186.959 13.5977 190.904 17.5121 190.904 24.4905C190.904 31.4336 187.02 35.3178 180.107 35.3178H172.429V13.5977H179.926H179.921ZM177.078 31.4034H179.921C184.147 31.4034 186.159 29.1696 186.159 24.4603C186.159 19.746 184.147 17.5171 179.921 17.5171H177.078V31.4034ZM191.825 13.5977H196.474V23.0817L204.368 13.5977H209.781L201.797 23.1723L210.274 35.3178H204.986L198.748 26.2917L196.484 28.923V35.3178H191.83V13.5977H191.825Z", fill: "currentColor" })] }));
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- export function LogoTurborepo({ height = 14, className, }) {
2
+ export function LogoTurborepo({ height = 21, className, }) {
3
3
  const width = (465.319 / 62.753) * height;
4
4
  return (_jsxs("svg", { "aria-hidden": "true", className: className, fill: "none", height: height, role: "img", viewBox: "7.125 7.125 465.319 62.753", width: width, xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M130.998 30.6566V22.3773H91.0977V30.6566H106.16V58.1876H115.935V30.6566H130.998Z", fill: "currentColor" }), _jsx("path", { d: "M153.542 58.7362C165.811 58.7362 172.544 52.5018 172.544 42.2276V22.3773H162.768V41.2799C162.768 47.0156 159.776 50.2574 153.542 50.2574C147.307 50.2574 144.315 47.0156 144.315 41.2799V22.3773H134.539V42.2276C134.539 52.5018 141.272 58.7362 153.542 58.7362Z", fill: "currentColor" }), _jsx("path", { d: "M187.508 46.3173H197.234L204.914 58.1876H216.136L207.458 45.2699C212.346 43.5243 215.338 39.6341 215.338 34.3473C215.338 26.6666 209.603 22.3773 200.874 22.3773H177.732V58.1876H187.508V46.3173ZM187.508 38.5867V30.5568H200.376C203.817 30.5568 205.712 32.0531 205.712 34.5967C205.712 36.9907 203.817 38.5867 200.376 38.5867H187.508Z", fill: "currentColor" }), _jsx("path", { d: "M219.887 58.1876H245.472C253.452 58.1876 258.041 54.3971 258.041 48.0629C258.041 43.8236 255.348 40.9308 252.156 39.6341C254.35 38.5867 257.043 36.0929 257.043 32.1528C257.043 25.8187 252.555 22.3773 244.625 22.3773H219.887V58.1876ZM229.263 36.3922V30.3074H243.627C246.32 30.3074 247.817 31.3548 247.817 33.3498C247.817 35.3448 246.32 36.3922 243.627 36.3922H229.263ZM229.263 43.7238H244.525C247.168 43.7238 248.615 45.0206 248.615 46.9657C248.615 48.9108 247.168 50.2076 244.525 50.2076H229.263V43.7238Z", fill: "currentColor" }), _jsx("path", { d: "M281.942 21.7788C269.423 21.7788 260.396 29.6092 260.396 40.2824C260.396 50.9557 269.423 58.7861 281.942 58.7861C294.461 58.7861 303.438 50.9557 303.438 40.2824C303.438 29.6092 294.461 21.7788 281.942 21.7788ZM281.942 30.2576C288.525 30.2576 293.463 34.1478 293.463 40.2824C293.463 46.4171 288.525 50.3073 281.942 50.3073C275.359 50.3073 270.421 46.4171 270.421 40.2824C270.421 34.1478 275.359 30.2576 281.942 30.2576Z", fill: "currentColor" }), _jsx("path", { d: "M317.526 46.3173H327.251L334.932 58.1876H346.154L337.476 45.2699C342.364 43.5243 345.356 39.6341 345.356 34.3473C345.356 26.6666 339.62 22.3773 330.892 22.3773H307.75V58.1876H317.526V46.3173ZM317.526 38.5867V30.5568H330.394C333.835 30.5568 335.73 32.0531 335.73 34.5967C335.73 36.9907 333.835 38.5867 330.394 38.5867H317.526Z", fill: "currentColor" }), _jsx("path", { d: "M349.904 22.3773V58.1876H384.717V49.9083H359.48V44.0729H381.874V35.9932H359.48V30.6566H384.717V22.3773H349.904Z", fill: "currentColor" }), _jsx("path", { d: "M399.204 46.7662H412.221C420.95 46.7662 426.685 42.5767 426.685 34.5967C426.685 26.5668 420.95 22.3773 412.221 22.3773H389.428V58.1876H399.204V46.7662ZM399.204 38.6366V30.5568H411.673C415.164 30.5568 417.059 32.0531 417.059 34.5967C417.059 37.0904 415.164 38.6366 411.673 38.6366H399.204Z", fill: "currentColor" }), _jsx("path", { d: "M450.948 21.7788C438.43 21.7788 429.402 29.6092 429.402 40.2824C429.402 50.9557 438.43 58.7861 450.948 58.7861C463.467 58.7861 472.444 50.9557 472.444 40.2824C472.444 29.6092 463.467 21.7788 450.948 21.7788ZM450.948 30.2576C457.532 30.2576 462.469 34.1478 462.469 40.2824C462.469 46.4171 457.532 50.3073 450.948 50.3073C444.365 50.3073 439.427 46.4171 439.427 40.2824C439.427 34.1478 444.365 30.2576 450.948 30.2576Z", fill: "currentColor" }), _jsx("path", { d: "M38.5017 18.0956C27.2499 18.0956 18.0957 27.2498 18.0957 38.5016C18.0957 49.7534 27.2499 58.9076 38.5017 58.9076C49.7535 58.9076 58.9077 49.7534 58.9077 38.5016C58.9077 27.2498 49.7535 18.0956 38.5017 18.0956ZM38.5017 49.0618C32.6687 49.0618 27.9415 44.3346 27.9415 38.5016C27.9415 32.6686 32.6687 27.9414 38.5017 27.9414C44.3347 27.9414 49.0619 32.6686 49.0619 38.5016C49.0619 44.3346 44.3347 49.0618 38.5017 49.0618Z", fill: "currentColor" }), _jsx("path", { clipRule: "evenodd", d: "M40.2115 14.744V7.125C56.7719 8.0104 69.9275 21.7208 69.9275 38.5016C69.9275 55.2824 56.7719 68.989 40.2115 69.8782V62.2592C52.5539 61.3776 62.3275 51.0644 62.3275 38.5016C62.3275 25.9388 52.5539 15.6256 40.2115 14.744ZM20.5048 54.0815C17.233 50.3043 15.124 45.4935 14.7478 40.2115H7.125C7.5202 47.6025 10.4766 54.3095 15.1088 59.4737L20.501 54.0815H20.5048ZM36.7916 69.8782V62.2592C31.5058 61.883 26.695 59.7778 22.9178 56.5022L17.5256 61.8944C22.6936 66.5304 29.4006 69.483 36.7878 69.8782H36.7916Z", fill: "currentColor", fillRule: "evenodd" })] }));
5
5
  }
@@ -1 +1 @@
1
- {"version":3,"file":"logo-workflow-sdk.d.ts","sourceRoot":"","sources":["../../../src/assets/logos/logo-workflow-sdk.tsx"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,CAAC,EAC9B,MAAW,EACX,SAAS,GACV,EAAE;IACD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,2CA+DA"}
1
+ {"version":3,"file":"logo-workflow-sdk.d.ts","sourceRoot":"","sources":["../../../src/assets/logos/logo-workflow-sdk.tsx"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,CAAC,EAC9B,MAAa,EACb,SAAS,GACV,EAAE;IACD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,2CA+DA"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- export function LogoWorkflowSdk({ height = 22, className, }) {
3
- const width = (437.736 / 58) * height;
4
- return (_jsxs("svg", { "aria-hidden": "true", className: className, fill: "none", height: height, role: "img", viewBox: "0 0 437.736 58", width: width, xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { clipRule: "evenodd", d: "M182.808 13.1499C195.226 13.1502 203.399 21.82 203.399 35.1393C203.399 48.4579 195.225 57.1285 182.808 57.1289C170.313 57.1289 162.142 48.4582 162.141 35.1393C162.141 21.8197 170.313 13.1499 182.808 13.1499ZM182.808 21.3468C176.286 21.3468 172.59 26.4698 172.59 35.1393C172.59 43.8869 176.286 48.9319 182.808 48.9319C189.252 48.9314 192.946 43.8865 192.947 35.1393C192.947 26.4702 189.253 21.3473 182.808 21.3468Z", fill: "currentColor", fillRule: "evenodd" }), _jsx("path", { clipRule: "evenodd", d: "M352.976 13.1499C365.393 13.1502 373.567 21.82 373.567 35.1393C373.566 48.4579 365.393 57.1286 352.976 57.1289C340.481 57.1289 332.309 48.4582 332.309 35.1393C332.309 21.8197 340.48 13.1499 352.976 13.1499ZM352.976 21.3468C346.453 21.3468 342.757 26.4698 342.757 35.1393C342.757 43.8869 346.454 48.9319 352.976 48.9319C359.42 48.9315 363.114 43.8865 363.114 35.1393C363.114 26.4701 359.42 21.3473 352.976 21.3468Z", fill: "currentColor", fillRule: "evenodd" }), _jsx("path", { d: "M14.4399 39.7095C15.5788 39.7095 16.5037 40.6379 16.5044 41.78V54.1909C16.5044 55.3334 15.5792 56.2612 14.4399 56.2612H2.06448C0.925195 56.2612 0 55.3334 0 54.1909V41.78C0.000584084 40.6379 0.925555 39.7095 2.06448 39.7095H14.4399Z", fill: "currentColor" }), _jsx("path", { d: "M28.1958 20.3999C29.3343 20.3999 30.2592 21.3248 30.2603 22.4666V36.3475C30.3072 38.2044 31.8186 39.6973 33.6793 39.7071H41.9487C43.0877 39.7071 44.0126 40.6356 44.0133 41.7776V54.1885C44.0133 55.331 43.088 56.2589 41.9487 56.2589H29.5733C28.4338 56.2589 27.5089 55.331 27.5089 54.1885V40.3075C27.4614 38.4749 25.9864 36.9984 24.1589 36.9517L24.0706 36.9478H15.8203C14.6813 36.9478 13.7563 36.0235 13.7559 34.8813V22.4666C13.757 21.3248 14.6817 20.3999 15.8203 20.3999H28.1958Z", fill: "currentColor" }), _jsx("path", { d: "M41.9437 1.08936C43.0827 1.08936 44.0076 2.01766 44.0083 3.15977V17.0408C44.0558 18.9035 45.5776 20.4004 47.4465 20.4004H55.6967C56.8354 20.4004 57.7601 21.3253 57.7612 22.467V36.348C57.8082 38.205 59.3196 39.6977 61.1803 39.7076H69.4497C70.5886 39.7076 71.5136 40.636 71.5142 41.7781V54.189C71.5142 55.3315 70.589 56.2594 69.4497 56.2594H57.0744C55.9349 56.2594 55.0099 55.3315 55.0099 54.189V40.3079C54.9624 38.4754 53.4875 36.9989 51.6599 36.9521L51.5716 36.9483H43.3214C42.1822 36.9483 41.2573 36.0239 41.2569 34.8818V21.0007C41.2107 19.1671 39.7353 17.6876 37.9069 17.6411H29.5684C28.4288 17.6411 27.5039 16.7133 27.5039 15.5707V3.15977C27.5045 2.01766 28.4293 1.08936 29.5684 1.08936H41.9437Z", fill: "currentColor" }), _jsx("path", { d: "M108.215 41.9952L118.511 0.225098H128.02L138.315 41.9952L148.453 0.225098H159.297L144.367 56.1841H133.05L123.303 17.8814L113.56 56.1841H102.163L87.2324 0.225098H98L108.215 41.9952Z", fill: "currentColor" }), _jsx("path", { d: "M218.461 22.2913C220.111 16.6175 223.337 14.0942 228.523 14.0942H232.371V22.7646H228.443C221.998 22.7648 218.856 25.4458 218.856 31.9083V56.1837H208.795V14.0942H218.227L218.461 22.2913Z", fill: "currentColor" }), _jsx("path", { d: "M247.859 33.0901L265.073 14.0946H277.486L261.063 31.593L278.039 56.1841H266.723L254.462 37.585L247.859 44.5966V56.1841H237.801V0.225098H247.859V33.0901Z", fill: "currentColor" }), _jsx("path", { d: "M309.551 8.02957H303.262C299.962 8.03016 298.55 9.76311 298.55 12.994V14.0946H308.999V21.8991H298.55V56.1841H288.488V21.8991H282.518V14.0946H288.488V12.4398C288.489 4.87451 292.498 0.225098 301.379 0.225098H309.551V8.02957Z", fill: "currentColor" }), _jsx("path", { d: "M324.617 45.2278C324.617 47.4343 325.716 48.3792 327.76 48.3796H330.826V56.1841H324.617C318.487 56.184 314.559 53.2659 314.559 46.2515V0.225098H324.617V45.2278Z", fill: "currentColor" }), _jsx("path", { d: "M393.575 44.7541L401.982 14.0942H410.785L419.27 44.7541L427.443 14.0942H437.739L425.087 56.1837H414.715L406.384 27.9676L398.13 56.1837H387.757L375.105 14.0942H385.401L393.575 44.7541Z", fill: "currentColor" })] }));
2
+ export function LogoWorkflowSdk({ height = 15.8, className, }) {
3
+ const width = (302 / 40) * height;
4
+ return (_jsxs("svg", { "aria-hidden": "true", className: className, fill: "none", height: height, role: "img", viewBox: "0 0 302 40", width: width, xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { clipRule: "evenodd", d: "M126.075 8.91371C134.639 8.91394 140.276 14.8931 140.276 24.0788C140.276 33.264 134.638 39.2437 126.075 39.2441C117.458 39.2441 111.823 33.2643 111.822 24.0788C111.822 14.8929 117.458 8.91371 126.075 8.91371ZM126.075 14.5668C121.577 14.5668 119.029 18.0998 119.029 24.0788C119.029 30.1117 121.577 33.5909 126.075 33.5909C130.519 33.5906 133.067 30.1114 133.068 24.0788C133.068 18.1001 130.52 14.5671 126.075 14.5668Z", fill: "currentColor", fillRule: "evenodd" }), _jsx("path", { clipRule: "evenodd", d: "M243.432 8.91371C251.995 8.91394 257.633 14.8931 257.633 24.0788C257.632 33.264 251.995 39.2438 243.432 39.2441C234.815 39.2441 229.179 33.2643 229.179 24.0788C229.179 14.8929 234.814 8.91371 243.432 8.91371ZM243.432 14.5668C238.933 14.5668 236.385 18.0998 236.385 24.0788C236.385 30.1117 238.934 33.5909 243.432 33.5909C247.876 33.5907 250.424 30.1114 250.424 24.0788C250.424 18.1 247.876 14.5671 243.432 14.5668Z", fill: "currentColor", fillRule: "evenodd" }), _jsx("path", { d: "M9.95857 27.2308C10.744 27.2308 11.3819 27.8711 11.3823 28.6587V37.2179C11.3823 38.0059 10.7443 38.6458 9.95857 38.6458H1.42378C0.638066 38.6458 0 38.0059 0 37.2179V28.6587C0.000402817 27.8711 0.638314 27.2308 1.42378 27.2308H9.95857Z", fill: "currentColor" }), _jsx("path", { d: "M19.4449 13.9137C20.2301 13.9137 20.8679 14.5516 20.8687 15.339V24.9121C20.901 26.1927 21.9434 27.2222 23.2266 27.229H28.9296C29.7152 27.229 30.353 27.8693 30.3535 28.657V37.2162C30.3535 38.0041 29.7154 38.6441 28.9296 38.6441H20.3949C19.609 38.6441 18.9712 38.0041 18.9712 37.2162V27.6431C18.9384 26.3792 17.9212 25.361 16.6608 25.3287L16.5999 25.3261H10.9101C10.1246 25.3261 9.48663 24.6886 9.48633 23.9009V15.339C9.48708 14.5516 10.1248 13.9137 10.9101 13.9137H19.4449Z", fill: "currentColor" }), _jsx("path", { d: "M28.9268 0.596283C29.7123 0.596286 30.3501 1.23649 30.3506 2.02416V11.5972C30.3834 12.8819 31.4329 13.9142 32.7218 13.9142H38.4116C39.1969 13.9142 39.8346 14.5521 39.8354 15.3395V24.9126C39.8678 26.1932 40.9101 27.2228 42.1934 27.2295H47.8964C48.6818 27.2295 49.3198 27.8698 49.3202 28.6575V37.2167C49.3202 38.0046 48.6821 38.6446 47.8964 38.6446H39.3617C38.5758 38.6446 37.9379 38.0046 37.9379 37.2167V27.6436C37.9052 26.3797 36.888 25.3615 35.6276 25.3292L35.5667 25.3266H29.8769C29.0912 25.3266 28.4534 24.6891 28.4531 23.9014V14.3283C28.4212 13.0637 27.4037 12.0434 26.1428 12.0113H20.392C19.6061 12.0113 18.9683 11.3714 18.9683 10.5834V2.02416C18.9686 1.23649 19.6064 0.596286 20.392 0.596283H28.9268Z", fill: "currentColor" }), _jsx("path", { d: "M74.6314 28.807L81.732 0H88.2898L95.3902 28.807L102.382 0H109.86L99.5637 38.5924H91.7592L85.0369 12.1768L78.3177 38.5924H70.4579L60.1606 0H67.5865L74.6314 28.807Z", fill: "currentColor" }), _jsx("path", { d: "M150.663 15.2183C151.801 11.3053 154.025 9.56519 157.602 9.56519H160.256V15.5447H157.547C153.102 15.5449 150.935 17.3939 150.935 21.8508V38.5924H143.997V9.56519H150.501L150.663 15.2183Z", fill: "currentColor" }), _jsx("path", { d: "M170.938 22.6655L182.809 9.56514H191.37L180.044 21.6331L191.751 38.5924H183.947L175.492 25.7654L170.938 30.6011V38.5924H164.001V0H170.938V22.6655Z", fill: "currentColor" }), _jsx("path", { d: "M213.483 5.38239H209.146C206.87 5.3828 205.896 6.57794 205.896 8.80612V9.56514H213.103V14.9476H205.896V38.5924H198.957V14.9476H194.839V9.56514H198.957V8.42393C198.958 3.20649 201.722 0 207.847 0H213.483V5.38239Z", fill: "currentColor" }), _jsx("path", { d: "M223.874 31.0363C223.874 32.558 224.633 33.2097 226.042 33.21H228.156V38.5924H223.874C219.647 38.5923 216.938 36.5799 216.938 31.7423V0H223.874V31.0363Z", fill: "currentColor" }), _jsx("path", { d: "M271.431 30.7099L277.229 9.56519H283.3L289.151 30.7099L294.788 9.56519H301.889L293.164 38.5924H286.01L280.265 19.133L274.573 38.5924H267.419L258.693 9.56519H265.794L271.431 30.7099Z", fill: "currentColor" })] }));
5
5
  }
package/dist/cli/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  import{program as T}from"commander";import{access as ce,copyFile as le}from"fs/promises";import{join as pe}from"path";import{cancel as de,intro as ge,isCancel as ue,log as fe,outro as me,spinner as he,text as we}from"@clack/prompts";import{spawn as te}from"child_process";import{readFileSync as se}from"fs";import{cp as ne,readFile as ae,rename as re,writeFile as ie}from"fs/promises";import{join as $}from"path";import{fileURLToPath as oe}from"url";var g="@vercel/geistdocs",m=(e,t=[],s={})=>new Promise((n,a)=>{let r=te(e,t,{stdio:"inherit",...s});r.on("error",a),r.on("close",i=>{if(i===0){n();return}a(new Error(`Command failed with exit code ${i}: ${[e,...t].join(" ")}`))})}),A=["dependencies","devDependencies","optionalDependencies","peerDependencies"],_=()=>JSON.parse(se(new URL("../../package.json",import.meta.url),"utf8")).version,P=async e=>{let t=$(e,"package.json"),s=await ae(t,"utf8");return JSON.parse(s)},x=async(e,t)=>{let s=$(e,"package.json");await ie(s,`${JSON.stringify(t,null,2)}
3
- `,"utf8")},R=(e,t)=>{for(let s of A){let n=e[s];if(n&&t in n)return n[t]}},V=(e,t)=>!!R(e,t),b=(e,t,s)=>{let n=!1;for(let a of A){let r=e[a];r&&t in r&&(r[t]=s,n=!0)}return n},j=()=>oe(new URL("../../template",import.meta.url)),F=async e=>{await ne(j(),e,{recursive:!0});let t=$(e,".gitignore"),s=$(e,"_gitignore");try{await re(s,t)}catch{}};var ye=async e=>{await F(e)},Pe=async e=>{try{return await ce(e),!0}catch{return!1}},ve=async()=>{await Pe(".env.example")&&await le(".env.example",".env.local")},Te=async e=>{let t=await P(e),s=_();return b(t,g,s)?(await x(e,t),!0):!1},ke=async e=>{await m("pnpm",["install"],{cwd:e,env:process.env,stdio:"inherit"})},$e=async e=>{await m("git",["init"],{cwd:e,env:process.env,stdio:"inherit"}),await m("git",["add","."],{cwd:e,env:process.env,stdio:"inherit"}),await m("git",["commit","-m","\u2728 Initial commit"],{cwd:e,env:process.env,stdio:"inherit"})},xe=async()=>{let e=await we({message:"What is your project named?",placeholder:"my-app",validate(t){if(t.length===0)return"Please enter a project name."}});return ue(e)&&(de("Operation cancelled."),process.exit(0)),e.toString()},G=async e=>{try{ge("Let's start a Geistdocs project!");let t=process.cwd(),s=e.name||await xe(),n=he(),a=pe(t,s);n.start("Copying bundled template..."),await ye(s),n.message("Setting up environment variables..."),process.chdir(a),await ve(),n.message("Rewriting package dependency versions..."),await Te(a),n.message("Installing dependencies..."),await ke(a),e.disableGit||(n.message("Initializing Git repository..."),await $e(a)),n.stop("Project initialized successfully!"),me("Run `pnpm dev` to start the development server.")}catch(t){let s=t instanceof Error?t.message:`Failed to initialize project: ${t}`;fe.error(s),process.exit(1)}};import{readFileSync as be,writeFileSync as Fe}from"fs";import{mkdir as De,readFile as N,writeFile as Se}from"fs/promises";import{dirname as Ce,extname as Re,relative as M,resolve as S}from"path";import{intro as je,isCancel as Ee,log as h,multiselect as Ne,outro as D,spinner as Ue}from"@clack/prompts";import{glob as Oe}from"glob";import{Node as v,Project as Ie,SyntaxKind as Je}from"ts-morph";var Le="geistdocs.tsx",Ae="content/docs/**/*.mdx",U=".translation-cache.json",E=8,B=()=>({version:1,entries:{}}),_e=async e=>{let t=await N(e),{createHash:s}=await import("crypto");return s("sha256").update(t).digest("hex")},Ve=e=>{let t=S(process.cwd(),e);return be(t,"utf8")},z=e=>v.isObjectLiteralExpression(e)?e.getProperties().flatMap(t=>{if(v.isPropertyAssignment(t)){let s=t.getNameNode();if(v.isIdentifier(s)||v.isStringLiteral(s))return[s.getText().replaceAll(/['"]/g,"")]}return[]}).filter(Boolean):[],Ge=e=>{try{let t=new Ie({compilerOptions:{allowJs:!0,jsx:4,module:99,target:10},skipAddingFilesFromTsConfig:!0,useInMemoryFileSystem:!0}),s=Ve(e),r=t.createSourceFile(e,s,{overwrite:!0}).getVariableDeclarations().find(l=>l.getName()==="translations")?.getInitializer();if(!r)return[];if(v.isObjectLiteralExpression(r))return z(r);let i=r.getFirstDescendantByKind(Je.ObjectLiteralExpression);return i?z(i):[]}catch(t){let s=t instanceof Error?t.message:`${t}`;return h.warn(`Failed to read locales from ${e}: ${s}`),[]}},Be=async()=>{let e=await Ne({message:"Which locales should be translated?",options:[{value:"cn",label:"Chinese (cn)"},{value:"jp",label:"Japanese (jp)"},{value:"es",label:"Spanish (es)"},{value:"fr",label:"French (fr)"},{value:"de",label:"German (de)"}],required:!0});return Ee(e)&&(D("Translation cancelled"),process.exit(0)),e},ze=async e=>(await Oe(e,{cwd:process.cwd(),absolute:!0,nodir:!0})).sort(),He=async()=>{let e=S(process.cwd(),U);try{let t=await N(e,"utf8"),s=JSON.parse(t);return s.version!==1||!s.entries?B():{version:1,entries:s.entries}}catch{return B()}},H=e=>{let t=S(process.cwd(),U),s=JSON.stringify(e,null,2);Fe(t,s,"utf8")},Me=async e=>{let t=await Promise.all(e.map(async s=>[s,await _e(s)]));return Object.fromEntries(t)},Ke=(e,t)=>{let s=Re(e);return`${e.slice(0,-s.length)}.${t}${s}`},K=(e,t)=>`${M(process.cwd(),e)}::${t}`,qe=(e,t,s,n,a=!1)=>{let r=[],i=0;for(let l of t){let c=s[l];for(let o of e){let d=Ke(l,o),u=K(l,o),f=n.entries[u];if(!a&&f?.hash===c){i+=1;continue}r.push({locale:o,sourceFile:l,sourceHash:c,targetFile:d})}}return{tasks:r,skippedCount:i}},Xe=async e=>{await De(Ce(e),{recursive:!0})},We=async(e,t,s)=>{let n=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t,locale:s})});if(!n.ok){let r=await n.text();throw new Error(`API request failed (${n.status}): ${r}`)}let a=await n.json();if(!a.translation)throw new Error("API response did not include a translation");return a.translation},Ye=async(e,t,s)=>{let n=await N(e.sourceFile,"utf8"),a=await We(t,n,e.locale);await Xe(e.targetFile),await Se(e.targetFile,a,"utf8"),s.entries[K(e.sourceFile,e.locale)]={hash:e.sourceHash,updatedAt:new Date().toISOString()}},q=async(e,t)=>{je("Translate MDX content");let s=e??Ae,n=t.url||process.env.GEISTDOCS_TRANSLATE_URL||"https://geistdocs.com/translate",a=Ge(t.config??Le),r=await ze(s);r.length===0&&(h.error(`No MDX files found matching pattern: ${s}`),D("Translation cancelled"),process.exit(1)),h.info(`Found ${r.length} MDX file(s) matching pattern`),a.length===0&&(a=await Be());let i=S(process.cwd(),U),l=await He();await H(l),h.info(`Using cache: ${i}`);let c=await Me(r),{tasks:o,skippedCount:d}=qe(a,r,c,l,t.force);if(o.length===0){h.success("All translations are up to date!"),D(`Skipped ${d} file(s) (unchanged)`);return}let u=[];for(let y=0;y<o.length;y+=E)u.push(o.slice(y,y+E));h.info(`Processing ${o.length} translation(s) in ${u.length} batch(es) of up to ${E}`),d>0&&h.info(`Skipped ${d} translation(s) (unchanged)`);let f=Ue();f.start("Translating content...");let k=0;for(let y of u)await Promise.all(y.map(async L=>{await Ye(L,n,l),k+=1,f.message(`Translated ${k}/${o.length}: ${M(process.cwd(),L.targetFile)}`)})),await H(l);f.stop("Translation complete!"),D(`Created/updated ${o.length} file(s)`)};import{access as Ze,copyFile as Qe,mkdir as Z,rm as J}from"fs/promises";import{dirname as et,join as w}from"path";import{intro as tt,log as p,outro as C,spinner as Q}from"@clack/prompts";import{glob as st}from"glob";var nt=["**/*"],at=["content/docs/**"],O=".geistdocs-tmp",rt=async(e,t)=>{let s=w(e,t);await J(s,{recursive:!0,force:!0}),await Z(s,{recursive:!0})},I=async e=>await J(e,{recursive:!0,force:!0}),X=async(e,t,s)=>(await st(e,{cwd:s,nodir:!0,dot:!0,ignore:[".git/**",...t]})).sort(),it=async e=>{try{return await Ze(e),!0}catch{return!1}},ot=async(e,t,s)=>{let n=w(t,e),a=w(s,e);return await it(n)?(await Qe(n,a),{success:!0}):{success:!1,error:`Source file not found: ${n}`}},ct=async(e,t)=>{let s=w(t,e);return await J(s,{force:!0}),{success:!0}},W=20,Y=async(e,t,s)=>{let n=[];for(let a=0;a<e.length;a+=s){let r=e.slice(a,a+s),i=await Promise.all(r.map(t));n.push(...i)}return n},lt=async(e,t,s,n,a)=>{let r={success:[],deleted:[],failed:[]},i=[...new Set(e.map(c=>et(w(n,c))))];a.message(`Creating ${i.length} directories...`),await Promise.all(i.map(c=>Z(c,{recursive:!0}))),a.message(`Updating ${e.length} files...`);let l=await Y(e,async c=>{let o=await ot(c,s,n);return{file:c,...o}},W);for(let{file:c,success:o,error:d}of l)o?r.success.push(c):r.failed.push({file:c,error:d??"Unknown error"});if(t.length>0){a.message(`Deleting ${t.length} files...`);let c=await Y(t,async o=>{try{return await ct(o,n),{file:o,success:!0}}catch(d){let u=d instanceof Error?d.message:`${d}`;return{file:o,success:!1,error:u}}},W);for(let o of c)o.success?r.deleted.push(o.file):r.failed.push({file:o.file,error:o.error})}return r},pt=e=>{if(e.success.length>0){p.success(`Successfully updated ${e.success.length} files:`);for(let t of e.success)p.info(` \u2713 ${t}`)}if(e.deleted.length>0){p.success(`Deleted ${e.deleted.length} files:`);for(let t of e.deleted)p.info(` \u{1F5D1} ${t}`)}if(e.failed.length>0){p.warn(`Failed to update ${e.failed.length} files:`);for(let{file:t,error:s}of e.failed)p.error(` \u2717 ${t}: ${s}`)}},dt=e=>e.includes("canary")?"canary":"latest",gt=async e=>{let t=await fetch(`https://registry.npmjs.org/${encodeURIComponent(g)}`);if(!t.ok)throw new Error(`Failed to resolve ${g}@${e}`);let n=(await t.json())["dist-tags"]?.[e];if(!n)throw new Error(`Could not find dist-tag ${e} for ${g}`);return n},ut=async e=>{let t=await P(e),s=R(t,g);if(!s)return{currentVersion:s,nextVersion:void 0,updated:!1};let n=dt(s),a=await gt(n);return s===a?{currentVersion:s,nextVersion:a,updateTag:n,updated:!1}:(b(t,g,a),await x(e,t),{currentVersion:s,nextVersion:a,updateTag:n,updated:!0})},ft=async(e,t,s)=>{let n=await P(e);if(!V(n,g))return!1;t&&t.length>0&&p.warn("Ignoring file patterns for a package-based site. This update will bump the package version instead."),s?.sync&&p.warn("Ignoring --sync for a package-based site. Runtime updates now come from the package version.");let{currentVersion:a,nextVersion:r,updateTag:i,updated:l}=await ut(e);if(!l)return p.success(a?`@vercel/geistdocs is already at ${r} (${i}).`:"No package version update was needed."),C("Package-based site is already up to date."),!0;p.info(`Bumping ${g} from ${a} to ${r} (${i})`);let c=Q();return c.start("Installing updated package version..."),await m("pnpm",["install"],{cwd:e}),c.stop("Package update complete!"),C("Please review and test the upgraded package version."),!0},mt=async(e,t,s,n,a)=>{let r=w(e,O),i=Q(),l=a?.sync?r:t;i.start("Preparing template snapshot..."),a?.sync&&(await rt(e,O),await F(r)),i.message("Scanning for files...");let c=await X(s,n,l),o=[];if(a?.sync){i.message("Comparing with local files...");let u=await X(s,n,e),f=new Set(c);o=u.filter(k=>!f.has(k))}if(i.stop(`Found ${c.length} files to update`),c.length===0&&o.length===0){p.warn("No files matched the patterns. Nothing to update."),a?.sync&&await I(r),C("Update cancelled.");return}p.info(`Patterns: ${s.length}`),p.info(`Files to update: ${c.length}`),a?.sync&&p.info(`Files to delete: ${o.length}`),i.start("Updating files...");let d=await lt(c,o,l,e,i);a?.sync&&(i.message("Cleaning up..."),await I(r)),i.stop("Update complete!"),pt(d),C("Please review and test the changes carefully.")},ee=async(e,t)=>{let s=process.cwd(),n=j(),a=e&&e.length>0?e:nt,r=e&&e.length>0?[]:at;try{if(tt("Let's update your Geistdocs project!"),await ft(s,e,t))return;p.info("Template source: bundled package snapshot"),e&&e.length>0&&p.info(`Updating specific files: ${e.join(", ")}`),t?.sync&&p.info("Sync mode enabled: will delete files removed from template"),await mt(s,n,a,r,t)}catch(i){let l=i instanceof Error?i.message:`${i}`;try{await I(w(s,O))}catch{}p.error(`Failed to update project: ${l}`),process.exit(1)}};T.name("geistdocs").description("CLI for Geistdocs projects").version("1.17.0","-v, --version","Output the current version");T.command("init").description("Initialize a new Geistdocs project").option("--name <name>","Name of the project").option("--disable-git","Disable git initialization").action(G);T.command("update [files...]").description("Update a Geistdocs project (optionally specify files/patterns to update)").option("--sync","Delete local files that no longer exist in the template").action(ee);T.command("translate [pattern]").description("Translate MDX file(s) to one or more locales (default: content/docs/**/*.mdx)").option("--config <path>","Path to config file to load locales from (defaults to geistdocs.tsx)").option("--url <url>","Custom translation API URL (defaults to GEISTDOCS_TRANSLATE_URL or https://geistdocs.com/translate)").option("--force","Force re-translation of all files, ignoring cache").action(q);T.parse(process.argv);
3
+ `,"utf8")},R=(e,t)=>{for(let s of A){let n=e[s];if(n&&t in n)return n[t]}},V=(e,t)=>!!R(e,t),b=(e,t,s)=>{let n=!1;for(let a of A){let r=e[a];r&&t in r&&(r[t]=s,n=!0)}return n},j=()=>oe(new URL("../../template",import.meta.url)),F=async e=>{await ne(j(),e,{recursive:!0});let t=$(e,".gitignore"),s=$(e,"_gitignore");try{await re(s,t)}catch{}};var ye=async e=>{await F(e)},Pe=async e=>{try{return await ce(e),!0}catch{return!1}},ve=async()=>{await Pe(".env.example")&&await le(".env.example",".env.local")},Te=async e=>{let t=await P(e),s=_();return b(t,g,s)?(await x(e,t),!0):!1},ke=async e=>{await m("pnpm",["install"],{cwd:e,env:process.env,stdio:"inherit"})},$e=async e=>{await m("git",["init"],{cwd:e,env:process.env,stdio:"inherit"}),await m("git",["add","."],{cwd:e,env:process.env,stdio:"inherit"}),await m("git",["commit","-m","\u2728 Initial commit"],{cwd:e,env:process.env,stdio:"inherit"})},xe=async()=>{let e=await we({message:"What is your project named?",placeholder:"my-app",validate(t){if(t.length===0)return"Please enter a project name."}});return ue(e)&&(de("Operation cancelled."),process.exit(0)),e.toString()},G=async e=>{try{ge("Let's start a Geistdocs project!");let t=process.cwd(),s=e.name||await xe(),n=he(),a=pe(t,s);n.start("Copying bundled template..."),await ye(s),n.message("Setting up environment variables..."),process.chdir(a),await ve(),n.message("Rewriting package dependency versions..."),await Te(a),n.message("Installing dependencies..."),await ke(a),e.disableGit||(n.message("Initializing Git repository..."),await $e(a)),n.stop("Project initialized successfully!"),me("Run `pnpm dev` to start the development server.")}catch(t){let s=t instanceof Error?t.message:`Failed to initialize project: ${t}`;fe.error(s),process.exit(1)}};import{readFileSync as be,writeFileSync as Fe}from"fs";import{mkdir as De,readFile as N,writeFile as Se}from"fs/promises";import{dirname as Ce,extname as Re,relative as M,resolve as S}from"path";import{intro as je,isCancel as Ee,log as h,multiselect as Ne,outro as D,spinner as Ue}from"@clack/prompts";import{glob as Oe}from"glob";import{Node as v,Project as Ie,SyntaxKind as Je}from"ts-morph";var Le="geistdocs.tsx",Ae="content/docs/**/*.mdx",U=".translation-cache.json",E=8,B=()=>({version:1,entries:{}}),_e=async e=>{let t=await N(e),{createHash:s}=await import("crypto");return s("sha256").update(t).digest("hex")},Ve=e=>{let t=S(process.cwd(),e);return be(t,"utf8")},z=e=>v.isObjectLiteralExpression(e)?e.getProperties().flatMap(t=>{if(v.isPropertyAssignment(t)){let s=t.getNameNode();if(v.isIdentifier(s)||v.isStringLiteral(s))return[s.getText().replaceAll(/['"]/g,"")]}return[]}).filter(Boolean):[],Ge=e=>{try{let t=new Ie({compilerOptions:{allowJs:!0,jsx:4,module:99,target:10},skipAddingFilesFromTsConfig:!0,useInMemoryFileSystem:!0}),s=Ve(e),r=t.createSourceFile(e,s,{overwrite:!0}).getVariableDeclarations().find(l=>l.getName()==="translations")?.getInitializer();if(!r)return[];if(v.isObjectLiteralExpression(r))return z(r);let i=r.getFirstDescendantByKind(Je.ObjectLiteralExpression);return i?z(i):[]}catch(t){let s=t instanceof Error?t.message:`${t}`;return h.warn(`Failed to read locales from ${e}: ${s}`),[]}},Be=async()=>{let e=await Ne({message:"Which locales should be translated?",options:[{value:"cn",label:"Chinese (cn)"},{value:"jp",label:"Japanese (jp)"},{value:"es",label:"Spanish (es)"},{value:"fr",label:"French (fr)"},{value:"de",label:"German (de)"}],required:!0});return Ee(e)&&(D("Translation cancelled"),process.exit(0)),e},ze=async e=>(await Oe(e,{cwd:process.cwd(),absolute:!0,nodir:!0})).sort(),He=async()=>{let e=S(process.cwd(),U);try{let t=await N(e,"utf8"),s=JSON.parse(t);return s.version!==1||!s.entries?B():{version:1,entries:s.entries}}catch{return B()}},H=e=>{let t=S(process.cwd(),U),s=JSON.stringify(e,null,2);Fe(t,s,"utf8")},Me=async e=>{let t=await Promise.all(e.map(async s=>[s,await _e(s)]));return Object.fromEntries(t)},Ke=(e,t)=>{let s=Re(e);return`${e.slice(0,-s.length)}.${t}${s}`},K=(e,t)=>`${M(process.cwd(),e)}::${t}`,qe=(e,t,s,n,a=!1)=>{let r=[],i=0;for(let l of t){let c=s[l];for(let o of e){let d=Ke(l,o),u=K(l,o),f=n.entries[u];if(!a&&f?.hash===c){i+=1;continue}r.push({locale:o,sourceFile:l,sourceHash:c,targetFile:d})}}return{tasks:r,skippedCount:i}},Xe=async e=>{await De(Ce(e),{recursive:!0})},We=async(e,t,s)=>{let n=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t,locale:s})});if(!n.ok){let r=await n.text();throw new Error(`API request failed (${n.status}): ${r}`)}let a=await n.json();if(!a.translation)throw new Error("API response did not include a translation");return a.translation},Ye=async(e,t,s)=>{let n=await N(e.sourceFile,"utf8"),a=await We(t,n,e.locale);await Xe(e.targetFile),await Se(e.targetFile,a,"utf8"),s.entries[K(e.sourceFile,e.locale)]={hash:e.sourceHash,updatedAt:new Date().toISOString()}},q=async(e,t)=>{je("Translate MDX content");let s=e??Ae,n=t.url||process.env.GEISTDOCS_TRANSLATE_URL||"https://geistdocs.com/translate",a=Ge(t.config??Le),r=await ze(s);r.length===0&&(h.error(`No MDX files found matching pattern: ${s}`),D("Translation cancelled"),process.exit(1)),h.info(`Found ${r.length} MDX file(s) matching pattern`),a.length===0&&(a=await Be());let i=S(process.cwd(),U),l=await He();await H(l),h.info(`Using cache: ${i}`);let c=await Me(r),{tasks:o,skippedCount:d}=qe(a,r,c,l,t.force);if(o.length===0){h.success("All translations are up to date!"),D(`Skipped ${d} file(s) (unchanged)`);return}let u=[];for(let y=0;y<o.length;y+=E)u.push(o.slice(y,y+E));h.info(`Processing ${o.length} translation(s) in ${u.length} batch(es) of up to ${E}`),d>0&&h.info(`Skipped ${d} translation(s) (unchanged)`);let f=Ue();f.start("Translating content...");let k=0;for(let y of u)await Promise.all(y.map(async L=>{await Ye(L,n,l),k+=1,f.message(`Translated ${k}/${o.length}: ${M(process.cwd(),L.targetFile)}`)})),await H(l);f.stop("Translation complete!"),D(`Created/updated ${o.length} file(s)`)};import{access as Ze,copyFile as Qe,mkdir as Z,rm as J}from"fs/promises";import{dirname as et,join as w}from"path";import{intro as tt,log as p,outro as C,spinner as Q}from"@clack/prompts";import{glob as st}from"glob";var nt=["**/*"],at=["content/docs/**"],O=".geistdocs-tmp",rt=async(e,t)=>{let s=w(e,t);await J(s,{recursive:!0,force:!0}),await Z(s,{recursive:!0})},I=async e=>await J(e,{recursive:!0,force:!0}),X=async(e,t,s)=>(await st(e,{cwd:s,nodir:!0,dot:!0,ignore:[".git/**",...t]})).sort(),it=async e=>{try{return await Ze(e),!0}catch{return!1}},ot=async(e,t,s)=>{let n=w(t,e),a=w(s,e);return await it(n)?(await Qe(n,a),{success:!0}):{success:!1,error:`Source file not found: ${n}`}},ct=async(e,t)=>{let s=w(t,e);return await J(s,{force:!0}),{success:!0}},W=20,Y=async(e,t,s)=>{let n=[];for(let a=0;a<e.length;a+=s){let r=e.slice(a,a+s),i=await Promise.all(r.map(t));n.push(...i)}return n},lt=async(e,t,s,n,a)=>{let r={success:[],deleted:[],failed:[]},i=[...new Set(e.map(c=>et(w(n,c))))];a.message(`Creating ${i.length} directories...`),await Promise.all(i.map(c=>Z(c,{recursive:!0}))),a.message(`Updating ${e.length} files...`);let l=await Y(e,async c=>{let o=await ot(c,s,n);return{file:c,...o}},W);for(let{file:c,success:o,error:d}of l)o?r.success.push(c):r.failed.push({file:c,error:d??"Unknown error"});if(t.length>0){a.message(`Deleting ${t.length} files...`);let c=await Y(t,async o=>{try{return await ct(o,n),{file:o,success:!0}}catch(d){let u=d instanceof Error?d.message:`${d}`;return{file:o,success:!1,error:u}}},W);for(let o of c)o.success?r.deleted.push(o.file):r.failed.push({file:o.file,error:o.error})}return r},pt=e=>{if(e.success.length>0){p.success(`Successfully updated ${e.success.length} files:`);for(let t of e.success)p.info(` \u2713 ${t}`)}if(e.deleted.length>0){p.success(`Deleted ${e.deleted.length} files:`);for(let t of e.deleted)p.info(` \u{1F5D1} ${t}`)}if(e.failed.length>0){p.warn(`Failed to update ${e.failed.length} files:`);for(let{file:t,error:s}of e.failed)p.error(` \u2717 ${t}: ${s}`)}},dt=e=>e.includes("canary")?"canary":"latest",gt=async e=>{let t=await fetch(`https://registry.npmjs.org/${encodeURIComponent(g)}`);if(!t.ok)throw new Error(`Failed to resolve ${g}@${e}`);let n=(await t.json())["dist-tags"]?.[e];if(!n)throw new Error(`Could not find dist-tag ${e} for ${g}`);return n},ut=async e=>{let t=await P(e),s=R(t,g);if(!s)return{currentVersion:s,nextVersion:void 0,updated:!1};let n=dt(s),a=await gt(n);return s===a?{currentVersion:s,nextVersion:a,updateTag:n,updated:!1}:(b(t,g,a),await x(e,t),{currentVersion:s,nextVersion:a,updateTag:n,updated:!0})},ft=async(e,t,s)=>{let n=await P(e);if(!V(n,g))return!1;t&&t.length>0&&p.warn("Ignoring file patterns for a package-based site. This update will bump the package version instead."),s?.sync&&p.warn("Ignoring --sync for a package-based site. Runtime updates now come from the package version.");let{currentVersion:a,nextVersion:r,updateTag:i,updated:l}=await ut(e);if(!l)return p.success(a?`@vercel/geistdocs is already at ${r} (${i}).`:"No package version update was needed."),C("Package-based site is already up to date."),!0;p.info(`Bumping ${g} from ${a} to ${r} (${i})`);let c=Q();return c.start("Installing updated package version..."),await m("pnpm",["install"],{cwd:e}),c.stop("Package update complete!"),C("Please review and test the upgraded package version."),!0},mt=async(e,t,s,n,a)=>{let r=w(e,O),i=Q(),l=a?.sync?r:t;i.start("Preparing template snapshot..."),a?.sync&&(await rt(e,O),await F(r)),i.message("Scanning for files...");let c=await X(s,n,l),o=[];if(a?.sync){i.message("Comparing with local files...");let u=await X(s,n,e),f=new Set(c);o=u.filter(k=>!f.has(k))}if(i.stop(`Found ${c.length} files to update`),c.length===0&&o.length===0){p.warn("No files matched the patterns. Nothing to update."),a?.sync&&await I(r),C("Update cancelled.");return}p.info(`Patterns: ${s.length}`),p.info(`Files to update: ${c.length}`),a?.sync&&p.info(`Files to delete: ${o.length}`),i.start("Updating files...");let d=await lt(c,o,l,e,i);a?.sync&&(i.message("Cleaning up..."),await I(r)),i.stop("Update complete!"),pt(d),C("Please review and test the changes carefully.")},ee=async(e,t)=>{let s=process.cwd(),n=j(),a=e&&e.length>0?e:nt,r=e&&e.length>0?[]:at;try{if(tt("Let's update your Geistdocs project!"),await ft(s,e,t))return;p.info("Template source: bundled package snapshot"),e&&e.length>0&&p.info(`Updating specific files: ${e.join(", ")}`),t?.sync&&p.info("Sync mode enabled: will delete files removed from template"),await mt(s,n,a,r,t)}catch(i){let l=i instanceof Error?i.message:`${i}`;try{await I(w(s,O))}catch{}p.error(`Failed to update project: ${l}`),process.exit(1)}};T.name("geistdocs").description("CLI for Geistdocs projects").version("1.18.0","-v, --version","Output the current version");T.command("init").description("Initialize a new Geistdocs project").option("--name <name>","Name of the project").option("--disable-git","Disable git initialization").action(G);T.command("update [files...]").description("Update a Geistdocs project (optionally specify files/patterns to update)").option("--sync","Delete local files that no longer exist in the template").action(ee);T.command("translate [pattern]").description("Translate MDX file(s) to one or more locales (default: content/docs/**/*.mdx)").option("--config <path>","Path to config file to load locales from (defaults to geistdocs.tsx)").option("--url <url>","Custom translation API URL (defaults to GEISTDOCS_TRANSLATE_URL or https://geistdocs.com/translate)").option("--force","Force re-translation of all files, ignoring cache").action(q);T.parse(process.argv);
@@ -3,4 +3,16 @@ export declare const createGitLastModified: ({ cwd, gitBinary, }?: {
3
3
  gitBinary?: string;
4
4
  }) => (filePath: string) => Promise<Date | null>;
5
5
  export declare const getGitLastModified: (filePath: string) => Promise<Date | null>;
6
+ /**
7
+ * Resolves a page's last-modified date with a frontmatter-first chain:
8
+ * an explicit `lastModified` frontmatter value wins, then the file's git
9
+ * author time, then nothing (surfaces omit the date). The frontmatter
10
+ * override keeps dates working on shallow clones, where git history for
11
+ * untouched files is unavailable.
12
+ */
13
+ export declare const createLastModified: ({ cwd, gitBinary, }?: {
14
+ cwd?: string;
15
+ gitBinary?: string;
16
+ }) => (filePath: string) => Promise<Date | null>;
17
+ export declare const getLastModified: (filePath: string) => Promise<Date | null>;
6
18
  //# sourceMappingURL=last-modified.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"last-modified.d.ts","sourceRoot":"","sources":["../../src/internal/last-modified.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,qBAAqB,GAAI,sBAGnC;IACD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACf,MAUI,UAAU,MAAM,yBA0BzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,aA5BX,MAAM,yBA4B+B,CAAC"}
1
+ {"version":3,"file":"last-modified.d.ts","sourceRoot":"","sources":["../../src/internal/last-modified.ts"],"names":[],"mappings":"AAgCA,eAAO,MAAM,qBAAqB,GAAI,sBAGnC;IACD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACf,MAUI,UAAU,MAAM,yBA0BzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,aA5BX,MAAM,yBA4B+B,CAAC;AAE1D;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAAI,sBAGhC;IACD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACf,MAII,UAAU,MAAM,yBAYzB,CAAC;AAEF,eAAO,MAAM,eAAe,aAdR,MAAM,yBAcyB,CAAC"}
@@ -1,7 +1,29 @@
1
1
  import { execFile } from "node:child_process";
2
+ import { readFile } from "node:fs/promises";
2
3
  import path from "node:path";
3
4
  import { promisify } from "node:util";
4
5
  const execFileAsync = promisify(execFile);
6
+ const FRONTMATTER_BLOCK_PATTERN = /^---\r?\n([\s\S]*?)\r?\n---/;
7
+ const LAST_MODIFIED_KEY_PATTERN = /^lastModified:\s*(?:"([^"]*)"|'([^']*)'|([^#\n]+?))\s*$/m;
8
+ const readFrontmatterLastModified = async (filePath) => {
9
+ try {
10
+ const contents = await readFile(filePath, "utf8");
11
+ const block = contents.match(FRONTMATTER_BLOCK_PATTERN)?.[1];
12
+ if (!block) {
13
+ return null;
14
+ }
15
+ const match = block.match(LAST_MODIFIED_KEY_PATTERN);
16
+ if (!match) {
17
+ return null;
18
+ }
19
+ const value = match[1] ?? match[2] ?? match[3];
20
+ const date = new Date(value);
21
+ return Number.isNaN(date.getTime()) ? null : date;
22
+ }
23
+ catch {
24
+ return null;
25
+ }
26
+ };
5
27
  export const createGitLastModified = ({ cwd = process.cwd(), gitBinary = "git", } = {}) => {
6
28
  const cache = new Map();
7
29
  const gitAvailable = execFileAsync(gitBinary, ["rev-parse", "--is-inside-work-tree"], { cwd })
@@ -30,3 +52,24 @@ export const createGitLastModified = ({ cwd = process.cwd(), gitBinary = "git",
30
52
  };
31
53
  };
32
54
  export const getGitLastModified = createGitLastModified();
55
+ /**
56
+ * Resolves a page's last-modified date with a frontmatter-first chain:
57
+ * an explicit `lastModified` frontmatter value wins, then the file's git
58
+ * author time, then nothing (surfaces omit the date). The frontmatter
59
+ * override keeps dates working on shallow clones, where git history for
60
+ * untouched files is unavailable.
61
+ */
62
+ export const createLastModified = ({ cwd, gitBinary, } = {}) => {
63
+ const gitLastModified = createGitLastModified({ cwd, gitBinary });
64
+ const cache = new Map();
65
+ return (filePath) => {
66
+ const cached = cache.get(filePath);
67
+ if (cached) {
68
+ return cached;
69
+ }
70
+ const result = readFrontmatterLastModified(filePath).then((fromFrontmatter) => fromFrontmatter ?? gitLastModified(filePath));
71
+ cache.set(filePath, result);
72
+ return result;
73
+ };
74
+ };
75
+ export const getLastModified = createLastModified();
package/dist/mdx.d.ts CHANGED
@@ -21,6 +21,7 @@ export declare const geistdocsFrontmatterSchema: import("zod").ZodObject<{
21
21
  prerequisites: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
22
22
  related: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
23
23
  summary: import("zod").ZodOptional<import("zod").ZodString>;
24
+ lastModified: import("zod").ZodOptional<import("zod").ZodCoercedDate<unknown>>;
24
25
  internal: import("zod").ZodOptional<import("zod").ZodBoolean>;
25
26
  noindex: import("zod").ZodOptional<import("zod").ZodBoolean>;
26
27
  tags: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
package/dist/mdx.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"mdx.d.ts","sourceRoot":"","sources":["../src/mdx.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAkB/C,OAAO,EAGL,KAAK,4BAA4B,IAAI,mBAAmB,EAGzD,MAAM,iBAAiB,CAAC;AAEzB,eAAO,MAAM,2BAA2B,8EAAe,CAAC;AACxD,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAAoB,CAAC;AAC5D,eAAO,MAAM,mBAAmB;;;;;;;gCAAa,CAAC;AAC9C,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;CAAa,CAAC;AAC1C,MAAM,MAAM,4BAA4B,GAAG,mBAAmB,CAAC;AAE/D,MAAM,MAAM,sBAAsB,GAAG,aAAa,CAAC;AAEnD,eAAO,MAAM,yBAAyB,GACpC,aAAa,sBAAsB,KAClC,sBA8BD,CAAC;AAEH,eAAO,MAAM,mBAAmB,GAC9B,aAAa,sBAAsB,KAClC,sBAA+D,CAAC;AAEnE,eAAO,MAAM,2BAA2B,GACtC,GAAG,eAAe,KAAK,CAAC,sBAAsB,GAAG,SAAS,CAAC,KAC1D,sBACkD,CAAC"}
1
+ {"version":3,"file":"mdx.d.ts","sourceRoot":"","sources":["../src/mdx.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAkB/C,OAAO,EAGL,KAAK,4BAA4B,IAAI,mBAAmB,EAGzD,MAAM,iBAAiB,CAAC;AAEzB,eAAO,MAAM,2BAA2B,8EAAe,CAAC;AACxD,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAAoB,CAAC;AAC5D,eAAO,MAAM,mBAAmB;;;;;;;gCAAa,CAAC;AAC9C,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;CAAa,CAAC;AAC1C,MAAM,MAAM,4BAA4B,GAAG,mBAAmB,CAAC;AAE/D,MAAM,MAAM,sBAAsB,GAAG,aAAa,CAAC;AAEnD,eAAO,MAAM,yBAAyB,GACpC,aAAa,sBAAsB,KAClC,sBA8BD,CAAC;AAEH,eAAO,MAAM,mBAAmB,GAC9B,aAAa,sBAAsB,KAClC,sBAA+D,CAAC;AAEnE,eAAO,MAAM,2BAA2B,GACtC,GAAG,eAAe,KAAK,CAAC,sBAAsB,GAAG,SAAS,CAAC,KAC1D,sBACkD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"sitemap.d.ts","sourceRoot":"","sources":["../../src/routes/sitemap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,KAAK,eAAe,EAAiB,MAAM,WAAW,CAAC;AAChE,OAAO,EACL,KAAK,2BAA2B,EAEjC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,KAAK,qBAAqB,EAA2B,MAAM,WAAW,CAAC;AAKhF,UAAU,WAAW;IACnB,IAAI,EAAE;QACJ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;QACzB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,YAAY,CAAC,EAAE,IAAI,CAAC;KACrB,GAAG,2BAA2B,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,UAAU,aAAa;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,EAAE,CAAC;CACvC;AAED,KAAK,kBAAkB,GAAG,qBAAqB,GAAG,aAAa,CAAC;AAEhE,UAAU,cAAc;IACtB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,iCAAiC;IACzC,MAAM,EAAE,IAAI,CACV,eAAe,EACf,UAAU,GAAG,iBAAiB,GAAG,cAAc,CAChD,CAAC;IACF,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,CACV,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KACtB,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;CAC/B;AAoMD,eAAO,MAAM,0BAA0B,GAAI,gDAMxC,iCAAiC;gBAK1B,WAAW,cACL;QAAE,MAAM,EAAE,OAAO,CAAC;YAAE,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE;;;;;;CA4DpD,CAAC"}
1
+ {"version":3,"file":"sitemap.d.ts","sourceRoot":"","sources":["../../src/routes/sitemap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,KAAK,eAAe,EAAiB,MAAM,WAAW,CAAC;AAChE,OAAO,EACL,KAAK,2BAA2B,EAEjC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,KAAK,qBAAqB,EAA2B,MAAM,WAAW,CAAC;AAKhF,UAAU,WAAW;IACnB,IAAI,EAAE;QACJ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;QACzB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,YAAY,CAAC,EAAE,IAAI,CAAC;KACrB,GAAG,2BAA2B,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,UAAU,aAAa;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,EAAE,CAAC;CACvC;AAED,KAAK,kBAAkB,GAAG,qBAAqB,GAAG,aAAa,CAAC;AAEhE,UAAU,cAAc;IACtB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,iCAAiC;IACzC,MAAM,EAAE,IAAI,CACV,eAAe,EACf,UAAU,GAAG,iBAAiB,GAAG,cAAc,CAChD,CAAC;IACF,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,CACV,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KACtB,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;CAC/B;AAuMD,eAAO,MAAM,0BAA0B,GAAI,gDAMxC,iCAAiC;gBAK1B,WAAW,cACL;QAAE,MAAM,EAAE,OAAO,CAAC;YAAE,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE;;;;;;CA4DpD,CAAC"}
@@ -86,7 +86,7 @@ function truncateToWords(text, maxWords) {
86
86
  }
87
87
  return `${words.slice(0, maxWords).join(" ")}...`;
88
88
  }
89
- function renderNode(node, indent, parentTitle) {
89
+ function renderNode(node, indent, parentPath) {
90
90
  const prefix = " ".repeat(indent);
91
91
  const lines = [];
92
92
  const segments = [];
@@ -98,9 +98,12 @@ function renderNode(node, indent, parentTitle) {
98
98
  if (summary) {
99
99
  segments.push(`Summary: ${truncateToWords(summary, 100)}`);
100
100
  }
101
+ // Explicit frontmatter prerequisites are public paths; the fallback for
102
+ // pages without them is the parent page's public path so the field keeps
103
+ // one vocabulary (paths, never titles) across sites.
101
104
  const prereqs = node.prerequisites && node.prerequisites.length > 0
102
105
  ? node.prerequisites.join(", ")
103
- : parentTitle;
106
+ : parentPath;
104
107
  if (prereqs) {
105
108
  segments.push(`Prerequisites: ${prereqs}`);
106
109
  }
@@ -111,7 +114,7 @@ function renderNode(node, indent, parentTitle) {
111
114
  lines.push(`${prefix}- [${node.title}](${node.url}) | ${segments.join(" | ")}`);
112
115
  for (const child of node.children) {
113
116
  lines.push("");
114
- lines.push(renderNode(child, indent + 1, node.title));
117
+ lines.push(renderNode(child, indent + 1, node.url));
115
118
  }
116
119
  return lines.join("\n");
117
120
  }
@@ -44,6 +44,7 @@ export declare const geistdocsFrontmatterSchema: z.ZodObject<{
44
44
  prerequisites: z.ZodOptional<z.ZodArray<z.ZodString>>;
45
45
  related: z.ZodOptional<z.ZodArray<z.ZodString>>;
46
46
  summary: z.ZodOptional<z.ZodString>;
47
+ lastModified: z.ZodOptional<z.ZodCoercedDate<unknown>>;
47
48
  internal: z.ZodOptional<z.ZodBoolean>;
48
49
  noindex: z.ZodOptional<z.ZodBoolean>;
49
50
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -1 +1 @@
1
- {"version":3,"file":"source-config.d.ts","sourceRoot":"","sources":["../src/source-config.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,iBAAiB,EACtB,YAAY,IAAI,oBAAoB,EAGrC,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,KAAK,mBAAmB,GAAG,WAAW,CACpC,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAC3C,CAAC;AAEF,MAAM,WAAW,4BAA4B;IAC3C,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,OAAO,CAAC,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;CAC1C;AAED,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;CAsG3B,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsCrC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;iBAAa,CAAC;AAE9C,eAAO,MAAM,2BAA2B,GACtC,SAAQ,4BAAiC,+CAuB1C,CAAC"}
1
+ {"version":3,"file":"source-config.d.ts","sourceRoot":"","sources":["../src/source-config.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,iBAAiB,EACtB,YAAY,IAAI,oBAAoB,EAGrC,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,KAAK,mBAAmB,GAAG,WAAW,CACpC,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAC3C,CAAC;AAEF,MAAM,WAAW,4BAA4B;IAC3C,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,OAAO,CAAC,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;CAC1C;AAED,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;CAsG3B,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuCrC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;iBAAa,CAAC;AAE9C,eAAO,MAAM,2BAA2B,GACtC,SAAQ,4BAAiC,+CAuB1C,CAAC"}
@@ -2,7 +2,7 @@ import { remarkMdxMermaid } from "fumadocs-core/mdx-plugins";
2
2
  import { defineConfig as defineFumadocsConfig, frontmatterSchema, metaSchema, } from "fumadocs-mdx/config";
3
3
  import lastModified from "fumadocs-mdx/plugins/last-modified";
4
4
  import { z } from "zod";
5
- import { getGitLastModified } from "./internal/last-modified.js";
5
+ import { getLastModified } from "./internal/last-modified.js";
6
6
  export const geistShikiTheme = {
7
7
  name: "geist",
8
8
  type: "dark",
@@ -132,6 +132,7 @@ export const geistdocsFrontmatterSchema = frontmatterSchema.extend({
132
132
  .array(z.string().regex(/^\/.*/, { message: "related must start with a slash" }))
133
133
  .optional(),
134
134
  summary: z.string().optional(),
135
+ lastModified: z.coerce.date().optional(),
135
136
  internal: z.boolean().optional(),
136
137
  noindex: z.boolean().optional(),
137
138
  tags: z.array(z.string()).optional(),
@@ -159,7 +160,7 @@ export const defineGeistdocsSourceConfig = (config = {}) => {
159
160
  },
160
161
  },
161
162
  plugins: [
162
- lastModified({ versionControl: getGitLastModified }),
163
+ lastModified({ versionControl: getLastModified }),
163
164
  ...existingPlugins,
164
165
  ],
165
166
  });
package/docs/agents.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Geistdocs Package Docs
2
2
 
3
- These docs are bundled with `@vercel/geistdocs` 1.17.0 so agents can understand the installed package without web access.
3
+ These docs are bundled with `@vercel/geistdocs` 1.18.0 so agents can understand the installed package without web access.
4
4
  They are generated from `apps/template/content/docs` during the package build.
5
5
 
6
6
  ## How to use these files
package/docs/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # Geistdocs Package Documentation
2
2
 
3
- These docs are bundled with `@vercel/geistdocs` 1.17.0.
3
+ These docs are bundled with `@vercel/geistdocs` 1.18.0.
4
4
  They describe how to build package-backed Geistdocs sites and how to use the package APIs from generated project adapters.
5
5
 
6
6
  ## Documentation Index
@@ -1018,6 +1018,26 @@ excludeFrom:
1018
1018
 
1019
1019
  Optional `tags`, `keywords`, and `canonical` frontmatter are also recognized by the package runtime.
1020
1020
 
1021
+ ## Last modified dates
1022
+
1023
+ `sitemap.md` entries include a `Lastmod` field and RSS items carry a publish date when a page has a last-modified date. Geistdocs resolves the date for each page in this order:
1024
+
1025
+ 1. The page's `lastModified` frontmatter value.
1026
+ 2. The file's most recent git commit date.
1027
+ 3. No date. The sitemap entry omits `Lastmod` and the RSS item falls back to the build date.
1028
+
1029
+ Set `lastModified` in frontmatter when a page needs a stable, editor-controlled date:
1030
+
1031
+ ```mdx title="content/docs/example.mdx"
1032
+ ---
1033
+ title: Example page
1034
+ description: An example documentation page
1035
+ lastModified: 2026-07-01
1036
+ ---
1037
+ ```
1038
+
1039
+ Git-based dates require full git history at build time. Vercel builds use a shallow clone by default, so pages that were not changed in the cloned history have no reachable commit date and their entries omit `Lastmod`. To make git-based dates work on Vercel, set the `VERCEL_DEEP_CLONE=true` environment variable on your project so builds clone the full history.
1040
+
1021
1041
  ## User-owned adapters
1022
1042
 
1023
1043
  Adapter files are safe to edit. Package updates do not overwrite them.
@@ -3318,7 +3338,7 @@ The feed automatically includes:
3318
3338
 
3319
3339
  ### Last Modified Dates
3320
3340
 
3321
- Pages use their `lastModified` frontmatter field or fall back to the current date:
3341
+ Pages use their `lastModified` frontmatter field, then the file's most recent git commit date, and fall back to the current date:
3322
3342
 
3323
3343
  ```mdx title="content/docs/example.mdx"
3324
3344
  ---
@@ -3328,6 +3348,8 @@ lastModified: 2025-11-12
3328
3348
  ---
3329
3349
  ```
3330
3350
 
3351
+ Git commit dates require full git history at build time. On Vercel, set the `VERCEL_DEEP_CLONE=true` environment variable so builds clone the full history. Read [Last modified dates](/docs/configuration#last-modified-dates) for the full resolution order.
3352
+
3331
3353
 
3332
3354
  ---
3333
3355
 
@@ -208,5 +208,5 @@
208
208
  }
209
209
  ],
210
210
  "source": "apps/template/content/docs",
211
- "version": "1.17.0"
211
+ "version": "1.18.0"
212
212
  }
@@ -254,6 +254,26 @@ excludeFrom:
254
254
 
255
255
  Optional `tags`, `keywords`, and `canonical` frontmatter are also recognized by the package runtime.
256
256
 
257
+ ## Last modified dates
258
+
259
+ `sitemap.md` entries include a `Lastmod` field and RSS items carry a publish date when a page has a last-modified date. Geistdocs resolves the date for each page in this order:
260
+
261
+ 1. The page's `lastModified` frontmatter value.
262
+ 2. The file's most recent git commit date.
263
+ 3. No date. The sitemap entry omits `Lastmod` and the RSS item falls back to the build date.
264
+
265
+ Set `lastModified` in frontmatter when a page needs a stable, editor-controlled date:
266
+
267
+ ```mdx title="content/docs/example.mdx"
268
+ ---
269
+ title: Example page
270
+ description: An example documentation page
271
+ lastModified: 2026-07-01
272
+ ---
273
+ ```
274
+
275
+ Git-based dates require full git history at build time. Vercel builds use a shallow clone by default, so pages that were not changed in the cloned history have no reachable commit date and their entries omit `Lastmod`. To make git-based dates work on Vercel, set the `VERCEL_DEEP_CLONE=true` environment variable on your project so builds clone the full history.
276
+
257
277
  ## User-owned adapters
258
278
 
259
279
  Adapter files are safe to edit. Package updates do not overwrite them.
package/docs/pages/rss.md CHANGED
@@ -101,7 +101,7 @@ The feed automatically includes:
101
101
 
102
102
  ### Last Modified Dates
103
103
 
104
- Pages use their `lastModified` frontmatter field or fall back to the current date:
104
+ Pages use their `lastModified` frontmatter field, then the file's most recent git commit date, and fall back to the current date:
105
105
 
106
106
  ```mdx title="content/docs/example.mdx"
107
107
  ---
@@ -110,3 +110,5 @@ description: An example documentation page
110
110
  lastModified: 2025-11-12
111
111
  ---
112
112
  ```
113
+
114
+ Git commit dates require full git history at build time. On Vercel, set the `VERCEL_DEEP_CLONE=true` environment variable so builds clone the full history. Read [Last modified dates](/docs/configuration#last-modified-dates) for the full resolution order.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vercel/geistdocs",
3
3
  "description": "Runtime and CLI for Geistdocs projects.",
4
- "version": "1.17.0",
4
+ "version": "1.18.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
package/source-config.js CHANGED
@@ -1,3 +1,7 @@
1
+ import { execFile } from "node:child_process";
2
+ import { readFile } from "node:fs/promises";
3
+ import path from "node:path";
4
+ import { promisify } from "node:util";
1
5
  import { remarkMdxMermaid } from "fumadocs-core/mdx-plugins";
2
6
  import {
3
7
  defineConfig as defineFumadocsConfig,
@@ -7,6 +11,83 @@ import {
7
11
  import lastModified from "fumadocs-mdx/plugins/last-modified";
8
12
  import { z } from "zod";
9
13
 
14
+ // Mirrors src/internal/last-modified.ts. This file must stay dependency-free
15
+ // on dist so source.config.ts can load it before the package is built.
16
+ const execFileAsync = promisify(execFile);
17
+
18
+ const FRONTMATTER_BLOCK_PATTERN = /^---\r?\n([\s\S]*?)\r?\n---/;
19
+ const LAST_MODIFIED_KEY_PATTERN =
20
+ /^lastModified:\s*(?:"([^"]*)"|'([^']*)'|([^#\n]+?))\s*$/m;
21
+
22
+ const readFrontmatterLastModified = async (filePath) => {
23
+ try {
24
+ const contents = await readFile(filePath, "utf8");
25
+ const block = contents.match(FRONTMATTER_BLOCK_PATTERN)?.[1];
26
+ if (!block) {
27
+ return null;
28
+ }
29
+ const match = block.match(LAST_MODIFIED_KEY_PATTERN);
30
+ if (!match) {
31
+ return null;
32
+ }
33
+ const value = match[1] ?? match[2] ?? match[3];
34
+ const date = new Date(value);
35
+ return Number.isNaN(date.getTime()) ? null : date;
36
+ } catch {
37
+ return null;
38
+ }
39
+ };
40
+
41
+ // Resolves a page's last-modified date frontmatter-first, then the file's
42
+ // git author time, then null so surfaces omit the date. The frontmatter
43
+ // override keeps dates working on shallow clones, where git history for
44
+ // untouched files is unavailable.
45
+ const createLastModified = ({
46
+ cwd = process.cwd(),
47
+ gitBinary = "git",
48
+ } = {}) => {
49
+ const cache = new Map();
50
+ const gitAvailable = execFileAsync(
51
+ gitBinary,
52
+ ["rev-parse", "--is-inside-work-tree"],
53
+ { cwd }
54
+ )
55
+ .then(({ stdout }) => stdout.trim() === "true")
56
+ .catch(() => false);
57
+
58
+ const gitLastModified = async (filePath) => {
59
+ if (!(await gitAvailable)) {
60
+ return null;
61
+ }
62
+ try {
63
+ const { stdout } = await execFileAsync(
64
+ gitBinary,
65
+ ["log", "-1", "--pretty=%aI", "--", path.relative(cwd, filePath)],
66
+ { cwd }
67
+ );
68
+ const date = new Date(stdout.trim());
69
+ return Number.isNaN(date.getTime()) ? null : date;
70
+ } catch {
71
+ return null;
72
+ }
73
+ };
74
+
75
+ return (filePath) => {
76
+ const cached = cache.get(filePath);
77
+ if (cached) {
78
+ return cached;
79
+ }
80
+
81
+ const result = readFrontmatterLastModified(filePath).then(
82
+ (fromFrontmatter) => fromFrontmatter ?? gitLastModified(filePath)
83
+ );
84
+ cache.set(filePath, result);
85
+ return result;
86
+ };
87
+ };
88
+
89
+ const getLastModified = createLastModified();
90
+
10
91
  export const geistShikiTheme = {
11
92
  name: "geist",
12
93
  type: "dark",
@@ -141,6 +222,7 @@ export const geistdocsFrontmatterSchema = frontmatterSchema.extend({
141
222
  )
142
223
  .optional(),
143
224
  summary: z.string().optional(),
225
+ lastModified: z.coerce.date().optional(),
144
226
  internal: z.boolean().optional(),
145
227
  noindex: z.boolean().optional(),
146
228
  tags: z.array(z.string()).optional(),
@@ -170,6 +252,9 @@ export const defineGeistdocsSourceConfig = (config = {}) => {
170
252
  defaultColor: "light",
171
253
  },
172
254
  },
173
- plugins: [lastModified(), ...existingPlugins],
255
+ plugins: [
256
+ lastModified({ versionControl: getLastModified }),
257
+ ...existingPlugins,
258
+ ],
174
259
  });
175
260
  };
@@ -252,6 +252,26 @@ excludeFrom:
252
252
 
253
253
  Optional `tags`, `keywords`, and `canonical` frontmatter are also recognized by the package runtime.
254
254
 
255
+ ## Last modified dates
256
+
257
+ `sitemap.md` entries include a `Lastmod` field and RSS items carry a publish date when a page has a last-modified date. Geistdocs resolves the date for each page in this order:
258
+
259
+ 1. The page's `lastModified` frontmatter value.
260
+ 2. The file's most recent git commit date.
261
+ 3. No date. The sitemap entry omits `Lastmod` and the RSS item falls back to the build date.
262
+
263
+ Set `lastModified` in frontmatter when a page needs a stable, editor-controlled date:
264
+
265
+ ```mdx title="content/docs/example.mdx"
266
+ ---
267
+ title: Example page
268
+ description: An example documentation page
269
+ lastModified: 2026-07-01
270
+ ---
271
+ ```
272
+
273
+ Git-based dates require full git history at build time. Vercel builds use a shallow clone by default, so pages that were not changed in the cloned history have no reachable commit date and their entries omit `Lastmod`. To make git-based dates work on Vercel, set the `VERCEL_DEEP_CLONE=true` environment variable on your project so builds clone the full history.
274
+
255
275
  ## User-owned adapters
256
276
 
257
277
  Adapter files are safe to edit. Package updates do not overwrite them.
@@ -99,7 +99,7 @@ The feed automatically includes:
99
99
 
100
100
  ### Last Modified Dates
101
101
 
102
- Pages use their `lastModified` frontmatter field or fall back to the current date:
102
+ Pages use their `lastModified` frontmatter field, then the file's most recent git commit date, and fall back to the current date:
103
103
 
104
104
  ```mdx title="content/docs/example.mdx"
105
105
  ---
@@ -108,3 +108,5 @@ description: An example documentation page
108
108
  lastModified: 2025-11-12
109
109
  ---
110
110
  ```
111
+
112
+ Git commit dates require full git history at build time. On Vercel, set the `VERCEL_DEEP_CLONE=true` environment variable so builds clone the full history. Read [Last modified dates](/docs/configuration#last-modified-dates) for the full resolution order.
@@ -18,7 +18,7 @@
18
18
  "@streamdown/code": "^1.0.1",
19
19
  "@vercel/agent-readability": "^0.2.1",
20
20
  "@vercel/analytics": "^1.6.1",
21
- "@vercel/geistdocs": "1.17.0",
21
+ "@vercel/geistdocs": "1.18.0",
22
22
  "@vercel/speed-insights": "^1.3.1",
23
23
  "ai": "^6.0.132",
24
24
  "class-variance-authority": "^0.7.1",