@v-office/site-checks 0.2.2 → 0.2.4
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 +21 -21
- package/dist/astro.mjs +1 -1
- package/dist/dist-checks.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{report-Dg5jtgGy.mjs → report-D8jkvHtK.mjs} +41 -18
- package/instructions/CHANGELOG.md +2 -0
- package/instructions/MIGRATION.md +2 -0
- package/instructions/versions/0.2.3/CHANGELOG.md +18 -0
- package/instructions/versions/0.2.3/MIGRATION.md +15 -0
- package/instructions/versions/0.2.4/CHANGELOG.md +11 -0
- package/instructions/versions/0.2.4/MIGRATION.md +15 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,24 +41,24 @@ A refused build ends with the failing checks and their first findings:
|
|
|
41
41
|
keys are accepted by `siteChecks({ … })`, and an option given there wins over the file's key.
|
|
42
42
|
Severities are fixed by the package: a site configures data, never whether a check blocks.
|
|
43
43
|
|
|
44
|
-
| Key | Used by | What
|
|
45
|
-
| ------------------------- | ---------------------------------- |
|
|
46
|
-
| `donorTerms` | `donor-terms` | Terms that must not ship: the template site's brand, people, places, phone, email, domain, asset names. Plain strings, matched case-insensitively with whitespace collapsed.
|
|
47
|
-
| `optimizeDepsIgnore` | `optimize-deps` | Packages imported from `src/` that may stay out of `vite.optimizeDeps.include` (only server-side code uses them). Exact specifier or package name.
|
|
48
|
-
| `imageIgnore` | `image-formats` | Raster images under `public/` that ship without an AVIF sibling on purpose, as paths relative to the project root (`public/brand/logo.png`).
|
|
49
|
-
| `feedImagePatterns` | `feed-image-formats` | Regular expressions (case-insensitive) matching a feed photo URL still requested as JPEG or PNG. Defaults to the vOffice image hosts (imgproxy `plain` paths, `dyn.v-office.com`).
|
|
50
|
-
| `listingPages` | `listing-noindex`, `listing-links` | URL paths of pages that list rentals, in addition to the pages the check recognizes by their markup.
|
|
51
|
-
| `listingClientOnly` | `listing-links` | Listing pages whose list stays client-only, as `{ "path", "reason" }`: their list is the rentals free in a window, and a build-time list would show booked-out flats.
|
|
52
|
-
| `consentAllowedHosts` | `consent-gate` | Hosts a `<script src>` or `<iframe src>` may load before consent. The site's own host (`site` in the Astro config) is always allowed.
|
|
53
|
-
| `wiring` | `wiring` | Markup hooks `{ init, marker, scope: "section" \| "global", file? }` and kept texts `{ file, contains, guard }` (the former `scripts/wiring.json` `hooks`).
|
|
54
|
-
| `hubFilterOptions` | `v9-hub-filters` | v9: the Website SDK options the Hub filter check needs (`rentalScope`, `customAttributeFilterDefinitions`), as the site passes them to the SDK.
|
|
55
|
-
| `structureIgnore` | `page-structure` | Rules the site declines: `one-h1`, `heading-skip`, `landmark-main`, `img-alt`, `control-label`, `table-headers`, `heading-ratio`.
|
|
56
|
-
| `bannedCopy` | `banned-copy` | Wordings recorded customer corrections ban, as `{ "pattern", "why" }` (a regular expression over the page's visible text).
|
|
57
|
-
| `copyExcludePaths` | the copy checks | URL paths (and below) the copy checks skip, legal pages ported verbatim; `/impressum` also covers `/de/impressum`.
|
|
58
|
-
| `bannedCopyExcludePaths` | `banned-copy` | URL paths only `banned-copy` skips (an FAQ whose answers port verbatim).
|
|
59
|
-
| `allowDuplicateSentences` | `duplicate-sentences` | Sentences a page may render twice.
|
|
60
|
-
| `quoteSources` | `quote-sources` | Files or directories holding the text a `<blockquote>` may quote (content captures, the feed's reviews written by the build).
|
|
61
|
-
| `factCheckAccepted` | `rental-facts` | Disagreements the customer confirmed, as the finding prints them: `<slug> <kind> prose=<n> feed=<n>`.
|
|
44
|
+
| Key | Used by | What |
|
|
45
|
+
| ------------------------- | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
46
|
+
| `donorTerms` | `donor-terms` | Terms that must not ship: the template site's brand, people, places, phone, email, domain, asset names. Plain strings, matched as whole words, case-insensitively with whitespace collapsed. |
|
|
47
|
+
| `optimizeDepsIgnore` | `optimize-deps` | Packages imported from `src/` that may stay out of `vite.optimizeDeps.include` (only server-side code uses them). Exact specifier or package name. |
|
|
48
|
+
| `imageIgnore` | `image-formats` | Raster images under `public/` that ship without an AVIF sibling on purpose, as paths relative to the project root (`public/brand/logo.png`). |
|
|
49
|
+
| `feedImagePatterns` | `feed-image-formats` | Regular expressions (case-insensitive) matching a feed photo URL still requested as JPEG or PNG. Defaults to the vOffice image hosts (imgproxy `plain` paths, `dyn.v-office.com`). |
|
|
50
|
+
| `listingPages` | `listing-noindex`, `listing-links` | URL paths of pages that list rentals, in addition to the pages the check recognizes by their markup. |
|
|
51
|
+
| `listingClientOnly` | `listing-links` | Listing pages whose list stays client-only, as `{ "path", "reason" }`: their list is the rentals free in a window, and a build-time list would show booked-out flats. |
|
|
52
|
+
| `consentAllowedHosts` | `consent-gate` | Hosts a `<script src>` or `<iframe src>` may load before consent. The site's own host (`site` in the Astro config) is always allowed. |
|
|
53
|
+
| `wiring` | `wiring` | Markup hooks `{ init, marker, scope: "section" \| "global", file? }` and kept texts `{ file, contains, guard }` (the former `scripts/wiring.json` `hooks`). |
|
|
54
|
+
| `hubFilterOptions` | `v9-hub-filters` | v9: the Website SDK options the Hub filter check needs (`rentalScope`, `customAttributeFilterDefinitions`), as the site passes them to the SDK. |
|
|
55
|
+
| `structureIgnore` | `page-structure` | Rules the site declines: `one-h1`, `heading-skip`, `landmark-main`, `img-alt`, `control-label`, `table-headers`, `heading-ratio`. |
|
|
56
|
+
| `bannedCopy` | `banned-copy` | Wordings recorded customer corrections ban, as `{ "pattern", "why" }` (a regular expression over the page's visible text). |
|
|
57
|
+
| `copyExcludePaths` | the copy checks | URL paths (and below) the copy checks skip, legal pages ported verbatim; `/impressum` also covers `/de/impressum`. |
|
|
58
|
+
| `bannedCopyExcludePaths` | `banned-copy` | URL paths only `banned-copy` skips (an FAQ whose answers port verbatim). |
|
|
59
|
+
| `allowDuplicateSentences` | `duplicate-sentences` | Sentences a page may render twice. |
|
|
60
|
+
| `quoteSources` | `quote-sources` | Files or directories holding the text a `<blockquote>` may quote (content captures, the feed's reviews written by the build). |
|
|
61
|
+
| `factCheckAccepted` | `rental-facts` | Disagreements the customer confirmed, as the finding prints them: `<slug> <kind> prose=<n> feed=<n>`. |
|
|
62
62
|
|
|
63
63
|
## The checks
|
|
64
64
|
|
|
@@ -66,7 +66,7 @@ Severities are fixed by the package: a site configures data, never whether a che
|
|
|
66
66
|
| --------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
67
67
|
| `html-comments` | error | An HTML comment (`<!-- … -->`) in `src/**/*.{astro,tsx,jsx,md,mdx,html}`: Astro passes it into the built page, readable with View Source. | `{/* … */}` in `.astro` and JSX markup, `//` in frontmatter, remove it from Markdown. |
|
|
68
68
|
| `view-source` | error | A developer's note a visitor can read with View Source: an HTML comment in a built page (framework markers are allowed), a comment in an inline `<script>`, `<style>` or event handler that is also in `src/` or `public/`, a comment in CSS or a line comment in JS copied from `public/`, a source map or a reference to one in any shipped file. Bundled JS and CSS are not scanned for comments. | Remove the comment; turn source maps off in the build. |
|
|
69
|
-
| `donor-terms` | error | A configured term in the visible text, the title, inline scripts and styles (JSON-LD) or an attribute of a built page, in a built file name, or in the shipped JS and CSS. Skipped without configured terms.
|
|
69
|
+
| `donor-terms` | error | A configured term in the visible text, the title, inline scripts and styles (JSON-LD) or an attribute of a built page, in a built file name, or in the shipped JS and CSS, as a whole word. Skipped without configured terms. | Replace the term; list the template site's terms in `donorTerms`. |
|
|
70
70
|
| `optimize-deps` | warning | A runtime package (`dependencies`) imported from `src/` that is not listed, with the exact specifier, in `vite.optimizeDeps.include`. Vite discovers it mid-session instead and re-bundles every dependency. | Add the specifier to `vite.optimizeDeps.include` in `astro.config`, or to `optimizeDepsIgnore` when only server-side code uses it. |
|
|
71
71
|
| `sync-once` | warning | An inline content loader in `src/content.config.ts` that fetches the PMS without the `CONTENT_SYNC_TOKEN` reuse idiom: `astro check` and `astro build` each run it, twice per build. | Keep the token in the store's meta (`meta.get`) and reuse the entries (`store.keys()`) when it matches. |
|
|
72
72
|
| `consent-gate` | error | A third-party `<script src>` or `<iframe src>` outside the consent kit's `ConsentEmbed` frame, loading before consent; a vendor in `ENABLED_VENDOR_IDS` that is not `approved` in `consent-registry.snapshot.json`. Skipped without `src/lib/consent/`. | Frame it with `ConsentEmbed`, or register the vendor so the kit injects it after consent; list a consent-free host in `consentAllowedHosts`. |
|
|
@@ -74,7 +74,7 @@ Severities are fixed by the package: a site configures data, never whether a che
|
|
|
74
74
|
| `feed-image-formats` | warning | A feed photo from the vOffice image hosts requested as JPEG or PNG in `src`, `srcset` or `poster`; a warning because the photos come from the PMS feed. | Pass feed photos through `webpUrl()`. |
|
|
75
75
|
| `listing-noindex` | error | A page that lists rentals (the search page's `data-prerendered-results` container, the `SearchResults` island, or `listingPages`) that is noindex. Waits while every page is noindex. | Take the page out of the noindex routes. |
|
|
76
76
|
| `listing-links` | warning | A page that lists rentals that carries no links to rentals in its HTML, so a crawler without JavaScript sees an empty list. Runs once some listing has links or the build has more than ten pages; a warning because the links come from the PMS feed. | Render the list server-side, or list the page in `listingClientOnly` with the reason. |
|
|
77
|
-
| `sitemap-noindex` | error | A sitemap entry whose page says noindex or is not in the build; an `llms.txt` link to a page that is not there. Skipped without a sitemap and `llms.txt`.
|
|
77
|
+
| `sitemap-noindex` | error | A sitemap entry whose page says noindex (waits while every page is noindex) or is not in the build; an `llms.txt` link to a page that is not there. Skipped without a sitemap and `llms.txt`. | Make the sitemap filter and the noindex routes agree; fix the link. |
|
|
78
78
|
| `page-heads` | warning | On indexable pages: a title over 60 characters, a description empty or over 160, a title or description another page repeats. A missing one is the build worker's `page-metadata`. | Shorten; give each page its own. |
|
|
79
79
|
| `wiring` | error | A component carrying a configured hook's marker whose initializer nothing calls (`section`: the component itself; `global`: anything in `src/`), through leaves marked `@bound-by-parent <init>`; a kept text gone from its file. Comments are stripped first. Skipped without `wiring`. | Call the initializer, mark the leaf `@bound-by-parent`, or put the kept text back. |
|
|
80
80
|
| `unused-initializers` | warning | An `init*` exported from `src/scripts/*.ts` that nothing calls. Skipped without `src/scripts/`. | Wire the feature, or delete the leftover. |
|
|
@@ -82,7 +82,7 @@ Severities are fixed by the package: a site configures data, never whether a che
|
|
|
82
82
|
| `canonical-link` | error | On the launched site (a production `site`, some indexable page): an indexable page without an absolute `<link rel="canonical">`. | Build it from the Astro `site` and the page path. |
|
|
83
83
|
| `open-graph` | warning | On the launched site: an indexable page without an absolute `og:url` and `og:image`. | Add them, absolute. |
|
|
84
84
|
| `trailing-slash` | warning | On the launched site: `trailingSlash` is not `"never"`. | Set `trailingSlash: "never"`; write internal links without a trailing slash. |
|
|
85
|
-
| `v9-production-hub` |
|
|
85
|
+
| `v9-production-hub` | warning | v9 only, on the launched site: the build's env does not call the production Hub (`CMS_STAGE=production` or the production Hub URLs); a committed `.env.local`; a committed `HUB_API_KEY` equal to `.env.local`'s. Waits for a production `site` and an indexable page. | Set the production stage or URLs and the customer's production key; untrack `.env.local`. |
|
|
86
86
|
| `page-structure` | warning | One `<h1>`, no skipped heading level, no flood of `<h3>` under few `<h2>`, a `<main>`, `alt` on every image, a label on every control, a caption and scoped `<th>` on every table. | Fix the component where a fault repeats; decline a rule in `structureIgnore`. |
|
|
87
87
|
| `load-order` | warning | At start: an on-demand library (map, chart, 3D) in the start-up code, a start-up chunk over 150 KB compressed, photos after the first in card swipe strips with a URL, a first-paint photo from 100 KB up in one size only, a preloaded swap face without a `size-adjust` stand-in. | `import()` on demand; first slide only; width `srcset`; a `local()` stand-in. |
|
|
88
88
|
| `banned-copy` | warning | A `bannedCopy` wording in a page's visible text. Skipped without configured wordings. | Reword. |
|
package/dist/astro.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as writeSiteChecksReport, d as runSiteChecks, i as summaryLines, l as blockingResults, m as checks, n as refusalMessage, p as loadOptions } from "./report-
|
|
1
|
+
import { a as writeSiteChecksReport, d as runSiteChecks, i as summaryLines, l as blockingResults, m as checks, n as refusalMessage, p as loadOptions } from "./report-D8jkvHtK.mjs";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
3
|
//#region src/astro.ts
|
|
4
4
|
/**
|
package/dist/dist-checks.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as referencedUrls, c as MAX_PATH_CHARS, g as loadDistContext, h as isSameSiteReference, l as blockingResults, o as MAX_FINDINGS_PER_CHECK, r as summarizeBlocking, s as MAX_MESSAGE_CHARS, t as SITE_CHECKS_FILE, u as runChecks, v as resolveReference, y as xmlText } from "./report-
|
|
1
|
+
import { _ as referencedUrls, c as MAX_PATH_CHARS, g as loadDistContext, h as isSameSiteReference, l as blockingResults, o as MAX_FINDINGS_PER_CHECK, r as summarizeBlocking, s as MAX_MESSAGE_CHARS, t as SITE_CHECKS_FILE, u as runChecks, v as resolveReference, y as xmlText } from "./report-D8jkvHtK.mjs";
|
|
2
2
|
//#region src/distChecks/insecureResources.ts
|
|
3
3
|
/** `<link>` relations the browser fetches as a subresource; canonical,
|
|
4
4
|
* alternate, preconnect and friends are hints or metadata, not loads. */
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as writeSiteChecksReport, c as MAX_PATH_CHARS, d as runSiteChecks, f as CONFIG_FILE, i as summaryLines, l as blockingResults, m as checks, n as refusalMessage, o as MAX_FINDINGS_PER_CHECK, p as loadOptions, r as summarizeBlocking, s as MAX_MESSAGE_CHARS, t as SITE_CHECKS_FILE } from "./report-
|
|
1
|
+
import { a as writeSiteChecksReport, c as MAX_PATH_CHARS, d as runSiteChecks, f as CONFIG_FILE, i as summaryLines, l as blockingResults, m as checks, n as refusalMessage, o as MAX_FINDINGS_PER_CHECK, p as loadOptions, r as summarizeBlocking, s as MAX_MESSAGE_CHARS, t as SITE_CHECKS_FILE } from "./report-D8jkvHtK.mjs";
|
|
2
2
|
export { CONFIG_FILE, MAX_FINDINGS_PER_CHECK, MAX_MESSAGE_CHARS, MAX_PATH_CHARS, SITE_CHECKS_FILE, blockingResults, checks, loadOptions, refusalMessage, runSiteChecks, summarizeBlocking, summaryLines, writeSiteChecksReport };
|
|
@@ -485,15 +485,25 @@ const quoteSources = {
|
|
|
485
485
|
/** More than this and the point is made; the runner keeps 25 anyway. */
|
|
486
486
|
const MAX_RAW_FINDINGS = 100;
|
|
487
487
|
const normalize$2 = (text) => text.normalize("NFC").toLowerCase().replace(/\s+/g, " ");
|
|
488
|
-
const
|
|
489
|
-
|
|
488
|
+
const escape$1 = (text) => text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
489
|
+
const WORD = /[\p{L}\p{N}]/u;
|
|
490
|
+
/** A term as a whole word: where it starts or ends with a letter or digit, the text next to it must
|
|
491
|
+
* not continue the word, so "schlei" does not match "wendeschleife" and "emden" not "fremden". A
|
|
492
|
+
* term that starts or ends with other characters (a phone number's "+", a domain's dot) matches
|
|
493
|
+
* there as written. */
|
|
494
|
+
const wholeWord = (term) => {
|
|
495
|
+
const chars = [...term];
|
|
496
|
+
return new RegExp(`${WORD.test(chars[0]) ? "(?<![\\p{L}\\p{N}])" : ""}${escape$1(term)}${WORD.test(chars.at(-1)) ? "(?![\\p{L}\\p{N}])" : ""}`, "u");
|
|
497
|
+
};
|
|
498
|
+
const excerpt$1 = (haystack, at, length) => {
|
|
490
499
|
const start = Math.max(0, at - 30);
|
|
491
|
-
const end = Math.min(haystack.length, at +
|
|
500
|
+
const end = Math.min(haystack.length, at + length + 30);
|
|
492
501
|
return `${start > 0 ? "…" : ""}${haystack.slice(start, end)}${end < haystack.length ? "…" : ""}`;
|
|
493
502
|
};
|
|
494
503
|
/** Every site starts from a template ("donor") site, and nothing of it may ship: its brand, people,
|
|
495
504
|
* places, phone, email, domain, asset names. The site lists the terms in `site-checks.config.json`
|
|
496
|
-
* (`donorTerms`); without them the check skips, which the report shows.
|
|
505
|
+
* (`donorTerms`); without them the check skips, which the report shows. A term matches as a whole
|
|
506
|
+
* word, case-insensitively with whitespace collapsed. Matched in the visible
|
|
497
507
|
* text, the title, the inline scripts and styles (JSON-LD shows in search results) and the
|
|
498
508
|
* attributes of every built page, in the built file names and in the shipped JS and CSS, where an
|
|
499
509
|
* island's copy lives. */
|
|
@@ -502,23 +512,31 @@ const donorTerms = {
|
|
|
502
512
|
title: "Terms of the template site in the built output",
|
|
503
513
|
severity: "error",
|
|
504
514
|
begin: (ctx) => {
|
|
505
|
-
const terms = [...new Set(ctx.options.donorTerms.map(normalize$2).filter(Boolean))]
|
|
515
|
+
const terms = [...new Set(ctx.options.donorTerms.map(normalize$2).map((t) => t.trim()).filter(Boolean))].map((term) => ({
|
|
516
|
+
term,
|
|
517
|
+
re: wholeWord(term)
|
|
518
|
+
}));
|
|
506
519
|
if (terms.length === 0 || !ctx.hasDist) return null;
|
|
507
520
|
const findings = [];
|
|
508
521
|
/** One finding per term and place: the first text of `texts` that contains it. */
|
|
509
522
|
const scan = (texts, path, where) => {
|
|
510
|
-
|
|
523
|
+
const haystacks = texts.map(normalize$2);
|
|
524
|
+
for (const { term, re } of terms) {
|
|
511
525
|
if (findings.length >= MAX_RAW_FINDINGS) return;
|
|
512
|
-
const
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
526
|
+
for (const haystack of haystacks) {
|
|
527
|
+
const match = re.exec(haystack);
|
|
528
|
+
if (!match) continue;
|
|
529
|
+
findings.push({
|
|
530
|
+
path,
|
|
531
|
+
message: `donor term "${term}" in ${where}: "${excerpt$1(haystack, match.index, term.length)}"`
|
|
532
|
+
});
|
|
533
|
+
break;
|
|
534
|
+
}
|
|
517
535
|
}
|
|
518
536
|
};
|
|
519
537
|
return {
|
|
520
538
|
visit: (page) => {
|
|
521
|
-
scan([page.
|
|
539
|
+
scan([blockText(page.document.body ?? page.document.documentElement)], page.path, "the visible text");
|
|
522
540
|
scan(page.attributeValues(), page.path, "an attribute");
|
|
523
541
|
scan([...page.document.querySelectorAll("title, script:not([src]), style")].map((el) => el.textContent ?? ""), page.path, "the title or inline code");
|
|
524
542
|
},
|
|
@@ -1497,7 +1515,8 @@ const toPath = (loc) => {
|
|
|
1497
1515
|
const locs = (xml) => [...xml.matchAll(/<loc>\s*([^<]+?)\s*<\/loc>/g)].map((m) => xmlText(m[1]));
|
|
1498
1516
|
/** The URL lists the build publishes agree with the pages it built: no sitemap entry whose own page
|
|
1499
1517
|
* says noindex or is not in the build, no `llms.txt` link to a page that is not there. Skipped when
|
|
1500
|
-
* the build publishes neither (a site before launch
|
|
1518
|
+
* the build publishes neither. While every page is noindex (a site before launch, under its blanket
|
|
1519
|
+
* robots meta), a sitemap listing them is not refused: that disagreement ends with the launch. */
|
|
1501
1520
|
const sitemapNoindex = {
|
|
1502
1521
|
id: "sitemap-noindex",
|
|
1503
1522
|
title: "Published URL lists match the built pages",
|
|
@@ -1507,9 +1526,12 @@ const sitemapNoindex = {
|
|
|
1507
1526
|
const start = ctx.has(SITEMAP_INDEX) ? [SITEMAP_INDEX] : ctx.files.filter((f) => /^sitemap[^/]*\.xml$/.test(f));
|
|
1508
1527
|
if (start.length === 0 && !ctx.has(LLMS)) return null;
|
|
1509
1528
|
const noindex = /* @__PURE__ */ new Map();
|
|
1529
|
+
let indexable = 0;
|
|
1510
1530
|
return {
|
|
1511
1531
|
visit: (page) => {
|
|
1512
|
-
if (
|
|
1532
|
+
if (page.redirect) return;
|
|
1533
|
+
if (page.noindex) noindex.set(normalize(page.url), page.path);
|
|
1534
|
+
else indexable += 1;
|
|
1513
1535
|
},
|
|
1514
1536
|
finish: () => {
|
|
1515
1537
|
const findings = [];
|
|
@@ -1536,7 +1558,7 @@ const sitemapNoindex = {
|
|
|
1536
1558
|
path: sitemap,
|
|
1537
1559
|
message: `The sitemap lists ${loc}, which is not in the build.`
|
|
1538
1560
|
});
|
|
1539
|
-
else if (noindex.has(urlPath)) findings.push({
|
|
1561
|
+
else if (indexable > 0 && noindex.has(urlPath)) findings.push({
|
|
1540
1562
|
path: sitemap,
|
|
1541
1563
|
message: `The sitemap lists ${loc}, whose page says noindex: the sitemap filter and the noindex routes disagree.`
|
|
1542
1564
|
});
|
|
@@ -1708,14 +1730,14 @@ const committedLocalFiles = (root) => LOCAL_ENV_FILES.filter((file) => {
|
|
|
1708
1730
|
/** A launched v9 site builds against the production be-on! Hub: the build's env says
|
|
1709
1731
|
* `CMS_STAGE=production`, or names the production Hub URLs. The Hub URLs are baked in at build
|
|
1710
1732
|
* time, so a site built against the demo Hub renders fine, only with the demo catalogue. Also
|
|
1711
|
-
*
|
|
1733
|
+
* reported: a committed `.env.local` (Vite loads it after `.env` in every mode, so CI builds from
|
|
1712
1734
|
* it) and a committed `HUB_API_KEY` that is the developer's local key. Waits while every page is
|
|
1713
1735
|
* noindex, and while the Astro `site` is a preview host or unset: before launch a site builds
|
|
1714
1736
|
* against the test Hub on purpose. v9 only. */
|
|
1715
1737
|
const v9ProductionHub = {
|
|
1716
1738
|
id: "v9-production-hub",
|
|
1717
1739
|
title: "A launched v9 site calls the production Hub",
|
|
1718
|
-
severity: "
|
|
1740
|
+
severity: "warning",
|
|
1719
1741
|
begin: (ctx) => {
|
|
1720
1742
|
const env = v9Env(ctx);
|
|
1721
1743
|
if (!env || !ctx.hasDist || !productionSite(ctx)) return null;
|
|
@@ -1984,7 +2006,8 @@ const FRAMEWORK_COMMENTS = /* @__PURE__ */ new Set([
|
|
|
1984
2006
|
"[",
|
|
1985
2007
|
"]",
|
|
1986
2008
|
"teleport start",
|
|
1987
|
-
"teleport end"
|
|
2009
|
+
"teleport end",
|
|
2010
|
+
"v-if"
|
|
1988
2011
|
]);
|
|
1989
2012
|
const isFrameworkComment = (data) => {
|
|
1990
2013
|
const text = data.trim();
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
Release notes of `@v-office/site-checks`, newest first. Each version has its own directory.
|
|
6
6
|
|
|
7
|
+
- `versions/0.2.4/CHANGELOG.md`: release notes for 0.2.4
|
|
8
|
+
- `versions/0.2.3/CHANGELOG.md`: release notes for 0.2.3
|
|
7
9
|
- `versions/0.2.2/CHANGELOG.md`: release notes for 0.2.2
|
|
8
10
|
- `versions/0.2.1/CHANGELOG.md`: release notes for 0.2.1
|
|
9
11
|
- `versions/0.2.0/CHANGELOG.md`: release notes for 0.2.0
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
Migration guides of `@v-office/site-checks`, newest first. Apply them in order when skipping versions.
|
|
6
6
|
|
|
7
|
+
- `versions/0.2.4/MIGRATION.md`: Migration: 0.2.3 to 0.2.4
|
|
8
|
+
- `versions/0.2.3/MIGRATION.md`: Migration: 0.2.2 to 0.2.3
|
|
7
9
|
- `versions/0.2.2/MIGRATION.md`: Migration: 0.2.1 to 0.2.2
|
|
8
10
|
- `versions/0.2.1/MIGRATION.md`: Migration: 0.2.0 to 0.2.1
|
|
9
11
|
- `versions/0.2.0/MIGRATION.md`: Migration: 0.1.0 to 0.2.0
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Changelog: 0.2.3
|
|
2
|
+
|
|
3
|
+
Three fixes for false refusals found while rolling site-checks out to the sites: a site before
|
|
4
|
+
launch, a donor term inside a longer word, and Vue's own placeholder comment.
|
|
5
|
+
|
|
6
|
+
## Fixed
|
|
7
|
+
|
|
8
|
+
- `sitemap-noindex` waits while every page is noindex (a site before launch, under its blanket
|
|
9
|
+
robots meta): a sitemap that lists those pages is no longer refused then. Once any page is
|
|
10
|
+
indexable it applies as before. A sitemap entry or `llms.txt` link to a page the build does not
|
|
11
|
+
have is still refused, launched or not.
|
|
12
|
+
- `donor-terms` matches a term as a whole word: "Schlei" no longer matches "Wendeschleife", nor
|
|
13
|
+
"Emden" "fremden". Matching stays case-insensitive with whitespace collapsed; a term that starts
|
|
14
|
+
or ends with something other than a letter or digit (a phone number's "+", a domain) matches
|
|
15
|
+
there as written. The visible text is read as a visitor sees it, so a word split by inline
|
|
16
|
+
markup (`Wende<em>schlei</em>fe`) is one word.
|
|
17
|
+
- `view-source` allows the HTML comment `v-if`, the placeholder Vue renders for a false `v-if` (for example
|
|
18
|
+
a closed reka-ui or shadcn-vue dialog portal). No developer writes it.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Migration: 0.2.2 to 0.2.3
|
|
2
|
+
|
|
3
|
+
No changes required.
|
|
4
|
+
|
|
5
|
+
## 1. Upgrade
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
pnpm add --save-exact --save-dev @v-office/site-checks@0.2.3
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## What changes for the site
|
|
12
|
+
|
|
13
|
+
- Before launch, a sitemap listing the site's noindex pages no longer refuses the build.
|
|
14
|
+
- `donorTerms` entries match whole words. A term that relied on matching inside a longer word (a
|
|
15
|
+
prefix such as "brisen" meant to catch "Brisenhof") now needs the full word; list every spelling.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Changelog: 0.2.4
|
|
2
|
+
|
|
3
|
+
`v9-production-hub` reports instead of refusing: which Hub a launched v9 site calls is a go-live
|
|
4
|
+
decision, and a refused build stops a live site from updating prices and availability.
|
|
5
|
+
|
|
6
|
+
## Changed
|
|
7
|
+
|
|
8
|
+
- `v9-production-hub` is a warning, no longer an error. A launched v9 site whose build calls the
|
|
9
|
+
demo Hub, a committed `.env.local`, or a committed `HUB_API_KEY` equal to `.env.local`'s still
|
|
10
|
+
shows up in `dist/site-checks.json` and the build log, and the build goes through. What it checks
|
|
11
|
+
and when it waits (before launch, on a preview host) are unchanged.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Migration: 0.2.3 to 0.2.4
|
|
2
|
+
|
|
3
|
+
No changes required.
|
|
4
|
+
|
|
5
|
+
## 1. Upgrade
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
pnpm add --save-exact --save-dev @v-office/site-checks@0.2.4
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## What changes for the site
|
|
12
|
+
|
|
13
|
+
- A launched v9 site on the demo Hub builds again; `v9-production-hub` lists it as a warning.
|
|
14
|
+
Read the warning before go-live: set `CMS_STAGE=production` or the production Hub URLs and the
|
|
15
|
+
customer's production `HUB_API_KEY`, and untrack a committed `.env.local`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@v-office/site-checks",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Build-time checks for the sites: runs inside `astro build`, writes dist/site-checks.json in the shape of the build worker's dist-check report, and refuses the build when a check with severity error finds something. The site-shipping guards of the commit gate, pinned and run where the site is built",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|