()
| 49 | private client: RudderAnalytics | null | undefined = undefined; |
| 50 | |
| 51 | private getClient(): RudderAnalytics | null { |
| 52 | if (this.client === undefined) { |
| 53 | if (!RUDDERSTACK_KEY) { |
| 54 | this.client = null; |
| 55 | return null; |
| 56 | } |
| 57 | this.client = new RudderAnalytics(RUDDERSTACK_KEY, { |
| 58 | dataPlaneUrl: RUDDERSTACK_DATA_PLANE_URL, |
| 59 | }); |
| 60 | } |
| 61 | return this.client; |
| 62 | } |
| 63 | |
| 64 | /** The single place a request-scoped envelope is built. */ |
| 65 | private buildEnvelope( |
no outgoing calls
no test coverage detected