@poe-platform/safe-bash 0.1.696 → 0.1.698
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/playwright/index.d.ts +2 -1
- package/dist/safe-bash/playwright/index.d.ts.map +1 -1
- package/dist/safe-bash/playwright/index.js +2 -1
- package/dist/safe-bash/playwright/index.js.map +1 -1
- package/dist/safe-bash/playwright/native-storage-targets.d.ts.map +1 -1
- package/dist/safe-bash/playwright/native-storage-targets.js +19 -2
- package/dist/safe-bash/playwright/native-storage-targets.js.map +1 -1
- package/dist/safe-bash/playwright/profile.d.ts +38 -0
- package/dist/safe-bash/playwright/profile.d.ts.map +1 -0
- package/dist/safe-bash/playwright/profile.js +172 -0
- package/dist/safe-bash/playwright/profile.js.map +1 -0
- package/dist/safe-playwright-cloudflare/browser-artifact.js +46 -0
- package/dist/safe-playwright-cloudflare/browser-code-executor.d.ts +7 -0
- package/dist/safe-playwright-cloudflare/browser-code-executor.js +20 -0
- package/dist/safe-playwright-cloudflare/browser-codegen.generated.js +8701 -0
- package/dist/safe-playwright-cloudflare/browser-codegen.js +26 -0
- package/dist/safe-playwright-cloudflare/browser-page-cdp.js +21 -0
- package/dist/safe-playwright-cloudflare/browser-private-transport.js +338 -0
- package/dist/safe-playwright-cloudflare/browser-profile-runtime.js +33 -0
- package/dist/safe-playwright-cloudflare/browser-run-code-budget.js +130 -0
- package/dist/safe-playwright-cloudflare/browser-run-code-context-state.js +54 -0
- package/dist/safe-playwright-cloudflare/browser-run-code-contract.js +1 -0
- package/dist/safe-playwright-cloudflare/browser-run-code-guest.generated.js +2 -0
- package/dist/safe-playwright-cloudflare/browser-run-code-native.js +180 -0
- package/dist/safe-playwright-cloudflare/browser-run-code-relay.js +149 -0
- package/dist/safe-playwright-cloudflare/browser-run-code-state.js +102 -0
- package/dist/safe-playwright-cloudflare/browser-run-code.js +251 -0
- package/dist/safe-playwright-cloudflare/browser-snapshot-json-injected.js +80 -0
- package/dist/safe-playwright-cloudflare/browser-snapshot-json.js +89 -0
- package/dist/safe-playwright-cloudflare/browser-socket-closure.js +111 -0
- package/dist/safe-playwright-cloudflare/browser-storage-control.js +262 -0
- package/dist/safe-playwright-cloudflare/browser-trace.js +143 -0
- package/dist/safe-playwright-cloudflare/index.d.ts +2 -0
- package/dist/safe-playwright-cloudflare/index.js +1 -0
- package/dist/safe-playwright-cloudflare/shell-browser-resource.d.ts +17 -0
- package/dist/safe-playwright-cloudflare/shell-browser-resource.js +217 -0
- package/dist/safe-playwright-cloudflare/shell-playwright.d.ts +11 -0
- package/dist/safe-playwright-cloudflare/shell-playwright.js +110 -0
- package/package.json +10 -2
- package/third-party/safe-playwright-cloudflare/third-party/playwright/LICENSE +202 -0
- package/third-party/safe-playwright-cloudflare/third-party/playwright/NOTICE +12 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Browser, BrowserWorker } from "@cloudflare/playwright";
|
|
2
|
+
/** O(1): retain only the session created by this acquisition, never guest aliases. */
|
|
3
|
+
export declare function acquireCloudflareBrowser(options: {
|
|
4
|
+
binding: BrowserWorker;
|
|
5
|
+
signal: AbortSignal;
|
|
6
|
+
}): Promise<{
|
|
7
|
+
browser: Browser;
|
|
8
|
+
connectSocket: (signal: AbortSignal) => Promise<WebSocket>;
|
|
9
|
+
prepareStorageOrigin: import("../safe-bash/commands/playwright/index.js").PlaywrightStorageOriginPreparer;
|
|
10
|
+
interrupt(): Promise<void>;
|
|
11
|
+
release: () => Promise<void>;
|
|
12
|
+
}>;
|
|
13
|
+
/** Concurrent cleanup paths share one deletion and the same provider outcome. */
|
|
14
|
+
export declare function createCloudflareBrowserRelease(options: {
|
|
15
|
+
binding: BrowserWorker;
|
|
16
|
+
sessionId: string;
|
|
17
|
+
}): () => Promise<void>;
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { createPlaywrightStorageOriginPreparer } from "@poe-platform/safe-bash/playwright";
|
|
2
|
+
import { createBrowserPrivateTransport, waitForBrowserSocketClose, } from "./browser-private-transport.js";
|
|
3
|
+
import { MAX_RUN_CODE_FRAME_BYTES } from "./browser-run-code-budget.js";
|
|
4
|
+
import { beginBrowserOwnerShutdown, closeBrowserSocket, finalizeBrowserOwnerTermination, registerBrowserSocketClose, } from "./browser-socket-closure.js";
|
|
5
|
+
import { createBrowserStorageControl } from "./browser-storage-control.js";
|
|
6
|
+
const BROWSER_IDLE_MS = 600_000;
|
|
7
|
+
const BROWSER_RELEASE_MS = 5_000;
|
|
8
|
+
/** O(1): retain only the session created by this acquisition, never guest aliases. */
|
|
9
|
+
export async function acquireCloudflareBrowser(options) {
|
|
10
|
+
const { binding, signal } = options;
|
|
11
|
+
signal.throwIfAborted();
|
|
12
|
+
const { acquire, connect } = await import("@cloudflare/playwright");
|
|
13
|
+
signal.throwIfAborted();
|
|
14
|
+
const { sessionId } = await acquire(binding, { keep_alive: BROWSER_IDLE_MS });
|
|
15
|
+
const owned = createOwnedConnections(binding, sessionId);
|
|
16
|
+
const canceled = Promise.withResolvers();
|
|
17
|
+
const onAbort = () => {
|
|
18
|
+
canceled.reject(signal.reason);
|
|
19
|
+
owned.disconnect(signal.reason);
|
|
20
|
+
};
|
|
21
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
22
|
+
try {
|
|
23
|
+
signal.throwIfAborted();
|
|
24
|
+
const resource = await Promise.race([
|
|
25
|
+
owned.setup(connect, signal),
|
|
26
|
+
canceled.promise,
|
|
27
|
+
]);
|
|
28
|
+
signal.throwIfAborted();
|
|
29
|
+
return resource;
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
try {
|
|
33
|
+
await owned.release();
|
|
34
|
+
}
|
|
35
|
+
catch (cleanup) {
|
|
36
|
+
throw new AggregateError([error, cleanup], "Browser acquisition and cleanup failed");
|
|
37
|
+
}
|
|
38
|
+
throw error;
|
|
39
|
+
}
|
|
40
|
+
finally {
|
|
41
|
+
signal.removeEventListener("abort", onAbort);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function createOwnedConnections(binding, sessionId) {
|
|
45
|
+
const sessionURL = `http://fake.host/v1/devtools/browser/${encodeURIComponent(sessionId)}`;
|
|
46
|
+
const protocolLimits = {
|
|
47
|
+
maxMessageBytes: MAX_RUN_CODE_FRAME_BYTES,
|
|
48
|
+
maxPendingBytes: MAX_RUN_CODE_FRAME_BYTES,
|
|
49
|
+
};
|
|
50
|
+
const privacy = createBrowserPrivateTransport({
|
|
51
|
+
...protocolLimits,
|
|
52
|
+
maxBufferedBytes: MAX_RUN_CODE_FRAME_BYTES,
|
|
53
|
+
});
|
|
54
|
+
const upstreams = new Set();
|
|
55
|
+
const clients = new AbortController();
|
|
56
|
+
const deleteBrowser = createCloudflareBrowserRelease({ binding, sessionId });
|
|
57
|
+
let control;
|
|
58
|
+
let browser;
|
|
59
|
+
let released = false;
|
|
60
|
+
let releasing;
|
|
61
|
+
async function rawSocket(signal, init) {
|
|
62
|
+
signal.throwIfAborted();
|
|
63
|
+
if (released)
|
|
64
|
+
throw new Error("Owned browser resource released");
|
|
65
|
+
const headers = new Headers(init?.headers);
|
|
66
|
+
headers.set("Upgrade", "websocket");
|
|
67
|
+
const handshake = new AbortController();
|
|
68
|
+
const aborted = () => handshake.abort(signal.reason);
|
|
69
|
+
signal.addEventListener("abort", aborted, { once: true });
|
|
70
|
+
let response;
|
|
71
|
+
try {
|
|
72
|
+
response = await binding.fetch(sessionURL, {
|
|
73
|
+
...init,
|
|
74
|
+
headers,
|
|
75
|
+
signal: handshake.signal,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
finally {
|
|
79
|
+
signal.removeEventListener("abort", aborted);
|
|
80
|
+
}
|
|
81
|
+
const socket = response.webSocket;
|
|
82
|
+
if (!socket) {
|
|
83
|
+
await response.body?.cancel();
|
|
84
|
+
throw new Error(`Owned browser connection failed: HTTP ${response.status}`);
|
|
85
|
+
}
|
|
86
|
+
const closed = registerBrowserSocketClose(socket);
|
|
87
|
+
upstreams.add(socket);
|
|
88
|
+
void closed.then(() => upstreams.delete(socket), () => { });
|
|
89
|
+
if (signal.aborted || released) {
|
|
90
|
+
closeBrowserSocket(socket);
|
|
91
|
+
await response.body?.cancel();
|
|
92
|
+
signal.throwIfAborted();
|
|
93
|
+
throw new Error("Owned browser resource released");
|
|
94
|
+
}
|
|
95
|
+
return socket;
|
|
96
|
+
}
|
|
97
|
+
async function connectSocket(signal) {
|
|
98
|
+
const lifetime = AbortSignal.any([signal, clients.signal]);
|
|
99
|
+
return privacy.wrap(await rawSocket(lifetime), lifetime);
|
|
100
|
+
}
|
|
101
|
+
function disconnect(reason) {
|
|
102
|
+
clients.abort(reason ?? new Error("Owned browser clients interrupted"));
|
|
103
|
+
}
|
|
104
|
+
function attempt(operation) {
|
|
105
|
+
try {
|
|
106
|
+
return Promise.resolve(operation());
|
|
107
|
+
}
|
|
108
|
+
catch (error) {
|
|
109
|
+
return Promise.reject(error);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
function release() {
|
|
113
|
+
if (releasing)
|
|
114
|
+
return releasing;
|
|
115
|
+
released = true;
|
|
116
|
+
beginBrowserOwnerShutdown(upstreams);
|
|
117
|
+
disconnect();
|
|
118
|
+
releasing = finishOwnedBrowserCleanup([
|
|
119
|
+
attempt(() => control?.close()),
|
|
120
|
+
attempt(() => privacy.close()),
|
|
121
|
+
attempt(() => browser?.close()),
|
|
122
|
+
attempt(async () => {
|
|
123
|
+
try {
|
|
124
|
+
await deleteBrowser();
|
|
125
|
+
finalizeBrowserOwnerTermination(upstreams, true);
|
|
126
|
+
}
|
|
127
|
+
catch (error) {
|
|
128
|
+
finalizeBrowserOwnerTermination(upstreams, false);
|
|
129
|
+
throw error;
|
|
130
|
+
}
|
|
131
|
+
}),
|
|
132
|
+
attempt(async () => {
|
|
133
|
+
const outcomes = await Promise.allSettled([...upstreams].map(waitForBrowserSocketClose));
|
|
134
|
+
const failures = outcomes
|
|
135
|
+
.filter((outcome) => outcome.status === "rejected")
|
|
136
|
+
.map((outcome) => outcome.reason);
|
|
137
|
+
if (failures.length)
|
|
138
|
+
throw new AggregateError(failures, "Owned browser upstream closure failed");
|
|
139
|
+
}),
|
|
140
|
+
], AbortSignal.timeout(BROWSER_RELEASE_MS));
|
|
141
|
+
return releasing;
|
|
142
|
+
}
|
|
143
|
+
async function setup(connect, signal) {
|
|
144
|
+
control = createBrowserStorageControl({
|
|
145
|
+
socket: await rawSocket(signal),
|
|
146
|
+
onEvent: privacy.observe,
|
|
147
|
+
limits: protocolLimits,
|
|
148
|
+
});
|
|
149
|
+
await control.send("Browser.getVersion");
|
|
150
|
+
signal.throwIfAborted();
|
|
151
|
+
const primaryBinding = {
|
|
152
|
+
fetch: async (_input, init) => {
|
|
153
|
+
const socket = privacy.wrap(await rawSocket(signal, init), clients.signal);
|
|
154
|
+
return new Response(null, { status: 101, webSocket: socket });
|
|
155
|
+
},
|
|
156
|
+
};
|
|
157
|
+
browser = await connect(primaryBinding, sessionId);
|
|
158
|
+
signal.throwIfAborted();
|
|
159
|
+
return {
|
|
160
|
+
browser,
|
|
161
|
+
connectSocket,
|
|
162
|
+
prepareStorageOrigin: createPlaywrightStorageOriginPreparer(control, privacy),
|
|
163
|
+
async interrupt() {
|
|
164
|
+
disconnect();
|
|
165
|
+
await browser?.close();
|
|
166
|
+
},
|
|
167
|
+
release,
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
return { setup, disconnect, release };
|
|
171
|
+
}
|
|
172
|
+
async function finishOwnedBrowserCleanup(operations, signal) {
|
|
173
|
+
const outcomes = [];
|
|
174
|
+
const completed = operations.map((operation, index) => operation.then(() => {
|
|
175
|
+
outcomes[index] = { status: "fulfilled", value: undefined };
|
|
176
|
+
}, (reason) => {
|
|
177
|
+
outcomes[index] = { status: "rejected", reason };
|
|
178
|
+
}));
|
|
179
|
+
const expired = Promise.withResolvers();
|
|
180
|
+
const onAbort = () => {
|
|
181
|
+
outcomes[operations.length] = {
|
|
182
|
+
status: "rejected",
|
|
183
|
+
reason: new Error("Owned browser release deadline exceeded", {
|
|
184
|
+
cause: signal.reason,
|
|
185
|
+
}),
|
|
186
|
+
};
|
|
187
|
+
expired.resolve();
|
|
188
|
+
};
|
|
189
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
190
|
+
try {
|
|
191
|
+
if (signal.aborted)
|
|
192
|
+
onAbort();
|
|
193
|
+
await Promise.race([Promise.all(completed), expired.promise]);
|
|
194
|
+
}
|
|
195
|
+
finally {
|
|
196
|
+
signal.removeEventListener("abort", onAbort);
|
|
197
|
+
}
|
|
198
|
+
const failures = outcomes
|
|
199
|
+
.filter((outcome) => outcome.status === "rejected")
|
|
200
|
+
.map((outcome) => outcome.reason);
|
|
201
|
+
if (failures.length)
|
|
202
|
+
throw new AggregateError(failures, "Owned browser release failed");
|
|
203
|
+
}
|
|
204
|
+
/** Concurrent cleanup paths share one deletion and the same provider outcome. */
|
|
205
|
+
export function createCloudflareBrowserRelease(options) {
|
|
206
|
+
let releasing;
|
|
207
|
+
return () => {
|
|
208
|
+
releasing ??= deleteOwnedBrowser(options);
|
|
209
|
+
return releasing;
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
async function deleteOwnedBrowser(options) {
|
|
213
|
+
const response = await options.binding.fetch(`http://fake.host/v1/devtools/browser/${encodeURIComponent(options.sessionId)}`, { method: "DELETE", signal: AbortSignal.timeout(BROWSER_RELEASE_MS) });
|
|
214
|
+
await response.body?.cancel();
|
|
215
|
+
if (!response.ok)
|
|
216
|
+
throw new Error(`Owned browser release failed: HTTP ${response.status}`);
|
|
217
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { BrowserContext, BrowserWorker } from "@cloudflare/playwright";
|
|
2
|
+
import { type PlaywrightAdapter } from "../safe-bash/commands/playwright/index.js";
|
|
3
|
+
import { type BrowserCodeRuntime } from "./browser-code-executor.js";
|
|
4
|
+
/** Cloudflare owns Chromium; the released CLI owns sessions, refs and artifacts. */
|
|
5
|
+
type BrowserStorageState = Awaited<ReturnType<BrowserContext["storageState"]>>;
|
|
6
|
+
export declare function createCloudflarePlaywrightAdapter(binding?: BrowserWorker, profiles?: {
|
|
7
|
+
loadState(name: string, signal: AbortSignal): Promise<BrowserStorageState | undefined>;
|
|
8
|
+
}, runtime?: BrowserCodeRuntime, limits?: {
|
|
9
|
+
maxStorageBytes: number;
|
|
10
|
+
}): PlaywrightAdapter;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { createPlaywrightAdapter, replacePlaywrightStorageState, } from "@poe-platform/safe-bash/playwright";
|
|
2
|
+
import { captureBrowserArtifact } from "./browser-artifact.js";
|
|
3
|
+
import { createBrowserCodeExecutor, } from "./browser-code-executor.js";
|
|
4
|
+
import { captureBrowserSnapshotJSON } from "./browser-snapshot-json.js";
|
|
5
|
+
import { captureBrowserTrace } from "./browser-trace.js";
|
|
6
|
+
import { acquireCloudflareBrowser } from "./shell-browser-resource.js";
|
|
7
|
+
import { browserProfileRuntime } from './browser-profile-runtime.js';
|
|
8
|
+
export function createCloudflarePlaywrightAdapter(binding, profiles, runtime, limits = { maxStorageBytes: 2 * 1024 * 1024 }) {
|
|
9
|
+
if (!Number.isSafeInteger(limits.maxStorageBytes) || limits.maxStorageBytes < 1)
|
|
10
|
+
throw new TypeError('Invalid Cloudflare storage byte limit');
|
|
11
|
+
const adapter = createPlaywrightAdapter({
|
|
12
|
+
chromium: {
|
|
13
|
+
headed: false,
|
|
14
|
+
async acquireBrowser({ signal }) {
|
|
15
|
+
signal.throwIfAborted();
|
|
16
|
+
if (!binding)
|
|
17
|
+
throw new Error("Playwright is unavailable: BROWSER binding missing");
|
|
18
|
+
const { generateBrowserActionCode } = await import("./browser-codegen.js");
|
|
19
|
+
const resource = await acquireCloudflareBrowser({ binding, signal });
|
|
20
|
+
return {
|
|
21
|
+
prepareStorageOrigin: resource.prepareStorageOrigin,
|
|
22
|
+
executeCode: createBrowserCodeExecutor(resource, runtime),
|
|
23
|
+
generateActionCode: generateBrowserActionCode,
|
|
24
|
+
captureSnapshotJSON: captureBrowserSnapshotJSON,
|
|
25
|
+
browser: publicBrowser(resource.browser),
|
|
26
|
+
captureArtifact: captureBrowserArtifact,
|
|
27
|
+
captureTrace: captureBrowserTrace,
|
|
28
|
+
async captureDownload() {
|
|
29
|
+
// Cloudflare's download APIs read a Worker-local path, while the
|
|
30
|
+
// file lives in remote Chromium. CDP exposes no file-byte stream.
|
|
31
|
+
throw new Error("Cloudflare Browser Run does not support download artifact retrieval");
|
|
32
|
+
},
|
|
33
|
+
prepareFileBytes: (bytes) => Buffer.from(bytes),
|
|
34
|
+
interrupt: resource.interrupt,
|
|
35
|
+
release: resource.release,
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
return {
|
|
41
|
+
...adapter,
|
|
42
|
+
async acquire(options) {
|
|
43
|
+
options.signal.throwIfAborted();
|
|
44
|
+
const state = options.contextOptions?.storageState ?? await profiles?.loadState(options.session, options.signal);
|
|
45
|
+
options.signal.throwIfAborted();
|
|
46
|
+
const lease = await adapter.acquire(state
|
|
47
|
+
? {
|
|
48
|
+
...options,
|
|
49
|
+
contextOptions: {
|
|
50
|
+
...options.contextOptions,
|
|
51
|
+
storageState: state,
|
|
52
|
+
},
|
|
53
|
+
}
|
|
54
|
+
: options);
|
|
55
|
+
if (!state)
|
|
56
|
+
return lease;
|
|
57
|
+
const cleanups = [];
|
|
58
|
+
const [result] = await Promise.allSettled([replacePlaywrightStorageState(lease.context, state, {
|
|
59
|
+
signal: options.signal, maxBytes: limits.maxStorageBytes, registerCleanup: cleanup => cleanups.push(cleanup),
|
|
60
|
+
})]);
|
|
61
|
+
const outcomes = await Promise.allSettled(cleanups.map(cleanup => Promise.resolve().then(cleanup)));
|
|
62
|
+
const failures = outcomes.filter((outcome) => outcome.status === 'rejected').map(outcome => outcome.reason);
|
|
63
|
+
if (result.status === 'rejected')
|
|
64
|
+
failures.unshift(result.reason);
|
|
65
|
+
if (options.signal.aborted && result.status === 'fulfilled')
|
|
66
|
+
failures.unshift(options.signal.reason);
|
|
67
|
+
if (!failures.length)
|
|
68
|
+
return lease;
|
|
69
|
+
try {
|
|
70
|
+
await lease.release();
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
failures.push(error);
|
|
74
|
+
}
|
|
75
|
+
if (failures.length === 1)
|
|
76
|
+
throw failures[0];
|
|
77
|
+
throw new AggregateError(failures, 'Cloudflare storage restoration and cleanup failed');
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function publicBrowser(browser) {
|
|
82
|
+
return {
|
|
83
|
+
isConnected: browser.isConnected.bind(browser),
|
|
84
|
+
on: browser.on.bind(browser),
|
|
85
|
+
off: browser.off.bind(browser),
|
|
86
|
+
async newContext(options) {
|
|
87
|
+
// Provider restoration resolves record requests before transaction completion.
|
|
88
|
+
// The acquired portable lease restores origins through held private targets.
|
|
89
|
+
const { storageState: ignoredStorageState, ...contextOptions } = options ?? {};
|
|
90
|
+
const context = await browser.newContext(contextOptions);
|
|
91
|
+
Object.defineProperty(context, 'browserProfile', { value: browserProfileRuntime(browser, context) });
|
|
92
|
+
const acquireCDP = context.newCDPSession.bind(context);
|
|
93
|
+
return Object.assign(context, {
|
|
94
|
+
async newCDPSession(page) {
|
|
95
|
+
return acquireCDP(ownedCDPTarget(context, page));
|
|
96
|
+
},
|
|
97
|
+
});
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
function ownedCDPTarget(context, page) {
|
|
102
|
+
for (const nativePage of context.pages()) {
|
|
103
|
+
if (nativePage === page)
|
|
104
|
+
return nativePage;
|
|
105
|
+
const frame = nativePage.frames().find((candidate) => candidate === page);
|
|
106
|
+
if (frame)
|
|
107
|
+
return frame;
|
|
108
|
+
}
|
|
109
|
+
throw new Error("Native CDP requires a live page or frame owned by this context");
|
|
110
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@poe-platform/safe-bash",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.698",
|
|
4
4
|
"description": "Extensible virtual shell with pluggable filesystems and streaming commands",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,6 +12,10 @@
|
|
|
12
12
|
"third-party"
|
|
13
13
|
],
|
|
14
14
|
"exports": {
|
|
15
|
+
"./playwright/cloudflare": {
|
|
16
|
+
"types": "./dist/safe-playwright-cloudflare/index.d.ts",
|
|
17
|
+
"import": "./dist/safe-playwright-cloudflare/index.js"
|
|
18
|
+
},
|
|
15
19
|
".": {
|
|
16
20
|
"types": {
|
|
17
21
|
"workerd": "./dist/safe-bash/core.d.ts",
|
|
@@ -374,7 +378,7 @@
|
|
|
374
378
|
"access": "public"
|
|
375
379
|
},
|
|
376
380
|
"dependencies": {
|
|
377
|
-
"@poe-platform/safe-fs": "0.1.
|
|
381
|
+
"@poe-platform/safe-fs": "0.1.698",
|
|
378
382
|
"pako": "3.0.1",
|
|
379
383
|
"@types/node": "^25.2.2",
|
|
380
384
|
"@noble/hashes": "2.4.0",
|
|
@@ -390,9 +394,13 @@
|
|
|
390
394
|
}
|
|
391
395
|
},
|
|
392
396
|
"peerDependencies": {
|
|
397
|
+
"@cloudflare/playwright": "1.3.6",
|
|
393
398
|
"yaml": "2.9.0"
|
|
394
399
|
},
|
|
395
400
|
"peerDependenciesMeta": {
|
|
401
|
+
"@cloudflare/playwright": {
|
|
402
|
+
"optional": true
|
|
403
|
+
},
|
|
396
404
|
"yaml": {
|
|
397
405
|
"optional": true
|
|
398
406
|
}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Portions Copyright (c) Microsoft Corporation.
|
|
190
|
+
Portions Copyright 2017 Google Inc.
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Cloudflare Playwright 1.3.6
|
|
2
|
+
https://github.com/cloudflare/playwright
|
|
3
|
+
|
|
4
|
+
Playwright portions copyright Microsoft Corporation.
|
|
5
|
+
Chromium automation portions copyright 2017 Google Inc.
|
|
6
|
+
Cloudflare Browser Run integration copyright Cloudflare, Inc.
|
|
7
|
+
Licensed under the Apache License, Version 2.0; see LICENSE.
|
|
8
|
+
|
|
9
|
+
This package bundles and minifies the native Cloudflare Playwright client for
|
|
10
|
+
Worker Loader execution and native action generators for supported languages.
|
|
11
|
+
Generated action-generator assets include source qualification and license text.
|
|
12
|
+
Upstream inline license notices are retained in both generated bundles.
|