샘플
playwright 1.63.0
검증된 샘플 — npm playwright 1.63.0. node 22 · linux debian/x64 · docker에서 contract를 실행해 통과했습니다: chromium, firefox, and webkit browser types provide expected type…
sha256:d5e9d11d35391f53bd06aa71c11eef57188f162b3d4547defb0ca3d142c212a5
이 네트워크가 제공하는 것은 하나입니다. 빌드되는 샘플. 샌드박스에서 돌리고 서명된 영수증을 보관합니다. 등급을 매기지 않고 무엇도 보증하지 않습니다 — 같은 코드가 당신 환경에서 빌드되는지는 측정한 적이 없습니다.
통과한 계약 영수증을 낸 서로 다른 서명 키의 수입니다. 하나면 작성자 혼자이고, 둘 이상이면 다른 사람도 빌드했다는 뜻입니다. 키는 스스로 만드는 것이고 뒤에 등록된 신원이 없으므로, 세는 것은 사람이 아니라 키입니다.
MIT-0
실행 증거
선언된 환경과 서명된 실행을 분리해 두었습니다. 이 샘플이 무엇을 어디서 실행했는지 그대로 볼 수 있습니다.
- 증거 기준
- 서명된 컨트랙트 통과
- 검증 영수증
- 1
- 빌드한 서명 키
- 1
선언된 환경
linux 24 · ubuntu · glibc 2.39 x64 npm
검증 실행 환경
| 환경 | 컨트랙트 | 단계 | 실행일 |
|---|---|---|---|
| node 22 · linux debian/x64 · docker ed25519:c1973797be207ac4 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · node-typescript@1node:22@sha256:8a34c4ab3ea2… |
2026-09-10 |
케이스
HOW- 목표
- verify pkg:npm/playwright@1.63.0
- 생성일
- 2026-09-10T17:27:14Z
컨트랙트
- chromium, firefox, and webkit browser types provide expected type names
- devices dictionary exposes mobile device emulation profiles
- errors namespace exports TimeoutError error class
- request APIRequestContext sends HTTP GET requests and parses JSON responses
- request APIRequestContext supports POST requests with JSON payload
- request APIRequestContext handles non-ok status codes and text responses
파일
- PROMPT.md
- csx.json
- package-lock.json
- package.json
- spec.json
- test/contract.mjs
소스
Clean-room public code sample — generation instructions
Write a brand-new, minimal, self-contained code sample in this clean-room directory.
Do not copy, paraphrase, or reference any existing project source. Work only from this spec.
A csx.json manifest scaffold already exists. Do not recreate it from memory. Preserve its case.goal, packages and symbols; fill its empty case.contract with exact assertions and correct its environment, commands and verifierAdapter for the files you generate.
Goal: verify pkg:npm/playwright@1.63.0
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/playwright@1.63.0
Rules:
- One focused purpose; the smallest project that proves the goal.
- Include a contract test (test/contract.*) that runs OFFLINE and exits 0 exactly when the goal behavior works.
- Pin every dependency with a lockfile so resolution is reproducible.
- No secrets, credentials, or tokens. No real URLs (only example.com or localhost). No absolute paths.
- No personal names, emails, company names, or project identifiers of any kind.
- No binaries and no generated output (node_modules, dist, target, venv, .git, .env).
- Keep it under 200 files and 256KB packed.
{"case":{"caseId":"case:sha256:3942bed4780aa5fce744f527f2ccf432f45846b641749064350e55a87e22fbbb","contract":["chromium, firefox, and webkit browser types provide expected type names","devices dictionary exposes mobile device emulation profiles","errors namespace exports TimeoutError error class","request APIRequestContext sends HTTP GET requests and parses JSON responses","request APIRequestContext supports POST requests with JSON payload","request APIRequestContext handles non-ok status codes and text responses"],"goal":"verify pkg:npm/playwright@1.63.0","kind":"HOW","packages":["pkg:npm/playwright@1.63.0"],"schemaVersion":1},"contractCommand":["node","test/contract.mjs"],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"npm","libc":"glibc","libcVersion":"2.39","os":"linux","osVersionBucket":"24","packageManager":"npm","schemaVersion":1},"license":"MIT-0","packages":["pkg:npm/playwright@1.63.0"],"schemaVersion":1,"subject":"pkg:npm/playwright@1.63.0","verifierAdapter":"node-typescript@1"}
{
"name": "playwright-sample",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "playwright-sample",
"version": "1.0.0",
"dependencies": {
"playwright": "1.63.0"
}
},
"node_modules/playwright": {
"version": "1.63.0",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.63.0.tgz",
"integrity": "sha512-+7ziBLidS4NaNCdt57SUDT+wYmmd5fmiQejUic/kb+YsYSCPyOOE9sebzMjNmQrsnNpDJqd4WHvV/8lfKfUDUg==",
"license": "Apache-2.0",
"dependencies": {
"playwright-core": "1.63.0"
},
"bin": {
"playwright": "cli.js"
},
"engines": {
"node": ">=20"
}
},
"node_modules/playwright-core": {
"version": "1.63.0",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.63.0.tgz",
"integrity": "sha512-rYCsBF/M5HjUch52bbtVONEFjv6Xu8sm8h72dNlR5bzIE1fvC/bxgspzkjSfU+MweEMmPM8KJebG6nnyxo5mCg==",
"license": "Apache-2.0",
"bin": {
"playwright-core": "cli.js"
},
"engines": {
"node": ">=20"
}
}
}
}
{
"name": "playwright-sample",
"version": "1.0.0",
"private": true,
"description": "Clean-room verification for playwright",
"dependencies": {
"playwright": "1.63.0"
}
}
{
"schemaVersion": 1,
"goal": "verify pkg:npm/playwright@1.63.0",
"kind": "HOW",
"packages": [
"pkg:npm/playwright@1.63.0"
]
}
import assert from 'node:assert';
import http from 'node:http';
import { chromium, firefox, webkit, devices, errors, request } from 'playwright';
// 1. chromium, firefox, and webkit browser types provide expected type names
assert.strictEqual(chromium.name(), 'chromium');
assert.strictEqual(firefox.name(), 'firefox');
assert.strictEqual(webkit.name(), 'webkit');
// 2. devices dictionary exposes mobile device emulation profiles
assert.ok('iPhone 12' in devices);
const iphone = devices['iPhone 12'];
assert.ok(iphone.userAgent.includes('iPhone'));
assert.strictEqual(typeof iphone.viewport.width, 'number');
assert.strictEqual(typeof iphone.viewport.height, 'number');
assert.strictEqual(iphone.isMobile, true);
assert.strictEqual(iphone.hasTouch, true);
// 3. errors namespace exports TimeoutError error class
assert.ok(errors.TimeoutError);
const timeoutErr = new errors.TimeoutError('operation timed out');
assert.ok(timeoutErr instanceof Error);
assert.strictEqual(timeoutErr.name, 'TimeoutError');
// 4. request APIRequestContext sends HTTP GET requests and parses JSON responses
{
const server = http.createServer((req, res) => {
if (req.url === '/api/status') {
res.writeHead(200, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({ status: 'ok', version: '1.63.0' }));
return;
}
res.writeHead(404);
res.end();
});
await new Promise((resolve) => server.listen(0, '127.0.0.1', resolve));
const port = server.address().port;
try {
const context = await request.newContext({ baseURL: `http://127.0.0.1:${port}` });
const res = await context.get('/api/status');
assert.strictEqual(res.status(), 200);
assert.strictEqual(res.ok(), true);
const data = await res.json();
assert.strictEqual(data.status, 'ok');
assert.strictEqual(data.version, '1.63.0');
await context.dispose();
} finally {
await new Promise((resolve) => server.close(resolve));
}
}
// 5. request APIRequestContext supports POST requests with JSON payload
{
let receivedBody = null;
const server = http.createServer((req, res) => {
let body = '';
req.on('data', (chunk) => {
body += chunk;
});
req.on('end', () => {
receivedBody = JSON.parse(body);
res.writeHead(201, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({ received: true, echo: receivedBody }));
});
});
await new Promise((resolve) => server.listen(0, '127.0.0.1', resolve));
const port = server.address().port;
try {
const context = await request.newContext({ baseURL: `http://127.0.0.1:${port}` });
const res = await context.post('/api/echo', {
data: { test: 'playwright-contract' },
});
assert.strictEqual(res.status(), 201);
const data = await res.json();
assert.strictEqual(data.received, true);
assert.deepStrictEqual(data.echo, { test: 'playwright-contract' });
await context.dispose();
} finally {
await new Promise((resolve) => server.close(resolve));
}
}
// 6. request APIRequestContext handles non-ok status codes and text responses
{
const server = http.createServer((req, res) => {
res.writeHead(404, { 'Content-Type': 'text/plain' });
res.end('Not Found Here');
});
await new Promise((resolve) => server.listen(0, '127.0.0.1', resolve));
const port = server.address().port;
try {
const context = await request.newContext({ baseURL: `http://127.0.0.1:${port}` });
const res = await context.get('/missing');
assert.strictEqual(res.status(), 404);
assert.strictEqual(res.ok(), false);
const text = await res.text();
assert.strictEqual(text, 'Not Found Here');
await context.dispose();
} finally {
await new Promise((resolve) => server.close(resolve));
}
}
console.log('Contract passed');
오리진 시더
익명