MCPcopy
hub / github.com/claabs/epicgames-freegames-node / testServerNotify

Method testServerNotify

src/device-login.ts:131–151  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

129 }
130
131 public async testServerNotify(): Promise<void> {
132 const { reqId, url } = getUniqueUrl();
133 const notificationTimeout = config.getMsUntilNextRun() - timeoutBufferMs;
134
135 logger.trace(
136 { notificationTimeout: `in ${(notificationTimeout / (60 * 1000)).toFixed(1)} minutes` },
137 'Awaiting test notification response',
138 );
139
140 // Wait on a promise to be resolved by the web redirect completing
141 await Promise.all([
142 promiseTimeout(
143 notificationTimeout,
144 new Promise((resolve, reject) => {
145 pendingRedirects.set(reqId, this.onTestVisit(resolve, reject).bind(this));
146 }),
147 ),
148 await this.notify(NotificationReason.TEST, url),
149 ]);
150 pendingRedirects.delete(reqId);
151 }
152
153 public async newDeviceAuthLogin(): Promise<void> {
154 const { reqId, url } = getUniqueUrl();

Callers 1

testNotifiersFunction · 0.95

Calls 4

notifyMethod · 0.95
getUniqueUrlFunction · 0.85
promiseTimeoutFunction · 0.85
getMsUntilNextRunMethod · 0.80

Tested by

no test coverage detected