helpyourneighbour/docs/runtime/integration_targets_helpyourneighbour.md

148 lines
96 KiB
Markdown
Raw Permalink Normal View History

# Integration Change Targets
Project: helpyourneighbour
## Highest Priority Files
backend/node_modules/accepts/index.js
backend/node_modules/bcryptjs/index.d.ts
backend/node_modules/bcryptjs/index.js
backend/node_modules/body-parser/index.js
backend/node_modules/buffer-equal-constant-time/index.js
backend/node_modules/bytes/index.js
backend/node_modules/call-bind-apply-helpers/index.d.ts
backend/node_modules/call-bind-apply-helpers/index.js
backend/node_modules/call-bound/index.d.ts
backend/node_modules/call-bound/index.js
backend/node_modules/content-disposition/index.js
backend/node_modules/content-type/index.js
backend/node_modules/cookie-signature/index.js
backend/node_modules/cookie/index.js
backend/node_modules/denque/index.d.ts
backend/node_modules/denque/index.js
backend/node_modules/depd/index.js
backend/node_modules/ee-first/index.js
backend/node_modules/encodeurl/index.js
backend/node_modules/es-define-property/index.d.ts
## Relevant Runtime Notes
# Integration Context Audit
Project: helpyourneighbour
## package.json scripts
{
"test": "npm run test:smoke",
"start": "node src/server.js",
"dev": "node --watch src/server.js",
"db:init": "node src/db/init.js",
"db:seed": "node src/db/seed.js",
"test:smoke": "node scripts/smoke-test.mjs",
"test:integration": "node scripts/integration-test.mjs"
}
## Integration Runner
// Einfacher HTTP-Test ohne Playwright
// Funktion zum Senden einer HTTP-Anfrage
async function testHealthEndpoint() {
try {
const response = await fetch('http://localhost:3000/health');
if (response.status === 200) {
console.log('Integration test passed: API server is running and healthy');
return true;
} else {
console.error(`Integration test failed: Expected status 200, got ${response.status}`);
return false;
}
} catch (error) {
console.error('Integration test failed:', error.message);
return false;
}
}
// Führe den Test aus
testHealthEndpoint().then(success => {
if (!success) {
process.exit(1);
}
});
## Referenced localhost URLs
./node_modules/encodeurl/README.md:60: href.host = 'localhost'
./node_modules/mysql2/lib/connection_config.js:97: this.host = options.host || 'localhost';
./node_modules/mysql2/typings/mysql/lib/Connection.d.ts:132: * The hostname of the database you are connecting to. (Default: localhost)
./node_modules/parseurl/README.md:67: Parsing URL "http://localhost:8888/foo/bar?user=tj&pet=fluffy"
./node_modules/body-parser/README.md:454:// POST /api/users gets JSON bodies
./node_modules/body-parser/README.md:455:app.post('/api/users', jsonParser, function (req, res) {
./node_modules/jws/readme.md:255:[encrypted-key-docs]: https://nodejs.org/api/crypto.html#crypto_sign_sign_private_key_output_format
./node_modules/safe-buffer/README.md:303:[See the docs](https://nodejs.org/api/buffer.html).
./node_modules/safe-buffer/README.md:341:From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size):
./node_modules/@playwright/test/README.md:5:## [Documentation](https://playwright.dev) | [API reference](https://playwright.dev/docs/api/class-playwright)
./node_modules/@playwright/test/README.md:49:* [API reference](https://playwright.dev/docs/api/class-playwright)
./node_modules/@playwright/test/README.md:166:* [API reference](https://playwright.dev/docs/api/class-playwright/)
./node_modules/jsonwebtoken/README.md:37:encoded private key for RSA and ECDSA. In case of a private key with passphrase an object `{ key, passphrase }` can be used (based on [crypto documentation](https://nodejs.org/api/crypto.html#crypto_sign_sign_private_key_output_format)), in this case be sure you pass the `algorithm` option.
./node_modules/router/README.md:159:var api = router.route('/api/')
./node_modules/router/README.md:211:- `req` - This is a [HTTP incoming message](https://nodejs.org/api/http.html#http_http_incomingmessage) instance.
./node_modules/router/README.md:212:- `res` - This is a [HTTP server response](https://nodejs.org/api/http.html#http_class_http_serverresponse) instance.
./node_modules/router/README.md:274:router.use('/api/', api)
./node_modules/router/README.md:279:// handle `PATCH` requests to `/api/set-message`
./node_modules/router/README.md:306:curl http://127.0.0.1:8080/api/set-message -X PATCH -H "Content-Type: application/json" -d '{"value":"Cats!"}'
./node_modules/statuses/README.md:95:[Node.js http module `http.STATUS_CODES`](https://nodejs.org/dist/latest/docs/api/http.html#http_http_status_codes).
./node_modules/dotenv/README-es.md:5:Dotenv is a zero-dependency module that loads environment variables from a `.env` file into [`process.env`](https://nodejs.org/docs/latest/api/process.html#process_process_env). Storing configuration in the environment separate from code is based on [The Twelve-Factor App](https://12factor.net/config) methodology.
./node_modules/dotenv/README-es.md:139:You can use the `--require` (`-r`) [command line option](https://nodejs.org/api/cli.html#-r---require-module) to preload dotenv. By doing this, you do not need to require and load dotenv in your application code.
./node_modules/dotenv/README-es.md:171:DATABASE_URL="postgres://${USERNAME}@localhost/my_database"
./node_modules/dotenv/README-es.md:180:DATABASE_URL postgres://username@localhost/my_database
./node_modules/dotenv/README-es.md:192:DATABASE_URL="postgres://$(whoami)@localhost/my_database"
./node_modules/dotenv/README-es.md:201:DATABASE_URL postgres://yourusername@localhost/my_database
./node_modules/dotenv/README-es.md:590:[`process.env`](https://nodejs.org/docs/latest/api/process.html#process_process_env),
./node_modules/dotenv/README.md:5:Dotenv is a zero-dependency module that loads environment variables from a `.env` file into [`process.env`](https://nodejs.org/docs/latest/api/process.html#process_process_env). Storing configuration in the environment separate from code is based on [The Twelve-Factor App](https://12factor.net/config) methodology.
./node_modules/dotenv/README.md:139:You can use the `--require` (`-r`) [command line option](https://nodejs.org/api/cli.html#-r---require-module) to preload dotenv. By doing this, you do not need to require and load dotenv in your application code.
./node_modules/dotenv/README.md:171:DATABASE_URL="postgres://${USERNAME}@localhost/my_database"
./node_modules/dotenv/README.md:180:DATABASE_URL postgres://username@localhost/my_database
./node_modules/dotenv/README.md:192:DATABASE_URL="postgres://$(whoami)@localhost/my_database"
./node_modules/dotenv/README.md:201:DATABASE_URL postgres://yourusername@localhost/my_database
./node_modules/dotenv/README.md:590:[`process.env`](https://nodejs.org/docs/latest/api/process.html#process_process_env),
./node_modules/dotenv/lib/main.d.ts:18: * @param src - contents to be parsed. example: `'DB_HOST=localhost'`
./node_modules/dotenv/lib/main.d.ts:19: * @returns an object with keys and values based on `src`. example: `{ DB_HOST : 'localhost' }`
./node_modules/playwright-core/ThirdPartyNotices.txt:156:$ bombardier -d 10s --fasthttp http://localhost:3000/
./node_modules/playwright-core/ThirdPartyNotices.txt:170:$ bombardier -d 10s --fasthttp http://localhost:3000/
./node_modules/playwright-core/ThirdPartyNotices.txt:218: console.log(`Listening on http://localhost:${info.port}`) // Listening on http://localhost:3000
./node_modules/playwright-core/ThirdPartyNotices.txt:228:Open `http://localhost:3000` with your browser.
./node_modules/playwright-core/lib/client/events.js:45: // @see https://nodejs.org/api/events.html#events_error_events
./node_modules/playwright-core/lib/client/events.js:67: // @see https://nodejs.org/api/events.html#events_error_events
./node_modules/playwright-core/lib/mcpBundleImpl/index.js:111:`&&o++}}return[e,r]}var vp=class extends Event{constructor(e,r){var o,n;super(e),this.code=(o=r==null?void 0:r.code)!=null?o:void 0,this.message=(n=r==null?void 0:r.message)!=null?n:void 0}[Symbol.for("nodejs.util.inspect.custom")](e,r,o){return o(h0(this),r)}[Symbol.for("Deno.customInspect")](e,r){return e(h0(this),r)}};function DC(t){let e=globalThis.DOMException;return typeof e=="function"?new e(t,"SyntaxError"):new SyntaxError(t)}function Cy(t){return t instanceof Error?"errors"in t&&Array.isArray(t.errors)?t.errors.map(Cy).join(", "):"cause"in t&&t.cause instanceof Error?`${t}: ${Cy(t.cause)}`:t.message:`${t}`}function h0(t){return{type:t.type,message:t.message,code:t.code,defaultPrevented:t.defaultPrevented,cancelable:t.cancelable,timeStamp:t.timeStamp}}var v0=t=>{throw TypeError(t)},Vy=(t,e,r)=>e.has(t)||v0("Cannot "+r),oe=(t,e,r)=>(Vy(t,e,"read from private field"),r?r.call(t):e.get(t)),Ze=(t,e,r)=>e.has(t)?v0("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),Ee=(t,e,r,o)=>(Vy(t,e,"write to private field"),e.set(t,r),r),Tr=(t,e,r)=>(Vy(t,e,"access private method"),r),vt,ro,Oi,gp,_p,Tc,Ni,Ec,vn,ji,Ci,Ri,Ic,Yt,Dy,Uy,Ay,g0,Zy,My,Pc,qy,Ly,no=class extends EventTarget{constructor(e,r){var o,n;super(),Ze(this,Yt),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Ze(this,vt),Ze(this,ro),Ze(this,Oi),Ze(this,gp),Ze(this,_p),Ze(this,Tc),Ze(this,Ni),Ze(this,Ec,null),Ze(this,vn),Ze(this,ji),Ze(this,Ci,null),Ze(this,Ri,null),Ze(this,Ic,null),Ze(this,Uy,async i=>{var a;oe(this,ji).reset();let{body:c,redirected:u,status:l,headers:d}=i;if(l===204){Tr(this,Yt,Pc).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(u?Ee(this,Oi,new URL(i.url)):Ee(this,Oi,void 0),l!==200){Tr(this,Yt,Pc).call(this,`Non-200 status code (${l})`,l);return}if(!(d.get("content-type")||"").startsWith("text/event-stream")){Tr(this,Yt,Pc).call(this,'Invalid content type, expected "text/event-stream"',l);return}if(oe(this,vt)===this.CLOSED)return;Ee(this,vt,this.OPEN);let s=new Event("open");if((a=oe(this,Ic))==null||a.call(this,s),this.dispatchEvent(s),typeof c!="object"||!c||!("getReader"in c)){Tr(this,Yt,Pc).call(this,"Invalid response body, expected a web ReadableStream",l),this.close();return}let f=new TextDecoder,p=c.getReader(),m=!0;do{let{done:h,value:g}=await p.read();g&&oe(this,ji).feed(f.decode(g,{stream:!h})),h&&(m=!1,oe(this,ji).reset(),Tr(this,Yt,qy).call(this))}while(m)}),Ze(this,Ay,i=>{Ee(this,vn,void 0),!(i.name==="AbortError"||i.type==="aborted")&&Tr(this,Yt,qy).call(this,Cy(i))}),Ze(this,Zy,i=>{typeof i.id=="string"&&Ee(this,Ec,i.id);let a=new MessageEvent(i.event||"message",{data:i.data,origin:oe(this,Oi)?oe(this,Oi).origin:oe(this,ro).origin,lastEventId:i.id||""});oe(this,Ri)&&(!i.event||i.event==="message")&&oe(this,Ri).call(this,a),this.dispatchEvent(a)}),Ze(this,My,i=>{Ee(this,Tc,i)}),Ze(this,Ly,()=>{Ee(this,Ni,void 0),oe(this,vt)===this.CONNECTING&&Tr(this,Yt,Dy).call(this)});try{if(e instanceof URL)Ee(this,ro,e);else if(typeof e=="string")Ee(this,ro,new URL(e,UC()));else throw new Error("Invalid URL")}catch{throw DC("An invalid or illegal string was specified")}Ee(this,ji,hp({onEvent:oe(this,Zy),onRetry:oe(this,My)})),Ee(this,vt,this.CONNECTING),Ee(this,Tc,3e3),Ee(this,_p,(o=r==null?void 0:r.fetch)!=null?o:globalThis.fetch),Ee(this,gp,(n=r==null?void 0:r.withCredentials)!=null?n:!1),Tr(this,Yt,Dy).call(this)}get readyState(){return oe(this,vt)}get url(){return oe(this,ro).href}get withCredentials(){return oe(this,gp)}get onerror(){return oe(this,Ci)}set onerror(e){Ee(this,Ci,e)}get onmessage(){return oe(this,Ri)}set onmessage(e){Ee(this,Ri,e)}get onopen(){return oe(this,Ic)}set onopen(e){Ee(this,Ic,e)}addEventListener(e,r,o){let n=r;super.addEventListener(e,n,o)}removeEventListener(e,r,o){let n=r;super.removeEventListener(e,n,o)}close(){oe(this,Ni)&&clearTimeout(oe(this,Ni)),oe(this,vt)!==this.CLOSED&&(oe(this,vn)&&oe(this,vn).abort(),Ee(this,vt,this.CLOSED),Ee(this,vn,void 0))}};vt=new WeakMap,ro=new WeakM
./node_modules/playwright-core/lib/server/socksClientCertificatesInterceptor.js:304: return host === "local.playwright" ? "localhost" : host;
./node_modules/playwright-core/lib/server/browserContext.js:63: // @see https://nodejs.org/api/events.html#events_error_events
./node_modules/playwright-core/lib/server/trace/viewer/traceViewer.js:70: const url = new URL("http://localhost" + request.url);
./node_modules/playwright-core/lib/server/trace/viewer/traceViewer.js:175: await (0, import_utilsBundle.open)(url.replace("0.0.0.0", "localhost")).catch(() => {
./node_modules/playwright-core/lib/server/network.js:63: return hostname === "localhost" || hostname.endsWith(".localhost");
./node_modules/playwright-core/lib/server/bidi/third_party/firefoxPrefs.js:124: "datareporting.healthreport.documentServerURI": `http://${server}/dummy/healthreport/`,
./node_modules/playwright-core/lib/server/chromium/chromium.js:220: if (endpointURL.hostname === "localhost" || endpointURL.hostname === "127.0.0.1")
./node_modules/playwright-core/lib/server/chromium/chromium.js:229: const endpointURLString = addProtocol(debuggerAddress || chromeOptionsURL).replace("localhost", "127.0.0.1");
./node_modules/playwright-core/lib/server/chromium/chromium.js:232: if (endpointURL.hostname === "localhost" || endpointURL.hostname === "127.0.0.1") {
./node_modules/playwright-core/lib/server/chromium/chromium.js:233: const sessionInfoUrl = new URL(hubUrl).origin + "/grid/api/testsession?session=" + sessionId;
./node_modules/playwright-core/lib/server/utils/socksProxy.js:297: return host === "localhost" || host.endsWith(".localhost") || host === "127.0.0.1" || host === "[::1]";
./node_modules/playwright-core/lib/server/utils/socksProxy.js:464: host = "localhost";
./node_modules/playwright-core/lib/server/utils/wsServer.js:56: const wsEndpoint2 = typeof address === "string" ? `${address}${path}` : `ws://${hostname || "localhost"}:${address.port}${path}`;
./node_modules/playwright-core/lib/server/utils/wsServer.js:67: const pathname = new URL("http://localhost" + request.url).pathname;
./node_modules/playwright-core/lib/server/utils/wsServer.js:85: const url = new URL("http://localhost" + (request.url || ""));
./node_modules/playwright-core/lib/server/utils/httpServer.js:109: this._urlPrefixHumanReadable = `http://${host ?? "localhost"}:${address.port}`;
./node_modules/playwright-core/lib/server/utils/httpServer.js:186: const url = new URL("http://localhost" + request.url);
./node_modules/playwright-core/lib/server/utils/network.js:174: const { host = "localhost", port = 0 } = options;
./node_modules/playwright-core/lib/server/utils/processLauncher.js:110: // @see https://nodejs.org/api/child_process.html#child_process_options_detached
./node_modules/playwright-core/lib/server/utils/crypto.js:144: DER.encodePrintableString("localhost")
./node_modules/playwright-core/lib/server/utils/crypto.js:168: DER.encodePrintableString("localhost")
./node_modules/playwright-core/lib/server/helper.js:29: if (urlString.startsWith("localhost") || urlString.startsWith("127.0.0.1"))
./node_modules/playwright-core/lib/server/registry/index.js:1181: const products = lowercaseAllKeys(JSON.parse(await (0, import_network.fetchData)(void 0, { url: "https://edgeupdates.microsoft.com/api/products" })));
./node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js:5:If your trace is in a local or private network, please grant permission for Local Network Access.`),new Error(a)}const n=new Qs(e.storage(),r=>e.resourceForSha1(r));return{traceLoader:e,snapshotServer:n}}async function Eo(s){const t=s.request;if(t.url.startsWith("chrome-extension://"))return fetch(t);const e=new URL(t.url);let n;if(t.url.startsWith(self.registration.scope)&&(n=e.pathname.substring(go.length-1)),n==="/restartServiceWorker")return bo(),new Response(null,{status:200});if(n==="/ping")return new Response(null,{status:200});const i=!!s.resultingClientId,r=s.clientId?await self.clients.get(s.clientId):void 0;if(i&&!(n!=null&&n.startsWith("/sha1/"))){if(n!=null&&n.startsWith("/snapshot/")){const{errorResponse:a,loadedTrace:o}=await Mn(s.resultingClientId,e,So);if(a)return a;const l=n.substring(10),_=o.snapshotServer.serveSnapshot(l,e.searchParams,e.href);return Fn&&_.headers.set("Content-Security-Policy","upgrade-insecure-requests"),_}return fetch(s.request)}if(!n){if(!r)return new Response("Sub-resource without a client",{status:500});const{snapshotServer:a}=await Ks(r.id,new URL(r.url),Un(r));if(!a)return new Response(null,{status:404});const o=[t.url];return Fn&&t.url.startsWith("https://")&&o.push(t.url.replace(/^https/,"http")),a.serveResource(o,t.method,r.url)}if(n==="/contexts"||n.startsWith("/snapshotInfo/")||n.startsWith("/closest-screenshot/")||n.startsWith("/sha1/")){if(!r)return new Response("Sub-resource without a client",{status:500});const{errorResponse:a,loadedTrace:o}=await Mn(r.id,e,Un(r));if(a)return a;if(n==="/contexts")return new Response(JSON.stringify(o.traceLoader.contextEntries),{status:200,headers:{"Content-Type":"application/json"}});if(n.startsWith("/snapshotInfo/")){const l=n.substring(14);return o.snapshotServer.serveSnapshotInfo(l,e.searchParams)}if(n.startsWith("/closest-screenshot/")){const l=n.substring(20);return o.snapshotServer.serveClosestScreenshot(l,e.searchParams)}if(n.startsWith("/sha1/")){const l=await o.traceLoader.resourceForSha1(n.slice(6));return l?new Response(l,{status:200,headers:xo(e.searchParams)}):new Response(null,{status:404})}}return fetch(s.request)}function xo(s){const t=s.get("dn"),e=s.get("dct");if(!t)return;const n=new Headers;return n.set("Content-Disposition",`attachment; filename="attachment"; filename*=UTF-8''${encodeURIComponent(t)}`),e&&n.set("Content-Type",e),n}async function To(){const s=await self.clients.matchAll(),t=new Set;for(const[e,n]of $e){if(!s.find(i=>i.id===e)){$e.delete(e);continue}t.add(n)}for(const e of Ee.keys())t.has(e)||Ee.delete(e)}function Un(s){return(t,e)=>{s.postMessage({method:"progress",params:{done:t,total:e}})}}function So(s,t){}function Ro(s){const e=new URL(s,"http://localhost").searchParams.get("path");return!!(e!=null&&e.endsWith(".json"))}self.addEventListener("fetch",function(s){if(s.request.headers.get("x-pw-serviceworker")==="skip")return!1;s.respondWith(Eo(s))});
./node_modules/playwright-core/lib/vite/traceViewer/snapshot.html:9: throw new Error(`Service workers are not supported.\nMake sure to serve the Trace Viewer (${window.location}) via HTTPS or localhost.`);
./node_modules/playwright-core/lib/vite/traceViewer/index.BDwrLSGN.js:2:Make sure to serve the Trace Viewer (${window.location}) via HTTPS or localhost.`);navigator.serviceWorker.register("sw.bundle.js"),navigator.serviceWorker.controller||await new Promise(h=>{navigator.serviceWorker.oncontrollerchange=()=>h()}),setInterval(function(){fetch("ping")},1e4)}const c=o.get("trace"),l=(c==null?void 0:c.endsWith(".json"))?e.jsx(q,{traceJson:c}):e.jsx($,{});V.createRoot(document.querySelector("#root")).render(l)})();
./node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-CJSZINFr.js:51:`,"\\n")}function Ex(n,e){if(n)for(const i of e.split("|")){if(i==="url")try{const l=new URL(n[i]);return l.protocol==="data:"?l.protocol:l.protocol==="about:"?n[i]:l.pathname+l.search}catch{if(n[i]!==void 0)return n[i]}if(i==="timeNumber"&&n[i]!==void 0)return new Date(n[i]).toString();const r=Ax(n,i);if(r!==void 0)return r}}function Ax(n,e){const i=e.split(".");let r=n;for(const l of i){if(typeof r!="object"||r===null)return;r=r[l]}if(r!==void 0)return String(r)}function Nx(n){var i;return(n.title??((i=Qh.get(n.type+"."+n.method))==null?void 0:i.title)??n.method).replace(/\{([^}]+)\}/g,(r,l)=>eb(n.params,l)??r)}function Cx(n){var e;return(e=Qh.get(n.type+"."+n.method))==null?void 0:e.group}const qa=Symbol("context"),tb=Symbol("nextInContext"),nb=Symbol("prevByEndTime"),ib=Symbol("nextByStartTime"),Py=Symbol("events");class BC{constructor(e,i){var l;i.forEach(o=>kx(o));const r=i.find(o=>o.origin==="library");this.traceUri=e,this.browserName=(r==null?void 0:r.browserName)||"",this.sdkLanguage=r==null?void 0:r.sdkLanguage,this.channel=r==null?void 0:r.channel,this.testIdAttributeName=r==null?void 0:r.testIdAttributeName,this.platform=(r==null?void 0:r.platform)||"",this.playwrightVersion=(l=i.find(o=>o.playwrightVersion))==null?void 0:l.playwrightVersion,this.title=(r==null?void 0:r.title)||"",this.options=(r==null?void 0:r.options)||{},this.actions=Mx(i),this.pages=[].concat(...i.map(o=>o.pages)),this.wallTime=i.map(o=>o.wallTime).reduce((o,u)=>Math.min(o||Number.MAX_VALUE,u),Number.MAX_VALUE),this.startTime=i.map(o=>o.startTime).reduce((o,u)=>Math.min(o,u),Number.MAX_VALUE),this.endTime=i.map(o=>o.endTime).reduce((o,u)=>Math.max(o,u),Number.MIN_VALUE),this.events=[].concat(...i.map(o=>o.events)),this.stdio=[].concat(...i.map(o=>o.stdio)),this.errors=[].concat(...i.map(o=>o.errors)),this.hasSource=i.some(o=>o.hasSource),this.hasStepData=i.some(o=>o.origin==="testRunner"),this.resources=[...i.map(o=>o.resources)].flat(),this.attachments=this.actions.flatMap(o=>{var u;return((u=o.attachments)==null?void 0:u.map(f=>({...f,callId:o.callId,traceUri:e})))??[]}),this.visibleAttachments=this.attachments.filter(o=>!o.name.startsWith("_")),this.events.sort((o,u)=>o.time-u.time),this.resources.sort((o,u)=>o._monotonicTime-u._monotonicTime),this.errorDescriptors=this.hasStepData?this._errorDescriptorsFromTestRunner():this._errorDescriptorsFromActions(),this.sources=Bx(this.actions,this.errorDescriptors),this.actionCounters=new Map;for(const o of this.actions)o.group=o.group??Cx({type:o.class,method:o.method}),o.group&&this.actionCounters.set(o.group,1+(this.actionCounters.get(o.group)||0))}createRelativeUrl(e){const i=new URL("http://localhost/"+e);return i.searchParams.set("trace",this.traceUri),i.toString().substring(17)}failedAction(){return this.actions.findLast(e=>e.error)}filteredActions(e){const i=new Set(e);return this.actions.filter(r=>!r.group||i.has(r.group))}renderActionTree(e){const i=this.filteredActions(e??[]),{rootItem:r}=sb(i),l=[],o=(u,f)=>{const h=Nx({...u.action,type:u.action.class});l.push(`${f}${h||u.id}`);for(const g of u.children)o(g,f+" ")};return r.children.forEach(u=>o(u,"")),l}_errorDescriptorsFromActions(){var i;const e=[];for(const r of this.actions||[])(i=r.error)!=null&&i.message&&e.push({action:r,stack:r.stack,message:r.error.message});return e}_errorDescriptorsFromTestRunner(){return this.errors.filter(e=>!!e.message).map((e,i)=>({stack:e.stack,message:e.message}))}}function kx(n){for(const i of n.pages)i[qa]=n;for(let i=0;i<n.actions.length;++i){const r=n.actions[i];r[qa]=n}let e;for(let i=n.actions.length-1;i>=0;i--){const r=n.actions[i];r[tb]=e,r.class!=="Route"&&(e=r)}for(const i of n.events)i[qa]=n;for(const i of n.resources)i[qa]=n}function Mx(n){const e=[],i=Ox(n);e.push(...i),e.sort((r,l)=>l.parentId===r.callId?1:r.parentId===l.callId?-1:r.endTime-l.endTime);for(let r=1;r<e.length;++r)e[r][nb]=e[r-1];e.sort((r,l)=>l.parentId===r.callId?-1:r.parentId===l.callId?1:r.startTime-l.startTime);for(let r=
./node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-CJSZINFr.js:266:`,i)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const i=qo(e),r=cr(i);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const i=qo(e),r=cr(i);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,i){return this.type!=="comment"||this.indent<=i?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function zS(n){const e=n.prettyErrors!==!1;return{lineCounter:n.lineCounter||e&&new RS||null,prettyErrors:e}}function sC(n,e={}){const{lineCounter:i,prettyErrors:r}=zS(e),l=new Id(i==null?void 0:i.addNewLine),o=new $d(e),u=Array.from(o.compose(l.parse(n)));if(r&&i)for(const f of u)f.errors.forEach(dc(n,i)),f.warnings.forEach(dc(n,i));return u.length>0?u:Object.assign([],{empty:!0},o.streamInfo())}function BS(n,e={}){const{lineCounter:i,prettyErrors:r}=zS(e),l=new Id(i==null?void 0:i.addNewLine),o=new $d(e);let u=null;for(const f of o.compose(l.parse(n),!0,n.length))if(!u)u=f;else if(u.options.logLevel!=="silent"){u.errors.push(new hs(f.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&i&&(u.errors.forEach(dc(n,i)),u.warnings.forEach(dc(n,i))),u}function rC(n,e,i){let r;typeof e=="function"?r=e:i===void 0&&e&&typeof e=="object"&&(i=e);const l=BS(n,i);if(!l)return null;if(l.warnings.forEach(o=>iS(l.options.logLevel,o)),l.errors.length>0){if(l.options.logLevel!=="silent")throw l.errors[0];l.errors=[]}return l.toJS(Object.assign({reviver:r},i))}function aC(n,e,i){let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:i===void 0&&e&&(i=e),typeof i=="string"&&(i=i.length),typeof i=="number"){const l=Math.round(i);i=l<1?void 0:l>8?{indent:8}:{indent:l}}if(n===void 0){const{keepUndefined:l}=i??e??{};if(!l)return}return bs(n)&&!r?n.toString(i):new Rr(n,r,i).toString(i)}const US=Object.freeze(Object.defineProperty({__proto__:null,Alias:_c,CST:tC,Composer:$d,Document:Rr,Lexer:LS,LineCounter:RS,Pair:vt,Parser:Id,Scalar:he,Schema:jc,YAMLError:Hd,YAMLMap:Xt,YAMLParseError:hs,YAMLSeq:Di,YAMLWarning:xS,isAlias:ys,isCollection:$e,isDocument:bs,isMap:Mr,isNode:Ie,isPair:He,isScalar:Le,isSeq:Or,parse:rC,parseAllDocuments:sC,parseDocument:BS,stringify:aC,visit:Ri,visitAsync:xc},Symbol.toStringTag,{value:"Module"})),lC=({action:n,model:e,sdkLanguage:i,testIdAttributeName:r,isInspecting:l,setIsInspecting:o,highlightedElement:u,setHighlightedElement:f})=>{const[h,g]=U.useState("action"),[y]=on("shouldPopulateCanvasFromScreenshot",!1),m=U.useMemo(()=>fC(n),[n]),{snapshotInfoUrl:w,snapshotUrl:v,popoutUrl:E}=U.useMemo(()=>{const _=m[h];return e&&_?hC(e.traceUri,_,y):{snapshotInfoUrl:void 0,snapshotUrl:void 0,popoutUrl:void 0}},[m,h,y,e]),x=U.useMemo(()=>w!==void 0?{snapshotInfoUrl:w,snapshotUrl:v,popoutUrl:
./node_modules/playwright-core/lib/vite/traceViewer/uiMode.CQJ9SCIQ.js:5:Make sure to serve the website (${window.location}) via HTTPS or localhost.`);navigator.serviceWorker.register("sw.bundle.js"),navigator.serviceWorker.controller||await new Promise(o=>{navigator.serviceWorker.oncontrollerchange=()=>o()}),setInterval(function(){fetch("ping")},1e4)}oe.createRoot(document.querySelector("#root")).render(r.jsx(ye,{}))})();
./node_modules/playwright-core/lib/utils/isomorphic/trace/traceModel.js:74: const url = new URL("http://localhost/" + path);
./node_modules/playwright-core/lib/utils/isomorphic/trace/traceModel.js:76: return url.toString().substring("http://localhost/".length);
./node_modules/playwright-core/types/protocol.d.ts:13987:of the local hostnames (e.g. "localhost") or IP addresses (IPv4
./node_modules/playwright-core/types/types.d.ts:31: * Page provides methods to interact with a single tab in a [Browser](https://playwright.dev/docs/api/class-browser),
./node_modules/playwright-core/types/types.d.ts:33: * [Browser](https://playwright.dev/docs/api/class-browser) instance might have multiple
./node_modules/playwright-core/types/types.d.ts:34: * [Page](https://playwright.dev/docs/api/class-page) instances.
./node_modules/playwright-core/types/types.d.ts:52: * [`EventEmitter`](https://nodejs.org/api/events.html#events_class_eventemitter) methods, such as `on`, `once` or