@bigbinary/neeto-playwright-commons 1.8.21 → 1.8.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +3 -1
- package/index.cjs.js.map +1 -1
- package/index.d.ts +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -206,7 +206,7 @@ declare class WebhooksPage {
|
|
|
206
206
|
constructor({ page, request, neetoPlaywrightUtilities, context, }: WebhooksPageParams);
|
|
207
207
|
getWebhookURL: () => Promise<{
|
|
208
208
|
webhookSiteURL: string;
|
|
209
|
-
webhookToken: string;
|
|
209
|
+
webhookToken: string | undefined;
|
|
210
210
|
}>;
|
|
211
211
|
addWebhook: ({ webhookSiteURL }: {
|
|
212
212
|
webhookSiteURL: string;
|
package/index.js
CHANGED
|
@@ -10479,10 +10479,12 @@ const WEBHOOK_SELECTORS = {
|
|
|
10479
10479
|
class WebhooksPage {
|
|
10480
10480
|
constructor({ page, request, neetoPlaywrightUtilities, context, }) {
|
|
10481
10481
|
this.getWebhookURL = async () => {
|
|
10482
|
+
var _a;
|
|
10483
|
+
const WEBHOOK_URL_REGEX = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/g;
|
|
10482
10484
|
const webhookSitePage = await this.context.newPage();
|
|
10483
10485
|
await webhookSitePage.goto(THIRD_PARTY_ROUTES.webhooks.site);
|
|
10484
10486
|
await webhookSitePage.waitForURL(/.*#!\/\w+/);
|
|
10485
|
-
const webhookToken = webhookSitePage.url().
|
|
10487
|
+
const webhookToken = (_a = webhookSitePage.url().match(WEBHOOK_URL_REGEX)) === null || _a === void 0 ? void 0 : _a[0];
|
|
10486
10488
|
const webhookSiteURL = `${THIRD_PARTY_ROUTES.webhooks.site}${webhookToken}`;
|
|
10487
10489
|
await webhookSitePage.close();
|
|
10488
10490
|
return { webhookSiteURL, webhookToken };
|