tamash-playwright 0.9.0-beta.2 → 0.9.0-beta.3
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/README.md +13 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -147,6 +147,19 @@ The fix: use a personal-account PAT instead of the ambient token, so the request
|
|
|
147
147
|
|
|
148
148
|
Outside GitHub Actions entirely, the same PAT approach applies — set `GITHUB_TOKEN` (or `COPILOT_GITHUB_TOKEN`) to a personal access token with the "Copilot Requests" scope.
|
|
149
149
|
|
|
150
|
+
**Gotcha if you're not using `@playwright/test` as your runner** (Cucumber, Jest, Mocha, a plain script, …): `copilot-subscription` keeps a shared client open across calls for performance. Playwright's own test runner force-exits its process regardless, so this is invisible there — but a runner that doesn't force-exit will hang indefinitely after all your tests/scenarios have actually finished (confirmed with Cucumber: the process just never returns, even though every scenario passed). Call `closeCopilotSubscriptionClient()` from your runner's own teardown/`AfterAll` hook to fix it:
|
|
151
|
+
|
|
152
|
+
```ts
|
|
153
|
+
import { AfterAll } from '@cucumber/cucumber';
|
|
154
|
+
import { closeCopilotSubscriptionClient } from 'tamash-playwright';
|
|
155
|
+
|
|
156
|
+
AfterAll(async () => {
|
|
157
|
+
await closeCopilotSubscriptionClient();
|
|
158
|
+
});
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
A no-op if `copilot-subscription` was never used, so it's safe to add unconditionally.
|
|
162
|
+
|
|
150
163
|
**One thing worth knowing**: only Claude and Copilot support this "subscription, no API key, works in CI too" combination — a ChatGPT or Google AI subscription can back local runs the same way (via those vendors' own CLIs), but neither vendor currently offers a way to use that subscription unattended in CI, so CI there still needs a plain API key (the existing `openai`/`gemini` providers above).
|
|
151
164
|
|
|
152
165
|
### Important: set `actionTimeout` in your `playwright.config.ts`
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export type { BindingFixtures } from './bindings';
|
|
|
3
3
|
export { bindPageActions, bindFrameActions, bindLocatorActions, bindTargetActions, bindContext } from './bindings/locator.binding';
|
|
4
4
|
export { healActionFailure, getHealingReports, getDurableLocator } from './healer';
|
|
5
5
|
export type { SelfHealingReport } from './healer';
|
|
6
|
+
export { closeCopilotSubscriptionClient } from './healer/providers/copilot-subscription';
|
|
6
7
|
export type { HealProvider, SelectorSuggestion, SuggestSelectorInput, TokenUsage, ProviderResult, VisionPoint, SuggestElementFromImageInput, VisionProviderResult, ActionTactic, SuggestActionTacticInput, ActionTacticResult } from './healer/providers/types';
|
|
7
8
|
declare module '@playwright/test' {
|
|
8
9
|
interface Locator {
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEnI,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACnF,YAAY,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEnI,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACnF,YAAY,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AASlD,OAAO,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC;AAEzF,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,4BAA4B,EAAE,oBAAoB,EAAE,YAAY,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAOhQ,OAAO,QAAQ,kBAAkB,CAAC;IAChC,UAAU,OAAO;QACf;;;;;;WAMG;QACH,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;KAC/C;CACF"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDurableLocator = exports.getHealingReports = exports.healActionFailure = exports.bindContext = exports.bindTargetActions = exports.bindLocatorActions = exports.bindFrameActions = exports.bindPageActions = exports.expect = exports.test = void 0;
|
|
3
|
+
exports.closeCopilotSubscriptionClient = exports.getDurableLocator = exports.getHealingReports = exports.healActionFailure = exports.bindContext = exports.bindTargetActions = exports.bindLocatorActions = exports.bindFrameActions = exports.bindPageActions = exports.expect = exports.test = void 0;
|
|
4
4
|
var bindings_1 = require("./bindings");
|
|
5
5
|
Object.defineProperty(exports, "test", { enumerable: true, get: function () { return bindings_1.test; } });
|
|
6
6
|
Object.defineProperty(exports, "expect", { enumerable: true, get: function () { return bindings_1.expect; } });
|
|
@@ -14,4 +14,13 @@ var healer_1 = require("./healer");
|
|
|
14
14
|
Object.defineProperty(exports, "healActionFailure", { enumerable: true, get: function () { return healer_1.healActionFailure; } });
|
|
15
15
|
Object.defineProperty(exports, "getHealingReports", { enumerable: true, get: function () { return healer_1.getHealingReports; } });
|
|
16
16
|
Object.defineProperty(exports, "getDurableLocator", { enumerable: true, get: function () { return healer_1.getDurableLocator; } });
|
|
17
|
+
// copilot-subscription keeps a shared CopilotClient (and its underlying `copilot` CLI subprocess)
|
|
18
|
+
// open across calls for performance — harmless inside Playwright's own test runner, which
|
|
19
|
+
// force-exits its process regardless of lingering handles, but a runner that does NOT force-exit
|
|
20
|
+
// (confirmed: Cucumber's CLI does not) will hang indefinitely after all scenarios finish, since the
|
|
21
|
+
// open connection keeps Node's event loop non-empty. Exported here so a non-Playwright consumer can
|
|
22
|
+
// call it from their own teardown hook (e.g. Cucumber's `AfterAll`) — see this package's own
|
|
23
|
+
// usage.md for the exact pattern. A no-op if copilot-subscription was never used.
|
|
24
|
+
var copilot_subscription_1 = require("./healer/providers/copilot-subscription");
|
|
25
|
+
Object.defineProperty(exports, "closeCopilotSubscriptionClient", { enumerable: true, get: function () { return copilot_subscription_1.closeCopilotSubscriptionClient; } });
|
|
17
26
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,uCAA0C;AAAjC,gGAAA,IAAI,OAAA;AAAE,kGAAA,MAAM,OAAA;AAErB,8DAAmI;AAA1H,kHAAA,eAAe,OAAA;AAAE,mHAAA,gBAAgB,OAAA;AAAE,qHAAA,kBAAkB,OAAA;AAAE,oHAAA,iBAAiB,OAAA;AAAE,8GAAA,WAAW,OAAA;AAE9F,mCAAmF;AAA1E,2GAAA,iBAAiB,OAAA;AAAE,2GAAA,iBAAiB,OAAA;AAAE,2GAAA,iBAAiB,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,uCAA0C;AAAjC,gGAAA,IAAI,OAAA;AAAE,kGAAA,MAAM,OAAA;AAErB,8DAAmI;AAA1H,kHAAA,eAAe,OAAA;AAAE,mHAAA,gBAAgB,OAAA;AAAE,qHAAA,kBAAkB,OAAA;AAAE,oHAAA,iBAAiB,OAAA;AAAE,8GAAA,WAAW,OAAA;AAE9F,mCAAmF;AAA1E,2GAAA,iBAAiB,OAAA;AAAE,2GAAA,iBAAiB,OAAA;AAAE,2GAAA,iBAAiB,OAAA;AAGhE,kGAAkG;AAClG,0FAA0F;AAC1F,iGAAiG;AACjG,oGAAoG;AACpG,oGAAoG;AACpG,6FAA6F;AAC7F,kFAAkF;AAClF,gFAAyF;AAAhF,sIAAA,8BAA8B,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tamash-playwright",
|
|
3
|
-
"version": "0.9.0-beta.
|
|
3
|
+
"version": "0.9.0-beta.3",
|
|
4
4
|
"description": "Plug and Play Self-healing for Playwright and automatically recovers broken selectors using an AI model (Ollama, OpenAI, Anthropic, Gemini, or a Claude/GitHub Copilot subscription).",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|