@leed-ai/cli 0.0.0-stage → 6.19.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.
- package/LICENSE.md +57 -0
- package/README.md +125 -2
- package/dist/LICENSE.md +57 -0
- package/dist/acorn-DAgDT1om.js +5087 -0
- package/dist/angular-l0_4PK8N.js +3598 -0
- package/dist/authShared-Dray38Ls.js +1161 -0
- package/dist/babel-CJeRQd5u.js +10038 -0
- package/dist/buildResults-tiq1nugP.js +21180 -0
- package/dist/chunk-1VJ9lAw7.js +42 -0
- package/dist/cliAuth-38JjD6hw.js +15 -0
- package/dist/env-B0bHiXJJ.js +29 -0
- package/dist/errors-CqKamGCu.js +481 -0
- package/dist/estree-E8WG8UHj.js +6930 -0
- package/dist/flow-6xaRIbPQ.js +52255 -0
- package/dist/glimmer-aJPjsfbT.js +7272 -0
- package/dist/graphql-mcgtPEiZ.js +1901 -0
- package/dist/html--eeea3Kl.js +6553 -0
- package/dist/leed.eleventy.mjs +6525 -0
- package/dist/leed.mjs +88952 -0
- package/dist/leed.sources.json +798 -0
- package/dist/leedLogger-Zkada5aO.js +78 -0
- package/dist/markdown-D73jNKwx.js +6836 -0
- package/dist/meriyah-CMp1nDDW.js +8932 -0
- package/dist/package.json +101 -0
- package/dist/postcss-h4fBr2Fn.js +6760 -0
- package/dist/prettier-CwFSKxfN.js +16821 -0
- package/dist/static/customer-site-worker/package.json +9 -0
- package/dist/static/customer-site-worker/src/assetsHydration.ts +55 -0
- package/dist/static/customer-site-worker/src/constants.ts +20 -0
- package/dist/static/customer-site-worker/src/cors.ts +120 -0
- package/dist/static/customer-site-worker/src/index.ts +242 -0
- package/dist/static/customer-site-worker/src/mcp-proxy.ts +98 -0
- package/dist/static/customer-site-worker/src/proxy.ts +92 -0
- package/dist/static/customer-site-worker/src/proxyHeaders.ts +47 -0
- package/dist/static/customer-site-worker/src/tier.ts +40 -0
- package/dist/static/customer-site-worker/src/types.ts +82 -0
- package/dist/static/customer-site-worker/test/functions-mock.worker.js +50 -0
- package/dist/static/customer-site-worker/tsconfig.json +19 -0
- package/dist/static/customer-site-worker/vitest.workers.config.ts +61 -0
- package/dist/static/install/husky/colors.mjs +5 -0
- package/dist/static/install/husky/hooks/commit-msg +1 -0
- package/dist/static/install/husky/hooks/pre-commit +1 -0
- package/dist/static/install/husky/hooks/pre-push +1 -0
- package/dist/static/install/husky/valid-command.mjs +29 -0
- package/dist/static/install/husky/valid-commit-msg.mjs +20 -0
- package/dist/static/install/package.json +10 -0
- package/dist/static/install/packages.txt +4 -0
- package/dist/static/install/tasks.json +111 -0
- package/dist/static/javascript/detectIncognito.js +195 -0
- package/dist/static/javascript/documentation.js +2781 -0
- package/dist/static/javascript/fp/fp.esm.js +2896 -0
- package/dist/static/javascript/fp/fp.js +3067 -0
- package/dist/static/javascript/live-search.js +986 -0
- package/dist/static/javascript/lunr-search.js +843 -0
- package/dist/static/javascript/timeme.js +451 -0
- package/dist/static/javascript/tracker/webmcp.js +67 -0
- package/dist/static/javascript/tracker/whisper.js +1 -0
- package/dist/static/javascript/utilities.js +819 -0
- package/dist/static/javascript/versions.json +74 -0
- package/dist/static/javascript/zoomable.js +488 -0
- package/dist/static/site/_data/eleventyComputed.js +228 -0
- package/dist/static/site/_data/leed-form-data.json +253 -0
- package/dist/static/site/_includes/leed/api/bits/array-type.hbs +24 -0
- package/dist/static/site/_includes/leed/api/bits/badges.hbs +9 -0
- package/dist/static/site/_includes/leed/api/bits/description.hbs +9 -0
- package/dist/static/site/_includes/leed/api/bits/examples.hbs +42 -0
- package/dist/static/site/_includes/leed/api/bits/scopes.hbs +28 -0
- package/dist/static/site/_includes/leed/api/object.hbs +110 -0
- package/dist/static/site/_includes/leed/api/parameters.hbs +11 -0
- package/dist/static/site/_includes/leed/api/property.hbs +153 -0
- package/dist/static/site/_includes/leed/api/request-body.hbs +51 -0
- package/dist/static/site/_includes/leed/api/responses.hbs +89 -0
- package/dist/static/site/_includes/leed/api/security-constraints.hbs +59 -0
- package/dist/static/site/_includes/leed/api/security.hbs +75 -0
- package/dist/static/site/_includes/leed/components/pagination.hbs +45 -0
- package/dist/static/site/_includes/leed/components/scroll-status-indicator-horizontal.hbs +22 -0
- package/dist/static/site/_includes/leed/docs/alpha/api.hbs +6 -0
- package/dist/static/site/_includes/leed/docs/alpha/base.hbs +26 -0
- package/dist/static/site/_includes/leed/docs/alpha/documentation.hbs +7 -0
- package/dist/static/site/_includes/leed/docs/api-article.hbs +75 -0
- package/dist/static/site/_includes/leed/docs/bravo/api.hbs +5 -0
- package/dist/static/site/_includes/leed/docs/bravo/base.hbs +31 -0
- package/dist/static/site/_includes/leed/docs/bravo/documentation.hbs +7 -0
- package/dist/static/site/_includes/leed/docs/charlie/api.hbs +6 -0
- package/dist/static/site/_includes/leed/docs/charlie/base.hbs +27 -0
- package/dist/static/site/_includes/leed/docs/charlie/documentation.hbs +10 -0
- package/dist/static/site/_includes/leed/docs/doc-article.hbs +40 -0
- package/dist/static/site/_includes/leed/docs/docs-footer.hbs +35 -0
- package/dist/static/site/_includes/leed/docs/docs-header.hbs +59 -0
- package/dist/static/site/_includes/leed/docs/document-search-modal.hbs +36 -0
- package/dist/static/site/_includes/leed/docs/document-search.hbs +23 -0
- package/dist/static/site/_includes/leed/docs/footer.hbs +12 -0
- package/dist/static/site/_includes/leed/docs/header/brand.hbs +19 -0
- package/dist/static/site/_includes/leed/docs/header/chrome.hbs +33 -0
- package/dist/static/site/_includes/leed/docs/header/compact.hbs +19 -0
- package/dist/static/site/_includes/leed/docs/header/cta.hbs +15 -0
- package/dist/static/site/_includes/leed/docs/header/nav.hbs +18 -0
- package/dist/static/site/_includes/leed/docs/header/top-search.hbs +15 -0
- package/dist/static/site/_includes/leed/docs/mini-bar.hbs +53 -0
- package/dist/static/site/_includes/leed/docs/pagination.hbs +19 -0
- package/dist/static/site/_includes/leed/docs/shell.hbs +56 -0
- package/dist/static/site/_includes/leed/docs/sidebar.hbs +52 -0
- package/dist/static/site/_includes/leed/docs/social-icons.hbs +81 -0
- package/dist/static/site/_includes/leed/docs/style.hbs +17 -0
- package/dist/static/site/_includes/leed/docs/toc.hbs +7 -0
- package/dist/static/site/_includes/leed/form.hbs +266 -0
- package/dist/static/site/_includes/leed/head.hbs +67 -0
- package/dist/static/site/_includes/leed/menu/builder.hbs +35 -0
- package/dist/static/site/_includes/leed/menu/item.hbs +67 -0
- package/dist/static/site/_includes/leed/menu/link.hbs +59 -0
- package/dist/static/site/_includes/leed/metadata/ogCard.hbs +40 -0
- package/dist/static/site/_includes/leed/metadata/siteMetadata.hbs +24 -0
- package/dist/static/site/_includes/leed/metadata/twitterCard.hbs +34 -0
- package/dist/static/site/_includes/leed/popup-video.hbs +21 -0
- package/dist/static/site/_includes/leed/stub-template.hbs +17 -0
- package/dist/static/site/_includes/leed/unsubscribe-form.hbs +30 -0
- package/dist/static/site/_layouts/leed-documentation.hbs +12 -0
- package/dist/static/site/leed-feed-atom.hbs +42 -0
- package/dist/static/site/leed-feed-json.hbs +56 -0
- package/dist/static/site/leed-feed-rss.hbs +39 -0
- package/dist/static/site/leed-headers.hbs +38 -0
- package/dist/static/site/leed-redirects.hbs +10 -0
- package/dist/static/site/leed-sitemap-pageType.hbs +28 -0
- package/dist/static/site/leed-sitemap.hbs +19 -0
- package/dist/static/site/leed-unsubscribe.hbs +44 -0
- package/dist/static/site/leed-unsubscribed.hbs +40 -0
- package/dist/static/tailwind/components/alerts.css +132 -0
- package/dist/static/tailwind/components/api-methods.css +39 -0
- package/dist/static/tailwind/components/breadcrumbs.css +31 -0
- package/dist/static/tailwind/components/code.css +88 -0
- package/dist/static/tailwind/components/collapsible.css +38 -0
- package/dist/static/tailwind/components/document-search.css +222 -0
- package/dist/static/tailwind/components/form.css +185 -0
- package/dist/static/tailwind/components/kbd.css +7 -0
- package/dist/static/tailwind/components/pagination.css +81 -0
- package/dist/static/tailwind/components/scroll-status-indicator.css +5 -0
- package/dist/static/tailwind/components/tab-groups.css +117 -0
- package/dist/static/tailwind/components/tables.css +0 -0
- package/dist/static/tailwind/components/toc.css +60 -0
- package/dist/static/tailwind/components.css +248 -0
- package/dist/static/tailwind/defaults.css +260 -0
- package/dist/static/tailwind/docs/api.css +701 -0
- package/dist/static/tailwind/docs/components/blockquote.css +5 -0
- package/dist/static/tailwind/docs/components/button.css +11 -0
- package/dist/static/tailwind/docs/components/docs-pagination.css +71 -0
- package/dist/static/tailwind/docs/components/mobile-bar.css +83 -0
- package/dist/static/tailwind/docs/components/navigation.css +279 -0
- package/dist/static/tailwind/docs/components/table.css +54 -0
- package/dist/static/tailwind/docs/components.css +6 -0
- package/dist/static/tailwind/docs/docs.css +427 -0
- package/dist/static/tailwind/docs/layouts/alpha.css +108 -0
- package/dist/static/tailwind/docs/layouts/bravo.css +218 -0
- package/dist/static/tailwind/docs/layouts/charlie.css +105 -0
- package/dist/static/tailwind/docs/layouts.css +3 -0
- package/dist/static/tailwind/docs/themes/amber.css +113 -0
- package/dist/static/tailwind/docs/themes/blue.css +94 -0
- package/dist/static/tailwind/docs/themes/cyan.css +111 -0
- package/dist/static/tailwind/docs/themes/emerald.css +111 -0
- package/dist/static/tailwind/docs/themes/fuchsia.css +111 -0
- package/dist/static/tailwind/docs/themes/green.css +95 -0
- package/dist/static/tailwind/docs/themes/indigo.css +111 -0
- package/dist/static/tailwind/docs/themes/lime.css +111 -0
- package/dist/static/tailwind/docs/themes/orange.css +111 -0
- package/dist/static/tailwind/docs/themes/pink.css +111 -0
- package/dist/static/tailwind/docs/themes/purple.css +111 -0
- package/dist/static/tailwind/docs/themes/red.css +111 -0
- package/dist/static/tailwind/docs/themes/rose.css +111 -0
- package/dist/static/tailwind/docs/themes/sky.css +111 -0
- package/dist/static/tailwind/docs/themes/teal.css +111 -0
- package/dist/static/tailwind/docs/themes/violet.css +111 -0
- package/dist/static/tailwind/docs/themes/yellow.css +111 -0
- package/dist/static/tailwind/docs/themes.css +84 -0
- package/dist/static/tailwind/font-awesome/free-7.3.1/brands.css +2455 -0
- package/dist/static/tailwind/font-awesome/free-7.3.1/fontawesome.css +8997 -0
- package/dist/static/tailwind/font-awesome/free-7.3.1/fonts.css +45 -0
- package/dist/static/tailwind/font-awesome/free-7.3.1/icons.json +2608 -0
- package/dist/static/tailwind/font-awesome/free-7.3.1.css +3 -0
- package/dist/static/tailwind/font-awesome/pro-7.0.0/brands.css +2215 -0
- package/dist/static/tailwind/font-awesome/pro-7.0.0/fontawesome.css +19281 -0
- package/dist/static/tailwind/font-awesome/pro-7.0.0/fonts.css +445 -0
- package/dist/static/tailwind/font-awesome/pro-7.0.0.css +3 -0
- package/dist/static/tailwind/font-awesome/pro-7.3.1/brands.css +2455 -0
- package/dist/static/tailwind/font-awesome/pro-7.3.1/fontawesome.css +20365 -0
- package/dist/static/tailwind/font-awesome/pro-7.3.1/fonts.css +589 -0
- package/dist/static/tailwind/font-awesome/pro-7.3.1.css +3 -0
- package/dist/static/tailwind/fonts/all.css +6 -0
- package/dist/static/tailwind/fonts/config.jsonc +31 -0
- package/dist/static/tailwind/fonts/geist-mono.css +142 -0
- package/dist/static/tailwind/fonts/geist.css +142 -0
- package/dist/static/tailwind/fonts/inter.css +215 -0
- package/dist/static/tailwind/fonts/jetbrains-mono.css +126 -0
- package/dist/static/tailwind/fonts/noto-sans.css +134 -0
- package/dist/static/tailwind/fonts/open-sans.css +89 -0
- package/dist/static/tailwind/highlighters.css +14 -0
- package/dist/static/tailwind/hljs/README.md +53 -0
- package/dist/static/tailwind/hljs/a11y.css +96 -0
- package/dist/static/tailwind/hljs/atom-fruit.css +90 -0
- package/dist/static/tailwind/hljs/atom-one.css +164 -0
- package/dist/static/tailwind/hljs/default.css +164 -0
- package/dist/static/tailwind/hljs/github.css +101 -0
- package/dist/static/tailwind/hljs/google-code.css +112 -0
- package/dist/static/tailwind/hljs/grayscale.css +115 -0
- package/dist/static/tailwind/hljs/gruvbox-hard.css +115 -0
- package/dist/static/tailwind/hljs/gruvbox-medium.css +115 -0
- package/dist/static/tailwind/hljs/gruvbox-soft.css +115 -0
- package/dist/static/tailwind/hljs/papercolor.css +120 -0
- package/dist/static/tailwind/hljs/qt-creator.css +91 -0
- package/dist/static/tailwind/hljs/summerfruit.css +115 -0
- package/dist/static/tailwind/hljs/tomorrow.css +115 -0
- package/dist/static/tailwind/leed.css +170 -0
- package/dist/static/tailwind/site-tokens.reference.css +105 -0
- package/dist/static/tailwind/utils/icons.css +102 -0
- package/dist/static/tailwind/utils/utilities.css +105 -0
- package/dist/static/templates/pages/PAGE.hbs +27 -0
- package/dist/static/templates/pages/PAGE_LAYOUT.hbs +19 -0
- package/dist/static/templates/pages/PAGE_TYPE_INDEX.hbs +89 -0
- package/dist/static/templates/pages/PAGINATED_PAGE_TYPE_ITEM.hbs +52 -0
- package/dist/static/templates/pages/PAGINATED_PAGE_TYPE_LIST.hbs +39 -0
- package/dist/static/templates/pages/PAGINATED_PAGE_TYPE_PAGINATION.hbs +11 -0
- package/dist/static/templates/raw-content/.ci/build.sh +58 -0
- package/dist/static/templates/raw-content/README.md +179 -0
- package/dist/static/templates/raw-content/_gitignore +50 -0
- package/dist/static/templates/raw-content/src/404.hbs +21 -0
- package/dist/static/templates/raw-content/src/_data/autolink.json +1 -0
- package/dist/static/templates/raw-content/src/_data/ctaList.json +1 -0
- package/dist/static/templates/raw-content/src/_data/leedForms.json +1 -0
- package/dist/static/templates/raw-content/src/_data/menu.json +1 -0
- package/dist/static/templates/raw-content/src/_includes/footer.hbs +18 -0
- package/dist/static/templates/raw-content/src/_includes/header-includes.hbs +25 -0
- package/dist/static/templates/raw-content/src/_includes/header.hbs +5 -0
- package/dist/static/templates/raw-content/src/_includes/site-template.hbs +23 -0
- package/dist/static/templates/raw-content/src/_includes/unsubscribe-DISABLED.hbs +17 -0
- package/dist/static/templates/raw-content/src/_includes/unsubscribed-DISABLED.hbs +13 -0
- package/dist/static/templates/raw-content/src/_layouts/empty.hbs +2 -0
- package/dist/static/templates/raw-content/src/index.hbs +21 -0
- package/dist/static/templates/raw-content/src/robots.hbs +9 -0
- package/dist/static/templates/raw-content/tailwind/site/base.css +44 -0
- package/dist/static/templates/raw-content/tailwind/site.config.css +3 -0
- package/dist/static/templates/sandbox/_gitignore +50 -0
- package/dist/static/templates/sandbox/identity.json +1 -0
- package/dist/static/templates/sandbox/src/404.hbs +21 -0
- package/dist/static/templates/sandbox/src/_data/autolink.json +1 -0
- package/dist/static/templates/sandbox/src/_data/ctaList.json +1 -0
- package/dist/static/templates/sandbox/src/_data/labelList.json +9 -0
- package/dist/static/templates/sandbox/src/_data/leedForms.json +20 -0
- package/dist/static/templates/sandbox/src/_data/menu.json +19 -0
- package/dist/static/templates/sandbox/src/_data/pageTypeList.json +14 -0
- package/dist/static/templates/sandbox/src/_data/searchIndexList.json +1 -0
- package/dist/static/templates/sandbox/src/_data/userList.json +11 -0
- package/dist/static/templates/sandbox/src/_includes/footer.hbs +18 -0
- package/dist/static/templates/sandbox/src/_includes/header-includes.hbs +25 -0
- package/dist/static/templates/sandbox/src/_includes/header.hbs +5 -0
- package/dist/static/templates/sandbox/src/_includes/site-template.hbs +23 -0
- package/dist/static/templates/sandbox/src/_layouts/empty.hbs +2 -0
- package/dist/static/templates/sandbox/src/index.hbs +20 -0
- package/dist/static/templates/sandbox/src/robots.hbs +9 -0
- package/dist/static/templates/sandbox/src/src.11tydata.json +39 -0
- package/dist/static/templates/sandbox/tailwind/site/base.css +44 -0
- package/dist/static/templates/sandbox/tailwind/site.config.css +3 -0
- package/dist/thrown-sukVkp_1.js +113 -0
- package/dist/typescript-D4T0V_Hn.js +23004 -0
- package/dist/yaml-9wR8GxF_.js +5236 -0
- package/package.json +157 -4
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{{!--
|
|
2
|
+
header-includes.hbs: the site's own additions to <head>, on every page.
|
|
3
|
+
|
|
4
|
+
Leed's head partial, `leed/head.hbs`, renders this file first in <head>, on
|
|
5
|
+
every page that calls it: the pages site-template.hbs wraps, Leed's
|
|
6
|
+
unsubscribe pages, and the documentation and API pages. Those last are built
|
|
7
|
+
on Leed's own documentation layouts, which are NOT wrapped in
|
|
8
|
+
site-template.hbs, so a tag written there never reaches the documentation
|
|
9
|
+
set. Written here, it reaches every page.
|
|
10
|
+
|
|
11
|
+
There is nothing to turn on: no CMS flag and no plan tier. `leed/head.hbs`
|
|
12
|
+
checks `templateExists "header-includes.hbs"`, so the file existing is what
|
|
13
|
+
enables it.
|
|
14
|
+
|
|
15
|
+
Put here what must be true on every page, docs included: a preload for a
|
|
16
|
+
self-hosted web font (never a font host, which logs every visitor), site
|
|
17
|
+
verification metas, analytics and
|
|
18
|
+
other site-wide scripts (deferred), theme-color, the web manifest, and PNG
|
|
19
|
+
and touch icon fallbacks. Tags only one kind of page needs go in that page
|
|
20
|
+
type's layout. The description, canonical URL, social cards and the SVG
|
|
21
|
+
favicon (the company favicon set in the CMS) are already written by
|
|
22
|
+
`leed/head.hbs`.
|
|
23
|
+
|
|
24
|
+
This file renders nothing until you add a tag below this comment.
|
|
25
|
+
--}}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en" class="scroll-smooth js-focus-visible code-theme-atom-fruit">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<title>{{ title }} | {{ siteTitle }}</title>
|
|
6
|
+
|
|
7
|
+
<meta name="viewport" content="width=device-width">
|
|
8
|
+
|
|
9
|
+
{{> leed/head }}
|
|
10
|
+
</head>
|
|
11
|
+
<body class="flex flex-col h-screen antialiased text-base text-(--site-text-color) bg-(--site-bg-color)">
|
|
12
|
+
{{> header }}
|
|
13
|
+
|
|
14
|
+
{{!-- We need to set the top margin, because it changes based on the header height --}}
|
|
15
|
+
<div class="grow mt-(--height-header)">
|
|
16
|
+
{{!-- Start Body Content --}}
|
|
17
|
+
{{> @partial-block}}
|
|
18
|
+
{{!-- End Body Content --}}
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
{{> footer }}
|
|
22
|
+
</body>
|
|
23
|
+
</html>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"title": "Your sandbox site",
|
|
4
|
+
"publishedAt": "2026-01-01T00:00:00.000Z",
|
|
5
|
+
"modifiedAt": "2026-01-01T00:00:00.000Z",
|
|
6
|
+
"pageTypeId": "ph-pt-1",
|
|
7
|
+
"pageId": "ph-page-1"
|
|
8
|
+
}
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
{{#>site-template}}
|
|
12
|
+
|
|
13
|
+
<h1>Your sandbox site</h1>
|
|
14
|
+
<p>This site runs on your machine only. It is not connected to a Leed account, so you can design and build it freely.</p>
|
|
15
|
+
<ul>
|
|
16
|
+
<li>Preview it with <code>leed site build --serve</code>.</li>
|
|
17
|
+
<li>When you are happy with it, move it into Leed with <code>/leed:site-sandbox-move</code> in Claude.</li>
|
|
18
|
+
</ul>
|
|
19
|
+
|
|
20
|
+
{{/site-template}}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"dateFormat": "MMM D, YYYY",
|
|
3
|
+
"deployment": {
|
|
4
|
+
"public": {
|
|
5
|
+
"domain": "localhost:8080",
|
|
6
|
+
"pagesDomain": "localhost:8080",
|
|
7
|
+
"turnstilePublicKey": "1x00000000000000000000AA",
|
|
8
|
+
"customDomainActive": false
|
|
9
|
+
},
|
|
10
|
+
"preview": {
|
|
11
|
+
"domain": "localhost:8080",
|
|
12
|
+
"pagesDomain": "localhost:8080",
|
|
13
|
+
"turnstilePublicKey": "1x00000000000000000000AA",
|
|
14
|
+
"customDomainActive": false
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"ogCard": {
|
|
18
|
+
"title": "My sandbox site",
|
|
19
|
+
"description": "A Leed site built locally, before it has an account."
|
|
20
|
+
},
|
|
21
|
+
"paging": {
|
|
22
|
+
"minimum": 6,
|
|
23
|
+
"size": 9
|
|
24
|
+
},
|
|
25
|
+
"readingWpm": 250,
|
|
26
|
+
"siteDescription": "A Leed site built locally, before it has an account.",
|
|
27
|
+
"siteLocale": "en-us",
|
|
28
|
+
"siteTitle": "My sandbox site",
|
|
29
|
+
"documentationConfiguration": {
|
|
30
|
+
"menus": {
|
|
31
|
+
"top": "ph-menu-1",
|
|
32
|
+
"bottom": "ph-menu-2"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"entitlements": {
|
|
36
|
+
"tier": "enterprise",
|
|
37
|
+
"mcp": false
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*
|
|
2
|
+
The default border color has changed to `currentColor` in Tailwind CSS v4,
|
|
3
|
+
so we've added these compatibility styles to make sure everything still
|
|
4
|
+
looks the same as it did with Tailwind CSS v3.
|
|
5
|
+
|
|
6
|
+
If we ever want to remove these styles, we need to add an explicit border
|
|
7
|
+
color utility to any element that depends on these defaults.
|
|
8
|
+
*/
|
|
9
|
+
h1 {
|
|
10
|
+
@apply font-extrabold text-4xl sm:text-6xl text-(--site-header-1-color);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
h2 {
|
|
14
|
+
@apply font-bold text-3xl sm:text-4xl mt-6 text-(--site-header-2-color);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
h3 {
|
|
18
|
+
@apply font-extrabold text-xl sm:text-2xl mt-5 text-(--site-header-3-color);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
h4 {
|
|
22
|
+
@apply font-bold text-xl sm:text-xl mt-4 text-(--site-header-4-color);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
h1,
|
|
26
|
+
h2,
|
|
27
|
+
h3,
|
|
28
|
+
h4,
|
|
29
|
+
h5,
|
|
30
|
+
h6 {
|
|
31
|
+
letter-spacing: -0.025em;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
p {
|
|
35
|
+
@apply mt-4;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
a {
|
|
39
|
+
@apply text-(--site-anchor-text-color) hover:text-(--site-anchor-text-color-hover) active:text-(--site-anchor-text-color-active);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
pre {
|
|
43
|
+
@apply mt-8;
|
|
44
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SPDX-FileCopyrightText: © 2024-2025 Leed, Inc.
|
|
3
|
+
* SPDX-License-Identifier: LicenseRef-Leed-EULA
|
|
4
|
+
*/
|
|
5
|
+
import { i as externalCommandDetails, r as cliErrorFrom } from "./errors-CqKamGCu.js";
|
|
6
|
+
//#region src/cli/output/thrown.ts
|
|
7
|
+
/**
|
|
8
|
+
* Machine-readable codes for errors that are NOT `CliUserError` (#333).
|
|
9
|
+
*
|
|
10
|
+
* `cliErrorFrom` maps anything that is not a `CliUserError` to
|
|
11
|
+
* `internal_error`, which is correct for a genuine fault and wrong for the
|
|
12
|
+
* throws this CLI makes deliberately from its `preAction` hooks — a missing
|
|
13
|
+
* site checkout, an uninitialized site, a raw-content directory that
|
|
14
|
+
* is not there. Those are ordinary user situations with a real remedy, and an
|
|
15
|
+
* agent that reads `internal_error` for them files a bug instead of running
|
|
16
|
+
* `leed site init`.
|
|
17
|
+
*
|
|
18
|
+
* They cannot simply become `CliUserError`s: `src/cli/index.ts` renders that
|
|
19
|
+
* class as `Error: <message>` plus a hint line, while a plain `Error` reaches
|
|
20
|
+
* the user through `log.error("The following error occurred: …")`. Both
|
|
21
|
+
* renderings are pinned by the Phase 1 baseline, so changing the class changes
|
|
22
|
+
* user-visible output.
|
|
23
|
+
*
|
|
24
|
+
* So the code travels ALONGSIDE the error instead of changing what it is: a
|
|
25
|
+
* non-enumerable symbol property carrying the code, an optional cleaner
|
|
26
|
+
* message for the JSON document, a hint and details. The thrown value keeps its
|
|
27
|
+
* class, its `message` and its stack, so every human-mode path renders exactly
|
|
28
|
+
* as before; only the `--json` branch reads the annotation.
|
|
29
|
+
*
|
|
30
|
+
* The property is non-enumerable and symbol-keyed on purpose: `util.inspect`
|
|
31
|
+
* hides both by default, so an error that is later dumped with `console.error`
|
|
32
|
+
* (src/cli/commit.ts) shows nothing new.
|
|
33
|
+
*/
|
|
34
|
+
/** Where the annotation is parked on the thrown value. */
|
|
35
|
+
const ANNOTATION = Symbol.for("leed.cli.thrownAnnotation");
|
|
36
|
+
/**
|
|
37
|
+
* Attach `annotation` to `thrown` and return it, so a throw site reads
|
|
38
|
+
* `throw annotateThrown(Error(MESSAGE), { code: "not_a_site_repo", hint })`.
|
|
39
|
+
*
|
|
40
|
+
* Non-object throws (a bare string) are returned untouched rather than
|
|
41
|
+
* rejected: annotating is an enrichment, and failing to enrich must never turn
|
|
42
|
+
* into a second failure on top of the one being reported.
|
|
43
|
+
*/
|
|
44
|
+
function annotateThrown(thrown, annotation) {
|
|
45
|
+
if (typeof thrown === "object" && thrown !== null) Object.defineProperty(thrown, ANNOTATION, {
|
|
46
|
+
value: annotation,
|
|
47
|
+
enumerable: false,
|
|
48
|
+
configurable: true,
|
|
49
|
+
writable: true
|
|
50
|
+
});
|
|
51
|
+
return thrown;
|
|
52
|
+
}
|
|
53
|
+
/** The annotation on `thrown`, or `null` when it carries none. */
|
|
54
|
+
function annotationOf(thrown) {
|
|
55
|
+
if (typeof thrown !== "object" || thrown === null) return null;
|
|
56
|
+
const found = thrown[ANNOTATION];
|
|
57
|
+
if (typeof found !== "object" || found === null) return null;
|
|
58
|
+
return typeof found.code === "string" ? found : null;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Convert anything thrown into the envelope's `error` object, honoring an
|
|
62
|
+
* annotation when the throw site left one.
|
|
63
|
+
*
|
|
64
|
+
* Falls back to `cliErrorFrom`, so a `CliUserError` still keeps its own code,
|
|
65
|
+
* message and hint and an unannotated fault is still `internal_error`.
|
|
66
|
+
*/
|
|
67
|
+
function cliErrorFromThrown(thrown) {
|
|
68
|
+
const annotation = annotationOf(thrown);
|
|
69
|
+
if (!annotation) return cliErrorFrom(thrown);
|
|
70
|
+
const message = annotation.message ?? messageOf(thrown);
|
|
71
|
+
const details = annotation.details ?? (annotation.code === "external_command_failed" ? externalCommandDetails(thrown) : void 0);
|
|
72
|
+
return {
|
|
73
|
+
code: annotation.code,
|
|
74
|
+
message,
|
|
75
|
+
...annotation.hint ? { hint: annotation.hint } : {},
|
|
76
|
+
...details ? { details } : {},
|
|
77
|
+
...annotation.next && annotation.next.length > 0 ? { next: [...annotation.next] } : {}
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function messageOf(thrown) {
|
|
81
|
+
if (thrown instanceof Error) return thrown.message;
|
|
82
|
+
if (typeof thrown === "string") return thrown;
|
|
83
|
+
return String(thrown);
|
|
84
|
+
}
|
|
85
|
+
/** How many schema issues are worth listing before the rest are counted. */
|
|
86
|
+
const MAX_SUMMARIZED_ISSUES = 8;
|
|
87
|
+
/**
|
|
88
|
+
* Summarize a `ZodError` as `path: message` pairs.
|
|
89
|
+
*
|
|
90
|
+
* The raw error's `message` is a multi-kilobyte JSON dump of every issue with
|
|
91
|
+
* its input echoed back — unreadable for a person and useless for an agent,
|
|
92
|
+
* which branches on `code` rather than parsing prose. This is what goes in
|
|
93
|
+
* `error.details` instead, so the caller learns WHICH field is wrong without
|
|
94
|
+
* the document swallowing the whole config file.
|
|
95
|
+
*
|
|
96
|
+
* Duck-typed on `issues` rather than `instanceof ZodError`: the CLI is bundled
|
|
97
|
+
* and the schemas come from `@leed/data-types`, so two zod copies in one
|
|
98
|
+
* process is a realistic failure mode for an identity check and a silent one.
|
|
99
|
+
* Anything without an `issues` array falls back to its own message.
|
|
100
|
+
*/
|
|
101
|
+
function summarizeSchemaIssues(thrown) {
|
|
102
|
+
const issues = thrown?.issues;
|
|
103
|
+
if (!Array.isArray(issues) || issues.length === 0) return messageOf(thrown);
|
|
104
|
+
const listed = issues.slice(0, MAX_SUMMARIZED_ISSUES).map((issue) => {
|
|
105
|
+
const raw = issue ?? {};
|
|
106
|
+
return `${Array.isArray(raw.path) && raw.path.length > 0 ? raw.path.join(".") : "(root)"}: ${typeof raw.message === "string" ? raw.message : "invalid"}`;
|
|
107
|
+
});
|
|
108
|
+
const remaining = issues.length - listed.length;
|
|
109
|
+
if (remaining > 0) listed.push(`… and ${remaining} more problem${remaining === 1 ? "" : "s"}`);
|
|
110
|
+
return listed.join("; ");
|
|
111
|
+
}
|
|
112
|
+
//#endregion
|
|
113
|
+
export { cliErrorFromThrown as n, summarizeSchemaIssues as r, annotateThrown as t };
|