@serenity-js/playwright 3.41.2 → 3.42.0
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/CHANGELOG.md +11 -0
- package/esm/ExtraBrowserContextOptions.d.ts +36 -0
- package/esm/ExtraBrowserContextOptions.d.ts.map +1 -0
- package/esm/ExtraBrowserContextOptions.js +2 -0
- package/esm/ExtraBrowserContextOptions.js.map +1 -0
- package/esm/index.d.ts +4 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +4 -0
- package/esm/index.js.map +1 -0
- package/esm/screenplay/abilities/BrowseTheWebWithPlaywright.d.ts +163 -0
- package/esm/screenplay/abilities/BrowseTheWebWithPlaywright.d.ts.map +1 -0
- package/esm/screenplay/abilities/BrowseTheWebWithPlaywright.js +168 -0
- package/esm/screenplay/abilities/BrowseTheWebWithPlaywright.js.map +1 -0
- package/esm/screenplay/abilities/index.d.ts +2 -0
- package/esm/screenplay/abilities/index.d.ts.map +1 -0
- package/esm/screenplay/abilities/index.js +2 -0
- package/esm/screenplay/abilities/index.js.map +1 -0
- package/esm/screenplay/index.d.ts +3 -0
- package/esm/screenplay/index.d.ts.map +1 -0
- package/esm/screenplay/index.js +3 -0
- package/esm/screenplay/index.js.map +1 -0
- package/esm/screenplay/models/PlaywrightBrowsingSession.d.ts +32 -0
- package/esm/screenplay/models/PlaywrightBrowsingSession.d.ts.map +1 -0
- package/esm/screenplay/models/PlaywrightBrowsingSession.js +54 -0
- package/esm/screenplay/models/PlaywrightBrowsingSession.js.map +1 -0
- package/esm/screenplay/models/PlaywrightBrowsingSessionWithBrowser.d.ts +18 -0
- package/esm/screenplay/models/PlaywrightBrowsingSessionWithBrowser.d.ts.map +1 -0
- package/esm/screenplay/models/PlaywrightBrowsingSessionWithBrowser.js +38 -0
- package/esm/screenplay/models/PlaywrightBrowsingSessionWithBrowser.js.map +1 -0
- package/esm/screenplay/models/PlaywrightBrowsingSessionWithPage.d.ts +21 -0
- package/esm/screenplay/models/PlaywrightBrowsingSessionWithPage.d.ts.map +1 -0
- package/esm/screenplay/models/PlaywrightBrowsingSessionWithPage.js +44 -0
- package/esm/screenplay/models/PlaywrightBrowsingSessionWithPage.js.map +1 -0
- package/esm/screenplay/models/PlaywrightCookie.d.ts +15 -0
- package/esm/screenplay/models/PlaywrightCookie.d.ts.map +1 -0
- package/esm/screenplay/models/PlaywrightCookie.js +41 -0
- package/esm/screenplay/models/PlaywrightCookie.js.map +1 -0
- package/esm/screenplay/models/PlaywrightModalDialogHandler.d.ts +19 -0
- package/esm/screenplay/models/PlaywrightModalDialogHandler.d.ts.map +1 -0
- package/esm/screenplay/models/PlaywrightModalDialogHandler.js +48 -0
- package/esm/screenplay/models/PlaywrightModalDialogHandler.js.map +1 -0
- package/esm/screenplay/models/PlaywrightPage.d.ts +54 -0
- package/esm/screenplay/models/PlaywrightPage.d.ts.map +1 -0
- package/esm/screenplay/models/PlaywrightPage.js +190 -0
- package/esm/screenplay/models/PlaywrightPage.js.map +1 -0
- package/esm/screenplay/models/PlaywrightPageElement.d.ts +33 -0
- package/esm/screenplay/models/PlaywrightPageElement.d.ts.map +1 -0
- package/esm/screenplay/models/PlaywrightPageElement.js +198 -0
- package/esm/screenplay/models/PlaywrightPageElement.js.map +1 -0
- package/esm/screenplay/models/index.d.ts +8 -0
- package/esm/screenplay/models/index.d.ts.map +1 -0
- package/esm/screenplay/models/index.js +8 -0
- package/esm/screenplay/models/index.js.map +1 -0
- package/esm/screenplay/models/locators/PlaywrightLocator.d.ts +31 -0
- package/esm/screenplay/models/locators/PlaywrightLocator.d.ts.map +1 -0
- package/esm/screenplay/models/locators/PlaywrightLocator.js +166 -0
- package/esm/screenplay/models/locators/PlaywrightLocator.js.map +1 -0
- package/esm/screenplay/models/locators/PlaywrightRootLocator.d.ts +39 -0
- package/esm/screenplay/models/locators/PlaywrightRootLocator.d.ts.map +1 -0
- package/esm/screenplay/models/locators/PlaywrightRootLocator.js +48 -0
- package/esm/screenplay/models/locators/PlaywrightRootLocator.js.map +1 -0
- package/esm/screenplay/models/locators/index.d.ts +3 -0
- package/esm/screenplay/models/locators/index.d.ts.map +1 -0
- package/esm/screenplay/models/locators/index.js +3 -0
- package/esm/screenplay/models/locators/index.js.map +1 -0
- package/esm/screenplay/promised.d.ts +10 -0
- package/esm/screenplay/promised.d.ts.map +1 -0
- package/esm/screenplay/promised.js +12 -0
- package/esm/screenplay/promised.js.map +1 -0
- package/esm/selector-engines/PlaywrightSelectorEngine.d.ts +5 -0
- package/esm/selector-engines/PlaywrightSelectorEngine.d.ts.map +1 -0
- package/esm/selector-engines/PlaywrightSelectorEngine.js +2 -0
- package/esm/selector-engines/PlaywrightSelectorEngine.js.map +1 -0
- package/esm/selector-engines/SerenitySelectorEngines.d.ts +14 -0
- package/esm/selector-engines/SerenitySelectorEngines.d.ts.map +1 -0
- package/esm/selector-engines/SerenitySelectorEngines.js +40 -0
- package/esm/selector-engines/SerenitySelectorEngines.js.map +1 -0
- package/esm/selector-engines/index.d.ts +2 -0
- package/esm/selector-engines/index.d.ts.map +1 -0
- package/esm/selector-engines/index.js +2 -0
- package/esm/selector-engines/index.js.map +1 -0
- package/lib/index.d.ts +3 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -3
- package/lib/index.js.map +1 -1
- package/lib/package.json +1 -0
- package/lib/screenplay/abilities/BrowseTheWebWithPlaywright.d.ts +1 -1
- package/lib/screenplay/abilities/BrowseTheWebWithPlaywright.d.ts.map +1 -1
- package/lib/screenplay/abilities/BrowseTheWebWithPlaywright.js +3 -3
- package/lib/screenplay/abilities/BrowseTheWebWithPlaywright.js.map +1 -1
- package/lib/screenplay/abilities/index.d.ts +1 -1
- package/lib/screenplay/abilities/index.d.ts.map +1 -1
- package/lib/screenplay/abilities/index.js +1 -1
- package/lib/screenplay/abilities/index.js.map +1 -1
- package/lib/screenplay/index.d.ts +2 -2
- package/lib/screenplay/index.d.ts.map +1 -1
- package/lib/screenplay/index.js +2 -2
- package/lib/screenplay/index.js.map +1 -1
- package/lib/screenplay/models/PlaywrightBrowsingSession.d.ts +3 -3
- package/lib/screenplay/models/PlaywrightBrowsingSession.d.ts.map +1 -1
- package/lib/screenplay/models/PlaywrightBrowsingSession.js +7 -6
- package/lib/screenplay/models/PlaywrightBrowsingSession.js.map +1 -1
- package/lib/screenplay/models/PlaywrightBrowsingSessionWithBrowser.d.ts +3 -3
- package/lib/screenplay/models/PlaywrightBrowsingSessionWithBrowser.d.ts.map +1 -1
- package/lib/screenplay/models/PlaywrightBrowsingSessionWithBrowser.js +2 -2
- package/lib/screenplay/models/PlaywrightBrowsingSessionWithBrowser.js.map +1 -1
- package/lib/screenplay/models/PlaywrightBrowsingSessionWithPage.d.ts +3 -3
- package/lib/screenplay/models/PlaywrightBrowsingSessionWithPage.d.ts.map +1 -1
- package/lib/screenplay/models/PlaywrightBrowsingSessionWithPage.js +5 -5
- package/lib/screenplay/models/PlaywrightBrowsingSessionWithPage.js.map +1 -1
- package/lib/screenplay/models/PlaywrightPage.d.ts +3 -3
- package/lib/screenplay/models/PlaywrightPage.d.ts.map +1 -1
- package/lib/screenplay/models/PlaywrightPage.js +11 -11
- package/lib/screenplay/models/PlaywrightPage.js.map +1 -1
- package/lib/screenplay/models/PlaywrightPageElement.js +1 -1
- package/lib/screenplay/models/PlaywrightPageElement.js.map +1 -1
- package/lib/screenplay/models/index.d.ts +7 -7
- package/lib/screenplay/models/index.d.ts.map +1 -1
- package/lib/screenplay/models/index.js +7 -7
- package/lib/screenplay/models/index.js.map +1 -1
- package/lib/screenplay/models/locators/PlaywrightLocator.d.ts +1 -1
- package/lib/screenplay/models/locators/PlaywrightLocator.d.ts.map +1 -1
- package/lib/screenplay/models/locators/PlaywrightLocator.js +8 -8
- package/lib/screenplay/models/locators/PlaywrightLocator.js.map +1 -1
- package/lib/screenplay/models/locators/PlaywrightRootLocator.d.ts +2 -1
- package/lib/screenplay/models/locators/PlaywrightRootLocator.d.ts.map +1 -1
- package/lib/screenplay/models/locators/PlaywrightRootLocator.js +2 -2
- package/lib/screenplay/models/locators/PlaywrightRootLocator.js.map +1 -1
- package/lib/screenplay/models/locators/index.d.ts +2 -2
- package/lib/screenplay/models/locators/index.d.ts.map +1 -1
- package/lib/screenplay/models/locators/index.js +2 -2
- package/lib/screenplay/models/locators/index.js.map +1 -1
- package/lib/selector-engines/index.d.ts +1 -1
- package/lib/selector-engines/index.d.ts.map +1 -1
- package/lib/selector-engines/index.js +1 -1
- package/lib/selector-engines/index.js.map +1 -1
- package/package.json +23 -7
- package/src/index.ts +3 -3
- package/src/screenplay/abilities/BrowseTheWebWithPlaywright.ts +2 -2
- package/src/screenplay/abilities/index.ts +1 -1
- package/src/screenplay/index.ts +2 -2
- package/src/screenplay/models/PlaywrightBrowsingSession.ts +5 -4
- package/src/screenplay/models/PlaywrightBrowsingSessionWithBrowser.ts +3 -3
- package/src/screenplay/models/PlaywrightBrowsingSessionWithPage.ts +4 -4
- package/src/screenplay/models/PlaywrightPage.ts +8 -8
- package/src/screenplay/models/PlaywrightPageElement.ts +2 -2
- package/src/screenplay/models/index.ts +7 -7
- package/src/screenplay/models/locators/PlaywrightLocator.ts +4 -4
- package/src/screenplay/models/locators/PlaywrightRootLocator.ts +5 -2
- package/src/screenplay/models/locators/index.ts +2 -2
- package/src/selector-engines/SerenitySelectorEngines.ts +1 -1
- package/src/selector-engines/index.ts +1 -1
- package/tsconfig-cjs.build.json +18 -0
- package/tsconfig-esm.build.json +18 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { PageElement, RootLocator, Selector } from '@serenity-js/web';
|
|
2
2
|
import { Locator } from '@serenity-js/web';
|
|
3
3
|
import type * as playwright from 'playwright-core';
|
|
4
|
-
import type { PlaywrightRootLocator } from './PlaywrightRootLocator';
|
|
4
|
+
import type { PlaywrightRootLocator } from './PlaywrightRootLocator.js';
|
|
5
5
|
/**
|
|
6
6
|
* Playwright-specific implementation of [`Locator`](https://serenity-js.org/api/web/class/Locator/).
|
|
7
7
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlaywrightLocator.d.ts","sourceRoot":"","sources":["../../../../src/screenplay/models/locators/PlaywrightLocator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAyB,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAClG,OAAO,EAA2E,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACpH,OAAO,KAAK,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAKnD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"PlaywrightLocator.d.ts","sourceRoot":"","sources":["../../../../src/screenplay/models/locators/PlaywrightLocator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAyB,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAClG,OAAO,EAA2E,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACpH,OAAO,KAAK,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAKnD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAExE;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC;gBAGlE,MAAM,EAAE,WAAW,CAAC,UAAU,CAAC,OAAO,CAAC,EACvC,QAAQ,EAAE,QAAQ;IAMtB,SAAS,CAAC,cAAc,IAAI,MAAM;IAgC5B,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC;IAsB7B,aAAa,IAAI,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC;IAM5C,iBAAiB,IAAI,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAU7D,EAAE,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC;IAItE,SAAS,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC;IAIxE,MAAM,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC;IAIrE,OAAO,IAAI,WAAW,CAAC,UAAU,CAAC,OAAO,CAAC;IAIpC,WAAW,IAAI,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;CAavE;AAED;;GAEG;AACH,qBAAa,gCAAiC,SAAQ,iBAAiB;IAI/D,OAAO,CAAC,QAAQ,CAAC,qBAAqB;gBAFtC,MAAM,EAAE,WAAW,CAAC,UAAU,CAAC,OAAO,CAAC,EACvC,QAAQ,EAAE,QAAQ,EACD,qBAAqB,EAAE,UAAU,CAAC,OAAO;IAKxD,aAAa,IAAI,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC;IAI5C,iBAAiB,IAAI,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;CAGhE"}
|
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PlaywrightExistingElementLocator = exports.PlaywrightLocator = void 0;
|
|
4
4
|
const core_1 = require("@serenity-js/core");
|
|
5
5
|
const web_1 = require("@serenity-js/web");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
6
|
+
const index_js_1 = require("../../../selector-engines/index.js");
|
|
7
|
+
const promised_js_1 = require("../../promised.js");
|
|
8
|
+
const PlaywrightPageElement_js_1 = require("../PlaywrightPageElement.js");
|
|
9
9
|
/**
|
|
10
10
|
* Playwright-specific implementation of [`Locator`](https://serenity-js.org/api/web/class/Locator/).
|
|
11
11
|
*
|
|
@@ -59,14 +59,14 @@ class PlaywrightLocator extends web_1.Locator {
|
|
|
59
59
|
}
|
|
60
60
|
async nativeElement() {
|
|
61
61
|
const parent = await this.parent.nativeElement();
|
|
62
|
-
return (0,
|
|
62
|
+
return (0, promised_js_1.promised)(parent.locator(this.nativeSelector()));
|
|
63
63
|
}
|
|
64
64
|
async allNativeElements() {
|
|
65
65
|
const parent = await this.parent.nativeElement();
|
|
66
66
|
if (!parent) {
|
|
67
67
|
return [];
|
|
68
68
|
}
|
|
69
|
-
return (0,
|
|
69
|
+
return (0, promised_js_1.promised)(parent.locator(this.nativeSelector()).all());
|
|
70
70
|
}
|
|
71
71
|
of(parent) {
|
|
72
72
|
return new PlaywrightLocator(parent, this.selector);
|
|
@@ -78,11 +78,11 @@ class PlaywrightLocator extends web_1.Locator {
|
|
|
78
78
|
return new PlaywrightLocator(this, child.selector);
|
|
79
79
|
}
|
|
80
80
|
element() {
|
|
81
|
-
return new
|
|
81
|
+
return new PlaywrightPageElement_js_1.PlaywrightPageElement(this);
|
|
82
82
|
}
|
|
83
83
|
async allElements() {
|
|
84
84
|
const elements = await this.allNativeElements();
|
|
85
|
-
return elements.map(childElement => new
|
|
85
|
+
return elements.map(childElement => new PlaywrightPageElement_js_1.PlaywrightPageElement(new PlaywrightExistingElementLocator(this.parent, this.selector, childElement)));
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
exports.PlaywrightLocator = PlaywrightLocator;
|
|
@@ -112,7 +112,7 @@ class PlaywrightParentElementLocator extends PlaywrightLocator {
|
|
|
112
112
|
async nativeElement() {
|
|
113
113
|
const cssSelector = this.asCssSelector(this.selector);
|
|
114
114
|
const child = await this.child.nativeElement();
|
|
115
|
-
return child.locator(`${
|
|
115
|
+
return child.locator(`${index_js_1.SerenitySelectorEngines.engineIdOf('closest')}=${cssSelector.value}`);
|
|
116
116
|
}
|
|
117
117
|
async allNativeElements() {
|
|
118
118
|
return [await this.nativeElement()];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlaywrightLocator.js","sourceRoot":"","sources":["../../../../src/screenplay/models/locators/PlaywrightLocator.ts"],"names":[],"mappings":";;;AAAA,4CAAkD;AAElD,0CAAo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AC;QAC5B,OAAO,sBAAsB,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;IACD,8EAA8E;IAC9E,iCAAiC;IACjC,OAAO,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;AAC5F,CAAC;AAED,6HAA6H;AAC7H,SAAS,sBAAsB,CAAC,EAAU;IACtC,8FAA8F;IAC9F,yDAAyD;IACzD,yGAAyG;IACzG,IAAI,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC;QACrC,OAAO,MAAM,CAAC,EAAE,CAAC,CAAC;IACtB,CAAC;IACD,0EAA0E;IAC1E,OAAO,MAAM,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,0BAA0B,EAAE,UAAU,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AACpG,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootLocator } from '@serenity-js/web';
|
|
2
2
|
import type * as playwright from 'playwright-core';
|
|
3
|
-
|
|
3
|
+
type PageFunction<Argument, R> = string | ((arg: Argument) => R | Promise<R>);
|
|
4
4
|
/**
|
|
5
5
|
* Playwright-specific implementation of [`RootLocator`](https://serenity-js.org/api/web/class/RootLocator/).
|
|
6
6
|
*
|
|
@@ -35,4 +35,5 @@ export declare class PlaywrightRootLocator extends RootLocator<playwright.Locato
|
|
|
35
35
|
*/
|
|
36
36
|
switchToMainFrame(): Promise<void>;
|
|
37
37
|
}
|
|
38
|
+
export {};
|
|
38
39
|
//# sourceMappingURL=PlaywrightRootLocator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlaywrightRootLocator.d.ts","sourceRoot":"","sources":["../../../../src/screenplay/models/locators/PlaywrightRootLocator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,KAAK,UAAU,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"PlaywrightRootLocator.d.ts","sourceRoot":"","sources":["../../../../src/screenplay/models/locators/PlaywrightRootLocator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAOnD,KAAK,YAAY,CAAC,QAAQ,EAAE,CAAC,IAAI,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,QAAQ,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9E;;;;GAIG;AACH,qBAAa,qBAAsB,SAAQ,WAAW,CAAC,UAAU,CAAC,OAAO,CAAC;IAI1D,OAAO,CAAC,QAAQ,CAAC,IAAI;IAFjC,OAAO,CAAC,YAAY,CAAmB;gBAEV,IAAI,EAAE,UAAU,CAAC,IAAI;IAK5C,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC;IAInC,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAI7D;;;;;;OAMG;IACH,QAAQ,CAAC,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC;IAK5F;;;;OAIG;IACG,aAAa,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAK7D;;OAEG;IACG,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;IAI1C;;OAEG;IACG,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;CAG3C"}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PlaywrightRootLocator = void 0;
|
|
4
4
|
const web_1 = require("@serenity-js/web");
|
|
5
5
|
const tiny_types_1 = require("tiny-types");
|
|
6
|
-
const
|
|
6
|
+
const promised_js_1 = require("../../promised.js");
|
|
7
7
|
/**
|
|
8
8
|
* Playwright-specific implementation of [`RootLocator`](https://serenity-js.org/api/web/class/RootLocator/).
|
|
9
9
|
*
|
|
@@ -21,7 +21,7 @@ class PlaywrightRootLocator extends web_1.RootLocator {
|
|
|
21
21
|
return true;
|
|
22
22
|
}
|
|
23
23
|
nativeElement() {
|
|
24
|
-
return (0,
|
|
24
|
+
return (0, promised_js_1.promised)(this.currentFrame);
|
|
25
25
|
}
|
|
26
26
|
evaluate(pageFunction, arg) {
|
|
27
27
|
return this.currentFrame.evaluate(pageFunction, arg);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlaywrightRootLocator.js","sourceRoot":"","sources":["../../../../src/screenplay/models/locators/PlaywrightRootLocator.ts"],"names":[],"mappings":";;;AAAA,0CAA+C;
|
|
1
|
+
{"version":3,"file":"PlaywrightRootLocator.js","sourceRoot":"","sources":["../../../../src/screenplay/models/locators/PlaywrightRootLocator.ts"],"names":[],"mappings":";;;AAAA,0CAA+C;AAE/C,2CAA+C;AAE/C,mDAA6C;AAM7C;;;;GAIG;AACH,MAAa,qBAAsB,SAAQ,iBAA+B;IAIzC;IAFrB,YAAY,CAAmB;IAEvC,YAA6B,IAAqB;QAC9C,KAAK,EAAE,CAAC;QADiB,SAAI,GAAJ,IAAI,CAAiB;QAE9C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;IAC9C,CAAC;IAED,KAAK,CAAC,SAAS;QACX,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,aAAa;QACT,OAAO,IAAA,sBAAQ,EAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACvC,CAAC;IAUD,QAAQ,CAAI,YAAmC,EAAE,GAAS;QACtD,OAAO,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;IACzD,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,aAAa,CAAC,KAAyB;QACzC,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,aAAa,EAAE,CAAC;QAC5C,IAAI,CAAC,YAAY,GAAG,IAAA,mBAAM,EAAC,OAAO,EAAE,MAAM,OAAO,CAAC,YAAY,EAAE,EAAE,IAAA,sBAAS,GAAE,CAAC,CAAC;IACnF,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,mBAAmB;QACrB,IAAI,CAAC,YAAY,GAAG,IAAA,mBAAM,EAAC,cAAc,EAAE,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,EAAE,IAAA,sBAAS,GAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,iBAAiB;QACnB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;IAC9C,CAAC;CACJ;AApDD,sDAoDC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './PlaywrightLocator';
|
|
2
|
-
export * from './PlaywrightRootLocator';
|
|
1
|
+
export * from './PlaywrightLocator.js';
|
|
2
|
+
export * from './PlaywrightRootLocator.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/screenplay/models/locators/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/screenplay/models/locators/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC"}
|
|
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./PlaywrightLocator"), exports);
|
|
18
|
-
__exportStar(require("./PlaywrightRootLocator"), exports);
|
|
17
|
+
__exportStar(require("./PlaywrightLocator.js"), exports);
|
|
18
|
+
__exportStar(require("./PlaywrightRootLocator.js"), exports);
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/screenplay/models/locators/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/screenplay/models/locators/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,6DAA2C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './SerenitySelectorEngines';
|
|
1
|
+
export * from './SerenitySelectorEngines.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/selector-engines/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/selector-engines/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC"}
|
|
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./SerenitySelectorEngines"), exports);
|
|
17
|
+
__exportStar(require("./SerenitySelectorEngines.js"), exports);
|
|
18
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/selector-engines/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/selector-engines/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA6C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serenity-js/playwright",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.42.0",
|
|
4
4
|
"description": "Adapter that integrates @serenity-js/web with Playwright, enabling Serenity/JS reporting and using the Screenplay Pattern to write component and end-to-end test scenarios",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jan Molak",
|
|
@@ -16,8 +16,20 @@
|
|
|
16
16
|
"access": "public",
|
|
17
17
|
"provenance": true
|
|
18
18
|
},
|
|
19
|
-
"main": "lib/index.js",
|
|
19
|
+
"main": "./lib/index.js",
|
|
20
20
|
"types": "./lib/index.d.ts",
|
|
21
|
+
"type": "module",
|
|
22
|
+
"module": "./esm/index.js",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./esm/index.d.ts",
|
|
26
|
+
"import": "./esm/index.js",
|
|
27
|
+
"require": "./lib/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./lib/*": "./lib/*",
|
|
30
|
+
"./esm/*": "./esm/*",
|
|
31
|
+
"./package.json": "./package.json"
|
|
32
|
+
},
|
|
21
33
|
"keywords": [
|
|
22
34
|
"automation",
|
|
23
35
|
"browser",
|
|
@@ -43,7 +55,11 @@
|
|
|
43
55
|
"clean": "rimraf target",
|
|
44
56
|
"~test": "c8 npm run test:no-coverage",
|
|
45
57
|
"~test:no-coverage": "mocha --config ../../.mocharc.yml --spec='spec/**/*.spec.*'",
|
|
46
|
-
"compile": "
|
|
58
|
+
"compile": "npm run compile:clean && npm run compile:esm && npm run compile:cjs-package && npm run compile:cjs",
|
|
59
|
+
"compile:clean": "rimraf lib esm",
|
|
60
|
+
"compile:esm": "tsc --project tsconfig-esm.build.json",
|
|
61
|
+
"compile:cjs-package": "node -e \"require('fs').mkdirSync('lib', { recursive: true }); require('fs').writeFileSync('lib/package.json', '{ \\\"type\\\": \\\"commonjs\\\" }')\"",
|
|
62
|
+
"compile:cjs": "tsc --project tsconfig-cjs.build.json"
|
|
47
63
|
},
|
|
48
64
|
"repository": {
|
|
49
65
|
"type": "git",
|
|
@@ -57,9 +73,9 @@
|
|
|
57
73
|
"node": "^20 || ^22 || ^24"
|
|
58
74
|
},
|
|
59
75
|
"dependencies": {
|
|
60
|
-
"@serenity-js/core": "3.
|
|
61
|
-
"@serenity-js/web": "3.
|
|
62
|
-
"tiny-types": "
|
|
76
|
+
"@serenity-js/core": "3.42.0",
|
|
77
|
+
"@serenity-js/web": "3.42.0",
|
|
78
|
+
"tiny-types": "2.0.5"
|
|
63
79
|
},
|
|
64
80
|
"peerDependencies": {
|
|
65
81
|
"playwright-core": "~1.58.2"
|
|
@@ -75,5 +91,5 @@
|
|
|
75
91
|
"ts-node": "10.9.2",
|
|
76
92
|
"typescript": "5.9.3"
|
|
77
93
|
},
|
|
78
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "a415b0066807d7bab9f34b1ceef66a26156aafe1"
|
|
79
95
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './ExtraBrowserContextOptions';
|
|
2
|
-
export * from './screenplay';
|
|
3
|
-
export * from './selector-engines';
|
|
1
|
+
export * from './ExtraBrowserContextOptions.js';
|
|
2
|
+
export * from './screenplay/index.js';
|
|
3
|
+
export * from './selector-engines/index.js';
|
|
@@ -2,11 +2,11 @@ import type { Discardable } from '@serenity-js/core';
|
|
|
2
2
|
import { BrowseTheWeb } from '@serenity-js/web';
|
|
3
3
|
import * as playwright from 'playwright-core';
|
|
4
4
|
|
|
5
|
-
import type { ExtraBrowserContextOptions } from '../../ExtraBrowserContextOptions';
|
|
5
|
+
import type { ExtraBrowserContextOptions } from '../../ExtraBrowserContextOptions.js';
|
|
6
6
|
import {
|
|
7
7
|
PlaywrightBrowsingSessionWithBrowser,
|
|
8
8
|
PlaywrightBrowsingSessionWithPage
|
|
9
|
-
} from '../models';
|
|
9
|
+
} from '../models/index.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* This implementation of the [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './BrowseTheWebWithPlaywright';
|
|
1
|
+
export * from './BrowseTheWebWithPlaywright.js';
|
package/src/screenplay/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './abilities';
|
|
2
|
-
export * from './models';
|
|
1
|
+
export * from './abilities/index.js';
|
|
2
|
+
export * from './models/index.js';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { CorrelationId } from '@serenity-js/core/
|
|
1
|
+
import { CorrelationId } from '@serenity-js/core/model';
|
|
2
2
|
import type { BrowserCapabilities } from '@serenity-js/web';
|
|
3
3
|
import { BrowsingSession, type Cookie, type CookieData } from '@serenity-js/web';
|
|
4
4
|
import type * as playwright from 'playwright-core';
|
|
5
5
|
|
|
6
|
-
import { type ExtraBrowserContextOptions } from '../../ExtraBrowserContextOptions';
|
|
7
|
-
import { SerenitySelectorEngines } from '../../selector-engines';
|
|
8
|
-
import { PlaywrightCookie
|
|
6
|
+
import { type ExtraBrowserContextOptions } from '../../ExtraBrowserContextOptions.js';
|
|
7
|
+
import { SerenitySelectorEngines } from '../../selector-engines/index.js';
|
|
8
|
+
import { PlaywrightCookie } from './PlaywrightCookie.js';
|
|
9
|
+
import { PlaywrightPage } from './PlaywrightPage.js';
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* Playwright-specific implementation of [`BrowsingSession`](https://serenity-js.org/api/web/class/BrowsingSession/).
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { BrowserCapabilities } from '@serenity-js/web';
|
|
2
2
|
import type * as playwright from 'playwright-core';
|
|
3
3
|
|
|
4
|
-
import type { ExtraBrowserContextOptions } from '../../ExtraBrowserContextOptions';
|
|
5
|
-
import { PlaywrightBrowsingSession } from './PlaywrightBrowsingSession';
|
|
6
|
-
import type { PlaywrightPage } from './PlaywrightPage';
|
|
4
|
+
import type { ExtraBrowserContextOptions } from '../../ExtraBrowserContextOptions.js';
|
|
5
|
+
import { PlaywrightBrowsingSession } from './PlaywrightBrowsingSession.js';
|
|
6
|
+
import type { PlaywrightPage } from './PlaywrightPage.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @group Models
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { CorrelationId } from '@serenity-js/core/
|
|
1
|
+
import { CorrelationId } from '@serenity-js/core/model';
|
|
2
2
|
import type { BrowserCapabilities } from '@serenity-js/web';
|
|
3
3
|
import type * as playwright from 'playwright-core';
|
|
4
4
|
|
|
5
|
-
import type { ExtraBrowserContextOptions } from '../../ExtraBrowserContextOptions';
|
|
6
|
-
import { PlaywrightBrowsingSession } from './PlaywrightBrowsingSession';
|
|
7
|
-
import { PlaywrightPage } from './PlaywrightPage';
|
|
5
|
+
import type { ExtraBrowserContextOptions } from '../../ExtraBrowserContextOptions.js';
|
|
6
|
+
import { PlaywrightBrowsingSession } from './PlaywrightBrowsingSession.js';
|
|
7
|
+
import { PlaywrightPage } from './PlaywrightPage.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @group Models
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { URL } from 'node:url';
|
|
2
2
|
|
|
3
3
|
import { List, LogicError, type QuestionAdapter } from '@serenity-js/core';
|
|
4
|
-
import type { CorrelationId } from '@serenity-js/core/
|
|
4
|
+
import type { CorrelationId } from '@serenity-js/core/model';
|
|
5
5
|
import type { Cookie, CookieData, PageElements, Selector } from '@serenity-js/web';
|
|
6
6
|
import { ArgumentDehydrator, BrowserWindowClosedError, ByDeepCss, Key, Page, PageElement, PageElementsLocator } from '@serenity-js/web';
|
|
7
|
-
import * as scripts from '@serenity-js/web/
|
|
7
|
+
import * as scripts from '@serenity-js/web/scripts';
|
|
8
8
|
import type * as playwright from 'playwright-core';
|
|
9
9
|
|
|
10
|
-
import type { ExtraBrowserContextOptions } from '../../ExtraBrowserContextOptions';
|
|
11
|
-
import { promised } from '../promised';
|
|
12
|
-
import { PlaywrightExistingElementLocator, PlaywrightLocator, PlaywrightRootLocator } from './locators';
|
|
13
|
-
import type { PlaywrightBrowsingSession } from './PlaywrightBrowsingSession';
|
|
14
|
-
import { PlaywrightModalDialogHandler } from './PlaywrightModalDialogHandler';
|
|
15
|
-
import { PlaywrightPageElement } from './PlaywrightPageElement';
|
|
10
|
+
import type { ExtraBrowserContextOptions } from '../../ExtraBrowserContextOptions.js';
|
|
11
|
+
import { promised } from '../promised.js';
|
|
12
|
+
import { PlaywrightExistingElementLocator, PlaywrightLocator, PlaywrightRootLocator } from './locators/index.js';
|
|
13
|
+
import type { PlaywrightBrowsingSession } from './PlaywrightBrowsingSession.js';
|
|
14
|
+
import { PlaywrightModalDialogHandler } from './PlaywrightModalDialogHandler.js';
|
|
15
|
+
import { PlaywrightPageElement } from './PlaywrightPageElement.js';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Playwright-specific implementation of [`Page`](https://serenity-js.org/api/web/class/Page/).
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { LogicError } from '@serenity-js/core';
|
|
2
2
|
import type { SwitchableOrigin } from '@serenity-js/web';
|
|
3
3
|
import { PageElement, SelectOption } from '@serenity-js/web';
|
|
4
|
-
import * as scripts from '@serenity-js/web/
|
|
4
|
+
import * as scripts from '@serenity-js/web/scripts';
|
|
5
5
|
import type * as playwright from 'playwright-core';
|
|
6
6
|
import { ensure, isDefined } from 'tiny-types';
|
|
7
7
|
|
|
8
|
-
import type { PlaywrightLocator } from './locators';
|
|
8
|
+
import type { PlaywrightLocator } from './locators/index.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Playwright-specific implementation of [`PageElement`](https://serenity-js.org/api/web/class/PageElement/).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './locators';
|
|
2
|
-
export * from './PlaywrightBrowsingSession';
|
|
3
|
-
export * from './PlaywrightBrowsingSessionWithBrowser';
|
|
4
|
-
export * from './PlaywrightBrowsingSessionWithPage';
|
|
5
|
-
export * from './PlaywrightCookie';
|
|
6
|
-
export * from './PlaywrightPage';
|
|
7
|
-
export * from './PlaywrightPageElement';
|
|
1
|
+
export * from './locators/index.js';
|
|
2
|
+
export * from './PlaywrightBrowsingSession.js';
|
|
3
|
+
export * from './PlaywrightBrowsingSessionWithBrowser.js';
|
|
4
|
+
export * from './PlaywrightBrowsingSessionWithPage.js';
|
|
5
|
+
export * from './PlaywrightCookie.js';
|
|
6
|
+
export * from './PlaywrightPage.js';
|
|
7
|
+
export * from './PlaywrightPageElement.js';
|
|
@@ -3,10 +3,10 @@ import type { ByRoleSelectorOptions, PageElement, RootLocator, Selector } from '
|
|
|
3
3
|
import { ByCss, ByCssContainingText, ByDeepCss, ById, ByRole, ByTagName, ByXPath, Locator } from '@serenity-js/web';
|
|
4
4
|
import type * as playwright from 'playwright-core';
|
|
5
5
|
|
|
6
|
-
import { SerenitySelectorEngines } from '../../../selector-engines';
|
|
7
|
-
import { promised } from '../../promised';
|
|
8
|
-
import { PlaywrightPageElement } from '../PlaywrightPageElement';
|
|
9
|
-
import type { PlaywrightRootLocator } from './PlaywrightRootLocator';
|
|
6
|
+
import { SerenitySelectorEngines } from '../../../selector-engines/index.js';
|
|
7
|
+
import { promised } from '../../promised.js';
|
|
8
|
+
import { PlaywrightPageElement } from '../PlaywrightPageElement.js';
|
|
9
|
+
import type { PlaywrightRootLocator } from './PlaywrightRootLocator.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Playwright-specific implementation of [`Locator`](https://serenity-js.org/api/web/class/Locator/).
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { RootLocator } from '@serenity-js/web';
|
|
2
2
|
import type * as playwright from 'playwright-core';
|
|
3
|
-
import { type PageFunction } from 'playwright-core/types/structs';
|
|
4
3
|
import { ensure, isDefined } from 'tiny-types';
|
|
5
4
|
|
|
6
|
-
import { promised } from '../../promised';
|
|
5
|
+
import { promised } from '../../promised.js';
|
|
6
|
+
|
|
7
|
+
// Inline the PageFunction type from playwright-core/types/structs
|
|
8
|
+
// to avoid ESM import issues with internal Playwright types
|
|
9
|
+
type PageFunction<Argument, R> = string | ((arg: Argument) => R | Promise<R>);
|
|
7
10
|
|
|
8
11
|
/**
|
|
9
12
|
* Playwright-specific implementation of [`RootLocator`](https://serenity-js.org/api/web/class/RootLocator/).
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './PlaywrightLocator';
|
|
2
|
-
export * from './PlaywrightRootLocator';
|
|
1
|
+
export * from './PlaywrightLocator.js';
|
|
2
|
+
export * from './PlaywrightRootLocator.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LogicError } from '@serenity-js/core';
|
|
2
2
|
import type { Selectors } from 'playwright-core';
|
|
3
3
|
|
|
4
|
-
import type { PlaywrightSelectorEngine } from './PlaywrightSelectorEngine';
|
|
4
|
+
import type { PlaywrightSelectorEngine } from './PlaywrightSelectorEngine.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Utility class responsible for registering custom [Playwright selector engines](https://playwright.dev/docs/extensibility)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './SerenitySelectorEngines';
|
|
1
|
+
export * from './SerenitySelectorEngines.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig.build.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"module": "CommonJS",
|
|
5
|
+
"moduleResolution": "Node",
|
|
6
|
+
"outDir": "lib",
|
|
7
|
+
"rootDir": "src",
|
|
8
|
+
"target": "es2022",
|
|
9
|
+
"lib": [
|
|
10
|
+
"es2022",
|
|
11
|
+
"dom"
|
|
12
|
+
],
|
|
13
|
+
"skipLibCheck": true
|
|
14
|
+
},
|
|
15
|
+
"include": [
|
|
16
|
+
"src/**/*.ts"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig-esm.options.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"module": "Node20",
|
|
5
|
+
"moduleResolution": "Node16",
|
|
6
|
+
"outDir": "esm",
|
|
7
|
+
"rootDir": "src",
|
|
8
|
+
"target": "es2022",
|
|
9
|
+
"lib": [
|
|
10
|
+
"es2022",
|
|
11
|
+
"dom"
|
|
12
|
+
],
|
|
13
|
+
"skipLibCheck": true
|
|
14
|
+
},
|
|
15
|
+
"include": [
|
|
16
|
+
"src/**/*.ts"
|
|
17
|
+
]
|
|
18
|
+
}
|