@theholocron/lighthouse-config 7.14.4 → 7.16.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/dist/index.cjs CHANGED
@@ -12,11 +12,13 @@ const defaultAssertions = {
12
12
  "unused-javascript": ["warn", { maxLength: 0 }],
13
13
  "uses-long-cache-ttl": ["warn", { maxLength: 0 }]
14
14
  };
15
- function defineConfig({ url, startServerCommand, assertions = defaultAssertions, uploadTarget = "temporary-public-storage" }) {
15
+ function defineConfig({ url, startServerCommand, startServerReadyPattern, startServerReadyTimeout, assertions = defaultAssertions, uploadTarget = "temporary-public-storage" }) {
16
16
  return { ci: {
17
17
  collect: {
18
18
  url: Array.isArray(url) ? url : [url],
19
- ...startServerCommand ? { startServerCommand } : {}
19
+ ...startServerCommand ? { startServerCommand } : {},
20
+ ...startServerReadyPattern !== void 0 ? { startServerReadyPattern } : {},
21
+ ...startServerReadyTimeout !== void 0 ? { startServerReadyTimeout } : {}
20
22
  },
21
23
  assert: { assertions },
22
24
  upload: { target: uploadTarget }
package/dist/index.d.cts CHANGED
@@ -23,13 +23,19 @@ declare const defaultAssertions: LighthouseAssertion;
23
23
  interface LighthouseConfigOptions {
24
24
  url: string | string[];
25
25
  startServerCommand?: string;
26
+ /** Pattern lhci waits for in server stdout before running audits. Defaults to lhci's built-in /(listen|ready)/i. */
27
+ startServerReadyPattern?: string;
28
+ /** Milliseconds to wait for startServerReadyPattern before timing out. */
29
+ startServerReadyTimeout?: number;
26
30
  assertions?: LighthouseAssertion;
27
31
  /** @default "temporary-public-storage" */
28
32
  uploadTarget?: string;
29
33
  }
30
- declare function defineConfig({ url, startServerCommand, assertions, uploadTarget }: LighthouseConfigOptions): {
34
+ declare function defineConfig({ url, startServerCommand, startServerReadyPattern, startServerReadyTimeout, assertions, uploadTarget }: LighthouseConfigOptions): {
31
35
  ci: {
32
36
  collect: {
37
+ startServerReadyTimeout?: number | undefined;
38
+ startServerReadyPattern?: string | undefined;
33
39
  startServerCommand?: string | undefined;
34
40
  url: string[];
35
41
  };
package/dist/index.d.mts CHANGED
@@ -23,13 +23,19 @@ declare const defaultAssertions: LighthouseAssertion;
23
23
  interface LighthouseConfigOptions {
24
24
  url: string | string[];
25
25
  startServerCommand?: string;
26
+ /** Pattern lhci waits for in server stdout before running audits. Defaults to lhci's built-in /(listen|ready)/i. */
27
+ startServerReadyPattern?: string;
28
+ /** Milliseconds to wait for startServerReadyPattern before timing out. */
29
+ startServerReadyTimeout?: number;
26
30
  assertions?: LighthouseAssertion;
27
31
  /** @default "temporary-public-storage" */
28
32
  uploadTarget?: string;
29
33
  }
30
- declare function defineConfig({ url, startServerCommand, assertions, uploadTarget }: LighthouseConfigOptions): {
34
+ declare function defineConfig({ url, startServerCommand, startServerReadyPattern, startServerReadyTimeout, assertions, uploadTarget }: LighthouseConfigOptions): {
31
35
  ci: {
32
36
  collect: {
37
+ startServerReadyTimeout?: number | undefined;
38
+ startServerReadyPattern?: string | undefined;
33
39
  startServerCommand?: string | undefined;
34
40
  url: string[];
35
41
  };
package/dist/index.mjs CHANGED
@@ -11,11 +11,13 @@ const defaultAssertions = {
11
11
  "unused-javascript": ["warn", { maxLength: 0 }],
12
12
  "uses-long-cache-ttl": ["warn", { maxLength: 0 }]
13
13
  };
14
- function defineConfig({ url, startServerCommand, assertions = defaultAssertions, uploadTarget = "temporary-public-storage" }) {
14
+ function defineConfig({ url, startServerCommand, startServerReadyPattern, startServerReadyTimeout, assertions = defaultAssertions, uploadTarget = "temporary-public-storage" }) {
15
15
  return { ci: {
16
16
  collect: {
17
17
  url: Array.isArray(url) ? url : [url],
18
- ...startServerCommand ? { startServerCommand } : {}
18
+ ...startServerCommand ? { startServerCommand } : {},
19
+ ...startServerReadyPattern !== void 0 ? { startServerReadyPattern } : {},
20
+ ...startServerReadyTimeout !== void 0 ? { startServerReadyTimeout } : {}
19
21
  },
20
22
  assert: { assertions },
21
23
  upload: { target: uploadTarget }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/lighthouse-config",
3
- "version": "7.14.4",
3
+ "version": "7.16.0",
4
4
  "description": "A Lighthouse CI configuration for auditing performance and accessibility within the Galaxy.",
5
5
  "homepage": "https://github.com/theholocron/configs/tree/main/packages/lighthouse-config#readme",
6
6
  "bugs": "https://github.com/theholocron/configs/issues",
@@ -24,8 +24,8 @@
24
24
  "tsdown": "^0.22.14",
25
25
  "typescript": "^5.9.3",
26
26
  "vitest": "^4.1.10",
27
- "@theholocron/tsconfig": "7.14.4",
28
- "@theholocron/vitest-config": "7.14.4"
27
+ "@theholocron/tsconfig": "7.16.0",
28
+ "@theholocron/vitest-config": "7.16.0"
29
29
  },
30
30
  "exports": {
31
31
  ".": {