@brandlab-digital/conformance 3.7.0 → 3.9.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/README.md +26 -0
- package/dist/current-release.js +5 -5
- package/dist/current-release.js.map +1 -1
- package/dist/engineering.js +4 -2
- package/dist/engineering.js.map +1 -1
- package/dist/public-copy.d.ts +7 -0
- package/dist/public-copy.d.ts.map +1 -1
- package/dist/public-copy.js +8 -3
- package/dist/public-copy.js.map +1 -1
- package/dist/ready-cli.d.ts +38 -0
- package/dist/ready-cli.d.ts.map +1 -0
- package/dist/ready-cli.js +327 -0
- package/dist/ready-cli.js.map +1 -0
- package/dist/site-system/checks.d.ts +389 -0
- package/dist/site-system/checks.d.ts.map +1 -0
- package/dist/site-system/checks.js +96 -0
- package/dist/site-system/checks.js.map +1 -0
- package/dist/site-system/config.d.ts +40 -0
- package/dist/site-system/config.d.ts.map +1 -0
- package/dist/site-system/config.js +214 -0
- package/dist/site-system/config.js.map +1 -0
- package/dist/site-system/index.d.ts +14 -0
- package/dist/site-system/index.d.ts.map +1 -0
- package/dist/site-system/index.js +14 -0
- package/dist/site-system/index.js.map +1 -0
- package/dist/site-system/journeys/access.d.ts +7 -0
- package/dist/site-system/journeys/access.d.ts.map +1 -0
- package/dist/site-system/journeys/access.js +263 -0
- package/dist/site-system/journeys/access.js.map +1 -0
- package/dist/site-system/journeys/browser.d.ts +79 -0
- package/dist/site-system/journeys/browser.d.ts.map +1 -0
- package/dist/site-system/journeys/browser.js +218 -0
- package/dist/site-system/journeys/browser.js.map +1 -0
- package/dist/site-system/journeys/conversion.d.ts +3 -0
- package/dist/site-system/journeys/conversion.d.ts.map +1 -0
- package/dist/site-system/journeys/conversion.js +152 -0
- package/dist/site-system/journeys/conversion.js.map +1 -0
- package/dist/site-system/journeys/menu.d.ts +11 -0
- package/dist/site-system/journeys/menu.d.ts.map +1 -0
- package/dist/site-system/journeys/menu.js +395 -0
- package/dist/site-system/journeys/menu.js.map +1 -0
- package/dist/site-system/journeys/page-helpers.d.ts +146 -0
- package/dist/site-system/journeys/page-helpers.d.ts.map +1 -0
- package/dist/site-system/journeys/page-helpers.js +426 -0
- package/dist/site-system/journeys/page-helpers.js.map +1 -0
- package/dist/site-system/journeys/plan.d.ts +82 -0
- package/dist/site-system/journeys/plan.d.ts.map +1 -0
- package/dist/site-system/journeys/plan.js +112 -0
- package/dist/site-system/journeys/plan.js.map +1 -0
- package/dist/site-system/journeys/shell.d.ts +24 -0
- package/dist/site-system/journeys/shell.d.ts.map +1 -0
- package/dist/site-system/journeys/shell.js +269 -0
- package/dist/site-system/journeys/shell.js.map +1 -0
- package/dist/site-system/playwright-report.d.ts +22 -0
- package/dist/site-system/playwright-report.d.ts.map +1 -0
- package/dist/site-system/playwright-report.js +131 -0
- package/dist/site-system/playwright-report.js.map +1 -0
- package/dist/site-system/records.d.ts +30 -0
- package/dist/site-system/records.d.ts.map +1 -0
- package/dist/site-system/records.js +98 -0
- package/dist/site-system/records.js.map +1 -0
- package/dist/site-system/report.d.ts +116 -0
- package/dist/site-system/report.d.ts.map +1 -0
- package/dist/site-system/report.js +366 -0
- package/dist/site-system/report.js.map +1 -0
- package/dist/site-system/rule-modules.d.ts +8 -0
- package/dist/site-system/rule-modules.d.ts.map +1 -0
- package/dist/site-system/rule-modules.js +33 -0
- package/dist/site-system/rule-modules.js.map +1 -0
- package/dist/site-system/rules/design/d4-distinctness.d.ts +36 -0
- package/dist/site-system/rules/design/d4-distinctness.d.ts.map +1 -0
- package/dist/site-system/rules/design/d4-distinctness.js +207 -0
- package/dist/site-system/rules/design/d4-distinctness.js.map +1 -0
- package/dist/site-system/rules/design/index.d.ts +17 -0
- package/dist/site-system/rules/design/index.d.ts.map +1 -0
- package/dist/site-system/rules/design/index.js +7 -0
- package/dist/site-system/rules/design/index.js.map +1 -0
- package/dist/site-system/rules/enquiry/c2-quote-form.d.ts +31 -0
- package/dist/site-system/rules/enquiry/c2-quote-form.d.ts.map +1 -0
- package/dist/site-system/rules/enquiry/c2-quote-form.js +211 -0
- package/dist/site-system/rules/enquiry/c2-quote-form.js.map +1 -0
- package/dist/site-system/rules/enquiry/common.d.ts +37 -0
- package/dist/site-system/rules/enquiry/common.d.ts.map +1 -0
- package/dist/site-system/rules/enquiry/common.js +59 -0
- package/dist/site-system/rules/enquiry/common.js.map +1 -0
- package/dist/site-system/rules/enquiry/e1-recorded-titles.d.ts +8 -0
- package/dist/site-system/rules/enquiry/e1-recorded-titles.d.ts.map +1 -0
- package/dist/site-system/rules/enquiry/e1-recorded-titles.js +59 -0
- package/dist/site-system/rules/enquiry/e1-recorded-titles.js.map +1 -0
- package/dist/site-system/rules/enquiry/e9-cost-guides.d.ts +22 -0
- package/dist/site-system/rules/enquiry/e9-cost-guides.d.ts.map +1 -0
- package/dist/site-system/rules/enquiry/e9-cost-guides.js +55 -0
- package/dist/site-system/rules/enquiry/e9-cost-guides.js.map +1 -0
- package/dist/site-system/rules/enquiry/html.d.ts +53 -0
- package/dist/site-system/rules/enquiry/html.d.ts.map +1 -0
- package/dist/site-system/rules/enquiry/html.js +294 -0
- package/dist/site-system/rules/enquiry/html.js.map +1 -0
- package/dist/site-system/rules/enquiry/index.d.ts +17 -0
- package/dist/site-system/rules/enquiry/index.d.ts.map +1 -0
- package/dist/site-system/rules/enquiry/index.js +26 -0
- package/dist/site-system/rules/enquiry/index.js.map +1 -0
- package/dist/site-system/rules/enquiry/k8-sections.d.ts +17 -0
- package/dist/site-system/rules/enquiry/k8-sections.d.ts.map +1 -0
- package/dist/site-system/rules/enquiry/k8-sections.js +76 -0
- package/dist/site-system/rules/enquiry/k8-sections.js.map +1 -0
- package/dist/site-system/rules/enquiry/literal.d.ts +29 -0
- package/dist/site-system/rules/enquiry/literal.d.ts.map +1 -0
- package/dist/site-system/rules/enquiry/literal.js +189 -0
- package/dist/site-system/rules/enquiry/literal.js.map +1 -0
- package/dist/site-system/rules/enquiry/t11-licence-classes.d.ts +73 -0
- package/dist/site-system/rules/enquiry/t11-licence-classes.d.ts.map +1 -0
- package/dist/site-system/rules/enquiry/t11-licence-classes.js +275 -0
- package/dist/site-system/rules/enquiry/t11-licence-classes.js.map +1 -0
- package/dist/site-system/rules/enquiry/t5-reviews.d.ts +23 -0
- package/dist/site-system/rules/enquiry/t5-reviews.d.ts.map +1 -0
- package/dist/site-system/rules/enquiry/t5-reviews.js +91 -0
- package/dist/site-system/rules/enquiry/t5-reviews.js.map +1 -0
- package/dist/site-system/rules/form/c11-contact-route.d.ts +5 -0
- package/dist/site-system/rules/form/c11-contact-route.d.ts.map +1 -0
- package/dist/site-system/rules/form/c11-contact-route.js +132 -0
- package/dist/site-system/rules/form/c11-contact-route.js.map +1 -0
- package/dist/site-system/rules/form/c7-thank-you.d.ts +20 -0
- package/dist/site-system/rules/form/c7-thank-you.d.ts.map +1 -0
- package/dist/site-system/rules/form/c7-thank-you.js +67 -0
- package/dist/site-system/rules/form/c7-thank-you.js.map +1 -0
- package/dist/site-system/rules/form/c8-forgiving-form.d.ts +19 -0
- package/dist/site-system/rules/form/c8-forgiving-form.d.ts.map +1 -0
- package/dist/site-system/rules/form/c8-forgiving-form.js +128 -0
- package/dist/site-system/rules/form/c8-forgiving-form.js.map +1 -0
- package/dist/site-system/rules/form/index.d.ts +14 -0
- package/dist/site-system/rules/form/index.d.ts.map +1 -0
- package/dist/site-system/rules/form/index.js +13 -0
- package/dist/site-system/rules/form/index.js.map +1 -0
- package/dist/site-system/rules/library/common.d.ts +36 -0
- package/dist/site-system/rules/library/common.d.ts.map +1 -0
- package/dist/site-system/rules/library/common.js +70 -0
- package/dist/site-system/rules/library/common.js.map +1 -0
- package/dist/site-system/rules/library/index.d.ts +16 -0
- package/dist/site-system/rules/library/index.d.ts.map +1 -0
- package/dist/site-system/rules/library/index.js +19 -0
- package/dist/site-system/rules/library/index.js.map +1 -0
- package/dist/site-system/rules/library/k1-shared-components.d.ts +29 -0
- package/dist/site-system/rules/library/k1-shared-components.d.ts.map +1 -0
- package/dist/site-system/rules/library/k1-shared-components.js +97 -0
- package/dist/site-system/rules/library/k1-shared-components.js.map +1 -0
- package/dist/site-system/rules/navigation/extract.d.ts +50 -0
- package/dist/site-system/rules/navigation/extract.d.ts.map +1 -0
- package/dist/site-system/rules/navigation/extract.js +220 -0
- package/dist/site-system/rules/navigation/extract.js.map +1 -0
- package/dist/site-system/rules/navigation/html.d.ts +23 -0
- package/dist/site-system/rules/navigation/html.d.ts.map +1 -0
- package/dist/site-system/rules/navigation/html.js +219 -0
- package/dist/site-system/rules/navigation/html.js.map +1 -0
- package/dist/site-system/rules/navigation/index.d.ts +37 -0
- package/dist/site-system/rules/navigation/index.d.ts.map +1 -0
- package/dist/site-system/rules/navigation/index.js +163 -0
- package/dist/site-system/rules/navigation/index.js.map +1 -0
- package/dist/site-system/rules/navigation/record.d.ts +8 -0
- package/dist/site-system/rules/navigation/record.d.ts.map +1 -0
- package/dist/site-system/rules/navigation/record.js +39 -0
- package/dist/site-system/rules/navigation/record.js.map +1 -0
- package/dist/site-system/rules/sections/exif.d.ts +22 -0
- package/dist/site-system/rules/sections/exif.d.ts.map +1 -0
- package/dist/site-system/rules/sections/exif.js +218 -0
- package/dist/site-system/rules/sections/exif.js.map +1 -0
- package/dist/site-system/rules/sections/images.d.ts +31 -0
- package/dist/site-system/rules/sections/images.d.ts.map +1 -0
- package/dist/site-system/rules/sections/images.js +96 -0
- package/dist/site-system/rules/sections/images.js.map +1 -0
- package/dist/site-system/rules/sections/index.d.ts +20 -0
- package/dist/site-system/rules/sections/index.d.ts.map +1 -0
- package/dist/site-system/rules/sections/index.js +34 -0
- package/dist/site-system/rules/sections/index.js.map +1 -0
- package/dist/site-system/rules/sections/k11-density.d.ts +23 -0
- package/dist/site-system/rules/sections/k11-density.d.ts.map +1 -0
- package/dist/site-system/rules/sections/k11-density.js +88 -0
- package/dist/site-system/rules/sections/k11-density.js.map +1 -0
- package/dist/site-system/rules/sections/k12-contact.d.ts +13 -0
- package/dist/site-system/rules/sections/k12-contact.d.ts.map +1 -0
- package/dist/site-system/rules/sections/k12-contact.js +70 -0
- package/dist/site-system/rules/sections/k12-contact.js.map +1 -0
- package/dist/site-system/rules/sections/k2-skin-coverage.d.ts +11 -0
- package/dist/site-system/rules/sections/k2-skin-coverage.d.ts.map +1 -0
- package/dist/site-system/rules/sections/k2-skin-coverage.js +126 -0
- package/dist/site-system/rules/sections/k2-skin-coverage.js.map +1 -0
- package/dist/site-system/rules/sections/n9-footer.d.ts +40 -0
- package/dist/site-system/rules/sections/n9-footer.d.ts.map +1 -0
- package/dist/site-system/rules/sections/n9-footer.js +186 -0
- package/dist/site-system/rules/sections/n9-footer.js.map +1 -0
- package/dist/site-system/rules/sections/t6-media-entries.d.ts +14 -0
- package/dist/site-system/rules/sections/t6-media-entries.d.ts.map +1 -0
- package/dist/site-system/rules/sections/t6-media-entries.js +96 -0
- package/dist/site-system/rules/sections/t6-media-entries.js.map +1 -0
- package/dist/site-system/rules/sections/t7-main-images.d.ts +13 -0
- package/dist/site-system/rules/sections/t7-main-images.d.ts.map +1 -0
- package/dist/site-system/rules/sections/t7-main-images.js +41 -0
- package/dist/site-system/rules/sections/t7-main-images.js.map +1 -0
- package/dist/site-system/rules/sections/t8-prices.d.ts +13 -0
- package/dist/site-system/rules/sections/t8-prices.d.ts.map +1 -0
- package/dist/site-system/rules/sections/t8-prices.js +92 -0
- package/dist/site-system/rules/sections/t8-prices.js.map +1 -0
- package/dist/site-system/rules/sections/t9-location-metadata.d.ts +3 -0
- package/dist/site-system/rules/sections/t9-location-metadata.d.ts.map +1 -0
- package/dist/site-system/rules/sections/t9-location-metadata.js +54 -0
- package/dist/site-system/rules/sections/t9-location-metadata.js.map +1 -0
- package/dist/site-system/rules/shell/banned-wording.d.ts +24 -0
- package/dist/site-system/rules/shell/banned-wording.d.ts.map +1 -0
- package/dist/site-system/rules/shell/banned-wording.js +212 -0
- package/dist/site-system/rules/shell/banned-wording.js.map +1 -0
- package/dist/site-system/rules/shell/budgets.d.ts +43 -0
- package/dist/site-system/rules/shell/budgets.d.ts.map +1 -0
- package/dist/site-system/rules/shell/budgets.js +297 -0
- package/dist/site-system/rules/shell/budgets.js.map +1 -0
- package/dist/site-system/rules/shell/cta-labels.d.ts +17 -0
- package/dist/site-system/rules/shell/cta-labels.d.ts.map +1 -0
- package/dist/site-system/rules/shell/cta-labels.js +86 -0
- package/dist/site-system/rules/shell/cta-labels.js.map +1 -0
- package/dist/site-system/rules/shell/facts.d.ts +33 -0
- package/dist/site-system/rules/shell/facts.d.ts.map +1 -0
- package/dist/site-system/rules/shell/facts.js +217 -0
- package/dist/site-system/rules/shell/facts.js.map +1 -0
- package/dist/site-system/rules/shell/headings.d.ts +5 -0
- package/dist/site-system/rules/shell/headings.d.ts.map +1 -0
- package/dist/site-system/rules/shell/headings.js +23 -0
- package/dist/site-system/rules/shell/headings.js.map +1 -0
- package/dist/site-system/rules/shell/hero-location.d.ts +4 -0
- package/dist/site-system/rules/shell/hero-location.d.ts.map +1 -0
- package/dist/site-system/rules/shell/hero-location.js +45 -0
- package/dist/site-system/rules/shell/hero-location.js.map +1 -0
- package/dist/site-system/rules/shell/html.d.ts +53 -0
- package/dist/site-system/rules/shell/html.d.ts.map +1 -0
- package/dist/site-system/rules/shell/html.js +341 -0
- package/dist/site-system/rules/shell/html.js.map +1 -0
- package/dist/site-system/rules/shell/index.d.ts +18 -0
- package/dist/site-system/rules/shell/index.d.ts.map +1 -0
- package/dist/site-system/rules/shell/index.js +65 -0
- package/dist/site-system/rules/shell/index.js.map +1 -0
- package/dist/site-system/rules/shell/licence.d.ts +4 -0
- package/dist/site-system/rules/shell/licence.d.ts.map +1 -0
- package/dist/site-system/rules/shell/licence.js +60 -0
- package/dist/site-system/rules/shell/licence.js.map +1 -0
- package/dist/site-system/rules/shell/location-wording.d.ts +13 -0
- package/dist/site-system/rules/shell/location-wording.d.ts.map +1 -0
- package/dist/site-system/rules/shell/location-wording.js +15 -0
- package/dist/site-system/rules/shell/location-wording.js.map +1 -0
- package/dist/site-system/rules/shell/navigation.d.ts +5 -0
- package/dist/site-system/rules/shell/navigation.d.ts.map +1 -0
- package/dist/site-system/rules/shell/navigation.js +272 -0
- package/dist/site-system/rules/shell/navigation.js.map +1 -0
- package/dist/site-system/rules/shell/overlays.d.ts +4 -0
- package/dist/site-system/rules/shell/overlays.d.ts.map +1 -0
- package/dist/site-system/rules/shell/overlays.js +93 -0
- package/dist/site-system/rules/shell/overlays.js.map +1 -0
- package/dist/site-system/rules/shell/page.d.ts +51 -0
- package/dist/site-system/rules/shell/page.d.ts.map +1 -0
- package/dist/site-system/rules/shell/page.js +256 -0
- package/dist/site-system/rules/shell/page.js.map +1 -0
- package/dist/site-system/rules/shell/phone.d.ts +13 -0
- package/dist/site-system/rules/shell/phone.d.ts.map +1 -0
- package/dist/site-system/rules/shell/phone.js +99 -0
- package/dist/site-system/rules/shell/phone.js.map +1 -0
- package/dist/site-system/rules/shell/proof-numbers.d.ts +7 -0
- package/dist/site-system/rules/shell/proof-numbers.d.ts.map +1 -0
- package/dist/site-system/rules/shell/proof-numbers.js +81 -0
- package/dist/site-system/rules/shell/proof-numbers.js.map +1 -0
- package/dist/site-system/rules/shell/types.d.ts +80 -0
- package/dist/site-system/rules/shell/types.d.ts.map +1 -0
- package/dist/site-system/rules/shell/types.js +17 -0
- package/dist/site-system/rules/shell/types.js.map +1 -0
- package/dist/site-system/runners.d.ts +37 -0
- package/dist/site-system/runners.d.ts.map +1 -0
- package/dist/site-system/runners.js +48 -0
- package/dist/site-system/runners.js.map +1 -0
- package/dist/site-system/samples.d.ts +43 -0
- package/dist/site-system/samples.d.ts.map +1 -0
- package/dist/site-system/samples.js +99 -0
- package/dist/site-system/samples.js.map +1 -0
- package/dist/site-system/steps.d.ts +66 -0
- package/dist/site-system/steps.d.ts.map +1 -0
- package/dist/site-system/steps.js +45 -0
- package/dist/site-system/steps.js.map +1 -0
- package/dist/site-system/streamed-html.d.ts +9 -0
- package/dist/site-system/streamed-html.d.ts.map +1 -0
- package/dist/site-system/streamed-html.js +43 -0
- package/dist/site-system/streamed-html.js.map +1 -0
- package/dist/site-system-e2e.d.ts +6 -0
- package/dist/site-system-e2e.d.ts.map +1 -0
- package/dist/site-system-e2e.js +54 -0
- package/dist/site-system-e2e.js.map +1 -0
- package/package.json +22 -5
package/dist/public-copy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-copy.js","sourceRoot":"","sources":["../src/public-copy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,qCAAqC,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACzG,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAc3C,oFAAoF;AACpF,MAAM,kBAAkB,GAAG,0EAA0E,CAAC;AACtG,wEAAwE;AACxE,MAAM,oBAAoB,GAAG,8DAA8D,CAAC;AAC5F,MAAM,eAAe,GAAG,0EAA0E,CAAC;AACnG,MAAM,eAAe,GAAG,yCAAyC,CAAC;AAElE,SAAS,eAAe,CAAC,IAAY;IACnC,OAAO,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACvE,CAAC;AAED,gEAAgE;AAChE,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IACvE,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAA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";\nimport ts from \"typescript\";\nimport { BRANDLAB_IMPLEMENTATION_COPY_PATTERNS, isBrandlabTradePhrase } from \"./search-certification.js\";\nimport { lineAt } from \"./source-files.js\";\n\n/**\n * Implementation wording found in text that renders publicly: JSX text, rendered\n * attributes, copy-bearing string literals, MDX and Markdown prose, frontmatter\n * and JSON data values.\n */\nexport interface PublicCopyFinding {\n line: number;\n /** Where the text renders, such as \"JSX text\" or \"the alt attribute\". */\n where: string;\n pattern: RegExp;\n}\n\n/** Root-level framework modules that configure the server and never render copy. */\nconst SERVER_ROOT_MODULE = /^(?:instrumentation[\\w.-]*|proxy|middleware|next\\.config)\\.[cm]?[jt]sx?$/;\n/** Test, fixture and story sources are not part of the public build. */\nconst NON_PUBLIC_DIRECTORY = /(?:^|\\/)(?:__tests__|__mocks__|__fixtures__|__snapshots__)\\//;\nconst NON_PUBLIC_ROOT = /^(?:src\\/)?(?:test|tests|testing|e2e|fixtures|mocks|stories|storybook)\\//;\nconst NON_PUBLIC_FILE = /\\.(?:d\\.[cm]?ts|stories\\.[cm]?[jt]sx?)$/;\n\nfunction isNonPublicPath(path: string): boolean {\n return NON_PUBLIC_DIRECTORY.test(path) || NON_PUBLIC_ROOT.test(path);\n}\n\n/** Whether a project source module can render public output. */\nexport function isPublicModulePath(path: string): boolean {\n if (!path.includes(\"/\") && SERVER_ROOT_MODULE.test(path)) return false;\n return !isNonPublicPath(path) && !NON_PUBLIC_FILE.test(path);\n}\n\nconst CONTENT_SEGMENTS = new Set([\"content\", \"posts\", \"blog\", \"articles\", \"data\", \"app\"]);\nconst DOCUMENTATION_NAMES = /^(?:readme|agents|claude|changelog|contributing|license|design|strategy)(?:\\.[\\w-]+)?\\.mdx?$/i;\n\n/** Whether a project file is public content: MDX anywhere, Markdown and JSON under content or data. */\nexport function isPublicDocumentPath(path: string): boolean {\n if (isNonPublicPath(path)) return false;\n const name = posix.basename(path);\n if (/\\.mdx$/i.test(path)) return !DOCUMENTATION_NAMES.test(name);\n const inContent = posix.dirname(path).split(\"/\").some((segment) => CONTENT_SEGMENTS.has(segment));\n if (/\\.md$/i.test(path)) return inContent && !DOCUMENTATION_NAMES.test(name);\n return /\\.json$/i.test(path) && inContent && !/(?:^|\\.)schema\\.json$/i.test(name);\n}\n\n// --- matching ----------------------------------------------------------------\n\nconst GLOBAL_PATTERNS = BRANDLAB_IMPLEMENTATION_COPY_PATTERNS.map((pattern) => ({\n pattern,\n global: new RegExp(pattern.source, pattern.flags.includes(\"g\") ? pattern.flags : `${pattern.flags}g`),\n}));\n\n/**\n * The first wording pattern that occurs as a word of prose. Occurrences inside a\n * code token (a Tailwind variant such as placeholder:text-stone-400, a path, a file\n * name, a CSS property or a kebab-case class) or a literal trade phrase (benchtop\n * template) are not implementation wording. Text that is not a copy slot must hold\n * at least two words, so single identifiers never match.\n */\nexport function findImplementationWording(\n text: string,\n options: { singleWord?: boolean } = {},\n): { pattern: RegExp; index: number } | null {\n if (!options.singleWord && !/\\S\\s+\\S/.test(text)) return null;\n for (const { pattern, global } of GLOBAL_PATTERNS) {\n for (const match of text.matchAll(global)) {\n if (isBrandlabTradePhrase(text, match.index, match[0].length)) continue;\n if (/\\s/.test(match[0]) || !isCodeToken(text, match.index, match[0].length)) {\n return { pattern, index: match.index };\n }\n }\n }\n return null;\n}\n\nfunction isCodeToken(text: string, index: number, length: number): boolean {\n let start = index;\n while (start > 0 && !/\\s/.test(text[start - 1]!)) start -= 1;\n let end = index + length;\n while (end < text.length && !/\\s/.test(text[end]!)) end += 1;\n const token = text\n .slice(start, end)\n .replace(/^[(\"'‘“]+/, \"\")\n .replace(/[)\"'’”.,;:!?]+$/, \"\");\n if (/[/\\\\[\\]{}()<>=@#$^|`]/.test(token) || /[:.]/.test(token)) return true;\n return /^-?[a-z0-9]+(?:-[a-z0-9]+)+$/.test(token) && (/\\d/.test(token) || token.split(\"-\").length >= 3);\n}\n\n// --- rendering context -------------------------------------------------------\n\n/** Class, style and variant names never hold copy: className, inputClass, cardStyles, variants. */\nconst CLASS_OR_STYLE_WORDS = new Set([\n \"class\", \"classes\", \"classname\", \"classnames\", \"cls\", \"style\", \"styles\", \"sx\", \"css\", \"tw\", \"variant\",\n \"variants\", \"compoundvariants\",\n]);\nconst CLASS_OR_STYLE_SUFFIX = /[a-z0-9](?:Class|Classes|ClassName|ClassNames|Style|Styles|Variants|Css)$/;\n/** Internal record fields and builders (rationale, evidence, decisions) never render. */\nconst INTERNAL_RECORD_NAME = /^(?:rationales?|evidence|decisions?)$|[a-z0-9](?:Rationales?|Evidence|Decisions?)$/;\n\n/** Names whose values are identifiers, addresses or code rather than copy. */\nconst NON_RENDERING_NAMES = new Set([\n \"id\", \"key\", \"ref\", \"href\", \"src\", \"srcset\", \"sizes\", \"url\", \"path\", \"pathname\", \"slug\", \"route\",\n \"canonical\", \"icon\", \"variant\", \"size\", \"as\", \"type\", \"kind\", \"mode\", \"tone\", \"theme\", \"layout\",\n \"rel\", \"target\", \"method\", \"enctype\", \"pattern\", \"regex\", \"selector\", \"matcher\",\n \"media\", \"strategy\", \"loading\", \"decoding\", \"fetchpriority\", \"crossorigin\", \"referrerpolicy\",\n \"integrity\", \"nonce\", \"viewbox\", \"d\", \"points\", \"transform\", \"fill\", \"stroke\", \"xmlns\",\n \"testid\", \"datatestid\", \"fontfamily\", \"font\", \"locale\", \"timezone\", \"format\", \"env\", \"event\",\n \"eventname\", \"@context\", \"@id\", \"@type\",\n]);\n\n/** Intrinsic element attributes that render text (visibly or to assistive technology). */\nconst RENDERED_INTRINSIC_ATTRIBUTES = new Set([\"alt\", \"title\", \"placeholder\", \"label\", \"content\", \"value\", \"summary\", \"abbr\"]);\nconst RENDERED_ARIA_ATTRIBUTES = new Set([\"aria-label\", \"aria-description\", \"aria-roledescription\", \"aria-valuetext\", \"aria-placeholder\"]);\n/** Attributes that pass through a component without rendering. */\nconst NON_RENDERING_COMPONENT_ATTRIBUTES = new Set([\n \"name\", \"form\", \"htmlfor\", \"for\", \"lang\", \"dir\", \"tabindex\", \"slot\", \"role\", \"autocomplete\", \"inputmode\",\n \"accept\", \"allow\", \"sandbox\", \"width\", \"height\", \"itemprop\", \"itemtype\", \"itemid\", \"property\", \"charset\",\n \"httpequiv\", \"http-equiv\", \"priority\", \"quality\", \"prefetch\", \"scroll\", \"replace\",\n]);\n\n/** Copy slots are checked even when they hold a single word. */\nconst COPY_NAME =\n /^(?:alt|title|label|caption|heading|headline|subheading|subtitle|eyebrow|summary|excerpt|intro|description|text|body|content|question|answer|placeholder|cta|tagline|quote|message|aria-label)$|[a-z0-9](?:Alt|Title|Label|Caption|Heading|Headline|Subtitle|Eyebrow|Summary|Excerpt|Description|Text|Body|Content|Question|Answer|Placeholder|Cta|Tagline|Message)$/;\n\n/** Elements whose children are code, not copy. */\nconst CODE_ELEMENTS = new Set([\"script\", \"style\", \"Script\"]);\n/** Calls whose string arguments are class lists. */\nconst CLASS_UTILITIES = new Set([\"cn\", \"clsx\", \"cx\", \"classNames\", \"classnames\", \"twMerge\", \"twJoin\", \"cva\", \"tv\"]);\n/** Calls whose string arguments never render. */\nconst NON_RENDERING_CALLS =\n /^(?:(?:console|logger|log)\\.\\w+|require(?:\\.resolve)?|fetch|RegExp|Symbol(?:\\.for)?|JSON\\.parse|matchMedia|redirect|permanentRedirect|notFound|invariant|assert\\w*|gtag|(?:NextResponse|Response)\\.(?:redirect|rewrite))$|\\.(?:querySelector(?:All)?|getElementById|getElementsByClassName|closest|matches|matchMedia|addEventListener|removeEventListener|setAttribute|getAttribute|removeAttribute|hasAttribute|toggleAttribute|startsWith|endsWith|includes|indexOf|split|replace|replaceAll|match|matchAll|search|test|join|localeCompare)$|classList\\./;\nconst NON_RENDERING_CONSTRUCTORS = /(?:Error|^URL|^URLSearchParams|^RegExp|^Date|^Headers|^Intl\\.\\w+)$/;\nconst CODE_TAGS = /^(?:css|sql|gql|graphql|keyframes|createGlobalStyle|styled(?:\\.\\w+)?)$/;\nconst COMPARISONS = new Set([\n ts.SyntaxKind.EqualsEqualsEqualsToken, ts.SyntaxKind.ExclamationEqualsEqualsToken,\n ts.SyntaxKind.EqualsEqualsToken, ts.SyntaxKind.ExclamationEqualsToken, ts.SyntaxKind.InKeyword,\n ts.SyntaxKind.InstanceOfKeyword,\n]);\n\nfunction nameRenders(name: string): boolean {\n const lower = name.toLowerCase();\n return !CLASS_OR_STYLE_WORDS.has(lower) && !CLASS_OR_STYLE_SUFFIX.test(name) && !INTERNAL_RECORD_NAME.test(name) &&\n !NON_RENDERING_NAMES.has(lower) && !lower.startsWith(\"data-\");\n}\n\nfunction attributeRenders(tag: string, attribute: string): boolean {\n if (attribute.startsWith(\"aria-\")) return RENDERED_ARIA_ATTRIBUTES.has(attribute);\n if (/^on[A-Z]/.test(attribute) || !nameRenders(attribute)) return false;\n if (/^[a-z]/.test(tag) && !tag.includes(\".\")) return RENDERED_INTRINSIC_ATTRIBUTES.has(attribute);\n return !NON_RENDERING_COMPONENT_ATTRIBUTES.has(attribute.toLowerCase());\n}\n\ninterface Slot {\n where: string;\n singleWord: boolean;\n}\n\nfunction entityName(node: ts.Node): string | null {\n if (ts.isIdentifier(node) || ts.isPrivateIdentifier(node)) return node.text;\n if (ts.isStringLiteralLike(node) || ts.isNumericLiteral(node)) return node.text;\n if (ts.isPropertyAccessExpression(node)) {\n const object = entityName(node.expression);\n return object === null ? node.name.text : `${object}.${node.name.text}`;\n }\n if (ts.isCallExpression(node)) return entityName(node.expression);\n if (ts.isJsxNamespacedName(node)) return `${node.namespace.text}:${node.name.text}`;\n if (node.kind === ts.SyntaxKind.ThisKeyword) return \"this\";\n return null;\n}\n\nfunction lastName(name: string): string {\n return name.slice(name.lastIndexOf(\".\") + 1);\n}\n\n/** Where a string literal renders, or null when its position never renders. */\nfunction literalSlot(node: ts.Node): Slot | null {\n let slot: Slot | undefined;\n let child: ts.Node = node;\n for (let parent = node.parent; parent && !ts.isSourceFile(parent); child = parent, parent = parent.parent) {\n if (ts.isTypeNode(parent) || ts.isEnumMember(parent) || ts.isComputedPropertyName(parent)) return null;\n if (\n ts.isImportDeclaration(parent) || ts.isExportDeclaration(parent) ||\n ts.isExternalModuleReference(parent) || ts.isImportEqualsDeclaration(parent) ||\n ts.isThrowStatement(parent)\n ) return null;\n if (ts.isExpressionStatement(parent) && child === node) return null;\n if (ts.isCaseClause(parent) && parent.expression === child) return null;\n if (ts.isElementAccessExpression(parent) && parent.argumentExpression === child) return null;\n if (ts.isPropertyAssignment(parent) || ts.isPropertyDeclaration(parent)) {\n if (parent.name === child) return null;\n const key = entityName(parent.name);\n if (key !== null) {\n if (!nameRenders(key)) return null;\n slot ??= { where: `the ${key} field`, singleWord: COPY_NAME.test(key) };\n }\n } else if (ts.isJsxAttribute(parent)) {\n const attribute = entityName(parent.name) ?? \"\";\n const element = parent.parent.parent;\n if (!attributeRenders(entityName(element.tagName) ?? \"\", attribute)) return null;\n slot ??= { where: `the ${attribute} attribute`, singleWord: attribute === \"alt\" || COPY_NAME.test(attribute) };\n } else if (ts.isJsxElement(parent)) {\n if (CODE_ELEMENTS.has(entityName(parent.openingElement.tagName) ?? \"\")) return null;\n slot ??= { where: \"JSX text\", singleWord: true };\n } else if (ts.isJsxFragment(parent)) {\n slot ??= { where: \"JSX text\", singleWord: true };\n } else if (ts.isCallExpression(parent) || ts.isNewExpression(parent)) {\n if (parent.expression === child) continue;\n if (parent.expression.kind === ts.SyntaxKind.ImportKeyword) return null;\n const callee = entityName(parent.expression) ?? \"\";\n const skipped = ts.isNewExpression(parent)\n ? NON_RENDERING_CONSTRUCTORS.test(callee)\n : CLASS_UTILITIES.has(lastName(callee)) || NON_RENDERING_CALLS.test(callee) ||\n INTERNAL_RECORD_NAME.test(lastName(callee));\n if (skipped) return null;\n slot ??= { where: \"a rendered string\", singleWord: false };\n } else if (ts.isTaggedTemplateExpression(parent)) {\n if (CODE_TAGS.test(entityName(parent.tag) ?? \"\")) return null;\n } else if (ts.isBinaryExpression(parent)) {\n if (COMPARISONS.has(parent.operatorToken.kind)) return null;\n if (parent.operatorToken.kind === ts.SyntaxKind.EqualsToken && parent.right === child) {\n const target = entityName(parent.left);\n if (target !== null && !nameRenders(lastName(target))) return null;\n }\n } else if (\n ts.isVariableDeclaration(parent) || ts.isParameter(parent) || ts.isBindingElement(parent) ||\n ts.isFunctionDeclaration(parent) || ts.isMethodDeclaration(parent)\n ) {\n const name = parent.name && ts.isIdentifier(parent.name) ? parent.name.text : null;\n if (name !== null && !nameRenders(name)) return null;\n if (name !== null && !ts.isFunctionDeclaration(parent) && !ts.isMethodDeclaration(parent)) {\n slot ??= { where: `the ${name} value`, singleWord: COPY_NAME.test(name) };\n }\n }\n }\n return slot ?? { where: \"a rendered string\", singleWord: false };\n}\n\nfunction insideCodeElement(node: ts.Node): boolean {\n for (let parent = node.parent; parent && !ts.isSourceFile(parent); parent = parent.parent) {\n if (ts.isJsxElement(parent) && CODE_ELEMENTS.has(entityName(parent.openingElement.tagName) ?? \"\")) return true;\n }\n return false;\n}\n\n/** Tags inside a string (rich text) do not render; blank them without moving offsets. */\nfunction blankTags(text: string): string {\n return text.replace(/<[^<>]*>/g, (tag) => \" \".repeat(tag.length));\n}\n\n/** Implementation wording in the rendered copy of a TypeScript, JavaScript or JSON source. */\nexport function findWordingInSource(source: ts.SourceFile): PublicCopyFinding[] {\n const text = source.text;\n const findings: PublicCopyFinding[] = [];\n const report = (value: string, offsets: (index: number) => number, slot: Slot) => {\n const match = findImplementationWording(value, { singleWord: slot.singleWord });\n if (match) findings.push({ line: lineAt(text, offsets(match.index)), where: slot.where, pattern: match.pattern });\n };\n const visit = (node: ts.Node) => {\n if (ts.isJsxText(node)) {\n if (!node.containsOnlyTriviaWhiteSpaces && !insideCodeElement(node)) {\n const start = node.end - node.text.length;\n report(node.text, (index) => start + index, { where: \"JSX text\", singleWord: true });\n }\n return;\n }\n if (ts.isStringLiteral(node) || ts.isNoSubstitutionTemplateLiteral(node)) {\n const slot = literalSlot(node);\n const start = node.getStart(source) + 1;\n if (slot) report(blankTags(node.text), (index) => start + index, slot);\n return;\n }\n if (ts.isTemplateExpression(node)) {\n const slot = literalSlot(node);\n if (slot) {\n const parts = [node.head, ...node.templateSpans.map((span) => span.literal)];\n const starts: number[] = [];\n let value = \"\";\n for (const [position, part] of parts.entries()) {\n if (position > 0) value += \" \";\n starts.push(value.length);\n value += part.text;\n }\n report(blankTags(value), (index) => {\n let position = starts.length - 1;\n while (position > 0 && starts[position]! > index) position -= 1;\n return parts[position]!.getStart(source) + 1 + (index - starts[position]!);\n }, slot);\n }\n }\n ts.forEachChild(node, visit);\n };\n visit(source);\n return findings;\n}\n\n/** Parse a JSON document with parent links so data values share the module rules. */\nexport function parseJsonSource(path: string, text: string): ts.SourceFile {\n return ts.createSourceFile(path, text, ts.ScriptTarget.Latest, true, ts.ScriptKind.JSON);\n}\n\n// --- MDX and Markdown --------------------------------------------------------\n\n/** Frontmatter keys whose values are identifiers, dates or addresses. */\nconst NON_RENDERING_FRONTMATTER = /^(?:slug|date|datePublished|dateModified|published|publishedAt|updated|updatedAt|lastModified|draft|id|image|images|cover|coverImage|thumbnail|ogImage|src|href|url|canonical|layout|template|redirect|redirectFrom|aliases|order|weight|featured|noindex|robots|readingTime)$/i;\n\n/** Implementation wording in the rendered text of an MDX or Markdown document. */\nexport function findWordingInMarkdown(text: string): PublicCopyFinding[] {\n const findings: PublicCopyFinding[] = [];\n const frontmatter = /^---\\r?\\n([\\s\\S]*?)\\r?\\n---[ \\t]*(?:\\r?\\n|$)/.exec(text);\n let bodyStart = 0;\n if (frontmatter) {\n bodyStart = frontmatter[0].length;\n let lastKey: string | null = null;\n let offset = text.indexOf(\"\\n\") + 1;\n for (const line of frontmatter[1]!.split(\"\\n\")) {\n const entry = /^\\s*(?:-\\s+)?(?:([\"']?)([\\w@$.-]+)\\1\\s*:(?=\\s|$))?\\s*(.*?)\\s*$/.exec(line.replace(/\\r$/, \"\"))!;\n if (entry[2]) lastKey = entry[2];\n const key = entry[2] ?? lastKey;\n const value = frontmatterValue(entry[3]!);\n if (key !== null && value !== \"\" && !NON_RENDERING_FRONTMATTER.test(key) && nameRenders(key)) {\n const match = findImplementationWording(value, { singleWord: COPY_NAME.test(key) });\n if (match) findings.push({ line: lineAt(text, offset), where: `the ${key} frontmatter`, pattern: match.pattern });\n }\n offset += line.length + 1;\n }\n }\n const { prose, esm } = renderedMarkdownText(text, bodyStart);\n if (esm.trim() !== \"\") {\n // ESM such as `export const metadata = { ... }` renders as page metadata.\n findings.push(...findWordingInSource(ts.createSourceFile(\"content.tsx\", esm, ts.ScriptTarget.Latest, true, ts.ScriptKind.TSX)));\n }\n let offset = 0;\n for (const line of prose.split(\"\\n\")) {\n const match = findImplementationWording(line, { singleWord: true });\n if (match && offset + match.index >= bodyStart) {\n findings.push({ line: lineAt(text, offset + match.index), where: \"the content\", pattern: match.pattern });\n }\n offset += line.length + 1;\n }\n return findings.sort((left, right) => left.line - right.line);\n}\n\n/** A frontmatter scalar or inline list as its rendered words (\"\" for block indicators and comments). */\nfunction frontmatterValue(raw: string): string {\n if (/^[|>][-+]?\\d*$/.test(raw) || raw.startsWith(\"#\")) return \"\";\n const list = /^\\[(.*)\\]$/.exec(raw);\n if (list) return list[1]!.replace(/[\"']/g, \" \");\n return raw.replace(/^([\"'])(.*)\\1$/, \"$2\");\n}\n\n/**\n * The document with everything that does not render as words blanked in place\n * (offsets and lines unchanged): frontmatter, code, ESM, comments, expressions,\n * tag syntax (rendered attribute values stay), link targets and Markdown markers.\n * The ESM blocks come back separately, blanked the same way, to be read as source.\n */\nfunction renderedMarkdownText(text: string, bodyStart: number): { prose: string; esm: string } {\n const out = text.split(\"\");\n const esmOut = text.replace(/[^\\n]/g, \" \").split(\"\");\n const blank = (from: number, to: number) => {\n for (let index = Math.max(from, 0); index < Math.min(to, out.length); index += 1) {\n if (out[index] !== \"\\n\") out[index] = \" \";\n }\n };\n blank(0, bodyStart);\n\n // Fenced code and ESM blocks, line by line.\n let fence: string | null = null;\n let esm = false;\n let offset = bodyStart;\n for (const line of text.slice(bodyStart).split(\"\\n\")) {\n const end = offset + line.length;\n const marker = /^ {0,3}(`{3,}|~{3,})/.exec(line)?.[1];\n if (fence !== null) {\n blank(offset, end);\n if (marker && marker[0] === fence[0] && marker.length >= fence.length && line.trim() === marker) fence = null;\n } else if (marker) {\n blank(offset, end);\n fence = marker;\n } else if (esm || /^(?:import|export)\\b/.test(line)) {\n for (let index = offset; index < end; index += 1) esmOut[index] = text[index]!;\n blank(offset, end);\n esm = line.trim() !== \"\";\n }\n offset = end + 1;\n }\n\n // Comments, expressions, inline code and tags.\n const skipBraces = (from: number): number => {\n let depth = 0;\n for (let index = from; index < text.length; index += 1) {\n const char = out[index];\n if (char === \"{\") depth += 1;\n else if (char === \"}\" && --depth === 0) return index + 1;\n }\n return -1;\n };\n let index = bodyStart;\n while (index < out.length) {\n const char = out[index]!;\n if (char === \"\\\\\" && index + 1 < out.length && out[index + 1] !== \"\\n\") {\n blank(index, index + 1);\n index += 2;\n } else if (char === \"`\") {\n let run = 1;\n while (out[index + run] === \"`\") run += 1;\n const close = text.indexOf(\"`\".repeat(run), index + run);\n if (close === -1) index += run;\n else {\n blank(index, close + run);\n index = close + run;\n }\n } else if (char === \"{\") {\n const end = skipBraces(index);\n if (end === -1) index += 1;\n else {\n blank(index, end);\n index = end;\n }\n } else if (char === \"<\" && text.startsWith(\"<!--\", index)) {\n const close = text.indexOf(\"-->\", index + 4);\n const end = close === -1 ? text.length : close + 3;\n blank(index, end);\n index = end;\n } else if (char === \"<\" && /[A-Za-z/]/.test(out[index + 1] ?? \"\")) {\n const end = blankTag(text, out, index, blank, skipBraces);\n index = end === -1 ? index + 1 : end;\n } else {\n index += 1;\n }\n }\n\n // Markdown syntax: reference definitions, link targets and markers.\n let rendered = out.join(\"\");\n rendered = rendered.replace(/^ {0,3}\\[[^\\]\\n]+\\]:[^\\n]*$/gm, (line) => \" \".repeat(line.length));\n rendered = rendered.replace(/(!?\\[)([^\\]\\n]*)(\\]\\([^)\\n]*\\)|\\]\\[[^\\]\\n]*\\])/g, (_match, open: string, label: string, target: string) =>\n `${\" \".repeat(open.length)}${label}${\" \".repeat(target.length)}`);\n rendered = rendered.replace(/[*~#>|]/g, \" \").replace(/(?<!\\w)_+|_+(?!\\w)/g, (match) => \" \".repeat(match.length));\n return { prose: rendered, esm: esmOut.join(\"\") };\n}\n\n/** Blank one JSX or HTML tag in place, keeping rendered attribute values; -1 if it is not a tag. */\nfunction blankTag(\n text: string,\n out: string[],\n start: number,\n blank: (from: number, to: number) => void,\n skipBraces: (from: number) => number,\n): number {\n const name = /^<\\/?([A-Za-z][\\w.:-]*)/.exec(text.slice(start, start + 200));\n if (!name) return -1;\n const tag = name[1]!;\n let index = start + name[0].length;\n const keep: [number, number][] = [];\n while (index < text.length) {\n while (/\\s/.test(text[index] ?? \"\")) {\n if (text.startsWith(\"\\n\\n\", index)) return -1;\n index += 1;\n }\n if (text.startsWith(\"/>\", index)) {\n index += 2;\n break;\n }\n if (text[index] === \">\") {\n index += 1;\n break;\n }\n if (text[index] === \"{\") {\n const end = skipBraces(index);\n if (end === -1) return -1;\n index = end;\n continue;\n }\n const attribute = /^[^\\s=>/{}]+/.exec(text.slice(index, index + 100))?.[0];\n if (!attribute) return -1;\n index += attribute.length;\n while (text[index] === \" \" || text[index] === \"\\t\") index += 1;\n if (text[index] !== \"=\") continue;\n index += 1;\n while (text[index] === \" \" || text[index] === \"\\t\") index += 1;\n const quote = text[index];\n if (quote === '\"' || quote === \"'\") {\n const close = text.indexOf(quote, index + 1);\n if (close === -1) return -1;\n if (attributeRenders(tag, attribute)) keep.push([index + 1, close]);\n index = close + 1;\n } else if (quote === \"{\") {\n const end = skipBraces(index);\n if (end === -1) return -1;\n index = end;\n } else {\n const value = /^[^\\s>]+/.exec(text.slice(index))?.[0] ?? \"\";\n index += value.length;\n }\n }\n const saved = keep.map(([from, to]) => out.slice(from, to));\n blank(start, index);\n keep.forEach(([from], position) => {\n saved[position]!.forEach((char, offset) => {\n out[from + offset] = char;\n });\n });\n return index;\n}\n"]}
|
|
1
|
+
{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randlabTradePhrase } from \"./search-certification.js\";\nimport { lineAt } from \"./source-files.js\";\n\n/**\n * Implementation wording found in text that renders publicly: JSX text, rendered\n * attributes, copy-bearing string literals, MDX and Markdown prose, frontmatter\n * and JSON data values.\n */\nexport interface PublicCopyFinding {\n line: number;\n /** Where the text renders, such as \"JSX text\" or \"the alt attribute\". */\n where: string;\n pattern: RegExp;\n}\n\n/** Root-level framework modules that configure the server and never render copy. */\nconst SERVER_ROOT_MODULE = /^(?:instrumentation[\\w.-]*|proxy|middleware|next\\.config)\\.[cm]?[jt]sx?$/;\n/** Test, fixture and story sources are not part of the public build. */\nconst NON_PUBLIC_DIRECTORY = /(?:^|\\/)(?:__tests__|__mocks__|__fixtures__|__snapshots__)\\//;\nconst NON_PUBLIC_ROOT = /^(?:src\\/)?(?:test|tests|testing|e2e|fixtures|mocks|stories|storybook)\\//;\nconst NON_PUBLIC_FILE = /\\.(?:d\\.[cm]?ts|stories\\.[cm]?[jt]sx?)$/;\n\nfunction isNonPublicPath(path: string): boolean {\n return NON_PUBLIC_DIRECTORY.test(path) || NON_PUBLIC_ROOT.test(path);\n}\n\n/** Whether a project source module can render public output. */\nexport function isPublicModulePath(path: string): boolean {\n if (!path.includes(\"/\") && SERVER_ROOT_MODULE.test(path)) return false;\n return !isNonPublicPath(path) && !NON_PUBLIC_FILE.test(path);\n}\n\nconst CONTENT_SEGMENTS = new Set([\"content\", \"posts\", \"blog\", \"articles\", \"data\", \"app\"]);\nconst DOCUMENTATION_NAMES = /^(?:readme|agents|claude|changelog|contributing|license|design|strategy)(?:\\.[\\w-]+)?\\.mdx?$/i;\n\n/** Whether a project file is public content: MDX anywhere, Markdown and JSON under content or data. */\nexport function isPublicDocumentPath(path: string): boolean {\n if (isNonPublicPath(path)) return false;\n const name = posix.basename(path);\n if (/\\.mdx$/i.test(path)) return !DOCUMENTATION_NAMES.test(name);\n const inContent = posix.dirname(path).split(\"/\").some((segment) => CONTENT_SEGMENTS.has(segment));\n if (/\\.md$/i.test(path)) return inContent && !DOCUMENTATION_NAMES.test(name);\n return /\\.json$/i.test(path) && inContent && !/(?:^|\\.)schema\\.json$/i.test(name);\n}\n\n// --- matching ----------------------------------------------------------------\n\nconst GLOBAL_PATTERNS = BRANDLAB_IMPLEMENTATION_COPY_PATTERNS.map((pattern) => ({\n pattern,\n global: new RegExp(pattern.source, pattern.flags.includes(\"g\") ? pattern.flags : `${pattern.flags}g`),\n}));\n\n/**\n * The first wording pattern that occurs as a word of prose. Occurrences inside a\n * code token (a Tailwind variant such as placeholder:text-stone-400, a path, a file\n * name, a CSS property or a kebab-case class) or a literal trade phrase (benchtop\n * template) are not implementation wording. Text that is not a copy slot must hold\n * at least two words, so single identifiers never match.\n */\nexport function findImplementationWording(\n text: string,\n options: { singleWord?: boolean } = {},\n): { pattern: RegExp; index: number } | null {\n for (const found of implementationWordingMatches(text, options)) return found;\n return null;\n}\n\n/** Every implementation-wording match in `text`, pattern by pattern, for callers that must judge each one. */\nexport function* implementationWordingMatches(\n text: string,\n options: { singleWord?: boolean } = {},\n): Generator<{ pattern: RegExp; index: number }> {\n if (!options.singleWord && !/\\S\\s+\\S/.test(text)) return;\n for (const { pattern, global } of GLOBAL_PATTERNS) {\n for (const match of text.matchAll(global)) {\n if (isBrandlabTradePhrase(text, match.index, match[0].length)) continue;\n if (/\\s/.test(match[0]) || !isCodeToken(text, match.index, match[0].length)) {\n yield { pattern, index: match.index };\n }\n }\n }\n}\n\nfunction isCodeToken(text: string, index: number, length: number): boolean {\n let start = index;\n while (start > 0 && !/\\s/.test(text[start - 1]!)) start -= 1;\n let end = index + length;\n while (end < text.length && !/\\s/.test(text[end]!)) end += 1;\n const token = text\n .slice(start, end)\n .replace(/^[(\"'‘“]+/, \"\")\n .replace(/[)\"'’”.,;:!?]+$/, \"\");\n if (/[/\\\\[\\]{}()<>=@#$^|`]/.test(token) || /[:.]/.test(token)) return true;\n return /^-?[a-z0-9]+(?:-[a-z0-9]+)+$/.test(token) && (/\\d/.test(token) || token.split(\"-\").length >= 3);\n}\n\n// --- rendering context -------------------------------------------------------\n\n/** Class, style and variant names never hold copy: className, inputClass, cardStyles, variants. */\nconst CLASS_OR_STYLE_WORDS = new Set([\n \"class\", \"classes\", \"classname\", \"classnames\", \"cls\", \"style\", \"styles\", \"sx\", \"css\", \"tw\", \"variant\",\n \"variants\", \"compoundvariants\",\n]);\nconst CLASS_OR_STYLE_SUFFIX = /[a-z0-9](?:Class|Classes|ClassName|ClassNames|Style|Styles|Variants|Css)$/;\n/** Internal record fields and builders (rationale, evidence, decisions) never render. */\nconst INTERNAL_RECORD_NAME = /^(?:rationales?|evidence|decisions?)$|[a-z0-9](?:Rationales?|Evidence|Decisions?)$/;\n\n/** Names whose values are identifiers, addresses or code rather than copy. */\nconst NON_RENDERING_NAMES = new Set([\n \"id\", \"key\", \"ref\", \"href\", \"src\", \"srcset\", \"sizes\", \"url\", \"path\", \"pathname\", \"slug\", \"route\",\n \"canonical\", \"icon\", \"variant\", \"size\", \"as\", \"type\", \"kind\", \"mode\", \"tone\", \"theme\", \"layout\",\n \"rel\", \"target\", \"method\", \"enctype\", \"pattern\", \"regex\", \"selector\", \"matcher\",\n \"media\", \"strategy\", \"loading\", \"decoding\", \"fetchpriority\", \"crossorigin\", \"referrerpolicy\",\n \"integrity\", \"nonce\", \"viewbox\", \"d\", \"points\", \"transform\", \"fill\", \"stroke\", \"xmlns\",\n \"testid\", \"datatestid\", \"fontfamily\", \"font\", \"locale\", \"timezone\", \"format\", \"env\", \"event\",\n \"eventname\", \"@context\", \"@id\", \"@type\",\n]);\n\n/** Intrinsic element attributes that render text (visibly or to assistive technology). */\nconst RENDERED_INTRINSIC_ATTRIBUTES = new Set([\"alt\", \"title\", \"placeholder\", \"label\", \"content\", \"value\", \"summary\", \"abbr\"]);\nconst RENDERED_ARIA_ATTRIBUTES = new Set([\"aria-label\", \"aria-description\", \"aria-roledescription\", \"aria-valuetext\", \"aria-placeholder\"]);\n/** Attributes that pass through a component without rendering. */\nconst NON_RENDERING_COMPONENT_ATTRIBUTES = new Set([\n \"name\", \"form\", \"htmlfor\", \"for\", \"lang\", \"dir\", \"tabindex\", \"slot\", \"role\", \"autocomplete\", \"inputmode\",\n \"accept\", \"allow\", \"sandbox\", \"width\", \"height\", \"itemprop\", \"itemtype\", \"itemid\", \"property\", \"charset\",\n \"httpequiv\", \"http-equiv\", \"priority\", \"quality\", \"prefetch\", \"scroll\", \"replace\",\n]);\n\n/** Copy slots are checked even when they hold a single word. */\nconst COPY_NAME =\n /^(?:alt|title|label|caption|heading|headline|subheading|subtitle|eyebrow|summary|excerpt|intro|description|text|body|content|question|answer|placeholder|cta|tagline|quote|message|aria-label)$|[a-z0-9](?:Alt|Title|Label|Caption|Heading|Headline|Subtitle|Eyebrow|Summary|Excerpt|Description|Text|Body|Content|Question|Answer|Placeholder|Cta|Tagline|Message)$/;\n\n/** Elements whose children are code, not copy. */\nconst CODE_ELEMENTS = new Set([\"script\", \"style\", \"Script\"]);\n/** Calls whose string arguments are class lists. */\nconst CLASS_UTILITIES = new Set([\"cn\", \"clsx\", \"cx\", \"classNames\", \"classnames\", \"twMerge\", \"twJoin\", \"cva\", \"tv\"]);\n/** Calls whose string arguments never render. */\nconst NON_RENDERING_CALLS =\n /^(?:(?:console|logger|log)\\.\\w+|require(?:\\.resolve)?|fetch|RegExp|Symbol(?:\\.for)?|JSON\\.parse|matchMedia|redirect|permanentRedirect|notFound|invariant|assert\\w*|gtag|(?:NextResponse|Response)\\.(?:redirect|rewrite))$|\\.(?:querySelector(?:All)?|getElementById|getElementsByClassName|closest|matches|matchMedia|addEventListener|removeEventListener|setAttribute|getAttribute|removeAttribute|hasAttribute|toggleAttribute|startsWith|endsWith|includes|indexOf|split|replace|replaceAll|match|matchAll|search|test|join|localeCompare)$|classList\\./;\nconst NON_RENDERING_CONSTRUCTORS = /(?:Error|^URL|^URLSearchParams|^RegExp|^Date|^Headers|^Intl\\.\\w+)$/;\nconst CODE_TAGS = /^(?:css|sql|gql|graphql|keyframes|createGlobalStyle|styled(?:\\.\\w+)?)$/;\nconst COMPARISONS = new Set([\n ts.SyntaxKind.EqualsEqualsEqualsToken, ts.SyntaxKind.ExclamationEqualsEqualsToken,\n ts.SyntaxKind.EqualsEqualsToken, ts.SyntaxKind.ExclamationEqualsToken, ts.SyntaxKind.InKeyword,\n ts.SyntaxKind.InstanceOfKeyword,\n]);\n\nfunction nameRenders(name: string): boolean {\n const lower = name.toLowerCase();\n return !CLASS_OR_STYLE_WORDS.has(lower) && !CLASS_OR_STYLE_SUFFIX.test(name) && !INTERNAL_RECORD_NAME.test(name) &&\n !NON_RENDERING_NAMES.has(lower) && !lower.startsWith(\"data-\");\n}\n\nfunction attributeRenders(tag: string, attribute: string): boolean {\n if (attribute.startsWith(\"aria-\")) return RENDERED_ARIA_ATTRIBUTES.has(attribute);\n if (/^on[A-Z]/.test(attribute) || !nameRenders(attribute)) return false;\n if (/^[a-z]/.test(tag) && !tag.includes(\".\")) return RENDERED_INTRINSIC_ATTRIBUTES.has(attribute);\n return !NON_RENDERING_COMPONENT_ATTRIBUTES.has(attribute.toLowerCase());\n}\n\ninterface Slot {\n where: string;\n singleWord: boolean;\n}\n\nfunction entityName(node: ts.Node): string | null {\n if (ts.isIdentifier(node) || ts.isPrivateIdentifier(node)) return node.text;\n if (ts.isStringLiteralLike(node) || ts.isNumericLiteral(node)) return node.text;\n if (ts.isPropertyAccessExpression(node)) {\n const object = entityName(node.expression);\n return object === null ? node.name.text : `${object}.${node.name.text}`;\n }\n if (ts.isCallExpression(node)) return entityName(node.expression);\n if (ts.isJsxNamespacedName(node)) return `${node.namespace.text}:${node.name.text}`;\n if (node.kind === ts.SyntaxKind.ThisKeyword) return \"this\";\n return null;\n}\n\nfunction lastName(name: string): string {\n return name.slice(name.lastIndexOf(\".\") + 1);\n}\n\n/** Where a string literal renders, or null when its position never renders. */\nfunction literalSlot(node: ts.Node): Slot | null {\n let slot: Slot | undefined;\n let child: ts.Node = node;\n for (let parent = node.parent; parent && !ts.isSourceFile(parent); child = parent, parent = parent.parent) {\n if (ts.isTypeNode(parent) || ts.isEnumMember(parent) || ts.isComputedPropertyName(parent)) return null;\n if (\n ts.isImportDeclaration(parent) || ts.isExportDeclaration(parent) ||\n ts.isExternalModuleReference(parent) || ts.isImportEqualsDeclaration(parent) ||\n ts.isThrowStatement(parent)\n ) return null;\n if (ts.isExpressionStatement(parent) && child === node) return null;\n if (ts.isCaseClause(parent) && parent.expression === child) return null;\n if (ts.isElementAccessExpression(parent) && parent.argumentExpression === child) return null;\n if (ts.isPropertyAssignment(parent) || ts.isPropertyDeclaration(parent)) {\n if (parent.name === child) return null;\n const key = entityName(parent.name);\n if (key !== null) {\n if (!nameRenders(key)) return null;\n slot ??= { where: `the ${key} field`, singleWord: COPY_NAME.test(key) };\n }\n } else if (ts.isJsxAttribute(parent)) {\n const attribute = entityName(parent.name) ?? \"\";\n const element = parent.parent.parent;\n if (!attributeRenders(entityName(element.tagName) ?? \"\", attribute)) return null;\n slot ??= { where: `the ${attribute} attribute`, singleWord: attribute === \"alt\" || COPY_NAME.test(attribute) };\n } else if (ts.isJsxElement(parent)) {\n if (CODE_ELEMENTS.has(entityName(parent.openingElement.tagName) ?? \"\")) return null;\n slot ??= { where: \"JSX text\", singleWord: true };\n } else if (ts.isJsxFragment(parent)) {\n slot ??= { where: \"JSX text\", singleWord: true };\n } else if (ts.isCallExpression(parent) || ts.isNewExpression(parent)) {\n if (parent.expression === child) continue;\n if (parent.expression.kind === ts.SyntaxKind.ImportKeyword) return null;\n const callee = entityName(parent.expression) ?? \"\";\n const skipped = ts.isNewExpression(parent)\n ? NON_RENDERING_CONSTRUCTORS.test(callee)\n : CLASS_UTILITIES.has(lastName(callee)) || NON_RENDERING_CALLS.test(callee) ||\n INTERNAL_RECORD_NAME.test(lastName(callee));\n if (skipped) return null;\n slot ??= { where: \"a rendered string\", singleWord: false };\n } else if (ts.isTaggedTemplateExpression(parent)) {\n if (CODE_TAGS.test(entityName(parent.tag) ?? \"\")) return null;\n } else if (ts.isBinaryExpression(parent)) {\n if (COMPARISONS.has(parent.operatorToken.kind)) return null;\n if (parent.operatorToken.kind === ts.SyntaxKind.EqualsToken && parent.right === child) {\n const target = entityName(parent.left);\n if (target !== null && !nameRenders(lastName(target))) return null;\n }\n } else if (\n ts.isVariableDeclaration(parent) || ts.isParameter(parent) || ts.isBindingElement(parent) ||\n ts.isFunctionDeclaration(parent) || ts.isMethodDeclaration(parent)\n ) {\n const name = parent.name && ts.isIdentifier(parent.name) ? parent.name.text : null;\n if (name !== null && !nameRenders(name)) return null;\n if (name !== null && !ts.isFunctionDeclaration(parent) && !ts.isMethodDeclaration(parent)) {\n slot ??= { where: `the ${name} value`, singleWord: COPY_NAME.test(name) };\n }\n }\n }\n return slot ?? { where: \"a rendered string\", singleWord: false };\n}\n\nfunction insideCodeElement(node: ts.Node): boolean {\n for (let parent = node.parent; parent && !ts.isSourceFile(parent); parent = parent.parent) {\n if (ts.isJsxElement(parent) && CODE_ELEMENTS.has(entityName(parent.openingElement.tagName) ?? \"\")) return true;\n }\n return false;\n}\n\n/** Tags inside a string (rich text) do not render; blank them without moving offsets. */\nfunction blankTags(text: string): string {\n return text.replace(/<[^<>]*>/g, (tag) => \" \".repeat(tag.length));\n}\n\n/** Implementation wording in the rendered copy of a TypeScript, JavaScript or JSON source. */\nexport function findWordingInSource(source: ts.SourceFile): PublicCopyFinding[] {\n const text = source.text;\n const findings: PublicCopyFinding[] = [];\n const report = (value: string, offsets: (index: number) => number, slot: Slot) => {\n const match = findImplementationWording(value, { singleWord: slot.singleWord });\n if (match) findings.push({ line: lineAt(text, offsets(match.index)), where: slot.where, pattern: match.pattern });\n };\n const visit = (node: ts.Node) => {\n if (ts.isJsxText(node)) {\n if (!node.containsOnlyTriviaWhiteSpaces && !insideCodeElement(node)) {\n const start = node.end - node.text.length;\n report(node.text, (index) => start + index, { where: \"JSX text\", singleWord: true });\n }\n return;\n }\n if (ts.isStringLiteral(node) || ts.isNoSubstitutionTemplateLiteral(node)) {\n const slot = literalSlot(node);\n const start = node.getStart(source) + 1;\n if (slot) report(blankTags(node.text), (index) => start + index, slot);\n return;\n }\n if (ts.isTemplateExpression(node)) {\n const slot = literalSlot(node);\n if (slot) {\n const parts = [node.head, ...node.templateSpans.map((span) => span.literal)];\n const starts: number[] = [];\n let value = \"\";\n for (const [position, part] of parts.entries()) {\n if (position > 0) value += \" \";\n starts.push(value.length);\n value += part.text;\n }\n report(blankTags(value), (index) => {\n let position = starts.length - 1;\n while (position > 0 && starts[position]! > index) position -= 1;\n return parts[position]!.getStart(source) + 1 + (index - starts[position]!);\n }, slot);\n }\n }\n ts.forEachChild(node, visit);\n };\n visit(source);\n return findings;\n}\n\n/** Parse a JSON document with parent links so data values share the module rules. */\nexport function parseJsonSource(path: string, text: string): ts.SourceFile {\n return ts.createSourceFile(path, text, ts.ScriptTarget.Latest, true, ts.ScriptKind.JSON);\n}\n\n// --- MDX and Markdown --------------------------------------------------------\n\n/** Frontmatter keys whose values are identifiers, dates or addresses. */\nconst NON_RENDERING_FRONTMATTER = /^(?:slug|date|datePublished|dateModified|published|publishedAt|updated|updatedAt|lastModified|draft|id|image|images|cover|coverImage|thumbnail|ogImage|src|href|url|canonical|layout|template|redirect|redirectFrom|aliases|order|weight|featured|noindex|robots|readingTime)$/i;\n\n/** Implementation wording in the rendered text of an MDX or Markdown document. */\nexport function findWordingInMarkdown(text: string): PublicCopyFinding[] {\n const findings: PublicCopyFinding[] = [];\n const frontmatter = /^---\\r?\\n([\\s\\S]*?)\\r?\\n---[ \\t]*(?:\\r?\\n|$)/.exec(text);\n let bodyStart = 0;\n if (frontmatter) {\n bodyStart = frontmatter[0].length;\n let lastKey: string | null = null;\n let offset = text.indexOf(\"\\n\") + 1;\n for (const line of frontmatter[1]!.split(\"\\n\")) {\n const entry = /^\\s*(?:-\\s+)?(?:([\"']?)([\\w@$.-]+)\\1\\s*:(?=\\s|$))?\\s*(.*?)\\s*$/.exec(line.replace(/\\r$/, \"\"))!;\n if (entry[2]) lastKey = entry[2];\n const key = entry[2] ?? lastKey;\n const value = frontmatterValue(entry[3]!);\n if (key !== null && value !== \"\" && !NON_RENDERING_FRONTMATTER.test(key) && nameRenders(key)) {\n const match = findImplementationWording(value, { singleWord: COPY_NAME.test(key) });\n if (match) findings.push({ line: lineAt(text, offset), where: `the ${key} frontmatter`, pattern: match.pattern });\n }\n offset += line.length + 1;\n }\n }\n const { prose, esm } = renderedMarkdownText(text, bodyStart);\n if (esm.trim() !== \"\") {\n // ESM such as `export const metadata = { ... }` renders as page metadata.\n findings.push(...findWordingInSource(ts.createSourceFile(\"content.tsx\", esm, ts.ScriptTarget.Latest, true, ts.ScriptKind.TSX)));\n }\n let offset = 0;\n for (const line of prose.split(\"\\n\")) {\n const match = findImplementationWording(line, { singleWord: true });\n if (match && offset + match.index >= bodyStart) {\n findings.push({ line: lineAt(text, offset + match.index), where: \"the content\", pattern: match.pattern });\n }\n offset += line.length + 1;\n }\n return findings.sort((left, right) => left.line - right.line);\n}\n\n/** A frontmatter scalar or inline list as its rendered words (\"\" for block indicators and comments). */\nfunction frontmatterValue(raw: string): string {\n if (/^[|>][-+]?\\d*$/.test(raw) || raw.startsWith(\"#\")) return \"\";\n const list = /^\\[(.*)\\]$/.exec(raw);\n if (list) return list[1]!.replace(/[\"']/g, \" \");\n return raw.replace(/^([\"'])(.*)\\1$/, \"$2\");\n}\n\n/**\n * The document with everything that does not render as words blanked in place\n * (offsets and lines unchanged): frontmatter, code, ESM, comments, expressions,\n * tag syntax (rendered attribute values stay), link targets and Markdown markers.\n * The ESM blocks come back separately, blanked the same way, to be read as source.\n */\nfunction renderedMarkdownText(text: string, bodyStart: number): { prose: string; esm: string } {\n const out = text.split(\"\");\n const esmOut = text.replace(/[^\\n]/g, \" \").split(\"\");\n const blank = (from: number, to: number) => {\n for (let index = Math.max(from, 0); index < Math.min(to, out.length); index += 1) {\n if (out[index] !== \"\\n\") out[index] = \" \";\n }\n };\n blank(0, bodyStart);\n\n // Fenced code and ESM blocks, line by line.\n let fence: string | null = null;\n let esm = false;\n let offset = bodyStart;\n for (const line of text.slice(bodyStart).split(\"\\n\")) {\n const end = offset + line.length;\n const marker = /^ {0,3}(`{3,}|~{3,})/.exec(line)?.[1];\n if (fence !== null) {\n blank(offset, end);\n if (marker && marker[0] === fence[0] && marker.length >= fence.length && line.trim() === marker) fence = null;\n } else if (marker) {\n blank(offset, end);\n fence = marker;\n } else if (esm || /^(?:import|export)\\b/.test(line)) {\n for (let index = offset; index < end; index += 1) esmOut[index] = text[index]!;\n blank(offset, end);\n esm = line.trim() !== \"\";\n }\n offset = end + 1;\n }\n\n // Comments, expressions, inline code and tags.\n const skipBraces = (from: number): number => {\n let depth = 0;\n for (let index = from; index < text.length; index += 1) {\n const char = out[index];\n if (char === \"{\") depth += 1;\n else if (char === \"}\" && --depth === 0) return index + 1;\n }\n return -1;\n };\n let index = bodyStart;\n while (index < out.length) {\n const char = out[index]!;\n if (char === \"\\\\\" && index + 1 < out.length && out[index + 1] !== \"\\n\") {\n blank(index, index + 1);\n index += 2;\n } else if (char === \"`\") {\n let run = 1;\n while (out[index + run] === \"`\") run += 1;\n const close = text.indexOf(\"`\".repeat(run), index + run);\n if (close === -1) index += run;\n else {\n blank(index, close + run);\n index = close + run;\n }\n } else if (char === \"{\") {\n const end = skipBraces(index);\n if (end === -1) index += 1;\n else {\n blank(index, end);\n index = end;\n }\n } else if (char === \"<\" && text.startsWith(\"<!--\", index)) {\n const close = text.indexOf(\"-->\", index + 4);\n const end = close === -1 ? text.length : close + 3;\n blank(index, end);\n index = end;\n } else if (char === \"<\" && /[A-Za-z/]/.test(out[index + 1] ?? \"\")) {\n const end = blankTag(text, out, index, blank, skipBraces);\n index = end === -1 ? index + 1 : end;\n } else {\n index += 1;\n }\n }\n\n // Markdown syntax: reference definitions, link targets and markers.\n let rendered = out.join(\"\");\n rendered = rendered.replace(/^ {0,3}\\[[^\\]\\n]+\\]:[^\\n]*$/gm, (line) => \" \".repeat(line.length));\n rendered = rendered.replace(/(!?\\[)([^\\]\\n]*)(\\]\\([^)\\n]*\\)|\\]\\[[^\\]\\n]*\\])/g, (_match, open: string, label: string, target: string) =>\n `${\" \".repeat(open.length)}${label}${\" \".repeat(target.length)}`);\n rendered = rendered.replace(/[*~#>|]/g, \" \").replace(/(?<!\\w)_+|_+(?!\\w)/g, (match) => \" \".repeat(match.length));\n return { prose: rendered, esm: esmOut.join(\"\") };\n}\n\n/** Blank one JSX or HTML tag in place, keeping rendered attribute values; -1 if it is not a tag. */\nfunction blankTag(\n text: string,\n out: string[],\n start: number,\n blank: (from: number, to: number) => void,\n skipBraces: (from: number) => number,\n): number {\n const name = /^<\\/?([A-Za-z][\\w.:-]*)/.exec(text.slice(start, start + 200));\n if (!name) return -1;\n const tag = name[1]!;\n let index = start + name[0].length;\n const keep: [number, number][] = [];\n while (index < text.length) {\n while (/\\s/.test(text[index] ?? \"\")) {\n if (text.startsWith(\"\\n\\n\", index)) return -1;\n index += 1;\n }\n if (text.startsWith(\"/>\", index)) {\n index += 2;\n break;\n }\n if (text[index] === \">\") {\n index += 1;\n break;\n }\n if (text[index] === \"{\") {\n const end = skipBraces(index);\n if (end === -1) return -1;\n index = end;\n continue;\n }\n const attribute = /^[^\\s=>/{}]+/.exec(text.slice(index, index + 100))?.[0];\n if (!attribute) return -1;\n index += attribute.length;\n while (text[index] === \" \" || text[index] === \"\\t\") index += 1;\n if (text[index] !== \"=\") continue;\n index += 1;\n while (text[index] === \" \" || text[index] === \"\\t\") index += 1;\n const quote = text[index];\n if (quote === '\"' || quote === \"'\") {\n const close = text.indexOf(quote, index + 1);\n if (close === -1) return -1;\n if (attributeRenders(tag, attribute)) keep.push([index + 1, close]);\n index = close + 1;\n } else if (quote === \"{\") {\n const end = skipBraces(index);\n if (end === -1) return -1;\n index = end;\n } else {\n const value = /^[^\\s>]+/.exec(text.slice(index))?.[0] ?? \"\";\n index += value.length;\n }\n }\n const saved = keep.map(([from, to]) => out.slice(from, to));\n blank(start, index);\n keep.forEach(([from], position) => {\n saved[position]!.forEach((char, offset) => {\n out[from + offset] = char;\n });\n });\n return index;\n}\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { type SiteSystemRenderedRunner } from "./site-system/runners.js";
|
|
3
|
+
import { type SiteSystemFetch } from "./site-system/samples.js";
|
|
4
|
+
interface ReadyReportOptions {
|
|
5
|
+
command: "report";
|
|
6
|
+
root: string;
|
|
7
|
+
playwrightReport: string;
|
|
8
|
+
baseUrl?: string;
|
|
9
|
+
buildDir: string;
|
|
10
|
+
findings: string[];
|
|
11
|
+
installedRelease?: string;
|
|
12
|
+
launch: boolean;
|
|
13
|
+
}
|
|
14
|
+
interface ReadyRecordOptions {
|
|
15
|
+
command: "record";
|
|
16
|
+
root: string;
|
|
17
|
+
id: string;
|
|
18
|
+
evidence?: string;
|
|
19
|
+
note?: string;
|
|
20
|
+
}
|
|
21
|
+
type ReadyCliOptions = ReadyReportOptions | ReadyRecordOptions | {
|
|
22
|
+
command: "help";
|
|
23
|
+
};
|
|
24
|
+
interface CliIo {
|
|
25
|
+
stdout: (value: string) => void;
|
|
26
|
+
stderr: (value: string) => void;
|
|
27
|
+
}
|
|
28
|
+
export interface BrandlabReadyCliDependencies {
|
|
29
|
+
/** The rule modules to run (default: SITE_SYSTEM_RENDERED_RUNNERS). */
|
|
30
|
+
runners?: readonly SiteSystemRenderedRunner[];
|
|
31
|
+
fetch?: SiteSystemFetch;
|
|
32
|
+
now?: () => Date;
|
|
33
|
+
}
|
|
34
|
+
export declare function parseBrandlabReadyArgs(argv: readonly string[]): ReadyCliOptions;
|
|
35
|
+
export declare function runBrandlabReadyCli(argv: readonly string[], io?: CliIo, dependencies?: BrandlabReadyCliDependencies): Promise<number>;
|
|
36
|
+
export declare function isBrandlabReadyCliEntrypoint(moduleUrl: string, argvPath: string | undefined): boolean;
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=ready-cli.d.ts.map
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,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,EAAE,GAAE,KAGH,EACD,YAAY,GAAE,4BAAiC,GAC9C,OAAO,CAAC,MAAM,CAAC,CAwCjB;AA4KD,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAOrG"}
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { existsSync, mkdirSync, readFileSync, realpathSync, writeFileSync } from "node:fs";
|
|
3
|
+
import { dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { detectInstalledBrandlabRelease, evaluateBrandlabProject } from "./project.js";
|
|
6
|
+
import { readSiteSystemProjectConfig } from "./site-system/config.js";
|
|
7
|
+
import { readSiteSystemJourneyReport } from "./site-system/playwright-report.js";
|
|
8
|
+
import { appendSiteSystemRecord, readSiteSystemRecords } from "./site-system/records.js";
|
|
9
|
+
import { buildSiteSystemReadyReport, renderSiteSystemReadyMarkdown, SITE_SYSTEM_READY_REPORT_PATHS, } from "./site-system/report.js";
|
|
10
|
+
import { SITE_SYSTEM_RENDERED_RUNNERS } from "./site-system/rule-modules.js";
|
|
11
|
+
import { isSiteSystemFinding, runSiteSystemRenderedRunners, } from "./site-system/runners.js";
|
|
12
|
+
import { loadSiteSystemPages, planSiteSystemSamplePaths } from "./site-system/samples.js";
|
|
13
|
+
import { SITE_SYSTEM_RECORDED_CHECK_IDS } from "./site-system/steps.js";
|
|
14
|
+
const DEFAULT_PLAYWRIGHT_REPORT = "test-results/site-system.json";
|
|
15
|
+
/** The checks a --findings file may set: K10 (the lenient harness) and the other recorded checks. */
|
|
16
|
+
const SUPPLIABLE_IDS = new Set(SITE_SYSTEM_RECORDED_CHECK_IDS);
|
|
17
|
+
const DEFAULT_BUILD_DIR = ".next";
|
|
18
|
+
const HELP = `Brandlab ready gate
|
|
19
|
+
|
|
20
|
+
Writes docs/ready/ready-report.md and .json for the Site System tier declared in
|
|
21
|
+
brandlab.config.ts (siteSystem: { tier }), and records launch-day and human steps.
|
|
22
|
+
|
|
23
|
+
Usage:
|
|
24
|
+
brandlab-ready [--root <path>]
|
|
25
|
+
[--playwright-report <path>] journey results (default ${DEFAULT_PLAYWRIGHT_REPORT})
|
|
26
|
+
[--base-url <url>] fetch the sample pages from the running site
|
|
27
|
+
[--build-dir <path>] otherwise read their HTML from the build (default ${DEFAULT_BUILD_DIR})
|
|
28
|
+
[--findings <path>]... K10 or X1 results as SiteSystemFinding JSON (the lenient harness)
|
|
29
|
+
[--installed-release <version>]
|
|
30
|
+
[--launch] also require every launch-day and human step
|
|
31
|
+
brandlab-ready record <id> --evidence <where the proof is> [--note <text>] [--root <path>]
|
|
32
|
+
|
|
33
|
+
Exit status:
|
|
34
|
+
0 ready at the declared tier, or nothing blocks (no tier declared, or none of its checks released)
|
|
35
|
+
1 a blocking check failed or did not run, home or the contact page could not be read, a --base-url
|
|
36
|
+
sample did not answer with HTML, or brandlab.config.ts could not be read in full
|
|
37
|
+
(with --launch, also a step not recorded)
|
|
38
|
+
2 the gate could not run (bad arguments, an unreadable config or records file)
|
|
39
|
+
`;
|
|
40
|
+
export function parseBrandlabReadyArgs(argv) {
|
|
41
|
+
if (argv.includes("--help") || argv.includes("-h"))
|
|
42
|
+
return { command: "help" };
|
|
43
|
+
if (argv[0] === "record")
|
|
44
|
+
return parseRecordArgs(argv.slice(1));
|
|
45
|
+
const parsed = {
|
|
46
|
+
command: "report",
|
|
47
|
+
root: process.cwd(),
|
|
48
|
+
playwrightReport: DEFAULT_PLAYWRIGHT_REPORT,
|
|
49
|
+
buildDir: DEFAULT_BUILD_DIR,
|
|
50
|
+
findings: [],
|
|
51
|
+
launch: false,
|
|
52
|
+
};
|
|
53
|
+
for (let index = 0; index < argv.length; index += 1) {
|
|
54
|
+
const argument = argv[index];
|
|
55
|
+
if (argument === "--root")
|
|
56
|
+
parsed.root = resolve(requireValue(argv, ++index, argument));
|
|
57
|
+
else if (argument === "--playwright-report")
|
|
58
|
+
parsed.playwrightReport = requireValue(argv, ++index, argument);
|
|
59
|
+
else if (argument === "--build-dir")
|
|
60
|
+
parsed.buildDir = requireValue(argv, ++index, argument);
|
|
61
|
+
else if (argument === "--findings")
|
|
62
|
+
parsed.findings.push(requireValue(argv, ++index, argument));
|
|
63
|
+
else if (argument === "--installed-release")
|
|
64
|
+
parsed.installedRelease = requireValue(argv, ++index, argument);
|
|
65
|
+
else if (argument === "--launch")
|
|
66
|
+
parsed.launch = true;
|
|
67
|
+
else if (argument === "--base-url") {
|
|
68
|
+
const value = requireValue(argv, ++index, argument);
|
|
69
|
+
let url;
|
|
70
|
+
try {
|
|
71
|
+
url = new URL(value);
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
throw new Error(`--base-url ${value} is not a URL.`);
|
|
75
|
+
}
|
|
76
|
+
if (url.protocol !== "http:" && url.protocol !== "https:")
|
|
77
|
+
throw new Error("--base-url must be an http or https URL.");
|
|
78
|
+
parsed.baseUrl = value;
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
throw new Error(`Unknown argument ${argument}.`);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return parsed;
|
|
85
|
+
}
|
|
86
|
+
function parseRecordArgs(argv) {
|
|
87
|
+
const parsed = { command: "record", root: process.cwd(), id: "" };
|
|
88
|
+
for (let index = 0; index < argv.length; index += 1) {
|
|
89
|
+
const argument = argv[index];
|
|
90
|
+
if (argument === "--evidence")
|
|
91
|
+
parsed.evidence = requireValue(argv, ++index, argument);
|
|
92
|
+
else if (argument === "--note")
|
|
93
|
+
parsed.note = requireValue(argv, ++index, argument);
|
|
94
|
+
else if (argument === "--root")
|
|
95
|
+
parsed.root = resolve(requireValue(argv, ++index, argument));
|
|
96
|
+
else if (!argument.startsWith("--") && !parsed.id)
|
|
97
|
+
parsed.id = argument;
|
|
98
|
+
else
|
|
99
|
+
throw new Error(`Unknown argument ${argument}.`);
|
|
100
|
+
}
|
|
101
|
+
if (!parsed.id)
|
|
102
|
+
throw new Error("record needs a step id, for example: brandlab-ready record X3 --evidence <PR link>.");
|
|
103
|
+
if (parsed.evidence === undefined)
|
|
104
|
+
throw new Error(`record ${parsed.id} needs --evidence <where the proof is>.`);
|
|
105
|
+
return parsed;
|
|
106
|
+
}
|
|
107
|
+
export async function runBrandlabReadyCli(argv, io = {
|
|
108
|
+
stdout: (value) => process.stdout.write(value),
|
|
109
|
+
stderr: (value) => process.stderr.write(value),
|
|
110
|
+
}, dependencies = {}) {
|
|
111
|
+
let options;
|
|
112
|
+
try {
|
|
113
|
+
options = parseBrandlabReadyArgs(argv);
|
|
114
|
+
}
|
|
115
|
+
catch (error) {
|
|
116
|
+
io.stderr(`${errorMessage(error)}\n\n${HELP}`);
|
|
117
|
+
return 2;
|
|
118
|
+
}
|
|
119
|
+
if (options.command === "help") {
|
|
120
|
+
io.stdout(HELP);
|
|
121
|
+
return 0;
|
|
122
|
+
}
|
|
123
|
+
const now = dependencies.now ?? (() => new Date());
|
|
124
|
+
try {
|
|
125
|
+
if (options.command === "record") {
|
|
126
|
+
const { path, record } = appendSiteSystemRecord(options.root, {
|
|
127
|
+
id: options.id,
|
|
128
|
+
evidence: options.evidence ?? "",
|
|
129
|
+
...(options.note !== undefined ? { note: options.note } : {}),
|
|
130
|
+
now: now(),
|
|
131
|
+
});
|
|
132
|
+
io.stdout(`Recorded ${record.id} in ${path}.\n`);
|
|
133
|
+
return 0;
|
|
134
|
+
}
|
|
135
|
+
const report = await createReadyReport(options, dependencies, now());
|
|
136
|
+
const markdownPath = join(options.root, SITE_SYSTEM_READY_REPORT_PATHS.markdown);
|
|
137
|
+
mkdirSync(dirname(markdownPath), { recursive: true });
|
|
138
|
+
writeFileSync(markdownPath, renderSiteSystemReadyMarkdown(report));
|
|
139
|
+
writeFileSync(join(options.root, SITE_SYSTEM_READY_REPORT_PATHS.json), `${JSON.stringify(report, null, 2)}\n`);
|
|
140
|
+
const problems = report.problems.length;
|
|
141
|
+
io.stdout(`${report.verdict.summary}.\n` +
|
|
142
|
+
(problems > 0 ? `The report lists ${problems} problem${problems === 1 ? "" : "s"} with the inputs.\n` : "") +
|
|
143
|
+
`Wrote ${SITE_SYSTEM_READY_REPORT_PATHS.markdown} and ${SITE_SYSTEM_READY_REPORT_PATHS.json}.\n`);
|
|
144
|
+
return report.verdict.exitCode;
|
|
145
|
+
}
|
|
146
|
+
catch (error) {
|
|
147
|
+
io.stderr(`${errorMessage(error)}\n`);
|
|
148
|
+
return 2;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
async function createReadyReport(options, dependencies, now) {
|
|
152
|
+
const root = options.root;
|
|
153
|
+
const config = readSiteSystemProjectConfig(root);
|
|
154
|
+
const release = options.installedRelease ?? detectInstalledBrandlabRelease(readPackageJson(root));
|
|
155
|
+
if (config.siteSystem && !release) {
|
|
156
|
+
throw new Error("The installed Brandlab release could not be read from package.json. Pin all four Brandlab packages to one exact version, or pass --installed-release.");
|
|
157
|
+
}
|
|
158
|
+
const problems = [...config.problems];
|
|
159
|
+
const findings = [];
|
|
160
|
+
// Journeys: the Playwright JSON report of the site-system spec.
|
|
161
|
+
const journeyPath = resolveIn(root, options.playwrightReport);
|
|
162
|
+
let journeyReport = null;
|
|
163
|
+
let journeyTests = 0;
|
|
164
|
+
if (!existsSync(journeyPath)) {
|
|
165
|
+
problems.push(`No Playwright report at ${displayPath(root, journeyPath)}, so the journey checks did not run (run the site-system journeys with the JSON reporter first).`);
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
journeyReport = displayPath(root, journeyPath);
|
|
169
|
+
const parsed = readJson(journeyPath);
|
|
170
|
+
if (parsed === undefined) {
|
|
171
|
+
problems.push(`${journeyReport} is not valid JSON, so the journey checks did not run.`);
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
const journeys = readSiteSystemJourneyReport(parsed);
|
|
175
|
+
findings.push(...journeys.findings);
|
|
176
|
+
problems.push(...journeys.problems);
|
|
177
|
+
journeyTests = journeys.tests;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
// Rendered and static rule modules over the sampled pages.
|
|
181
|
+
const buildDir = resolveIn(root, options.buildDir);
|
|
182
|
+
const prerenderManifest = readJson(join(buildDir, "prerender-manifest.json"));
|
|
183
|
+
const paths = planSiteSystemSamplePaths({
|
|
184
|
+
representativeRoutes: config.representativeRoutes,
|
|
185
|
+
samples: config.siteSystem?.samples ?? [],
|
|
186
|
+
prerenderManifest,
|
|
187
|
+
});
|
|
188
|
+
if (!options.baseUrl && prerenderManifest === undefined) {
|
|
189
|
+
problems.push(`No production build at ${displayPath(root, buildDir)}: run next build first, or pass --base-url.`);
|
|
190
|
+
}
|
|
191
|
+
const loaded = options.baseUrl || prerenderManifest !== undefined
|
|
192
|
+
? await loadSiteSystemPages({ paths, buildDir, baseUrl: options.baseUrl, fetch: dependencies.fetch })
|
|
193
|
+
: { pages: [], missing: paths, source: "build", problems: [] };
|
|
194
|
+
problems.push(...loaded.problems);
|
|
195
|
+
if (loaded.pages.length === 0)
|
|
196
|
+
problems.push("No page HTML was available, so the rule modules ran on the project files only.");
|
|
197
|
+
// Every runner runs: static rules read the project, rendered rules report not-applicable without pages.
|
|
198
|
+
const runners = dependencies.runners ?? SITE_SYSTEM_RENDERED_RUNNERS;
|
|
199
|
+
const rendered = await runSiteSystemRenderedRunners(runners, {
|
|
200
|
+
baseUrl: options.baseUrl ?? "",
|
|
201
|
+
pages: loaded.pages,
|
|
202
|
+
missing: loaded.missing,
|
|
203
|
+
projectRoot: root,
|
|
204
|
+
siteSystem: config.siteSystem,
|
|
205
|
+
});
|
|
206
|
+
findings.push(...rendered.findings);
|
|
207
|
+
problems.push(...rendered.problems);
|
|
208
|
+
// Fail closed: a config the gate cannot read in full, and (for a declared tier) pages it could not read.
|
|
209
|
+
const blockers = [];
|
|
210
|
+
if (!config.complete)
|
|
211
|
+
blockers.push("brandlab.config.ts could not be read in full");
|
|
212
|
+
if (config.siteSystem) {
|
|
213
|
+
if (loaded.source === "base-url" && loaded.missing.length > 0) {
|
|
214
|
+
blockers.push(`${loaded.missing.length} sample page${loaded.missing.length === 1 ? "" : "s"} did not answer with HTML`);
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
if (loaded.missing.includes("/"))
|
|
218
|
+
blockers.push("the home page could not be read");
|
|
219
|
+
const contact = config.representativeRoutes.contact;
|
|
220
|
+
if (contact && loaded.missing.includes(contact))
|
|
221
|
+
blockers.push("the contact page could not be read");
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
// Results other tools wrote as SiteSystemFinding JSON.
|
|
225
|
+
for (const file of options.findings) {
|
|
226
|
+
const path = resolveIn(root, file);
|
|
227
|
+
const parsed = readJson(path);
|
|
228
|
+
const list = Array.isArray(parsed) ? parsed : isRecord(parsed) && Array.isArray(parsed.findings) ? parsed.findings : null;
|
|
229
|
+
if (!list) {
|
|
230
|
+
problems.push(`${displayPath(root, path)} is missing or is not a list of findings, so it was ignored.`);
|
|
231
|
+
continue;
|
|
232
|
+
}
|
|
233
|
+
const valid = list.filter(isSiteSystemFinding);
|
|
234
|
+
if (valid.length < list.length) {
|
|
235
|
+
problems.push(`${list.length - valid.length} result(s) in ${displayPath(root, path)} name an unknown check or status, so they were ignored.`);
|
|
236
|
+
}
|
|
237
|
+
// Supplied files carry harness and recorded results only; they cannot pass a journey or rule check.
|
|
238
|
+
const refused = [...new Set(valid.filter((finding) => !SUPPLIABLE_IDS.has(finding.checkId)).map((finding) => finding.checkId))];
|
|
239
|
+
if (refused.length > 0) {
|
|
240
|
+
problems.push(`${displayPath(root, path)} sets ${refused.join(", ")}, but --findings may only set ${[...SUPPLIABLE_IDS].join(" and ")}, so those results were ignored.`);
|
|
241
|
+
}
|
|
242
|
+
findings.push(...valid.filter((finding) => SUPPLIABLE_IDS.has(finding.checkId)));
|
|
243
|
+
}
|
|
244
|
+
// The existing brandlab-verify families the shell tier carries.
|
|
245
|
+
let verify = null;
|
|
246
|
+
try {
|
|
247
|
+
verify = evaluateBrandlabProject({
|
|
248
|
+
root,
|
|
249
|
+
...(options.installedRelease !== undefined ? { installedRelease: options.installedRelease } : {}),
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
catch (error) {
|
|
253
|
+
problems.push(`brandlab-verify could not run (${errorMessage(error)}), so its search, contact and analytics checks did not run.`);
|
|
254
|
+
}
|
|
255
|
+
return buildSiteSystemReadyReport({
|
|
256
|
+
projectId: config.projectId,
|
|
257
|
+
siteSystem: config.siteSystem,
|
|
258
|
+
release,
|
|
259
|
+
findings,
|
|
260
|
+
verify,
|
|
261
|
+
launchRecords: readSiteSystemRecords(root, "launch"),
|
|
262
|
+
humanRecords: readSiteSystemRecords(root, "human"),
|
|
263
|
+
exceptions: config.exceptions,
|
|
264
|
+
inputs: {
|
|
265
|
+
journeyReport,
|
|
266
|
+
journeyTests,
|
|
267
|
+
pageSource: loaded.pages.length === 0 ? "none" : loaded.source,
|
|
268
|
+
pages: loaded.pages.map((page) => page.path),
|
|
269
|
+
runners: runners.length,
|
|
270
|
+
findingFiles: options.findings.map((file) => displayPath(root, resolveIn(root, file))),
|
|
271
|
+
},
|
|
272
|
+
problems,
|
|
273
|
+
now,
|
|
274
|
+
launch: options.launch,
|
|
275
|
+
blockers,
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
function readPackageJson(root) {
|
|
279
|
+
const parsed = readJson(join(root, "package.json"));
|
|
280
|
+
return isRecord(parsed) ? parsed : null;
|
|
281
|
+
}
|
|
282
|
+
/** Parsed JSON, or undefined when the file is missing or invalid. */
|
|
283
|
+
function readJson(path) {
|
|
284
|
+
if (!existsSync(path))
|
|
285
|
+
return undefined;
|
|
286
|
+
try {
|
|
287
|
+
return JSON.parse(readFileSync(path, "utf8"));
|
|
288
|
+
}
|
|
289
|
+
catch {
|
|
290
|
+
return undefined;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
function resolveIn(root, path) {
|
|
294
|
+
return isAbsolute(path) ? path : resolve(root, path);
|
|
295
|
+
}
|
|
296
|
+
function displayPath(root, path) {
|
|
297
|
+
const relativePath = relative(root, path);
|
|
298
|
+
return relativePath && !relativePath.startsWith("..") && !isAbsolute(relativePath) ? relativePath : path;
|
|
299
|
+
}
|
|
300
|
+
function requireValue(argv, index, argument) {
|
|
301
|
+
const value = argv[index];
|
|
302
|
+
if (value === undefined || value.startsWith("--"))
|
|
303
|
+
throw new Error(`${argument} requires a value.`);
|
|
304
|
+
return value;
|
|
305
|
+
}
|
|
306
|
+
function errorMessage(error) {
|
|
307
|
+
return error instanceof Error ? error.message : String(error);
|
|
308
|
+
}
|
|
309
|
+
function isRecord(value) {
|
|
310
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
311
|
+
}
|
|
312
|
+
export function isBrandlabReadyCliEntrypoint(moduleUrl, argvPath) {
|
|
313
|
+
if (!argvPath)
|
|
314
|
+
return false;
|
|
315
|
+
try {
|
|
316
|
+
return realpathSync(fileURLToPath(moduleUrl)) === realpathSync(resolve(argvPath));
|
|
317
|
+
}
|
|
318
|
+
catch {
|
|
319
|
+
return false;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
if (isBrandlabReadyCliEntrypoint(import.meta.url, process.argv[1])) {
|
|
323
|
+
runBrandlabReadyCli(process.argv.slice(2)).then((code) => {
|
|
324
|
+
process.exitCode = code;
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
//# sourceMappingURL=ready-cli.js.map
|