@simpleapps-com/augur-config 2026.11.2 → 2026.11.3

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 CHANGED
@@ -29,6 +29,21 @@ pnpm add -D @simpleapps-com/augur-config
29
29
  | `@simpleapps-com/augur-config/tsconfig/next` | tsconfig preset |
30
30
  | `@simpleapps-com/augur-config/lighthouse` | `lighthousePreset()` for Lighthouse CI |
31
31
 
32
+ ## Lighthouse CI and `pnpm audit`
33
+
34
+ `lighthousePreset()` only builds a config object; a site that runs Lighthouse CI installs
35
+ `@lhci/cli` itself, at the optional peer range `^0.16.0` (Lighthouse 13, Node 22; atlas#86).
36
+
37
+ Known advisories on that tree (dev-only, nothing reaches a site's bundle), each with the condition
38
+ that removes it:
39
+
40
+ - `basic-ftp` ≤ 6.2.0 (GHSA-c475-qrg2-pj4r, high): `@lhci/cli` → `proxy-agent` →
41
+ `pac-proxy-agent` → `get-uri` → `basic-ftp`. Goes when `get-uri` takes `basic-ftp` ≥ 6.2.1
42
+ (its current release takes `^5.3.1`). Site rules forbid `overrides`, so it stays until then.
43
+
44
+ `braces` 3.0.3 through `@next/eslint-plugin-next` is not one: its advisory (GHSA-vfj7-8cjw-p6xm)
45
+ was withdrawn on 2026-10-23 as not practically exploitable, and `pnpm audit` no longer reports it.
46
+
32
47
  ## augur-doctor
33
48
 
34
49
  ```bash
@@ -48,8 +63,12 @@ the [guide](https://augur.build/docs/packages/augur-config).
48
63
 
49
64
  TypeScript in `src/`, built to `dist/` (ESM) by tsup; the tsconfig presets ship as JSON from
50
65
  `src/tsconfig/`. The doctor's decisions are proved (`src/doctor/rules.ts`, model
51
- `models/AugurConfig.dfy`, link `models/links/augur-config-doctor-rules.dfy`); the file reads
52
- (`src/doctor/checks.ts`, `node-reader.ts`) and the scorecard (`report.ts`) are tested at 100%.
66
+ `models/AugurConfig.dfy`, link `models/links/augur-config-doctor-rules.dfy`), and so are the
67
+ Lighthouse preset's (`src/lighthouse-rules.ts`, link `models/links/augur-config-lighthouse-rules.dfy`:
68
+ the URL list, the start-server condition, the collect defaults); the file reads
69
+ (`src/doctor/checks.ts`, `node-reader.ts`), the scorecard (`report.ts`) and the preset's object
70
+ building (`lighthouse.ts`, which lsc can't translate: `Record<string, unknown>` and spreads) are
71
+ tested at 100%.
53
72
 
54
73
  ```bash
55
74
  pnpm -C repo/packages/augur-config test
@@ -0,0 +1,28 @@
1
+ /**
2
+ * The pages to audit: the caller's list when given (an empty list stays empty), else the root.
3
+ *
4
+ * @ensures exactly the model's UrlPathsOf
5
+ */
6
+ export declare function urlPathsOf(urls: string[] | undefined): string[];
7
+ /**
8
+ * The start-server options go into the collect section only with a start command that is not
9
+ * empty.
10
+ *
11
+ * @ensures exactly the model's ServerShown
12
+ */
13
+ export declare function serverShown(command: string | undefined): boolean;
14
+ /** The collect section's values once its defaults are filled in. */
15
+ export interface CollectDefaults {
16
+ baseUrl: string;
17
+ readyPattern: string;
18
+ runs: number;
19
+ preset: string;
20
+ }
21
+ /**
22
+ * The collect section's defaults, each used only when the caller leaves it out (a given 0 runs or
23
+ * "" stays): localhost:3000, "ready on", 3 runs, the desktop preset.
24
+ *
25
+ * @ensures exactly the model's CollectDefaultsOf
26
+ */
27
+ export declare function collectDefaultsOf(baseUrl: string | undefined, readyPattern: string | undefined, runs: number | undefined, preset: string | undefined): CollectDefaults;
28
+ //# sourceMappingURL=lighthouse-rules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lighthouse-rules.d.ts","sourceRoot":"","sources":["../src/lighthouse-rules.ts"],"names":[],"mappings":"AAOA;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,SAAS,GAAG,MAAM,EAAE,CAM/D;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAMhE;AAED,oEAAoE;AACpE,MAAM,WAAW,eAAe;IAC9B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2
2
  resolveUrl
3
3
  } from "./chunk-3L322IID.js";
4
4
 
5
+ // src/lighthouse-rules.ts
6
+ function urlPathsOf(urls) {
7
+ if (urls === void 0) return ["/"];
8
+ return urls;
9
+ }
10
+ function serverShown(command) {
11
+ if (command === void 0) return false;
12
+ return command.length > 0;
13
+ }
14
+ function collectDefaultsOf(baseUrl, readyPattern, runs, preset) {
15
+ return {
16
+ baseUrl: baseUrl === void 0 ? "http://localhost:3000" : baseUrl,
17
+ readyPattern: readyPattern === void 0 ? "ready on" : readyPattern,
18
+ runs: runs === void 0 ? 3 : runs,
19
+ preset: preset === void 0 ? "desktop" : preset
20
+ };
21
+ }
22
+
5
23
  // src/lighthouse.ts
6
24
  var defaultAssertions = {
7
25
  // Performance — Core Web Vitals
@@ -27,37 +45,34 @@ var defaultAssertions = {
27
45
  "service-worker": "off",
28
46
  "maskable-icon": "off"
29
47
  };
30
- function collectConfigOf({
31
- urls,
32
- baseUrl = "http://localhost:3000",
33
- startServerCommand,
34
- startServerReadyPattern = "ready on",
35
- numberOfRuns = 3,
36
- preset = "desktop",
37
- collect = {}
38
- }) {
48
+ function collectConfigOf(options) {
49
+ const defaults = collectDefaultsOf(
50
+ options.baseUrl,
51
+ options.startServerReadyPattern,
52
+ options.numberOfRuns,
53
+ options.preset
54
+ );
39
55
  const collectConfig = {
40
- url: (urls || ["/"]).map((u) => resolveUrl(u, baseUrl)),
41
- numberOfRuns,
42
- settings: { preset },
43
- ...collect
56
+ url: urlPathsOf(options.urls).map((u) => resolveUrl(u, defaults.baseUrl)),
57
+ numberOfRuns: defaults.runs,
58
+ settings: { preset: defaults.preset },
59
+ ...options.collect
44
60
  };
45
- if (startServerCommand) {
46
- collectConfig["startServerCommand"] = startServerCommand;
47
- collectConfig["startServerReadyPattern"] = startServerReadyPattern;
61
+ if (serverShown(options.startServerCommand)) {
62
+ collectConfig["startServerCommand"] = options.startServerCommand;
63
+ collectConfig["startServerReadyPattern"] = defaults.readyPattern;
48
64
  }
49
65
  return collectConfig;
50
66
  }
51
67
  function lighthousePreset(options = {}) {
52
- const { assertions = {}, upload = {} } = options;
53
68
  return {
54
69
  ci: {
55
70
  collect: collectConfigOf(options),
56
71
  assert: {
57
72
  preset: "lighthouse:recommended",
58
- assertions: { ...defaultAssertions, ...assertions }
73
+ assertions: { ...defaultAssertions, ...options.assertions }
59
74
  },
60
- upload: { target: "temporary-public-storage", ...upload }
75
+ upload: { target: "temporary-public-storage", ...options.upload }
61
76
  }
62
77
  };
63
78
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/lighthouse.ts"],"sourcesContent":["/**\n * Lighthouse CI preset for Augur e-commerce sites.\n *\n * Provides battle-tested Core Web Vitals thresholds tuned for e-commerce.\n * Sites extend this preset and provide their own URLs and server config.\n *\n * @example\n * ```js\n * // lighthouserc.js\n * import { lighthousePreset } from \"@simpleapps-com/augur-config/lighthouse\";\n *\n * export default lighthousePreset({\n * urls: [\"/\", \"/products\", \"/items/WAFL112\", \"/cart\"],\n * startServerCommand: \"npm run start\",\n * // override any threshold\n * assertions: {\n * \"largest-contentful-paint\": [\"error\", { maxNumericValue: 3000 }],\n * },\n * });\n * ```\n */\n\nimport { resolveUrl } from \"./doctor/rules\";\n\n/** A Lighthouse CI assertion: a level, optionally with its options. */\ntype Assertion = string | [string, Record<string, unknown>];\n\n/** Default assertion thresholds for Augur e-commerce sites. */\nconst defaultAssertions: Record<string, Assertion> = {\n // Performance — Core Web Vitals\n \"first-contentful-paint\": [\"warn\", { maxNumericValue: 2000 }],\n \"largest-contentful-paint\": [\"warn\", { maxNumericValue: 2500 }],\n \"cumulative-layout-shift\": [\"warn\", { maxNumericValue: 0.1 }],\n \"total-blocking-time\": [\"warn\", { maxNumericValue: 300 }],\n \"speed-index\": [\"warn\", { maxNumericValue: 3000 }],\n // Accessibility\n \"color-contrast\": \"warn\",\n \"heading-order\": \"warn\",\n \"link-name\": \"warn\",\n \"button-name\": \"warn\",\n // Best Practices\n \"errors-in-console\": \"warn\",\n deprecations: \"warn\",\n // SEO\n \"document-title\": \"error\",\n \"meta-description\": \"error\",\n \"http-status-code\": \"error\",\n // PWA — off for e-commerce sites\n \"installable-manifest\": \"off\",\n \"service-worker\": \"off\",\n \"maskable-icon\": \"off\",\n};\n\nexport interface LighthousePresetOptions {\n /** Pages to audit (paths appended to baseUrl). */\n urls?: string[];\n /** Base URL for the dev server. Default: \"http://localhost:3000\". */\n baseUrl?: string;\n /** Command to start the dev server. */\n startServerCommand?: string;\n /** Pattern indicating the server is ready. Default: \"ready on\". */\n startServerReadyPattern?: string;\n /** Number of Lighthouse runs per URL. Default: 3. */\n numberOfRuns?: number;\n /** Lighthouse settings preset. Default: \"desktop\". */\n preset?: \"desktop\" | \"perf\";\n /** Override or extend default assertion thresholds. */\n assertions?: Record<string, Assertion>;\n /** Override any collect options. */\n collect?: Record<string, unknown>;\n /** Override upload config (default: temporary-public-storage). */\n upload?: Record<string, unknown>;\n}\n\n/** The collect section: the URLs, runs and preset, the caller's collect options, the server. */\nfunction collectConfigOf({\n urls,\n baseUrl = \"http://localhost:3000\",\n startServerCommand,\n startServerReadyPattern = \"ready on\",\n numberOfRuns = 3,\n preset = \"desktop\",\n collect = {},\n}: LighthousePresetOptions): Record<string, unknown> {\n const collectConfig: Record<string, unknown> = {\n url: (urls || [\"/\"]).map((u) => resolveUrl(u, baseUrl)),\n numberOfRuns,\n settings: { preset },\n ...collect,\n };\n if (startServerCommand) {\n collectConfig[\"startServerCommand\"] = startServerCommand;\n collectConfig[\"startServerReadyPattern\"] = startServerReadyPattern;\n }\n return collectConfig;\n}\n\n/** Creates a Lighthouse CI config with Augur e-commerce defaults. */\nexport function lighthousePreset(options: LighthousePresetOptions = {}) {\n const { assertions = {}, upload = {} } = options;\n return {\n ci: {\n collect: collectConfigOf(options),\n assert: {\n preset: \"lighthouse:recommended\",\n assertions: { ...defaultAssertions, ...assertions },\n },\n upload: { target: \"temporary-public-storage\", ...upload },\n },\n };\n}\n\nexport { defaultAssertions };\n"],"mapp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AAQ;AAAA,QACR,YAAY,EAAE,GAAG,mBAAmB,GAAG,WAAW;AAAA,MACpD;AAAA,MACA,QAAQ,EAAE,QAAQ,4BAA4B,GAAG,OAAO;AAAA,IAC1D;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../src/lighthouse-rules.ts","../src/lighthouse.ts"],"sourcesContent":["//@ backend dafny\n\n/* The Lighthouse preset's decisions, verified with LemmaScript → Dafny (model:\n models/AugurConfig.dfy, \"the Lighthouse preset\"; link:\n models/links/augur-config-lighthouse-rules.dfy). `lighthouse.ts` builds the config object from\n their answers and decides nothing itself (atlas#86). */\n\n/**\n * The pages to audit: the caller's list when given (an empty list stays empty), else the root.\n *\n * @ensures exactly the model's UrlPathsOf\n */\nexport function urlPathsOf(urls: string[] | undefined): string[] {\n //@ verify\n //@ ensures urls === undefined ==> \\result.length === 1 && \\result[0] === \"/\"\n //@ ensures urls !== undefined ==> \\result === urls\n if (urls === undefined) return [\"/\"];\n return urls;\n}\n\n/**\n * The start-server options go into the collect section only with a start command that is not\n * empty.\n *\n * @ensures exactly the model's ServerShown\n */\nexport function serverShown(command: string | undefined): boolean {\n //@ verify\n //@ ensures command === undefined ==> \\result === false\n //@ ensures command !== undefined ==> \\result === (command.length > 0)\n if (command === undefined) return false;\n return command.length > 0;\n}\n\n/** The collect section's values once its defaults are filled in. */\nexport interface CollectDefaults {\n baseUrl: string;\n readyPattern: string;\n runs: number;\n preset: string;\n}\n\n/**\n * The collect section's defaults, each used only when the caller leaves it out (a given 0 runs or\n * \"\" stays): localhost:3000, \"ready on\", 3 runs, the desktop preset.\n *\n * @ensures exactly the model's CollectDefaultsOf\n */\nexport function collectDefaultsOf(\n baseUrl: string | undefined,\n readyPattern: string | undefined,\n runs: number | undefined,\n preset: string | undefined,\n): CollectDefaults {\n //@ verify\n //@ ensures baseUrl === undefined ==> \\result.baseUrl === \"http://localhost:3000\"\n //@ ensures baseUrl !== undefined ==> \\result.baseUrl === baseUrl\n //@ ensures readyPattern === undefined ==> \\result.readyPattern === \"ready on\"\n //@ ensures readyPattern !== undefined ==> \\result.readyPattern === readyPattern\n //@ ensures runs === undefined ==> \\result.runs === 3\n //@ ensures runs !== undefined ==> \\result.runs === runs\n //@ ensures preset === undefined ==> \\result.preset === \"desktop\"\n //@ ensures preset !== undefined ==> \\result.preset === preset\n return {\n baseUrl: baseUrl === undefined ? \"http://localhost:3000\" : baseUrl,\n readyPattern: readyPattern === undefined ? \"ready on\" : readyPattern,\n runs: runs === undefined ? 3 : runs,\n preset: preset === undefined ? \"desktop\" : preset,\n };\n}\n","/**\n * Lighthouse CI preset for Augur e-commerce sites.\n *\n * Provides battle-tested Core Web Vitals thresholds tuned for e-commerce.\n * Sites extend this preset and provide their own URLs and server config.\n *\n * @example\n * ```js\n * // lighthouserc.js\n * import { lighthousePreset } from \"@simpleapps-com/augur-config/lighthouse\";\n *\n * export default lighthousePreset({\n * urls: [\"/\", \"/products\", \"/items/WAFL112\", \"/cart\"],\n * startServerCommand: \"npm run start\",\n * // override any threshold\n * assertions: {\n * \"largest-contentful-paint\": [\"error\", { maxNumericValue: 3000 }],\n * },\n * });\n * ```\n */\n\nimport { resolveUrl } from \"./doctor/rules\";\nimport { collectDefaultsOf, serverShown, urlPathsOf } from \"./lighthouse-rules\";\n\n/** A Lighthouse CI assertion: a level, optionally with its options. */\ntype Assertion = string | [string, Record<string, unknown>];\n\n/** Default assertion thresholds for Augur e-commerce sites. */\nconst defaultAssertions: Record<string, Assertion> = {\n // Performance — Core Web Vitals\n \"first-contentful-paint\": [\"warn\", { maxNumericValue: 2000 }],\n \"largest-contentful-paint\": [\"warn\", { maxNumericValue: 2500 }],\n \"cumulative-layout-shift\": [\"warn\", { maxNumericValue: 0.1 }],\n \"total-blocking-time\": [\"warn\", { maxNumericValue: 300 }],\n \"speed-index\": [\"warn\", { maxNumericValue: 3000 }],\n // Accessibility\n \"color-contrast\": \"warn\",\n \"heading-order\": \"warn\",\n \"link-name\": \"warn\",\n \"button-name\": \"warn\",\n // Best Practices\n \"errors-in-console\": \"warn\",\n deprecations: \"warn\",\n // SEO\n \"document-title\": \"error\",\n \"meta-description\": \"error\",\n \"http-status-code\": \"error\",\n // PWA — off for e-commerce sites\n \"installable-manifest\": \"off\",\n \"service-worker\": \"off\",\n \"maskable-icon\": \"off\",\n};\n\nexport interface LighthousePresetOptions {\n /** Pages to audit (paths appended to baseUrl). */\n urls?: string[];\n /** Base URL for the dev server. Default: \"http://localhost:3000\". */\n baseUrl?: string;\n /** Command to start the dev server. */\n startServerCommand?: string;\n /** Pattern indicating the server is ready. Default: \"ready on\". */\n startServerReadyPattern?: string;\n /** Number of Lighthouse runs per URL. Default: 3. */\n numberOfRuns?: number;\n /** Lighthouse settings preset. Default: \"desktop\". */\n preset?: \"desktop\" | \"perf\";\n /** Override or extend default assertion thresholds. */\n assertions?: Record<string, Assertion>;\n /** Override any collect options. */\n collect?: Record<string, unknown>;\n /** Override upload config (default: temporary-public-storage). */\n upload?: Record<string, unknown>;\n}\n\n/**\n * The collect section: the URLs, runs and preset, the caller's collect options, the server. The\n * proved rules (`lighthouse-rules.ts`) decide the defaults, the URL list and the server options.\n */\nfunction collectConfigOf(options: LighthousePresetOptions): Record<string, unknown> {\n const defaults = collectDefaultsOf(\n options.baseUrl,\n options.startServerReadyPattern,\n options.numberOfRuns,\n options.preset,\n );\n const collectConfig: Record<string, unknown> = {\n url: urlPathsOf(options.urls).map((u) => resolveUrl(u, defaults.baseUrl)),\n numberOfRuns: defaults.runs,\n settings: { preset: defaults.preset },\n ...options.collect,\n };\n if (serverShown(options.startServerCommand)) {\n collectConfig[\"startServerCommand\"] = options.startServerCommand;\n collectConfig[\"startServerReadyPattern\"] = defaults.readyPattern;\n }\n return collectConfig;\n}\n\n/** Creates a Lighthouse CI config with Augur e-commerce defaults. */\nexport function lighthousePreset(options: LighthousePresetOptions = {}) {\n return {\n ci: {\n collect: collectConfigOf(options),\n assert: {\n preset: \"lighthouse:recommended\",\n assertions: { ...defaultAssertions, ...options.assertions },\n },\n upload: { target: \"temporary-public-storage\", ...options.upload },\n },\n };\n}\n\nexport { defaultAssertions };\n"],"mappings":";;;;;AAYO,SAAS,WAAW,MAAsC;AAI/D,MAAI,SAAS,OAAW,QAAO,CAAC,GAAG;AACnC,SAAO;AACT;AAQO,SAAS,YAAY,SAAsC;AAIhE,MAAI,YAAY,OAAW,QAAO;AAClC,SAAO,QAAQ,SAAS;AAC1B;AAgBO,SAAS,kBACd,SACA,cACA,MACA,QACiB;AAUjB,SAAO;AAAA,IACL,SAAS,YAAY,SAAY,0BAA0B;AAAA,IAC3D,cAAc,iBAAiB,SAAY,aAAa;AAAA,IACxD,MAAM,SAAS,SAAY,IAAI;AAAA,IAC/B,QAAQ,WAAW,SAAY,YAAY;AAAA,EAC7C;AACF;;;ACxCA,IAAM,oBAA+C;AAAA;AAAA,EAEnD,0BAA0B,CAAC,QAAQ,EAAE,iBAAiB,IAAK,CAAC;AAAA,EAC5D,4BAA4B,CAAC,QAAQ,EAAE,iBAAiB,KAAK,CAAC;AAAA,EAC9D,2BAA2B,CAAC,QAAQ,EAAE,iBAAiB,IAAI,CAAC;AAAA,EAC5D,uBAAuB,CAAC,QAAQ,EAAE,iBAAiB,IAAI,CAAC;AAAA,EACxD,eAAe,CAAC,QAAQ,EAAE,iBAAiB,IAAK,CAAC;AAAA;AAAA,EAEjD,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,eAAe;AAAA;AAAA,EAEf,qBAAqB;AAAA,EACrB,cAAc;AAAA;AAAA,EAEd,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,oBAAoB;AAAA;AAAA,EAEpB,wBAAwB;AAAA,EACxB,kBAAkB;AAAA,EAClB,iBAAiB;AACnB;AA2BA,SAAS,gBAAgB,SAA2D;AAClF,QAAM,WAAW;AAAA,IACf,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA,EACV;AACA,QAAM,gBAAyC;AAAA,IAC7C,KAAK,WAAW,QAAQ,IAAI,EAAE,IAAI,CAAC,MAAM,WAAW,GAAG,SAAS,OAAO,CAAC;AAAA,IACxE,cAAc,SAAS;AAAA,IACvB,UAAU,EAAE,QAAQ,SAAS,OAAO;AAAA,IACpC,GAAG,QAAQ;AAAA,EACb;AACA,MAAI,YAAY,QAAQ,kBAAkB,GAAG;AAC3C,kBAAc,oBAAoB,IAAI,QAAQ;AAC9C,kBAAc,yBAAyB,IAAI,SAAS;AAAA,EACtD;AACA,SAAO;AACT;AAGO,SAAS,iBAAiB,UAAmC,CAAC,GAAG;AACtE,SAAO;AAAA,IACL,IAAI;AAAA,MACF,SAAS,gBAAgB,OAAO;AAAA,MAChC,QAAQ;AAAA,QACN,QAAQ;AAAA,QACR,YAAY,EAAE,GAAG,mBAAmB,GAAG,QAAQ,WAAW;AAAA,MAC5D;AAAA,MACA,QAAQ,EAAE,QAAQ,4BAA4B,GAAG,QAAQ,OAAO;AAAA,IAClE;AAAA,EACF;AACF;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simpleapps-com/augur-config",
3
- "version": "2026.11.2",
3
+ "version": "2026.11.3",
4
4
  "description": "Shared tooling configuration presets for Augur ecommerce sites",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -56,7 +56,7 @@
56
56
  "eslint": "^9.0.0",
57
57
  "prettier": "^3.0.0",
58
58
  "typescript": "^5.0.0",
59
- "@lhci/cli": "^0.14.0"
59
+ "@lhci/cli": "^0.16.0"
60
60
  },
61
61
  "peerDependenciesMeta": {
62
62
  "prettier": {