diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c18405c..cf769ecb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -201,10 +201,11 @@ jobs: name: Browser Journeys (${{ matrix.part }}/8) runs-on: ubuntu-latest # A part aims for 10 minutes or less. One hung once (2026-10-31) and would have held its machine - # for GitHub's default six hours. Playwright's own limit (playwright.config.ts globalTimeout, 25 - # minutes) ends a hung run first, as a failure, so its report is still kept; this one catches a - # hang outside the tests. - timeout-minutes: 30 + # for GitHub's default six hours. Playwright's own limit (playwright.config.ts globalTimeout, 16 + # minutes) ends a hung run first, as a failure, so its report is still kept; the run step's own + # 18 minutes stop one Playwright itself froze in (2026-11-22: 28 minutes silent, cancelling did + # nothing), and this one a hang outside the tests. It was 30, with Playwright's at 25 (8n4). + timeout-minutes: 22 strategy: # Every part runs to the end, so one failure never hides another's. fail-fast: false @@ -242,12 +243,30 @@ jobs: - name: Run the journeys working-directory: ./e2e + # Enforced by GitHub's runner, not by Playwright: a part whose Playwright froze still ends here (8n4). + timeout-minutes: 18 # The frontend built once and served whole (playwright.config.ts E2E_BUILT), not file by file by the dev # server: with the boot no longer played in every fresh tab (tests/helpers.ts skipBoot), a third of the time. env: E2E_BUILT: '1' run: npx playwright test --shard=${{ matrix.part }}/8 --fully-parallel + # How long each journey took (8n4, e2e/timings.js): the slowest ten on the run's summary page, and every test's time + # kept for 30 days, so the parts can be shared out by time. Passed or failed, so a slow failure shows too. + - name: Time the journeys + if: always() + working-directory: ./e2e + run: node timings.js results/report.json ${{ matrix.part }} results/timings-part-${{ matrix.part }}.json >> "$GITHUB_STEP_SUMMARY" + + - name: Keep the journeys' times + if: always() + uses: actions/upload-artifact@v4 + with: + name: e2e-timings-${{ matrix.part }} + path: e2e/results/timings-part-${{ matrix.part }}.json + if-no-files-found: ignore + retention-days: 30 + # What failed and why: screenshots, a trace of every step, and the HTML report, one per part. - name: Keep the report of a failed run if: failure() diff --git a/.gitignore b/.gitignore index 69f46a3d..c0ef2bf5 100644 --- a/.gitignore +++ b/.gitignore @@ -76,3 +76,4 @@ frontend/src/*.bak e2e/test-results/ e2e/playwright-report/ e2e/.built/ +e2e/results/ diff --git a/CHANGELOG.md b/CHANGELOG.md index d2332af4..9e008e29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -933,6 +933,7 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Under the hood +- **The browser journeys' times on CI, and a hang caught sooner.** Each of the eight parts now lists its slowest ten tests on the run's summary page and keeps every test's time for 30 days, so the parts can later be shared out by time rather than by count. A frozen part now fails at 16 to 18 minutes rather than sitting for up to 30, and the frontend server no longer logs a harmless error with a stack trace every time a browser window closes. - **What a shop buys, on the server.** Each kind of shop, the app's and a game's own, can buy WHAT IT SELLS (as every shop always has) or ANYTHING: a Fence or a pawn shop takes every priced thing at its building's buyback rate, and the shop window's SELL list offers it all. Carried by the system file. The builder's BUYS setting comes with the game's own shops on FEATURES. - **A game's own kinds of shop, on the server.** A system can now make shops of its own (an Apothecary, a Fence), each with a name and on or off, carried by the system file. An item type's SOLD AT can tick them, a building can be one, and it sells the types that tick it at their prices. Off, or in a game that doesn't make it, a building set to it is no shop. The builder's SOLD AT, + NEW SHOP and the BUILDING TYPE list come next. - **PLAYERS CHANGE GEAR, on the server.** A table setting (on to start) for systems with their own item types: switched off, the server keeps every column of a player's gear lines as it was saved, and a thing a player adds comes without column values, while their names, counts and where they carry things still change. The GM can always change them. The GAME tab's switch and the sheet's side come next. diff --git a/README.md b/README.md index a3b1f893..2bb20a47 100644 --- a/README.md +++ b/README.md @@ -586,6 +586,7 @@ CITY_NET/ │ ├── npc_rolls.test.js # Rolling from an NPC's sheet: the GM from any NPC, a player from the friendly NPC given to them, the log naming the NPC; anyone else ignored │ ├── npc_attacks.test.js # Attacking as an NPC in CWN, Shadowrun and Cyberpunk RED: its own sheet, wounds and position, the GM for any NPC and a controller for theirs, the log naming both │ ├── e2e_names.test.js # Each browser journey's system and player names its own: on CI, tests sharing a database and a name clash +│ ├── e2e_timings.test.js # The journeys' times on CI (8n4, e2e/timings.js): every test, in describe blocks too, slowest first with its tries added; the summary table with failures and retries said, only the slowest ten; run as CI runs it, and a part with no report not failing the step │ ├── readme_structure.test.js # This tree held to the files on disk: every backend and frontend source and test file named in its own folder, and no line naming a file that has gone. Reads the tree by indentation into full paths │ ├── system_isolation.test.js # The CWN work kept out of the other systems where rolls are resolved and sheets written, so widening the shared engine has to be deliberate (the browser half is in components/__tests__/systemIsolation.test.tsx) │ ├── bank_own_account.test.js # The bank's player handlers acting on the sender's own account only, where they used to act on whatever name the message carried; the ordinary cases unchanged @@ -1440,6 +1441,7 @@ CITY_NET/ │ │ │ └── setup.ts # Loaded before every frontend test: Testing Library's DOM matchers │ │ ├── __tests__/ │ │ │ ├── App.smoke.test.tsx # The app mounts without throwing and draws the sidebar and canvas area, so a broken import or a crash on first render fails here; says its theme where an open sheet tab hears it (8s1a) +│ │ │ ├── viteLogger.test.ts # The dev and preview servers' logger (8n4, vite.config.ts): a closed browser's EPIPE and ECONNRESET on the socket's proxy dropped, every other error still said │ │ │ ├── SheetSurfaces.test.tsx # The standalone tab and SHEET.EXE are one sheet (8s1a): the same play props (those still to come named with their piece), each action on the tab sent as the window's, refusals and recovery reaching it, in the theme and following it, signed in after a refresh, CONNECTION LOST, only own rolls; IMPORT where the system can import on both and IMPORT.EXE from the tab, what the GM gives said on the tab (8s1b); LEVEL_UP.EXE and NEW_CHARACTER.EXE opening on the tab (8s1c); every prop the window gives, the tab gives too, none left to come, the asks of the main window and the vehicle badge on the tab (8s1d); the vitals strip on both, each with its own sign-in (8s3b); FIRE (onGearCount) on both (8a4b) │ │ │ ├── BattleMapScene.test.tsx # Which loader a map goes to — the whole of the animated-map change, and previously uncovered since the app smoke test mocks the scene away. A loop must not reach `useLoader`, which suspends with nothing above it to catch that │ │ │ ├── battleMapMedia.test.ts # Still or loop, including the trap where the last dot is in the query string rather than the filename @@ -1503,10 +1505,11 @@ CITY_NET/ │ ├── COVERAGE.md # Every option a GM can set in the builder, its server tests, and the browser test proving it at the table (AT THE TABLE / BUILDER ONLY / GAP), with the gaps in the order Phase 7 closes them; updated by every piece that adds or changes an option │ ├── README.md # How to install and run the journeys, read a failure, and write a new one │ ├── package.json # Playwright's test runner, and nothing else -│ ├── playwright.config.ts # Starts both servers (Secure Mode on, a temp database, the test GM), one worker, the installed Chrome locally or Playwright's Chromium in CI; with E2E_BUILT=1 (CI) the frontend built once into e2e/.built and served by vite preview rather than file by file +│ ├── playwright.config.ts # Starts both servers (Secure Mode on, a temp database, the test GM), one worker, the installed Chrome locally or Playwright's Chromium in CI; with E2E_BUILT=1 (CI) the frontend built once into e2e/.built and served by vite preview rather than file by file; on CI a whole part stops at 16 minutes, and a JSON report is written for timings.js (8n4) │ ├── fixtures/ │ │ └── emberline.citysys # A random system from the test generator, exported as the builder does: the file INSTALL A FILE is given in builder-clicks │ ├── cleanup.ts # Before a run, the throwaway databases earlier runs left in the temp folder +│ ├── timings.js # How long each journey took on CI (8n4): Playwright's JSON report read into every test's time over its tries, slowest first; the slowest ten as a table on the run's summary page, every test's time kept as the part's file; a part with no report says so │ └── tests/ │ ├── helpers.ts # Signing in as the GM or a player, the GAME tab, the builder past its tour, a rail button (pointer moved off after), a builder page; a tab of an open character sheet (sheetTab); a running system and an approved player through the API; skipBoot, each tab started as one that has played the boot sequence │ ├── acceleration-notice.spec.ts # HARDWARE ACCELERATION IS OFF: a browser offering only slow drawing is told how to turn acceleration on, and DISMISS keeps it gone after a reload; SYSTEM_INFO's MAP SLOW? holds the steps, and WARN ME, off since DISMISS, brings it back diff --git a/backend/__tests__/e2e_timings.test.js b/backend/__tests__/e2e_timings.test.js new file mode 100644 index 00000000..cb3d31d9 --- /dev/null +++ b/backend/__tests__/e2e_timings.test.js @@ -0,0 +1,94 @@ +/** + * How long each browser journey took on CI (8n4, e2e/timings.js): Playwright's JSON report read into every test's time, + * slowest first, retries counted in; the slowest ten as a table for the run's summary page; and a part that wrote no + * report says so without failing the step. + */ + +import { describe, it, expect } from 'vitest'; +import fs from 'fs'; +import os from 'os'; +import path from 'path'; +import { execFileSync } from 'child_process'; +import { createRequire } from 'module'; +import { fileURLToPath } from 'url'; + +const SCRIPT = path.join(path.dirname(fileURLToPath(import.meta.url)), '..', '..', 'e2e', 'timings.js'); +const { rowsOf, summaryOf, clock, SHOWN } = createRequire(import.meta.url)(SCRIPT); + +const spec = (file, line, title, durations, status = 'expected') => ({ title, file, line, tests: [{ status, results: durations.map((duration, retry) => ({ duration, retry })) }] }); +const REPORT = { + suites: [ + { title: 'a.spec.ts', file: 'a.spec.ts', specs: [spec('a.spec.ts', 8, 'quick one', [3400])], + // A describe block inside the file: its tests are found too. + // Each spec names its own file, as Playwright's do. + suites: [{ title: 'in a block', specs: [spec('a.spec.ts', 30, 'slow | piped', [61000])] }] }, + { title: 'b.spec.ts', file: 'b.spec.ts', specs: [spec('b.spec.ts', 12, 'flaky one', [120000, 9500], 'flaky'), spec('b.spec.ts', 50, 'broken one', [8000, 7000], 'unexpected')] }, + ], +}; + +describe('the times', () => { + it('every test, in blocks too, slowest first, its tries added together and counted', () => { + expect(rowsOf(REPORT)).toEqual([ + { file: 'b.spec.ts', line: 12, title: 'flaky one', seconds: 129.5, tries: 2, outcome: 'flaky' }, + { file: 'a.spec.ts', line: 30, title: 'slow | piped', seconds: 61, tries: 1, outcome: 'expected' }, + { file: 'b.spec.ts', line: 50, title: 'broken one', seconds: 15, tries: 2, outcome: 'unexpected' }, + { file: 'a.spec.ts', line: 8, title: 'quick one', seconds: 3.4, tries: 1, outcome: 'expected' }, + ]); + expect(rowsOf({})).toEqual([]); + }); + + it('as a person reads a duration', () => { + expect(clock(42.4)).toBe('42s'); + expect(clock(231)).toBe('3m 51s'); + expect(clock(60)).toBe('1m 0s'); + }); +}); + +describe('the summary page', () => { + it('the part, its tests and their time; the slowest as a table, a failure and a retry said', () => { + const text = summaryOf(rowsOf(REPORT), 5); + expect(text.split('\n')).toEqual([ + '### Browser Journeys, part 5: 4 tests, 3m 29s of testing', + '', + 'The slowest 4:', + '', + '| SECONDS | TRIES | TEST |', + '|---:|---:|---|', + '| 129.5 | 2 | b.spec.ts:12 flaky one (passed on a retry) |', + '| 61.0 | 1 | a.spec.ts:30 slow \\| piped |', + '| 15.0 | 2 | b.spec.ts:50 broken one **FAILED** |', + '| 3.4 | 1 | a.spec.ts:8 quick one |', + '', + ]); + }); + + it('only the slowest ten; a part with none says so', () => { + expect(SHOWN).toBe(10); + const many = { suites: [{ file: 'm.spec.ts', specs: Array.from({ length: 14 }, (_, n) => spec('m.spec.ts', n + 1, `t${n}`, [1000 * (n + 1)])) }] }; + const text = summaryOf(rowsOf(many), 2); + expect(text).toContain('14 tests'); + expect(text).toContain('The slowest 10:'); + expect(text.split('\n').filter((l) => l.startsWith('| ') && !l.startsWith('| SECONDS'))).toHaveLength(10); + expect(summaryOf(rowsOf({ suites: [{ file: 'o.spec.ts', specs: [spec('o.spec.ts', 3, 'only', [2000])] }] }), 4)).toContain('part 4: 1 test, 2s of testing'); + expect(summaryOf([], 3)).toBe('### Browser Journeys, part 3: 0 tests, 0s of testing\n\nNo tests ran.\n'); + }); +}); + +describe('run on CI', () => { + const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'e2e-timings-')); + + it('prints the table and writes every test\'s time to the part\'s file', () => { + const report = path.join(dir, 'report.json'); + const out = path.join(dir, 'timings-part-5.json'); + fs.writeFileSync(report, JSON.stringify(REPORT)); + const printed = execFileSync(process.execPath, [SCRIPT, report, '5', out], { encoding: 'utf8' }); + expect(printed).toBe(summaryOf(rowsOf(REPORT), 5)); + expect(JSON.parse(fs.readFileSync(out, 'utf8'))).toEqual({ part: 5, tests: rowsOf(REPORT) }); + }); + + it('a part that wrote no report says so, and the step still passes', () => { + const printed = execFileSync(process.execPath, [SCRIPT, path.join(dir, 'none.json'), '7', path.join(dir, 'x.json')], { encoding: 'utf8' }); + expect(printed).toBe('### Browser Journeys, part 7: no report was written\n'); + expect(fs.existsSync(path.join(dir, 'x.json'))).toBe(false); + }); +}); diff --git a/e2e/README.md b/e2e/README.md index 813ceb22..534a3202 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -102,7 +102,7 @@ npx playwright test --debug ``` - In CI the same files, and an HTML report, are attached to the run as an artifact, one per part - (**e2e-report-1** to **e2e-report-4**), downloadable from the run's summary page on GitHub. + (**e2e-report-1** to **e2e-report-8**), downloadable from the run's summary page on GitHub. ## In CI @@ -114,9 +114,15 @@ two runs in a row, add a part. A last job named **Browser Journeys** passes only when all eight did, so the check keeps its name. On a developer's machine nothing changes: one machine, files in order. -A part that hangs fails after 25 minutes (Playwright's `globalTimeout`, CI only), with its report -kept; the job itself stops at 30 (`timeout-minutes`), for a hang outside the tests. Either way, -**Re-run failed jobs** runs just that part again. +A part that hangs fails after 16 minutes (Playwright's `globalTimeout`, CI only), with its report +kept. If Playwright itself freezes, as a GitHub runner did on 2026-11-22 (28 minutes silent, Cancel +doing nothing), the run step stops at 18 (its own `timeout-minutes`, enforced by the runner), and the +job at 22 for a hang outside the tests. Either way, **Re-run failed jobs** runs just that part again. + +Every part, passed or failed, writes how long each test took (`timings.js`, from Playwright's JSON +report): the slowest ten as a table on the run's summary page, and every test's time as an artifact, +**e2e-timings-1** to **e2e-timings-8**, kept 30 days. The parts are shared out by count today; these +times are what sharing them out by time will use. ## Writing a journey diff --git a/e2e/playwright.config.ts b/e2e/playwright.config.ts index 5e703419..e231e80a 100644 --- a/e2e/playwright.config.ts +++ b/e2e/playwright.config.ts @@ -40,11 +40,14 @@ export default defineConfig({ // Two minutes: CI runs about four times slower than a desktop, and tests of 15 s here took past // one minute there (builder-dice, the bell, the journey, the clicks sweep; 2026-10-24 to 10-27). timeout: 120_000, - // A whole CI part, at most 25 minutes (a part took 12 to 21 by 2026-11-18, before E2E_BUILT and skipBoot): a hung run then fails, with its - // report kept, well before the job's own 30-minute limit (ci.yml) cancels it with none. No limit - // on a developer's machine, where the whole suite takes about 27 minutes. - globalTimeout: process.env.CI ? 25 * 60_000 : 0, - reporter: process.env.CI ? [['list'], ['html', { open: 'never' }]] : 'list', + // A whole CI part, at most 16 minutes (8n4; parts took 4 to 12 by 2026-11-22, with E2E_BUILT and skipBoot): a hung run + // then fails, with its report kept, before the run step's own 18-minute limit (ci.yml) stops it with none. It was 25, + // and on 2026-11-22 a part sat silent for 28 minutes on a frozen runner until it was cancelled. No limit on a developer's + // machine, where the whole suite takes about 27 minutes. + globalTimeout: process.env.CI ? 16 * 60_000 : 0, + // On CI also a JSON report, which timings.js turns into the slowest ten on the run's summary page and a file of every + // test's time (8n4). + reporter: process.env.CI ? [['list'], ['html', { open: 'never' }], ['json', { outputFile: 'results/report.json' }]] : 'list', use: { baseURL: `http://127.0.0.1:${FRONTEND_PORT}`, viewport: { width: 1366, height: 820 }, diff --git a/e2e/timings.js b/e2e/timings.js new file mode 100644 index 00000000..aa1efee4 --- /dev/null +++ b/e2e/timings.js @@ -0,0 +1,72 @@ +// How long each browser journey took on CI (8n4): read from Playwright's JSON report, the slowest ten written as a table +// on the run's summary page, and every test's time kept as a file of the part's own, so the parts can be balanced by +// time rather than by count (ci.yml shares them out by count today, and they ran 4 to 12 minutes on 2026-11-22). +// Plain Node, no packages: the backend's tests read it too (backend/__tests__/e2e_timings.test.js). +// +// node timings.js prints the table, writes the file + +const fs = require('fs'); + +/** The slowest this many are listed on the summary page; the file keeps every one. */ +const SHOWN = 10; + +/** Every test in the report, slowest first: where it is, its name, its seconds over every try, how many tries, how it ended. */ +const rowsOf = (report) => { + const rows = []; + const walk = (suite) => { + for (const spec of suite.specs || []) { + for (const test of spec.tests || []) { + const results = test.results || []; + const ms = results.reduce((sum, r) => sum + (Number(r.duration) || 0), 0); + rows.push({ + file: spec.file || '', + line: spec.line || 0, + title: spec.title || '', + seconds: Math.round(ms / 100) / 10, + tries: results.length, + // Playwright's own word: expected (passed), unexpected (failed), flaky (passed on a retry), skipped. + outcome: test.status || 'unknown', + }); + } + } + for (const child of suite.suites || []) walk(child); + }; + for (const suite of (report && report.suites) || []) walk(suite); + return rows.sort((a, b) => b.seconds - a.seconds || a.file.localeCompare(b.file) || a.line - b.line); +}; + +/** Minutes and seconds, as a person reads a duration: 3m 51s, or 42s. */ +const clock = (seconds) => { + const s = Math.round(seconds); + return s >= 60 ? `${Math.floor(s / 60)}m ${s % 60}s` : `${s}s`; +}; + +/** What a test's last column says beside its name: retried, failed, or nothing for a plain pass. */ +const mark = (row) => (row.outcome === 'unexpected' ? ' **FAILED**' : row.outcome === 'flaky' ? ' (passed on a retry)' : row.tries > 1 ? ' (retried)' : ''); + +/** The table for the run's summary page: the part, how many tests and their time together, then the slowest. */ +const summaryOf = (rows, part) => { + const total = rows.reduce((sum, r) => sum + r.seconds, 0); + const lines = [ + `### Browser Journeys, part ${part}: ${rows.length} test${rows.length === 1 ? '' : 's'}, ${clock(total)} of testing`, + '', + ]; + if (!rows.length) return [...lines, 'No tests ran.', ''].join('\n'); + lines.push(`The slowest ${Math.min(SHOWN, rows.length)}:`, '', '| SECONDS | TRIES | TEST |', '|---:|---:|---|'); + for (const r of rows.slice(0, SHOWN)) lines.push(`| ${r.seconds.toFixed(1)} | ${r.tries} | ${r.file}:${r.line} ${r.title.replace(/\|/g, '\\|')}${mark(r)} |`); + return [...lines, ''].join('\n'); +}; + +if (require.main === module) { + const [reportPath, part, outPath] = process.argv.slice(2); + // A part that never got to write its report (a hang, a build that failed) says so, rather than failing this step too. + if (!reportPath || !fs.existsSync(reportPath)) { + process.stdout.write(`### Browser Journeys, part ${part || '?'}: no report was written\n`); + } else { + const rows = rowsOf(JSON.parse(fs.readFileSync(reportPath, 'utf8'))); + process.stdout.write(summaryOf(rows, part)); + if (outPath) fs.writeFileSync(outPath, JSON.stringify({ part: Number(part), tests: rows }, null, 2)); + } +} + +module.exports = { rowsOf, summaryOf, clock, SHOWN }; diff --git a/frontend/src/__tests__/viteLogger.test.ts b/frontend/src/__tests__/viteLogger.test.ts new file mode 100644 index 00000000..5e1164dd --- /dev/null +++ b/frontend/src/__tests__/viteLogger.test.ts @@ -0,0 +1,26 @@ +import { describe, it, expect, vi, afterEach } from 'vitest'; +import config from '../../vite.config'; + +// The dev and preview servers' logger (8n4, vite.config.ts): the socket proxy's EPIPE and ECONNRESET, a browser closing +// mid-message, are dropped; every other error is still said. + +const logger = (config as { customLogger?: { error: (msg: string) => void } }).customLogger!; +const said = () => vi.spyOn(console, 'error').mockImplementation(() => {}); +afterEach(() => vi.restoreAllMocks()); + +describe('the servers\' logger', () => { + it('drops a closed browser\'s EPIPE and ECONNRESET on the socket\'s proxy', () => { + const spy = said(); + logger.error('2:55:47 AM [vite] ws proxy error:\nError: write EPIPE\n at afterWriteDispatched (node:internal/stream_base_commons:138:10)'); + logger.error('[vite] ws proxy socket error:\nError: read ECONNRESET\n at TCP.onStreamRead'); + expect(spy).not.toHaveBeenCalled(); + }); + + it('says any other proxy error, and anything else', () => { + const spy = said(); + logger.error('[vite] ws proxy error:\nError: connect ECONNREFUSED 127.0.0.1:5055'); + logger.error('[vite] http proxy error: /api/version\nError: write EPIPE'); + logger.error('Build failed'); + expect(spy).toHaveBeenCalledTimes(3); + }); +}); diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 12f6d66b..dd251972 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -1,4 +1,5 @@ import { defineConfig } from 'vitest/config' +import { createLogger } from 'vite' import react from '@vitejs/plugin-react' import { readFileSync } from 'fs' @@ -8,7 +9,18 @@ const { version } = JSON.parse(readFileSync('./package.json', 'utf-8')) // the browser tests (e2e/), which run their own beside a dev setup that may already be on 5000. const api = process.env.API_TARGET || 'http://127.0.0.1:5000' +// The socket's proxy reports a browser that closed mid-message (EPIPE, ECONNRESET) as an error with a stack, every time a +// tab or a browser journey's window closes: harmless, and it buried the real errors in a failed CI log (8n4). Only those +// two are dropped; every other proxy error, and everything else, is still said. +const logger = createLogger() +const sayError = logger.error +logger.error = (msg, options) => { + if (/ws proxy (socket )?error/.test(msg) && /\b(EPIPE|ECONNRESET)\b/.test(msg)) return + sayError(msg, options) +} + export default defineConfig({ + customLogger: logger, plugins: [react()], define: { __APP_VERSION__: JSON.stringify(version),