repoburg 1.3.255 → 1.3.256
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/daemon/dist/index.js +61 -3
- package/daemon/dist/staticServing.js +2 -2
- package/daemon/dist/tabtape/api/follow.js +174 -0
- package/daemon/dist/tabtape/api/http.js +221 -0
- package/daemon/dist/tabtape/api/record.js +149 -0
- package/daemon/dist/tabtape/api/router.js +519 -0
- package/daemon/dist/tabtape/api/router.spec.js +604 -0
- package/daemon/dist/tabtape/api/static.js +70 -0
- package/daemon/dist/tabtape/api/ws.js +166 -0
- package/daemon/dist/tabtape/buffer/buffer.js +347 -0
- package/daemon/dist/tabtape/buffer/buffer.spec.js +137 -0
- package/daemon/dist/tabtape/config.js +108 -0
- package/daemon/dist/tabtape/e2e-server.js +96 -0
- package/daemon/dist/tabtape/errors.js +77 -0
- package/daemon/dist/tabtape/export/export.js +331 -0
- package/daemon/dist/tabtape/export/export.spec.js +262 -0
- package/daemon/dist/tabtape/har/gostd.js +395 -0
- package/daemon/dist/tabtape/har/gostd.spec.js +139 -0
- package/daemon/dist/tabtape/har/har.js +582 -0
- package/daemon/dist/tabtape/har/har.spec.js +325 -0
- package/daemon/dist/tabtape/index.js +134 -0
- package/daemon/dist/tabtape/index.spec.js +104 -0
- package/daemon/dist/tabtape/lock.js +67 -0
- package/daemon/dist/tabtape/log.js +32 -0
- package/daemon/dist/tabtape/mcp/definitions.js +362 -0
- package/daemon/dist/tabtape/mcp/gofmt.js +227 -0
- package/daemon/dist/tabtape/mcp/params.js +345 -0
- package/daemon/dist/tabtape/mcp/params.spec.js +172 -0
- package/daemon/dist/tabtape/mcp/recordLink.js +122 -0
- package/daemon/dist/tabtape/mcp/server.js +411 -0
- package/daemon/dist/tabtape/mcp/server.spec.js +722 -0
- package/daemon/dist/tabtape/mcp/tools.js +1085 -0
- package/daemon/dist/tabtape/query/format.js +195 -0
- package/daemon/dist/tabtape/query/network.js +133 -0
- package/daemon/dist/tabtape/query/perf.js +93 -0
- package/daemon/dist/tabtape/query/query.spec.js +233 -0
- package/daemon/dist/tabtape/query/reader.js +602 -0
- package/daemon/dist/tabtape/query/types.js +274 -0
- package/daemon/dist/tabtape/redact.js +37 -0
- package/daemon/dist/tabtape/repro/lang.js +95 -0
- package/daemon/dist/tabtape/repro/repro.js +422 -0
- package/daemon/dist/tabtape/repro/repro.spec.js +210 -0
- package/daemon/dist/tabtape/sink.js +24 -0
- package/daemon/dist/tabtape/store/record.js +99 -0
- package/daemon/dist/tabtape/store/segment.js +267 -0
- package/daemon/dist/tabtape/store/store.js +846 -0
- package/daemon/dist/tabtape/store/store.spec.js +485 -0
- package/daemon/dist/tabtape/testing/querytest.js +119 -0
- package/daemon/dist/tabtape/testing/tmp.js +33 -0
- package/package.json +3 -2
- package/tabtape/extension/dist/background.js +8 -0
- package/tabtape/extension/dist/background.js.map +7 -0
- package/tabtape/extension/dist/bridge.js +3 -0
- package/tabtape/extension/dist/bridge.js.map +7 -0
- package/tabtape/extension/dist/icons/128.png +0 -0
- package/tabtape/extension/dist/icons/16.png +0 -0
- package/tabtape/extension/dist/icons/32.png +0 -0
- package/tabtape/extension/dist/icons/48.png +0 -0
- package/tabtape/extension/dist/manifest.json +28 -0
- package/tabtape/extension/dist/popup.css +62 -0
- package/tabtape/extension/dist/popup.html +34 -0
- package/tabtape/extension/dist/popup.js +4 -0
- package/tabtape/extension/dist/popup.js.map +7 -0
- package/tabtape/extension/dist/recorder.js +133 -0
- package/tabtape/extension/dist/recorder.js.map +1 -0
- package/tabtape/extension/dist/state.js +2 -0
- package/tabtape/extension/dist/state.js.map +1 -0
- package/tabtape/playwright/mcp.mjs +58 -0
- package/tabtape/playwright/tabtape.d.mts +37 -0
- package/tabtape/playwright/tabtape.mjs +146 -0
- package/tabtape/ui/dist/app/assets/index-Canv3Ljk.css +1 -0
- package/tabtape/ui/dist/app/assets/index-iWNSSrAE.js +145 -0
- package/tabtape/ui/dist/app/index.html +14 -0
- package/tabtape/ui/dist/export/viewer.css +2 -0
- package/tabtape/ui/dist/export/viewer.js +143 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// Expected values are what Go 1.25 returns (net/url, mime, path, net/http).
|
|
4
|
+
const gostd_1 = require("./gostd");
|
|
5
|
+
const ok = (scheme, rawQuery, path) => ({ scheme, rawQuery, path });
|
|
6
|
+
describe('parseURL', () => {
|
|
7
|
+
const cases = [
|
|
8
|
+
['http://localhost:7788/api/data?x=1&y=two%20words', ok('http', 'x=1&y=two%20words', '/api/data')],
|
|
9
|
+
['HTTP://H/x', ok('http', '', '/x')],
|
|
10
|
+
['/collect', ok('', '', '/collect')],
|
|
11
|
+
['/a%2Ejs?x', ok('', 'x', '/a.js')],
|
|
12
|
+
['/a%zz', null],
|
|
13
|
+
['http://h/p#frag%zz', null],
|
|
14
|
+
['http://h/p#a b', ok('http', '', '/p')],
|
|
15
|
+
['http://h/p#a\tb', ok('http', '', '/p')], // control characters are only checked before the fragment
|
|
16
|
+
['a\tb', null],
|
|
17
|
+
[':foo', null],
|
|
18
|
+
['1a:b/c', null],
|
|
19
|
+
['a/b:c', ok('', '', 'a/b:c')],
|
|
20
|
+
['mailto:x?subject=hi', ok('mailto', 'subject=hi', '')],
|
|
21
|
+
['data:text/plain,hello.js', ok('data', '', '')],
|
|
22
|
+
['http://host:abc/x', null],
|
|
23
|
+
['http://h:/x', ok('http', '', '/x')],
|
|
24
|
+
['http://h:80:90/', ok('http', '', '/')],
|
|
25
|
+
['http://[::1/x', null],
|
|
26
|
+
['http://[::1]x/', null],
|
|
27
|
+
['http://[::1]:80/x?q', ok('http', 'q', '/x')],
|
|
28
|
+
['http://[fe80::1%25en0]/', ok('http', '', '/')],
|
|
29
|
+
['http://[fe80::1%25%41]/', ok('http', '', '/')],
|
|
30
|
+
['http://[fe80::1%25%2F]/', null],
|
|
31
|
+
['http://exa mple.com/', null],
|
|
32
|
+
['http://h{x}/', null],
|
|
33
|
+
['http://h%41/', null],
|
|
34
|
+
['http://h%C3%A9/', ok('http', '', '/')],
|
|
35
|
+
['http://us er@host/', null],
|
|
36
|
+
['http://user:p%zz@host/', null],
|
|
37
|
+
['http://u@v@h/p', ok('http', '', '/p')],
|
|
38
|
+
['//cdn.example.com/x.js?v=1', ok('', 'v=1', '/x.js')],
|
|
39
|
+
['///x', ok('', '', '///x')],
|
|
40
|
+
['x?', ok('', '', 'x')],
|
|
41
|
+
['http://h/a?b?c#d?e', ok('http', 'b?c', '/a')],
|
|
42
|
+
['http://h/a|b', ok('http', '', '/a|b')],
|
|
43
|
+
['*', ok('', '', '*')],
|
|
44
|
+
['', ok('', '', '')],
|
|
45
|
+
];
|
|
46
|
+
it.each(cases)('%j', (raw, want) => {
|
|
47
|
+
expect((0, gostd_1.parseURL)(raw)).toEqual(want);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
describe('queryUnescape', () => {
|
|
51
|
+
const cases = [
|
|
52
|
+
['two%20words', 'two words'],
|
|
53
|
+
['a+b', 'a b'],
|
|
54
|
+
['a%2Bb', 'a+b'],
|
|
55
|
+
['%41%42', 'AB'],
|
|
56
|
+
['%e2%82%ac', '€'],
|
|
57
|
+
['', ''],
|
|
58
|
+
['%zz', null],
|
|
59
|
+
['%4', null],
|
|
60
|
+
['100%', null],
|
|
61
|
+
];
|
|
62
|
+
it.each(cases)('%j', (s, want) => {
|
|
63
|
+
expect((0, gostd_1.queryUnescape)(s)).toBe(want);
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
describe('pathExt', () => {
|
|
67
|
+
it('returns the last extension of the last element', () => {
|
|
68
|
+
const got = ['/logo.svg', '/a/b', '/a.b/c', 'file.tar.gz', '.', '/x.', ''].map(gostd_1.pathExt);
|
|
69
|
+
expect(got).toEqual(['.svg', '', '', '.gz', '.', '.', '']);
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
describe('mediaType', () => {
|
|
73
|
+
const cases = [
|
|
74
|
+
['application/json; charset=utf-8', 'application/json'],
|
|
75
|
+
['Text/HTML', 'text/html'],
|
|
76
|
+
[' text/css ', 'text/css'],
|
|
77
|
+
['image/svg+xml', 'image/svg+xml'],
|
|
78
|
+
['text', 'text'],
|
|
79
|
+
['text/html;', 'text/html'],
|
|
80
|
+
['text/html ;', 'text/html'],
|
|
81
|
+
['text/html; charset=utf-8; ', 'text/html'],
|
|
82
|
+
['text/html; charset="utf-8"', 'text/html'],
|
|
83
|
+
['video/mp4; codecs="avc1.42E01E, mp4a.40.2"', 'video/mp4'],
|
|
84
|
+
['text/plain; a*0=x; a*1=y', 'text/plain'],
|
|
85
|
+
['text/html; charset=utf-8; charset=utf-8', 'text/html'], // equal duplicates: allowed in Go 1.25, not in older versions
|
|
86
|
+
['text/html; charset=utf-8; charset=latin1', null],
|
|
87
|
+
['text/plain; a*=x; a*=y', null],
|
|
88
|
+
['text/html; charset', null],
|
|
89
|
+
['text/html; ;', null],
|
|
90
|
+
['text/html;;', null],
|
|
91
|
+
['text/html; a=b;; c=d', null],
|
|
92
|
+
['text/html; charset="utf-8', null],
|
|
93
|
+
['text/html; x={a}', null], // braces: not token characters in Go 1.25, they were in older versions
|
|
94
|
+
['text/html garbage', null],
|
|
95
|
+
['text/', null],
|
|
96
|
+
['/html', null],
|
|
97
|
+
['', null],
|
|
98
|
+
];
|
|
99
|
+
it.each(cases)('%j', (v, want) => {
|
|
100
|
+
expect((0, gostd_1.mediaType)(v)).toBe(want);
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
describe('cookies', () => {
|
|
104
|
+
it('parses Cookie headers like http.ParseCookie', () => {
|
|
105
|
+
expect((0, gostd_1.parseCookie)('sid=abc; theme=dark')).toEqual([
|
|
106
|
+
{ name: 'sid', value: 'abc' },
|
|
107
|
+
{ name: 'theme', value: 'dark' },
|
|
108
|
+
]);
|
|
109
|
+
expect((0, gostd_1.parseCookie)(' a=1 ')).toEqual([{ name: 'a', value: '1' }]);
|
|
110
|
+
expect((0, gostd_1.parseCookie)('a="q"; b=x y; c=')).toEqual([
|
|
111
|
+
{ name: 'a', value: 'q' },
|
|
112
|
+
{ name: 'b', value: 'x y' },
|
|
113
|
+
{ name: 'c', value: '' },
|
|
114
|
+
]);
|
|
115
|
+
// Any malformed part rejects the header.
|
|
116
|
+
for (const bad of ['', 'a=1;', 'a =1', 'a', '=1', 'a=x\\y', 'a=é', 'a{=1'])
|
|
117
|
+
expect((0, gostd_1.parseCookie)(bad)).toBeNull();
|
|
118
|
+
});
|
|
119
|
+
it('parses Set-Cookie lines like http.ParseSetCookie', () => {
|
|
120
|
+
expect((0, gostd_1.parseSetCookie)('tabtape_demo=1; SameSite=None')).toEqual({ name: 'tabtape_demo', value: '1' });
|
|
121
|
+
expect((0, gostd_1.parseSetCookie)('a = 1; Path=/')).toEqual({ name: 'a', value: ' 1' }); // the name is trimmed, the value is not
|
|
122
|
+
expect((0, gostd_1.parseSetCookie)('a=1; Max-Age=x; weird')).toEqual({ name: 'a', value: '1' });
|
|
123
|
+
for (const bad of ['', 'noequals; Path=/', 'a="x;y"', 'b{=1'])
|
|
124
|
+
expect((0, gostd_1.parseSetCookie)(bad)).toBeNull();
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
describe('strings', () => {
|
|
128
|
+
it('trims white space like strings.TrimSpace', () => {
|
|
129
|
+
const c = (...codes) => String.fromCharCode(...codes);
|
|
130
|
+
expect((0, gostd_1.trimSpace)(c(0x85) + 'x' + c(0xa0, 0x3000))).toBe('x');
|
|
131
|
+
expect((0, gostd_1.trimSpace)(c(0xfeff) + 'x')).toBe(c(0xfeff) + 'x'); // not white space in Go
|
|
132
|
+
});
|
|
133
|
+
it('compares by UTF-8 bytes', () => {
|
|
134
|
+
expect((0, gostd_1.compareStrings)('a', 'b')).toBe(-1);
|
|
135
|
+
expect((0, gostd_1.compareStrings)('b', 'b')).toBe(0);
|
|
136
|
+
// U+FFFF sorts before U+10000 in UTF-8, after it in UTF-16.
|
|
137
|
+
expect((0, gostd_1.compareStrings)(String.fromCodePoint(0xffff), String.fromCodePoint(0x10000))).toBe(-1);
|
|
138
|
+
});
|
|
139
|
+
});
|