@poe-platform/safe-bash 0.1.679 → 0.1.681
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 +1 -1
- package/dist/safe-bash/commands/playwright/index.d.ts.map +1 -1
- package/dist/safe-bash/commands/playwright/index.js +77 -4
- package/dist/safe-bash/commands/playwright/index.js.map +1 -1
- package/dist/safe-bash/commands/text-programs/awk-runtime.d.ts.map +1 -1
- package/dist/safe-bash/commands/text-programs/awk-runtime.js +1 -3
- package/dist/safe-bash/commands/text-programs/awk-runtime.js.map +1 -1
- package/dist/safe-bash/commands/text-programs/regex.d.ts +3 -1
- package/dist/safe-bash/commands/text-programs/regex.d.ts.map +1 -1
- package/dist/safe-bash/commands/text-programs/regex.js +13 -7
- package/dist/safe-bash/commands/text-programs/regex.js.map +1 -1
- package/dist/safe-bash/core.browser.js +12 -9
- package/dist/safe-bash/core.browser.js.map +2 -2
- package/dist/safe-bash/playwright/abilities.d.ts +24 -5
- package/dist/safe-bash/playwright/abilities.d.ts.map +1 -1
- package/dist/safe-bash/playwright/abilities.js +9 -4
- package/dist/safe-bash/playwright/abilities.js.map +1 -1
- package/dist/safe-bash/playwright/ability-execution.d.ts +6 -1
- package/dist/safe-bash/playwright/ability-execution.d.ts.map +1 -1
- package/dist/safe-bash/playwright/ability-execution.js +77 -5
- package/dist/safe-bash/playwright/ability-execution.js.map +1 -1
- package/dist/safe-bash/playwright/adapter.d.ts +467 -11
- package/dist/safe-bash/playwright/adapter.d.ts.map +1 -1
- package/dist/safe-bash/playwright/adapter.js +213 -4
- package/dist/safe-bash/playwright/adapter.js.map +1 -1
- package/dist/safe-bash/playwright/builtins.d.ts +44 -4
- package/dist/safe-bash/playwright/builtins.d.ts.map +1 -1
- package/dist/safe-bash/playwright/builtins.js +14 -9
- package/dist/safe-bash/playwright/builtins.js.map +1 -1
- package/dist/safe-bash/playwright/canonical-locator-parser.d.ts +5 -0
- package/dist/safe-bash/playwright/canonical-locator-parser.d.ts.map +1 -0
- package/dist/safe-bash/playwright/canonical-locator-parser.js +146 -0
- package/dist/safe-bash/playwright/canonical-locator-parser.js.map +1 -0
- package/dist/safe-bash/playwright/capability-events.d.ts +15 -0
- package/dist/safe-bash/playwright/capability-events.d.ts.map +1 -0
- package/dist/safe-bash/playwright/capability-events.js +265 -0
- package/dist/safe-bash/playwright/capability-events.js.map +1 -0
- package/dist/safe-bash/playwright/capability-result.d.ts +33 -0
- package/dist/safe-bash/playwright/capability-result.d.ts.map +1 -0
- package/dist/safe-bash/playwright/capability-result.js +72 -0
- package/dist/safe-bash/playwright/capability-result.js.map +1 -0
- package/dist/safe-bash/playwright/config-ini.d.ts +3 -0
- package/dist/safe-bash/playwright/config-ini.d.ts.map +1 -0
- package/dist/safe-bash/playwright/config-ini.js +161 -0
- package/dist/safe-bash/playwright/config-ini.js.map +1 -0
- package/dist/safe-bash/playwright/controller.d.ts +39 -1
- package/dist/safe-bash/playwright/controller.d.ts.map +1 -1
- package/dist/safe-bash/playwright/controller.js +913 -77
- package/dist/safe-bash/playwright/controller.js.map +1 -1
- package/dist/safe-bash/playwright/devices.d.ts +229 -0
- package/dist/safe-bash/playwright/devices.d.ts.map +1 -0
- package/dist/safe-bash/playwright/devices.js +2740 -0
- package/dist/safe-bash/playwright/devices.js.map +1 -0
- package/dist/safe-bash/playwright/download-capabilities.d.ts +15 -0
- package/dist/safe-bash/playwright/download-capabilities.d.ts.map +1 -0
- package/dist/safe-bash/playwright/download-capabilities.js +161 -0
- package/dist/safe-bash/playwright/download-capabilities.js.map +1 -0
- package/dist/safe-bash/playwright/drop-capability.d.ts +3 -0
- package/dist/safe-bash/playwright/drop-capability.d.ts.map +1 -0
- package/dist/safe-bash/playwright/drop-capability.js +50 -0
- package/dist/safe-bash/playwright/drop-capability.js.map +1 -0
- package/dist/safe-bash/playwright/find.d.ts +8 -0
- package/dist/safe-bash/playwright/find.d.ts.map +1 -0
- package/dist/safe-bash/playwright/find.js +68 -0
- package/dist/safe-bash/playwright/find.js.map +1 -0
- package/dist/safe-bash/playwright/generated-locator.d.ts +4 -0
- package/dist/safe-bash/playwright/generated-locator.d.ts.map +1 -0
- package/dist/safe-bash/playwright/generated-locator.js +22 -0
- package/dist/safe-bash/playwright/generated-locator.js.map +1 -0
- package/dist/safe-bash/playwright/help.d.ts +4 -3
- package/dist/safe-bash/playwright/help.d.ts.map +1 -1
- package/dist/safe-bash/playwright/help.js +7 -52
- package/dist/safe-bash/playwright/help.js.map +1 -1
- package/dist/safe-bash/playwright/highlight.d.ts +8 -0
- package/dist/safe-bash/playwright/highlight.d.ts.map +1 -0
- package/dist/safe-bash/playwright/highlight.js +82 -0
- package/dist/safe-bash/playwright/highlight.js.map +1 -0
- package/dist/safe-bash/playwright/index.d.ts +5 -0
- package/dist/safe-bash/playwright/index.d.ts.map +1 -1
- package/dist/safe-bash/playwright/index.js +4 -0
- package/dist/safe-bash/playwright/index.js.map +1 -1
- package/dist/safe-bash/playwright/invocation.d.ts +24 -0
- package/dist/safe-bash/playwright/invocation.d.ts.map +1 -1
- package/dist/safe-bash/playwright/invocation.js +42 -10
- package/dist/safe-bash/playwright/invocation.js.map +1 -1
- package/dist/safe-bash/playwright/locator-selector.d.ts +5 -0
- package/dist/safe-bash/playwright/locator-selector.d.ts.map +1 -0
- package/dist/safe-bash/playwright/locator-selector.js +70 -0
- package/dist/safe-bash/playwright/locator-selector.js.map +1 -0
- package/dist/safe-bash/playwright/modal-capabilities.d.ts +20 -0
- package/dist/safe-bash/playwright/modal-capabilities.d.ts.map +1 -0
- package/dist/safe-bash/playwright/modal-capabilities.js +137 -0
- package/dist/safe-bash/playwright/modal-capabilities.js.map +1 -0
- package/dist/safe-bash/playwright/native-json-snapshot.d.ts +17 -0
- package/dist/safe-bash/playwright/native-json-snapshot.d.ts.map +1 -0
- package/dist/safe-bash/playwright/native-json-snapshot.js +94 -0
- package/dist/safe-bash/playwright/native-json-snapshot.js.map +1 -0
- package/dist/safe-bash/playwright/native-snapshot.d.ts +17 -0
- package/dist/safe-bash/playwright/native-snapshot.d.ts.map +1 -0
- package/dist/safe-bash/playwright/native-snapshot.js +164 -0
- package/dist/safe-bash/playwright/native-snapshot.js.map +1 -0
- package/dist/safe-bash/playwright/network-policy.d.ts +2 -0
- package/dist/safe-bash/playwright/network-policy.d.ts.map +1 -1
- package/dist/safe-bash/playwright/network-policy.js +1 -1
- package/dist/safe-bash/playwright/network-policy.js.map +1 -1
- package/dist/safe-bash/playwright/open-options.d.ts +14 -0
- package/dist/safe-bash/playwright/open-options.d.ts.map +1 -0
- package/dist/safe-bash/playwright/open-options.js +279 -0
- package/dist/safe-bash/playwright/open-options.js.map +1 -0
- package/dist/safe-bash/playwright/recording-capabilities.d.ts +6 -0
- package/dist/safe-bash/playwright/recording-capabilities.d.ts.map +1 -0
- package/dist/safe-bash/playwright/recording-capabilities.js +83 -0
- package/dist/safe-bash/playwright/recording-capabilities.js.map +1 -0
- package/dist/safe-bash/playwright/resource-limit.d.ts +6 -0
- package/dist/safe-bash/playwright/resource-limit.d.ts.map +1 -0
- package/dist/safe-bash/playwright/resource-limit.js +8 -0
- package/dist/safe-bash/playwright/resource-limit.js.map +1 -0
- package/dist/safe-bash/playwright/response.d.ts +22 -0
- package/dist/safe-bash/playwright/response.d.ts.map +1 -0
- package/dist/safe-bash/playwright/response.js +43 -0
- package/dist/safe-bash/playwright/response.js.map +1 -0
- package/dist/safe-bash/playwright/route-capabilities.d.ts +25 -0
- package/dist/safe-bash/playwright/route-capabilities.d.ts.map +1 -0
- package/dist/safe-bash/playwright/route-capabilities.js +138 -0
- package/dist/safe-bash/playwright/route-capabilities.js.map +1 -0
- package/dist/safe-bash/playwright/screenshot.d.ts +3 -1
- package/dist/safe-bash/playwright/screenshot.d.ts.map +1 -1
- package/dist/safe-bash/playwright/screenshot.js +15 -12
- package/dist/safe-bash/playwright/screenshot.js.map +1 -1
- package/dist/safe-bash/playwright/session-configuration.d.ts +35 -0
- package/dist/safe-bash/playwright/session-configuration.d.ts.map +1 -0
- package/dist/safe-bash/playwright/session-configuration.js +50 -0
- package/dist/safe-bash/playwright/session-configuration.js.map +1 -0
- package/dist/safe-bash/playwright/session-runtime.d.ts +8 -0
- package/dist/safe-bash/playwright/session-runtime.d.ts.map +1 -0
- package/dist/safe-bash/playwright/session-runtime.js +96 -0
- package/dist/safe-bash/playwright/session-runtime.js.map +1 -0
- package/dist/safe-bash/playwright/snapshot.d.ts +15 -2
- package/dist/safe-bash/playwright/snapshot.d.ts.map +1 -1
- package/dist/safe-bash/playwright/snapshot.js +66 -7
- package/dist/safe-bash/playwright/snapshot.js.map +1 -1
- package/dist/safe-bash/playwright/standard-capabilities.d.ts +4 -0
- package/dist/safe-bash/playwright/standard-capabilities.d.ts.map +1 -0
- package/dist/safe-bash/playwright/standard-capabilities.js +248 -0
- package/dist/safe-bash/playwright/standard-capabilities.js.map +1 -0
- package/dist/safe-bash/playwright/storage-capabilities.d.ts +4 -0
- package/dist/safe-bash/playwright/storage-capabilities.d.ts.map +1 -0
- package/dist/safe-bash/playwright/storage-capabilities.js +120 -0
- package/dist/safe-bash/playwright/storage-capabilities.js.map +1 -0
- package/dist/safe-bash/playwright/storage-state.d.ts +8 -0
- package/dist/safe-bash/playwright/storage-state.d.ts.map +1 -0
- package/dist/safe-bash/playwright/storage-state.js +122 -0
- package/dist/safe-bash/playwright/storage-state.js.map +1 -0
- package/dist/safe-bash/playwright/target-screenshot.d.ts +9 -0
- package/dist/safe-bash/playwright/target-screenshot.d.ts.map +1 -0
- package/dist/safe-bash/playwright/target-screenshot.js +28 -0
- package/dist/safe-bash/playwright/target-screenshot.js.map +1 -0
- package/dist/safe-bash/playwright/targets.d.ts +12 -0
- package/dist/safe-bash/playwright/targets.d.ts.map +1 -0
- package/dist/safe-bash/playwright/targets.js +36 -0
- package/dist/safe-bash/playwright/targets.js.map +1 -0
- package/dist/safe-bash/playwright/tracing-capabilities.d.ts +12 -0
- package/dist/safe-bash/playwright/tracing-capabilities.d.ts.map +1 -0
- package/dist/safe-bash/playwright/tracing-capabilities.js +100 -0
- package/dist/safe-bash/playwright/tracing-capabilities.js.map +1 -0
- package/dist/safe-bash/playwright/webmcp-capabilities.d.ts +6 -0
- package/dist/safe-bash/playwright/webmcp-capabilities.d.ts.map +1 -0
- package/dist/safe-bash/playwright/webmcp-capabilities.js +122 -0
- package/dist/safe-bash/playwright/webmcp-capabilities.js.map +1 -0
- package/dist/safe-bash/playwright/workspace-assets.d.ts +5 -0
- package/dist/safe-bash/playwright/workspace-assets.d.ts.map +1 -0
- package/dist/safe-bash/playwright/workspace-assets.js +17 -0
- package/dist/safe-bash/playwright/workspace-assets.js.map +1 -0
- package/dist/safe-bash/playwright/workspace.d.ts +3 -0
- package/dist/safe-bash/playwright/workspace.d.ts.map +1 -0
- package/dist/safe-bash/playwright/workspace.js +48 -0
- package/dist/safe-bash/playwright/workspace.js.map +1 -0
- package/package.json +2 -2
|
@@ -11713,7 +11713,7 @@ var Pattern = class {
|
|
|
11713
11713
|
}
|
|
11714
11714
|
}
|
|
11715
11715
|
};
|
|
11716
|
-
async function replacementLength(replacement, match, budget, available2) {
|
|
11716
|
+
async function replacementLength(replacement, match, budget, available2, syntax) {
|
|
11717
11717
|
let length = 0;
|
|
11718
11718
|
let tokens2 = 0;
|
|
11719
11719
|
for (let index = 0; index < replacement.length; index++) {
|
|
@@ -11727,7 +11727,9 @@ async function replacementLength(replacement, match, budget, available2) {
|
|
|
11727
11727
|
} else if (character === "\\" && index + 1 < replacement.length) {
|
|
11728
11728
|
budget.step();
|
|
11729
11729
|
const next = replacement[++index];
|
|
11730
|
-
if (
|
|
11730
|
+
if (syntax === "awk") {
|
|
11731
|
+
size = next === "&" || next === "\\" ? 1 : 2;
|
|
11732
|
+
} else if (next >= "1" && next <= "9") {
|
|
11731
11733
|
budget.step();
|
|
11732
11734
|
size = match.groups[Number(next)]?.length ?? 0;
|
|
11733
11735
|
}
|
|
@@ -11737,7 +11739,7 @@ async function replacementLength(replacement, match, budget, available2) {
|
|
|
11737
11739
|
}
|
|
11738
11740
|
return length;
|
|
11739
11741
|
}
|
|
11740
|
-
async function replacementText(replacement, match, buffer, budget) {
|
|
11742
|
+
async function replacementText(replacement, match, buffer, budget, syntax) {
|
|
11741
11743
|
let literal = 0;
|
|
11742
11744
|
let tokens2 = 0;
|
|
11743
11745
|
for (let index = 0; index < replacement.length; index++) {
|
|
@@ -11752,7 +11754,9 @@ async function replacementText(replacement, match, buffer, budget) {
|
|
|
11752
11754
|
} else {
|
|
11753
11755
|
budget.step();
|
|
11754
11756
|
const next = replacement[++index];
|
|
11755
|
-
if (
|
|
11757
|
+
if (syntax === "awk") {
|
|
11758
|
+
await buffer.append(replacement, next === "&" || next === "\\" ? index : index - 1, index + 1);
|
|
11759
|
+
} else if (next >= "1" && next <= "9") {
|
|
11756
11760
|
budget.step();
|
|
11757
11761
|
await buffer.append(match.groups[Number(next)] ?? "");
|
|
11758
11762
|
} else await buffer.append(next === "n" ? "\n" : next === "t" ? " " : next);
|
|
@@ -11761,7 +11765,7 @@ async function replacementText(replacement, match, buffer, budget) {
|
|
|
11761
11765
|
}
|
|
11762
11766
|
await buffer.append(replacement, literal);
|
|
11763
11767
|
}
|
|
11764
|
-
async function substitute(text3, pattern, replacement, budget, global, occurrence = 1) {
|
|
11768
|
+
async function substitute(text3, pattern, replacement, budget, global, occurrence = 1, syntax = "sed") {
|
|
11765
11769
|
let search = 0;
|
|
11766
11770
|
let consumed = 0;
|
|
11767
11771
|
let previousEnd = -1;
|
|
@@ -11782,10 +11786,10 @@ async function substitute(text3, pattern, replacement, budget, global, occurrenc
|
|
|
11782
11786
|
if (encountered >= occurrence) {
|
|
11783
11787
|
const prefix3 = match.start - consumed;
|
|
11784
11788
|
result.admit(prefix3);
|
|
11785
|
-
const length = await replacementLength(replacement, match, budget, result.remaining - prefix3);
|
|
11789
|
+
const length = await replacementLength(replacement, match, budget, result.remaining - prefix3, syntax);
|
|
11786
11790
|
result.admit(prefix3 + length);
|
|
11787
11791
|
await result.append(text3, consumed, match.start);
|
|
11788
|
-
await replacementText(replacement, match, result, budget);
|
|
11792
|
+
await replacementText(replacement, match, result, budget, syntax);
|
|
11789
11793
|
consumed = match.end;
|
|
11790
11794
|
count2++;
|
|
11791
11795
|
if (!global) break;
|
|
@@ -13727,9 +13731,8 @@ var AwkRuntime = class {
|
|
|
13727
13731
|
if (name2 === "sub" || name2 === "gsub") {
|
|
13728
13732
|
const pattern = await this.regex(args[0]);
|
|
13729
13733
|
const replacement = this.asText(await this.scalarExpression(args[1]));
|
|
13730
|
-
if (/\\[1-9]/u.test(replacement)) throw new ProgramError("awk replacement backreference escapes are not supported");
|
|
13731
13734
|
const target = await this.reference(args[2] ?? { kind: "field", index: { kind: "number", value: 0 } });
|
|
13732
|
-
const result2 = await substitute(this.asText(scalar(target.get())), pattern, replacement, this.budget, name2 === "gsub");
|
|
13735
|
+
const result2 = await substitute(this.asText(scalar(target.get())), pattern, replacement, this.budget, name2 === "gsub", 1, "awk");
|
|
13733
13736
|
if (result2.count) await target.set(string(result2.text));
|
|
13734
13737
|
return numeric(result2.count);
|
|
13735
13738
|
}
|