MCPcopy
hub / github.com/partykit/partykit / initialize

Method initialize

packages/partykit/facade/source.ts:577–582  ·  view source on GitHub ↗

* Parties can only be created once we have a request URL. * This method should be called when the durable object receives its * first connection, or is woken up from hibernation.

(requestUri: string)

Source from the content-addressed store, hash-verified

575 * first connection, or is woken up from hibernation.
576 */
577 async initialize(requestUri: string) {
578 // these can be collapsed into a single method once we solve
579 // request url rehydration on alarm
580 this.#initializeParty(requestUri);
581 return this.#initializeWorker();
582 }
583
584 #initializeParty(requestUri: string) {
585 const url = new URL(requestUri);

Callers 4

fetchMethod · 0.80
webSocketMessageMethod · 0.80
webSocketCloseMethod · 0.80
webSocketErrorMethod · 0.80

Calls 2

#initializePartyMethod · 0.80
#initializeWorkerMethod · 0.80

Tested by

no test coverage detected