@keploy/capture-sdk 3.2.1 → 3.3.1
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 +38 -29
- package/dist/body-jobs.d.ts +2 -2
- package/dist/body-redact.js +1 -1
- package/dist/body-redact.js.map +1 -1
- package/dist/body-redact.mjs +1 -1
- package/dist/body-redact.mjs.map +1 -1
- package/dist/body-worker-none.js +1 -1
- package/dist/body-worker-none.js.map +1 -1
- package/dist/body-worker-none.mjs +1 -1
- package/dist/body-worker-none.mjs.map +1 -1
- package/dist/body-worker-start.js +1 -1
- package/dist/body-worker-start.js.map +1 -1
- package/dist/body-worker-start.mjs +1 -1
- package/dist/body-worker-start.mjs.map +1 -1
- package/dist/body-worker-unbundled.mjs +1 -1
- package/dist/body-worker-unbundled.mjs.map +1 -1
- package/dist/body-worker.js +1 -1
- package/dist/body-worker.js.map +1 -1
- package/dist/errors.d.ts +6 -6
- package/dist/index.bundler.mjs +1 -1
- package/dist/index.bundler.mjs.map +1 -1
- package/dist/index.d.ts +4 -6
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/network.d.ts +9 -9
- package/dist/privacy.d.ts +26 -32
- package/dist/recorder.d.ts +29 -25
- package/dist/redact.d.ts +9 -0
- package/dist/request-term.js +1 -1
- package/dist/request-term.js.map +1 -1
- package/dist/request-term.mjs +1 -1
- package/dist/request-term.mjs.map +1 -1
- package/dist/strict-attributes.js +1 -1
- package/dist/strict-attributes.js.map +1 -1
- package/dist/strict-attributes.mjs +1 -1
- package/dist/strict-attributes.mjs.map +1 -1
- package/dist/transport.d.ts +12 -12
- package/dist/types.d.ts +8 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/strict-attributes.ts","../package.json"],"names":["kept","name","tag","svg","attributes","PAGE_METAS","test","String","STRICT_KEPT","SVG_KEPT","includes","HTML_KEPT","strict_attributes_exports","__export","version","module","exports"],"mappings":"aAmEO,SAASA,EACdC,EACAC,EACAC,EACAC,GAEA,MAAgB,YAATH,EACK,SAARC,QACiB,IAAfE,IACqC,iBAA7BA,EAAW,eACjBC,EAAWC,KAAKC,OAAOH,EAAWH,QACtCO,EAAYF,KAAKL,KAEb,KADDE,EAAMM,EAAWP,EAAIQ,SAAS,KAAO,KAAOC,IAAYL,KAAKL,EAEtE,C,+HAjFAW,EAAA,G,yDAAAC,CAAAD,EAAA,CAAAZ,KAAA,IAAAA,EAAAc,QAAA,IAAAA,IAAAC,OAAAC,S,EAAAJ,E,gNCEE,IAAAE,EAAW,QD+CPN,EACJ,icAEIG,EACJ,4nBAEIF,EACJ,46BAEIJ,EACJ","sourcesContent":["/* ------------------------------------------------------------------ */\n/* @keploy/capture-sdk - strict's attribute allow-list */\n/* ------------------------------------------------------------------ */\n/*\n * THIS FILE IS A CHUNK OF ITS OWN (dist/strict-attributes.{mjs,js}, the\n * package's \"./strict-attributes\" export). The recorder loads it under\n * `privacyMode: \"strict\"` alone, beside rrweb's import and in parallel\n * with it, and starts no recording until both have loaded\n * (recorder.ts loadRecorder), so no snapshot is ever taken without it; a\n * load that fails ends the capture with\n * KUI_E_STRICT_ATTRIBUTES_UNAVAILABLE and records nothing. balanced and\n * off never load it. It imports nothing but the version it exports (a\n * string the build inlines), and the main builds import it\n * only by that name (dist/index.mjs also by its file beside it, for a page\n * with no bundler): __tests__/bundle-size.test.ts fails when\n * one of its names is in dist/index.mjs, dist/index.bundler.mjs or\n * dist/index.js. Why a chunk: the three lists are about 954 B gzipped\n * of distinct names, and with them in the base bundle every build was\n * over its budget (founder's ruling, 2026-11-13: never slow the page).\n *\n * STRICT RECORDS NO PAGE TEXT (README, Privacy): what a text node holds,\n * rrweb masks; what an attribute holds, privacy.ts blanks unless this\n * file keeps it, by an ALLOW-LIST. A list of the attributes that hold\n * text missed every one it did not name -- Livewire's wire:snapshot,\n * Alpine's x-data, an Astro island's props, a custom element's message\n * -- so strict keeps only the names whose value is the page's\n * structure: an id, a class, a token, a number, an id reference, SVG\n * geometry, ARIA state, a test id, rrweb's own. A URL, CSS, a srcset and\n * a srcdoc go through their own rules (privacy.ts OWN_RULE, the URL\n * rule). Every other value is blanked, a field's value rrweb already\n * masked kept as it is, and a meta's `content` kept only where the meta\n * configures the page. Blank, not asterisks: the flow engine reads an\n * empty aria-label as none, so a strict recording never names an\n * element by a label it cannot have.\n *\n * ARIA under strict: kept, the attributes that describe the widget -- its\n * structure (level, posinset, setsize, row/col counts and indexes), its\n * relationships (id references: controls, describedby, labelledby, owns,\n * details, errormessage, flowto), its configuration (autocomplete,\n * haspopup, multiline, multiselectable, orientation, readonly, required,\n * disabled, modal, live, atomic, busy, relevant) and whether it is open or\n * hidden (expanded, hidden). Blanked, every one that reflects what the\n * visitor chose or entered: value now/min/max/text (a two-thumb slider's\n * min and max are the other thumb's chosen value), checked, selected,\n * pressed, current, sort, invalid (a verdict on what they typed) and\n * activedescendant (the id of the option they are on). And on HTML\n * elements `checked` and `selected` for the same reason (privacy.ts drops\n * them).\n */\nconst STRICT_KEPT =\n /^(?:id|class|role|slot|part|is|hidden|inert|tabindex|dir|lang|translate|draggable|contenteditable|spellcheck|autofocus|data-testid|xmlns(?::\\w+)?|xml:\\w+|aria-(?:atomic|autocomplete|busy|colcount|colindex|colspan|controls|describedby|details|disabled|errormessage|expanded|flowto|haspopup|hidden|labelledby|level|live|modal|multiline|multiselectable|orientation|owns|posinset|readonly|relevant|required|rowcount|rowindex|rowspan|setsize)|rr_\\w+)$/;\n/** Kept on an HTML element (not a custom one, whose attributes are its own): a token, a number, an id reference. */\nconst HTML_KEPT =\n /^(?:name|type|rel|for|form|list|headers|disabled|readonly|required|multiple|open|autocomplete|inputmode|enterkeyhint|accept|charset|http-equiv|media|sizes|loading|decoding|fetchpriority|crossorigin|referrerpolicy|sandbox|allow|allowfullscreen|target|method|enctype|novalidate|async|defer|nomodule|as|start|reversed|scope|span|colspan|rowspan|cols|rows|size|maxlength|minlength|step|low|high|optimum|width|height|wrap|kind|srclang|default|controls|autoplay|loop|muted|playsinline|preload|shape|coords|usemap|ismap|popover|popovertarget|popovertargetaction|align|valign|border|frameborder|property|itemprop|itemscope|itemtype|itemref)$/;\n/** Kept on an SVG element only: its geometry and paint, by exact name. */\nconst SVG_KEPT =\n /^(?:viewbox|preserveaspectratio|version|d|x|y|z|[xy][12]|c[xy]|r[xy]?|f[xyr]|dx|dy|width|height|points|transform|offset|opacity|display|visibility|overflow|focusable|rotate|refx|refy|orient|pathlength|startoffset|lengthadjust|spreadmethod|in2?|result|stddeviation|operator|mode|k[1-4]|values|radius|scale|type|fill(?:-opacity|-rule)?|stroke(?:-width|-opacity|-linecap|-linejoin|-dasharray|-dashoffset|-miterlimit)?|stop-(?:color|opacity)|font-(?:family|size|weight|style)|text-(?:anchor|decoration|rendering)|textlength|clip-(?:path|rule)|clippathunits|marker(?:-start|-mid|-end|width|height|units)|(?:gradient|pattern|mask|filter|primitive|maskcontent|patterncontent)(?:units|transform)|mask|filter|flood-(?:color|opacity)|lighting-color|vector-effect|(?:dominant|alignment)-baseline|baseline-shift|(?:letter|word)-spacing|writing-mode|paint-order|color(?:-interpolation(?:-filters)?)?|shape-rendering|image-rendering|transform-origin)$/;\n/** A meta whose `content` configures the page, not one that describes it. */\nconst PAGE_METAS =\n /^(viewport|color-scheme|theme-color|referrer|robots|format-detection)$/i;\n\n/**\n * Whether strict keeps attribute `name`'s value on a `tag` element (an SVG\n * one when `svg`), by name alone; a meta's `content` by the meta's own\n * `attributes`. privacy.ts asks this for every attribute but those with\n * their own rule, and blanks what it answers false for.\n */\nexport function kept(\n name: string,\n tag: string,\n svg: boolean,\n attributes?: Record<string, unknown>,\n): boolean {\n return name === \"content\"\n ? tag === \"meta\" &&\n attributes !== undefined &&\n (typeof attributes[\"http-equiv\"] === \"string\" ||\n PAGE_METAS.test(String(attributes.name)))\n : STRICT_KEPT.test(name) ||\n (svg ? SVG_KEPT : tag.includes(\"-\") ? null : HTML_KEPT)?.test(name) ===\n true;\n}\n\n/** The version this chunk was built as: the SDK refuses one of another (module-of.ts ownChunk). */\nexport { version } from \"../package.json\";\n","{\n \"name\": \"@keploy/capture-sdk\",\n \"version\": \"3.2.1\",\n \"description\": \"Lightweight SDK to capture UI flows from real users - DOM recording, network interception, PII masking\",\n \"homepage\": \"https://keploy.io/docs/running-keploy/ui-capture/\",\n \"main\": \"dist/index.js\",\n \"module\": \"dist/index.bundler.mjs\",\n \"unpkg\": \"dist/index.mjs\",\n \"jsdelivr\": \"dist/index.mjs\",\n \"types\": \"dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.mjs\",\n \"require\": \"./dist/index.js\"\n },\n \"./request-term\": {\n \"types\": \"./dist/request-term.d.ts\",\n \"import\": \"./dist/request-term.mjs\",\n \"require\": \"./dist/request-term.js\"\n },\n \"./strict-attributes\": {\n \"types\": \"./dist/strict-attributes.d.ts\",\n \"import\": \"./dist/strict-attributes.mjs\",\n \"require\": \"./dist/strict-attributes.js\"\n },\n \"./body-redact\": {\n \"types\": \"./dist/body-redact.d.ts\",\n \"import\": \"./dist/body-redact.mjs\",\n \"require\": \"./dist/body-redact.js\"\n },\n \"./body-worker-start\": {\n \"types\": \"./dist/body-worker-start.d.ts\",\n \"import\": \"./dist/body-worker-start.mjs\",\n \"require\": \"./dist/body-worker-start.js\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"files\": [\n \"dist\",\n \"request-term/package.json\",\n \"strict-attributes/package.json\",\n \"body-redact/package.json\",\n \"body-worker-start/package.json\",\n \"LICENSE\",\n \"README.md\"\n ],\n \"scripts\": {\n \"build\": \"node scripts/build-main.mjs && node scripts/build-worker.mjs && tsc -p tsconfig.build.json\",\n \"dev\": \"node scripts/build-main.mjs --watch\",\n \"test\": \"vitest run\",\n \"clean\": \"rm -rf dist\",\n \"typecheck\": \"tsc --noEmit\",\n \"prepublishOnly\": \"pnpm run clean && turbo run build --filter=@keploy/capture-sdk --force && node ../../tools/check-release-size.mjs\"\n },\n \"dependencies\": {\n \"rrweb\": \"^2.1.6\"\n },\n \"devDependencies\": {\n \"@keploy/contract\": \"workspace:*\",\n \"@types/node\": \"~24.13.5\",\n \"jsdom\": \"^30.1.0\",\n \"terser\": \"5.51.2\",\n \"tsup\": \"^8.3.0\",\n \"typescript\": \"^7.0.2\",\n \"vitest\": \"^5.0.1\"\n },\n \"peerDependencies\": {},\n \"keywords\": [\n \"keploy\",\n \"ui-testing\",\n \"session-recording\",\n \"e2e\",\n \"capture\"\n ],\n \"browser\": {\n \"./dist/body-worker-unbundled.mjs\": \"./dist/body-worker-none.mjs\"\n },\n \"alias\": {\n \"@keploy/capture-sdk/body-worker-start\": \"./dist/body-worker-start.mjs\"\n },\n \"license\": \"Apache-2.0\",\n \"publishConfig\": {\n \"access\": \"public\"\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/strict-attributes.ts","../package.json"],"names":["kept","name","tag","svg","attributes","PAGE_METAS","test","String","STRICT_KEPT","SVG_KEPT","includes","HTML_KEPT","strict_attributes_exports","__export","version","module","exports"],"mappings":"aAmEO,SAASA,EACdC,EACAC,EACAC,EACAC,GAEA,MAAgB,YAATH,EACK,SAARC,QACiB,IAAfE,IACqC,iBAA7BA,EAAW,eACjBC,EAAWC,KAAKC,OAAOH,EAAWH,QACtCO,EAAYF,KAAKL,KAEb,KADDE,EAAMM,EAAWP,EAAIQ,SAAS,KAAO,KAAOC,IAAYL,KAAKL,EAEtE,C,+HAjFAW,EAAA,G,yDAAAC,CAAAD,EAAA,CAAAZ,KAAA,IAAAA,EAAAc,QAAA,IAAAA,IAAAC,OAAAC,S,EAAAJ,E,gNCEE,IAAAE,EAAW,QD+CPN,EACJ,icAEIG,EACJ,4nBAEIF,EACJ,46BAEIJ,EACJ","sourcesContent":["/* ------------------------------------------------------------------ */\n/* @keploy/capture-sdk - strict's attribute allow-list */\n/* ------------------------------------------------------------------ */\n/*\n * THIS FILE IS A CHUNK OF ITS OWN (dist/strict-attributes.{mjs,js}, the\n * package's \"./strict-attributes\" export). The recorder loads it under\n * `privacyMode: \"strict\"` alone, beside rrweb's import and in parallel\n * with it, and starts no recording until both have loaded\n * (recorder.ts loadRecorder), so no snapshot is ever taken without it; a\n * load that fails ends the capture with\n * KUI_E_STRICT_ATTRIBUTES_UNAVAILABLE and records nothing. balanced and\n * off never load it. It imports nothing but the version it exports (a\n * string the build inlines), and the main builds import it\n * only by that name (dist/index.mjs also by its file beside it, for a page\n * with no bundler): __tests__/bundle-size.test.ts fails when\n * one of its names is in dist/index.mjs, dist/index.bundler.mjs or\n * dist/index.js. Why a chunk: the three lists are about 954 B gzipped\n * of distinct names, and with them in the base bundle every build was\n * over its budget (founder's ruling, 2026-11-13: never slow the page).\n *\n * STRICT RECORDS NO PAGE TEXT (README, Privacy): what a text node holds,\n * rrweb masks; what an attribute holds, privacy.ts blanks unless this\n * file keeps it, by an ALLOW-LIST. A list of the attributes that hold\n * text missed every one it did not name -- Livewire's wire:snapshot,\n * Alpine's x-data, an Astro island's props, a custom element's message\n * -- so strict keeps only the names whose value is the page's\n * structure: an id, a class, a token, a number, an id reference, SVG\n * geometry, ARIA state, a test id, rrweb's own. A URL, CSS, a srcset and\n * a srcdoc go through their own rules (privacy.ts OWN_RULE, the URL\n * rule). Every other value is blanked, a field's value rrweb already\n * masked kept as it is, and a meta's `content` kept only where the meta\n * configures the page. Blank, not asterisks: the flow engine reads an\n * empty aria-label as none, so a strict recording never names an\n * element by a label it cannot have.\n *\n * ARIA under strict: kept, the attributes that describe the widget -- its\n * structure (level, posinset, setsize, row/col counts and indexes), its\n * relationships (id references: controls, describedby, labelledby, owns,\n * details, errormessage, flowto), its configuration (autocomplete,\n * haspopup, multiline, multiselectable, orientation, readonly, required,\n * disabled, modal, live, atomic, busy, relevant) and whether it is open or\n * hidden (expanded, hidden). Blanked, every one that reflects what the\n * visitor chose or entered: value now/min/max/text (a two-thumb slider's\n * min and max are the other thumb's chosen value), checked, selected,\n * pressed, current, sort, invalid (a verdict on what they typed) and\n * activedescendant (the id of the option they are on). And on HTML\n * elements `checked` and `selected` for the same reason (privacy.ts drops\n * them).\n */\nconst STRICT_KEPT =\n /^(?:id|class|role|slot|part|is|hidden|inert|tabindex|dir|lang|translate|draggable|contenteditable|spellcheck|autofocus|data-testid|xmlns(?::\\w+)?|xml:\\w+|aria-(?:atomic|autocomplete|busy|colcount|colindex|colspan|controls|describedby|details|disabled|errormessage|expanded|flowto|haspopup|hidden|labelledby|level|live|modal|multiline|multiselectable|orientation|owns|posinset|readonly|relevant|required|rowcount|rowindex|rowspan|setsize)|rr_\\w+)$/;\n/** Kept on an HTML element (not a custom one, whose attributes are its own): a token, a number, an id reference. */\nconst HTML_KEPT =\n /^(?:name|type|rel|for|form|list|headers|disabled|readonly|required|multiple|open|autocomplete|inputmode|enterkeyhint|accept|charset|http-equiv|media|sizes|loading|decoding|fetchpriority|crossorigin|referrerpolicy|sandbox|allow|allowfullscreen|target|method|enctype|novalidate|async|defer|nomodule|as|start|reversed|scope|span|colspan|rowspan|cols|rows|size|maxlength|minlength|step|low|high|optimum|width|height|wrap|kind|srclang|default|controls|autoplay|loop|muted|playsinline|preload|shape|coords|usemap|ismap|popover|popovertarget|popovertargetaction|align|valign|border|frameborder|property|itemprop|itemscope|itemtype|itemref)$/;\n/** Kept on an SVG element only: its geometry and paint, by exact name. */\nconst SVG_KEPT =\n /^(?:viewbox|preserveaspectratio|version|d|x|y|z|[xy][12]|c[xy]|r[xy]?|f[xyr]|dx|dy|width|height|points|transform|offset|opacity|display|visibility|overflow|focusable|rotate|refx|refy|orient|pathlength|startoffset|lengthadjust|spreadmethod|in2?|result|stddeviation|operator|mode|k[1-4]|values|radius|scale|type|fill(?:-opacity|-rule)?|stroke(?:-width|-opacity|-linecap|-linejoin|-dasharray|-dashoffset|-miterlimit)?|stop-(?:color|opacity)|font-(?:family|size|weight|style)|text-(?:anchor|decoration|rendering)|textlength|clip-(?:path|rule)|clippathunits|marker(?:-start|-mid|-end|width|height|units)|(?:gradient|pattern|mask|filter|primitive|maskcontent|patterncontent)(?:units|transform)|mask|filter|flood-(?:color|opacity)|lighting-color|vector-effect|(?:dominant|alignment)-baseline|baseline-shift|(?:letter|word)-spacing|writing-mode|paint-order|color(?:-interpolation(?:-filters)?)?|shape-rendering|image-rendering|transform-origin)$/;\n/** A meta whose `content` configures the page, not one that describes it. */\nconst PAGE_METAS =\n /^(viewport|color-scheme|theme-color|referrer|robots|format-detection)$/i;\n\n/**\n * Whether strict keeps attribute `name`'s value on a `tag` element (an SVG\n * one when `svg`), by name alone; a meta's `content` by the meta's own\n * `attributes`. privacy.ts asks this for every attribute but those with\n * their own rule, and blanks what it answers false for.\n */\nexport function kept(\n name: string,\n tag: string,\n svg: boolean,\n attributes?: Record<string, unknown>,\n): boolean {\n return name === \"content\"\n ? tag === \"meta\" &&\n attributes !== undefined &&\n (typeof attributes[\"http-equiv\"] === \"string\" ||\n PAGE_METAS.test(String(attributes.name)))\n : STRICT_KEPT.test(name) ||\n (svg ? SVG_KEPT : tag.includes(\"-\") ? null : HTML_KEPT)?.test(name) ===\n true;\n}\n\n/** The version this chunk was built as: the SDK refuses one of another (module-of.ts ownChunk). */\nexport { version } from \"../package.json\";\n","{\n \"name\": \"@keploy/capture-sdk\",\n \"version\": \"3.3.1\",\n \"description\": \"Lightweight SDK to capture UI flows from real users - DOM recording, network interception, PII masking\",\n \"homepage\": \"https://keploy.io/docs/running-keploy/ui-capture/\",\n \"main\": \"dist/index.js\",\n \"module\": \"dist/index.bundler.mjs\",\n \"unpkg\": \"dist/index.mjs\",\n \"jsdelivr\": \"dist/index.mjs\",\n \"types\": \"dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.mjs\",\n \"require\": \"./dist/index.js\"\n },\n \"./request-term\": {\n \"types\": \"./dist/request-term.d.ts\",\n \"import\": \"./dist/request-term.mjs\",\n \"require\": \"./dist/request-term.js\"\n },\n \"./strict-attributes\": {\n \"types\": \"./dist/strict-attributes.d.ts\",\n \"import\": \"./dist/strict-attributes.mjs\",\n \"require\": \"./dist/strict-attributes.js\"\n },\n \"./body-redact\": {\n \"types\": \"./dist/body-redact.d.ts\",\n \"import\": \"./dist/body-redact.mjs\",\n \"require\": \"./dist/body-redact.js\"\n },\n \"./body-worker-start\": {\n \"types\": \"./dist/body-worker-start.d.ts\",\n \"import\": \"./dist/body-worker-start.mjs\",\n \"require\": \"./dist/body-worker-start.js\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"files\": [\n \"dist\",\n \"request-term/package.json\",\n \"strict-attributes/package.json\",\n \"body-redact/package.json\",\n \"body-worker-start/package.json\",\n \"LICENSE\",\n \"README.md\"\n ],\n \"scripts\": {\n \"build\": \"node scripts/build-main.mjs && node scripts/build-worker.mjs && tsc -p tsconfig.build.json\",\n \"dev\": \"node scripts/build-main.mjs --watch\",\n \"test\": \"vitest run\",\n \"clean\": \"rm -rf dist\",\n \"typecheck\": \"tsc --noEmit\",\n \"prepublishOnly\": \"pnpm run clean && turbo run build --filter=@keploy/capture-sdk --force && node ../../tools/check-release-size.mjs\"\n },\n \"dependencies\": {\n \"rrweb\": \"^2.2.2\"\n },\n \"devDependencies\": {\n \"@keploy/contract\": \"workspace:*\",\n \"@types/node\": \"~24.13.5\",\n \"jsdom\": \"^30.1.0\",\n \"terser\": \"5.51.2\",\n \"tsup\": \"^8.3.0\",\n \"typescript\": \"^7.0.2\",\n \"vitest\": \"^5.0.1\"\n },\n \"peerDependencies\": {},\n \"keywords\": [\n \"keploy\",\n \"ui-testing\",\n \"session-recording\",\n \"e2e\",\n \"capture\"\n ],\n \"browser\": {\n \"./dist/body-worker-unbundled.mjs\": \"./dist/body-worker-none.mjs\"\n },\n \"alias\": {\n \"@keploy/capture-sdk/body-worker-start\": \"./dist/body-worker-start.mjs\"\n },\n \"license\": \"Apache-2.0\",\n \"publishConfig\": {\n \"access\": \"public\"\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e,t,n,l){return"content"===e?"meta"===t&&void 0!==l&&("string"==typeof l["http-equiv"]||a.test(String(l.name))):o.test(e)||!0===(n?i:t.includes("-")?null:r)?.test(e)}var t="3.
|
|
1
|
+
function e(e,t,n,l){return"content"===e?"meta"===t&&void 0!==l&&("string"==typeof l["http-equiv"]||a.test(String(l.name))):o.test(e)||!0===(n?i:t.includes("-")?null:r)?.test(e)}var t="3.3.1",o=/^(?:id|class|role|slot|part|is|hidden|inert|tabindex|dir|lang|translate|draggable|contenteditable|spellcheck|autofocus|data-testid|xmlns(?::\w+)?|xml:\w+|aria-(?:atomic|autocomplete|busy|colcount|colindex|colspan|controls|describedby|details|disabled|errormessage|expanded|flowto|haspopup|hidden|labelledby|level|live|modal|multiline|multiselectable|orientation|owns|posinset|readonly|relevant|required|rowcount|rowindex|rowspan|setsize)|rr_\w+)$/,r=/^(?:name|type|rel|for|form|list|headers|disabled|readonly|required|multiple|open|autocomplete|inputmode|enterkeyhint|accept|charset|http-equiv|media|sizes|loading|decoding|fetchpriority|crossorigin|referrerpolicy|sandbox|allow|allowfullscreen|target|method|enctype|novalidate|async|defer|nomodule|as|start|reversed|scope|span|colspan|rowspan|cols|rows|size|maxlength|minlength|step|low|high|optimum|width|height|wrap|kind|srclang|default|controls|autoplay|loop|muted|playsinline|preload|shape|coords|usemap|ismap|popover|popovertarget|popovertargetaction|align|valign|border|frameborder|property|itemprop|itemscope|itemtype|itemref)$/,i=/^(?:viewbox|preserveaspectratio|version|d|x|y|z|[xy][12]|c[xy]|r[xy]?|f[xyr]|dx|dy|width|height|points|transform|offset|opacity|display|visibility|overflow|focusable|rotate|refx|refy|orient|pathlength|startoffset|lengthadjust|spreadmethod|in2?|result|stddeviation|operator|mode|k[1-4]|values|radius|scale|type|fill(?:-opacity|-rule)?|stroke(?:-width|-opacity|-linecap|-linejoin|-dasharray|-dashoffset|-miterlimit)?|stop-(?:color|opacity)|font-(?:family|size|weight|style)|text-(?:anchor|decoration|rendering)|textlength|clip-(?:path|rule)|clippathunits|marker(?:-start|-mid|-end|width|height|units)|(?:gradient|pattern|mask|filter|primitive|maskcontent|patterncontent)(?:units|transform)|mask|filter|flood-(?:color|opacity)|lighting-color|vector-effect|(?:dominant|alignment)-baseline|baseline-shift|(?:letter|word)-spacing|writing-mode|paint-order|color(?:-interpolation(?:-filters)?)?|shape-rendering|image-rendering|transform-origin)$/,a=/^(viewport|color-scheme|theme-color|referrer|robots|format-detection)$/i;export{e as kept,t as version};//# sourceMappingURL=strict-attributes.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/strict-attributes.ts","../package.json"],"names":["kept","name","tag","svg","attributes","PAGE_METAS","test","String","STRICT_KEPT","SVG_KEPT","includes","HTML_KEPT","version","c","o"],"mappings":"AAmEO,SAASA,EACdC,EACAC,EACAC,EACAC,GAEA,MAAgB,YAATH,EACK,SAARC,QACiB,IAAfE,IACqC,iBAA7BA,EAAW,eACjBC,EAAWC,KAAKC,OAAOH,EAAWH,QACtCO,EAAYF,KAAKL,KAEb,KADDE,EAAMM,EAAWP,EAAIQ,SAAS,KAAO,KAAOC,IAAYL,KAAKL,EAEtE,CC/EE,IAAAW,EAAW,QD+CPJ,EACJ,icAEIG,EACJ,4nBAEIF,EACJ,46BAEIJ,EACJ,iFAsBFQ,UAAAC","sourcesContent":["/* ------------------------------------------------------------------ */\n/* @keploy/capture-sdk - strict's attribute allow-list */\n/* ------------------------------------------------------------------ */\n/*\n * THIS FILE IS A CHUNK OF ITS OWN (dist/strict-attributes.{mjs,js}, the\n * package's \"./strict-attributes\" export). The recorder loads it under\n * `privacyMode: \"strict\"` alone, beside rrweb's import and in parallel\n * with it, and starts no recording until both have loaded\n * (recorder.ts loadRecorder), so no snapshot is ever taken without it; a\n * load that fails ends the capture with\n * KUI_E_STRICT_ATTRIBUTES_UNAVAILABLE and records nothing. balanced and\n * off never load it. It imports nothing but the version it exports (a\n * string the build inlines), and the main builds import it\n * only by that name (dist/index.mjs also by its file beside it, for a page\n * with no bundler): __tests__/bundle-size.test.ts fails when\n * one of its names is in dist/index.mjs, dist/index.bundler.mjs or\n * dist/index.js. Why a chunk: the three lists are about 954 B gzipped\n * of distinct names, and with them in the base bundle every build was\n * over its budget (founder's ruling, 2026-11-13: never slow the page).\n *\n * STRICT RECORDS NO PAGE TEXT (README, Privacy): what a text node holds,\n * rrweb masks; what an attribute holds, privacy.ts blanks unless this\n * file keeps it, by an ALLOW-LIST. A list of the attributes that hold\n * text missed every one it did not name -- Livewire's wire:snapshot,\n * Alpine's x-data, an Astro island's props, a custom element's message\n * -- so strict keeps only the names whose value is the page's\n * structure: an id, a class, a token, a number, an id reference, SVG\n * geometry, ARIA state, a test id, rrweb's own. A URL, CSS, a srcset and\n * a srcdoc go through their own rules (privacy.ts OWN_RULE, the URL\n * rule). Every other value is blanked, a field's value rrweb already\n * masked kept as it is, and a meta's `content` kept only where the meta\n * configures the page. Blank, not asterisks: the flow engine reads an\n * empty aria-label as none, so a strict recording never names an\n * element by a label it cannot have.\n *\n * ARIA under strict: kept, the attributes that describe the widget -- its\n * structure (level, posinset, setsize, row/col counts and indexes), its\n * relationships (id references: controls, describedby, labelledby, owns,\n * details, errormessage, flowto), its configuration (autocomplete,\n * haspopup, multiline, multiselectable, orientation, readonly, required,\n * disabled, modal, live, atomic, busy, relevant) and whether it is open or\n * hidden (expanded, hidden). Blanked, every one that reflects what the\n * visitor chose or entered: value now/min/max/text (a two-thumb slider's\n * min and max are the other thumb's chosen value), checked, selected,\n * pressed, current, sort, invalid (a verdict on what they typed) and\n * activedescendant (the id of the option they are on). And on HTML\n * elements `checked` and `selected` for the same reason (privacy.ts drops\n * them).\n */\nconst STRICT_KEPT =\n /^(?:id|class|role|slot|part|is|hidden|inert|tabindex|dir|lang|translate|draggable|contenteditable|spellcheck|autofocus|data-testid|xmlns(?::\\w+)?|xml:\\w+|aria-(?:atomic|autocomplete|busy|colcount|colindex|colspan|controls|describedby|details|disabled|errormessage|expanded|flowto|haspopup|hidden|labelledby|level|live|modal|multiline|multiselectable|orientation|owns|posinset|readonly|relevant|required|rowcount|rowindex|rowspan|setsize)|rr_\\w+)$/;\n/** Kept on an HTML element (not a custom one, whose attributes are its own): a token, a number, an id reference. */\nconst HTML_KEPT =\n /^(?:name|type|rel|for|form|list|headers|disabled|readonly|required|multiple|open|autocomplete|inputmode|enterkeyhint|accept|charset|http-equiv|media|sizes|loading|decoding|fetchpriority|crossorigin|referrerpolicy|sandbox|allow|allowfullscreen|target|method|enctype|novalidate|async|defer|nomodule|as|start|reversed|scope|span|colspan|rowspan|cols|rows|size|maxlength|minlength|step|low|high|optimum|width|height|wrap|kind|srclang|default|controls|autoplay|loop|muted|playsinline|preload|shape|coords|usemap|ismap|popover|popovertarget|popovertargetaction|align|valign|border|frameborder|property|itemprop|itemscope|itemtype|itemref)$/;\n/** Kept on an SVG element only: its geometry and paint, by exact name. */\nconst SVG_KEPT =\n /^(?:viewbox|preserveaspectratio|version|d|x|y|z|[xy][12]|c[xy]|r[xy]?|f[xyr]|dx|dy|width|height|points|transform|offset|opacity|display|visibility|overflow|focusable|rotate|refx|refy|orient|pathlength|startoffset|lengthadjust|spreadmethod|in2?|result|stddeviation|operator|mode|k[1-4]|values|radius|scale|type|fill(?:-opacity|-rule)?|stroke(?:-width|-opacity|-linecap|-linejoin|-dasharray|-dashoffset|-miterlimit)?|stop-(?:color|opacity)|font-(?:family|size|weight|style)|text-(?:anchor|decoration|rendering)|textlength|clip-(?:path|rule)|clippathunits|marker(?:-start|-mid|-end|width|height|units)|(?:gradient|pattern|mask|filter|primitive|maskcontent|patterncontent)(?:units|transform)|mask|filter|flood-(?:color|opacity)|lighting-color|vector-effect|(?:dominant|alignment)-baseline|baseline-shift|(?:letter|word)-spacing|writing-mode|paint-order|color(?:-interpolation(?:-filters)?)?|shape-rendering|image-rendering|transform-origin)$/;\n/** A meta whose `content` configures the page, not one that describes it. */\nconst PAGE_METAS =\n /^(viewport|color-scheme|theme-color|referrer|robots|format-detection)$/i;\n\n/**\n * Whether strict keeps attribute `name`'s value on a `tag` element (an SVG\n * one when `svg`), by name alone; a meta's `content` by the meta's own\n * `attributes`. privacy.ts asks this for every attribute but those with\n * their own rule, and blanks what it answers false for.\n */\nexport function kept(\n name: string,\n tag: string,\n svg: boolean,\n attributes?: Record<string, unknown>,\n): boolean {\n return name === \"content\"\n ? tag === \"meta\" &&\n attributes !== undefined &&\n (typeof attributes[\"http-equiv\"] === \"string\" ||\n PAGE_METAS.test(String(attributes.name)))\n : STRICT_KEPT.test(name) ||\n (svg ? SVG_KEPT : tag.includes(\"-\") ? null : HTML_KEPT)?.test(name) ===\n true;\n}\n\n/** The version this chunk was built as: the SDK refuses one of another (module-of.ts ownChunk). */\nexport { version } from \"../package.json\";\n","{\n \"name\": \"@keploy/capture-sdk\",\n \"version\": \"3.
|
|
1
|
+
{"version":3,"sources":["../src/strict-attributes.ts","../package.json"],"names":["kept","name","tag","svg","attributes","PAGE_METAS","test","String","STRICT_KEPT","SVG_KEPT","includes","HTML_KEPT","version","c","o"],"mappings":"AAmEO,SAASA,EACdC,EACAC,EACAC,EACAC,GAEA,MAAgB,YAATH,EACK,SAARC,QACiB,IAAfE,IACqC,iBAA7BA,EAAW,eACjBC,EAAWC,KAAKC,OAAOH,EAAWH,QACtCO,EAAYF,KAAKL,KAEb,KADDE,EAAMM,EAAWP,EAAIQ,SAAS,KAAO,KAAOC,IAAYL,KAAKL,EAEtE,CC/EE,IAAAW,EAAW,QD+CPJ,EACJ,icAEIG,EACJ,4nBAEIF,EACJ,46BAEIJ,EACJ,iFAsBFQ,UAAAC","sourcesContent":["/* ------------------------------------------------------------------ */\n/* @keploy/capture-sdk - strict's attribute allow-list */\n/* ------------------------------------------------------------------ */\n/*\n * THIS FILE IS A CHUNK OF ITS OWN (dist/strict-attributes.{mjs,js}, the\n * package's \"./strict-attributes\" export). The recorder loads it under\n * `privacyMode: \"strict\"` alone, beside rrweb's import and in parallel\n * with it, and starts no recording until both have loaded\n * (recorder.ts loadRecorder), so no snapshot is ever taken without it; a\n * load that fails ends the capture with\n * KUI_E_STRICT_ATTRIBUTES_UNAVAILABLE and records nothing. balanced and\n * off never load it. It imports nothing but the version it exports (a\n * string the build inlines), and the main builds import it\n * only by that name (dist/index.mjs also by its file beside it, for a page\n * with no bundler): __tests__/bundle-size.test.ts fails when\n * one of its names is in dist/index.mjs, dist/index.bundler.mjs or\n * dist/index.js. Why a chunk: the three lists are about 954 B gzipped\n * of distinct names, and with them in the base bundle every build was\n * over its budget (founder's ruling, 2026-11-13: never slow the page).\n *\n * STRICT RECORDS NO PAGE TEXT (README, Privacy): what a text node holds,\n * rrweb masks; what an attribute holds, privacy.ts blanks unless this\n * file keeps it, by an ALLOW-LIST. A list of the attributes that hold\n * text missed every one it did not name -- Livewire's wire:snapshot,\n * Alpine's x-data, an Astro island's props, a custom element's message\n * -- so strict keeps only the names whose value is the page's\n * structure: an id, a class, a token, a number, an id reference, SVG\n * geometry, ARIA state, a test id, rrweb's own. A URL, CSS, a srcset and\n * a srcdoc go through their own rules (privacy.ts OWN_RULE, the URL\n * rule). Every other value is blanked, a field's value rrweb already\n * masked kept as it is, and a meta's `content` kept only where the meta\n * configures the page. Blank, not asterisks: the flow engine reads an\n * empty aria-label as none, so a strict recording never names an\n * element by a label it cannot have.\n *\n * ARIA under strict: kept, the attributes that describe the widget -- its\n * structure (level, posinset, setsize, row/col counts and indexes), its\n * relationships (id references: controls, describedby, labelledby, owns,\n * details, errormessage, flowto), its configuration (autocomplete,\n * haspopup, multiline, multiselectable, orientation, readonly, required,\n * disabled, modal, live, atomic, busy, relevant) and whether it is open or\n * hidden (expanded, hidden). Blanked, every one that reflects what the\n * visitor chose or entered: value now/min/max/text (a two-thumb slider's\n * min and max are the other thumb's chosen value), checked, selected,\n * pressed, current, sort, invalid (a verdict on what they typed) and\n * activedescendant (the id of the option they are on). And on HTML\n * elements `checked` and `selected` for the same reason (privacy.ts drops\n * them).\n */\nconst STRICT_KEPT =\n /^(?:id|class|role|slot|part|is|hidden|inert|tabindex|dir|lang|translate|draggable|contenteditable|spellcheck|autofocus|data-testid|xmlns(?::\\w+)?|xml:\\w+|aria-(?:atomic|autocomplete|busy|colcount|colindex|colspan|controls|describedby|details|disabled|errormessage|expanded|flowto|haspopup|hidden|labelledby|level|live|modal|multiline|multiselectable|orientation|owns|posinset|readonly|relevant|required|rowcount|rowindex|rowspan|setsize)|rr_\\w+)$/;\n/** Kept on an HTML element (not a custom one, whose attributes are its own): a token, a number, an id reference. */\nconst HTML_KEPT =\n /^(?:name|type|rel|for|form|list|headers|disabled|readonly|required|multiple|open|autocomplete|inputmode|enterkeyhint|accept|charset|http-equiv|media|sizes|loading|decoding|fetchpriority|crossorigin|referrerpolicy|sandbox|allow|allowfullscreen|target|method|enctype|novalidate|async|defer|nomodule|as|start|reversed|scope|span|colspan|rowspan|cols|rows|size|maxlength|minlength|step|low|high|optimum|width|height|wrap|kind|srclang|default|controls|autoplay|loop|muted|playsinline|preload|shape|coords|usemap|ismap|popover|popovertarget|popovertargetaction|align|valign|border|frameborder|property|itemprop|itemscope|itemtype|itemref)$/;\n/** Kept on an SVG element only: its geometry and paint, by exact name. */\nconst SVG_KEPT =\n /^(?:viewbox|preserveaspectratio|version|d|x|y|z|[xy][12]|c[xy]|r[xy]?|f[xyr]|dx|dy|width|height|points|transform|offset|opacity|display|visibility|overflow|focusable|rotate|refx|refy|orient|pathlength|startoffset|lengthadjust|spreadmethod|in2?|result|stddeviation|operator|mode|k[1-4]|values|radius|scale|type|fill(?:-opacity|-rule)?|stroke(?:-width|-opacity|-linecap|-linejoin|-dasharray|-dashoffset|-miterlimit)?|stop-(?:color|opacity)|font-(?:family|size|weight|style)|text-(?:anchor|decoration|rendering)|textlength|clip-(?:path|rule)|clippathunits|marker(?:-start|-mid|-end|width|height|units)|(?:gradient|pattern|mask|filter|primitive|maskcontent|patterncontent)(?:units|transform)|mask|filter|flood-(?:color|opacity)|lighting-color|vector-effect|(?:dominant|alignment)-baseline|baseline-shift|(?:letter|word)-spacing|writing-mode|paint-order|color(?:-interpolation(?:-filters)?)?|shape-rendering|image-rendering|transform-origin)$/;\n/** A meta whose `content` configures the page, not one that describes it. */\nconst PAGE_METAS =\n /^(viewport|color-scheme|theme-color|referrer|robots|format-detection)$/i;\n\n/**\n * Whether strict keeps attribute `name`'s value on a `tag` element (an SVG\n * one when `svg`), by name alone; a meta's `content` by the meta's own\n * `attributes`. privacy.ts asks this for every attribute but those with\n * their own rule, and blanks what it answers false for.\n */\nexport function kept(\n name: string,\n tag: string,\n svg: boolean,\n attributes?: Record<string, unknown>,\n): boolean {\n return name === \"content\"\n ? tag === \"meta\" &&\n attributes !== undefined &&\n (typeof attributes[\"http-equiv\"] === \"string\" ||\n PAGE_METAS.test(String(attributes.name)))\n : STRICT_KEPT.test(name) ||\n (svg ? SVG_KEPT : tag.includes(\"-\") ? null : HTML_KEPT)?.test(name) ===\n true;\n}\n\n/** The version this chunk was built as: the SDK refuses one of another (module-of.ts ownChunk). */\nexport { version } from \"../package.json\";\n","{\n \"name\": \"@keploy/capture-sdk\",\n \"version\": \"3.3.1\",\n \"description\": \"Lightweight SDK to capture UI flows from real users - DOM recording, network interception, PII masking\",\n \"homepage\": \"https://keploy.io/docs/running-keploy/ui-capture/\",\n \"main\": \"dist/index.js\",\n \"module\": \"dist/index.bundler.mjs\",\n \"unpkg\": \"dist/index.mjs\",\n \"jsdelivr\": \"dist/index.mjs\",\n \"types\": \"dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.mjs\",\n \"require\": \"./dist/index.js\"\n },\n \"./request-term\": {\n \"types\": \"./dist/request-term.d.ts\",\n \"import\": \"./dist/request-term.mjs\",\n \"require\": \"./dist/request-term.js\"\n },\n \"./strict-attributes\": {\n \"types\": \"./dist/strict-attributes.d.ts\",\n \"import\": \"./dist/strict-attributes.mjs\",\n \"require\": \"./dist/strict-attributes.js\"\n },\n \"./body-redact\": {\n \"types\": \"./dist/body-redact.d.ts\",\n \"import\": \"./dist/body-redact.mjs\",\n \"require\": \"./dist/body-redact.js\"\n },\n \"./body-worker-start\": {\n \"types\": \"./dist/body-worker-start.d.ts\",\n \"import\": \"./dist/body-worker-start.mjs\",\n \"require\": \"./dist/body-worker-start.js\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"files\": [\n \"dist\",\n \"request-term/package.json\",\n \"strict-attributes/package.json\",\n \"body-redact/package.json\",\n \"body-worker-start/package.json\",\n \"LICENSE\",\n \"README.md\"\n ],\n \"scripts\": {\n \"build\": \"node scripts/build-main.mjs && node scripts/build-worker.mjs && tsc -p tsconfig.build.json\",\n \"dev\": \"node scripts/build-main.mjs --watch\",\n \"test\": \"vitest run\",\n \"clean\": \"rm -rf dist\",\n \"typecheck\": \"tsc --noEmit\",\n \"prepublishOnly\": \"pnpm run clean && turbo run build --filter=@keploy/capture-sdk --force && node ../../tools/check-release-size.mjs\"\n },\n \"dependencies\": {\n \"rrweb\": \"^2.2.2\"\n },\n \"devDependencies\": {\n \"@keploy/contract\": \"workspace:*\",\n \"@types/node\": \"~24.13.5\",\n \"jsdom\": \"^30.1.0\",\n \"terser\": \"5.51.2\",\n \"tsup\": \"^8.3.0\",\n \"typescript\": \"^7.0.2\",\n \"vitest\": \"^5.0.1\"\n },\n \"peerDependencies\": {},\n \"keywords\": [\n \"keploy\",\n \"ui-testing\",\n \"session-recording\",\n \"e2e\",\n \"capture\"\n ],\n \"browser\": {\n \"./dist/body-worker-unbundled.mjs\": \"./dist/body-worker-none.mjs\"\n },\n \"alias\": {\n \"@keploy/capture-sdk/body-worker-start\": \"./dist/body-worker-start.mjs\"\n },\n \"license\": \"Apache-2.0\",\n \"publishConfig\": {\n \"access\": \"public\"\n }\n}\n"]}
|
package/dist/transport.d.ts
CHANGED
|
@@ -159,7 +159,7 @@ export interface TransportConfig {
|
|
|
159
159
|
onFailing?: (failing: boolean) => void;
|
|
160
160
|
}
|
|
161
161
|
export declare class Transport {
|
|
162
|
-
private
|
|
162
|
+
private txCfg;
|
|
163
163
|
private queue;
|
|
164
164
|
/**
|
|
165
165
|
* Flights that failed to send and must go out again AS THEY WERE.
|
|
@@ -175,7 +175,7 @@ export declare class Transport {
|
|
|
175
175
|
private flushTimer;
|
|
176
176
|
/** The flush in progress, or null. One at a time: batches stay ordered. */
|
|
177
177
|
private current;
|
|
178
|
-
private
|
|
178
|
+
private txSessId;
|
|
179
179
|
private sessionMeta;
|
|
180
180
|
private capIdentity;
|
|
181
181
|
/**
|
|
@@ -192,8 +192,8 @@ export declare class Transport {
|
|
|
192
192
|
* read. The `online` event is when to send at once; the timed flush
|
|
193
193
|
* finds the network back when no event said so.
|
|
194
194
|
*/
|
|
195
|
-
private get
|
|
196
|
-
private
|
|
195
|
+
private get txOnline();
|
|
196
|
+
private txStarted;
|
|
197
197
|
/** The stamp the next queued event gets; see enqueue(). */
|
|
198
198
|
private nextSeq;
|
|
199
199
|
/** Set by a drain request that arrived while a flush was running. */
|
|
@@ -204,7 +204,7 @@ export declare class Transport {
|
|
|
204
204
|
* Full batches enqueue() asked for while a flight was out, which the run
|
|
205
205
|
* under way owes: one batch each, sent as its flight settles (run()).
|
|
206
206
|
*/
|
|
207
|
-
private
|
|
207
|
+
private txAsked;
|
|
208
208
|
/**
|
|
209
209
|
* A DRAIN IS OWED: an event over the keepalive quota was queued while
|
|
210
210
|
* the browser said it was offline. The next thing that sends -- the
|
|
@@ -237,20 +237,20 @@ export declare class Transport {
|
|
|
237
237
|
*/
|
|
238
238
|
private readonly jsonOf;
|
|
239
239
|
/** The batch run() is working on, so the unload flush can take it back. */
|
|
240
|
-
private
|
|
240
|
+
private txInFlight;
|
|
241
241
|
/**
|
|
242
242
|
* At least the bytes held unsent (MAX_QUEUE_BYTES): set to the exact
|
|
243
243
|
* sum by fit(), raised by everything that adds to the queue or the retry
|
|
244
244
|
* queue, and never lowered by what leaves them, so it can only be over.
|
|
245
245
|
* fit() counts again only when it is over the cap.
|
|
246
246
|
*/
|
|
247
|
-
private
|
|
247
|
+
private txHeld;
|
|
248
248
|
/**
|
|
249
249
|
* The JSON bytes of what `queue` holds, kept exactly at every change of
|
|
250
250
|
* it (each event's size is measured once, at enqueue): what the unload
|
|
251
251
|
* flush would have to carry. O(1) an event; never a walk of the queue.
|
|
252
252
|
*/
|
|
253
|
-
private
|
|
253
|
+
private txQueued;
|
|
254
254
|
/**
|
|
255
255
|
* The next flight is the counter's: the queue went past the share, and
|
|
256
256
|
* no drain was asked. It is capped at the share (formFlight).
|
|
@@ -261,7 +261,7 @@ export declare class Transport {
|
|
|
261
261
|
/** performance.now() before which no flight starts on the timer's or an enqueue's say; see OUTAGE_FIRST_MS. */
|
|
262
262
|
private notBefore;
|
|
263
263
|
constructor(config: TransportConfig);
|
|
264
|
-
private
|
|
264
|
+
private txFail;
|
|
265
265
|
start(sessionId: string, metadata: SessionMetadata, captureIdentity?: CaptureIdentity | null): void;
|
|
266
266
|
/**
|
|
267
267
|
* HELD: nothing is sent until release(). The capture holds its transport
|
|
@@ -333,7 +333,7 @@ export declare class Transport {
|
|
|
333
333
|
* snapshot held was resolved to `body` (found in review #23). A
|
|
334
334
|
* FullSnapshot is never dropped ahead of its incrementals.
|
|
335
335
|
*/
|
|
336
|
-
private
|
|
336
|
+
private txDropped;
|
|
337
337
|
private reportUnserialisable;
|
|
338
338
|
private reportOversized;
|
|
339
339
|
/**
|
|
@@ -374,7 +374,7 @@ export declare class Transport {
|
|
|
374
374
|
* running flush, drain included, has settled.
|
|
375
375
|
*/
|
|
376
376
|
flush(drain?: boolean): Promise<void>;
|
|
377
|
-
private
|
|
377
|
+
private txRun;
|
|
378
378
|
/**
|
|
379
379
|
* The wait before the next attempt, ENDED BY `online`: the network
|
|
380
380
|
* being back is what the wait was for, and a sender that slept on
|
|
@@ -443,7 +443,7 @@ export declare class Transport {
|
|
|
443
443
|
* event with no JSON kept (one a flight carried, taken back at
|
|
444
444
|
* pagehide) is written now.
|
|
445
445
|
*/
|
|
446
|
-
private
|
|
446
|
+
private txBody;
|
|
447
447
|
/** The event's JSON bytes: what enqueue() measured, or measured now for one a flight carried and pagehide took back. */
|
|
448
448
|
private eventBytes;
|
|
449
449
|
private mintBatchId;
|
package/dist/types.d.ts
CHANGED
|
@@ -343,6 +343,11 @@ export interface NetworkEvent {
|
|
|
343
343
|
* (KUI_E_REQUEST_TERM_FAILED) (spec/canonical-key.v2.json rules.record).
|
|
344
344
|
*/
|
|
345
345
|
requestTerm?: string;
|
|
346
|
+
/**
|
|
347
|
+
* True when re-emitted from tab-opening pre-interaction boot reads into a
|
|
348
|
+
* rotated continuous session: served if requested at replay, never required.
|
|
349
|
+
*/
|
|
350
|
+
optional?: boolean;
|
|
346
351
|
}
|
|
347
352
|
export interface SessionMetadata {
|
|
348
353
|
url: string;
|
|
@@ -524,4 +529,6 @@ export type EventCallback = (event: SessionEvent) => void;
|
|
|
524
529
|
*/
|
|
525
530
|
export type NetworkEventCallback = (event: NetworkEvent, at?: number,
|
|
526
531
|
/** The event's place in the recording, when the interceptor was given a way to take one (NetworkInterceptor.start). */
|
|
527
|
-
seq?: number
|
|
532
|
+
seq?: number,
|
|
533
|
+
/** Monotonic performance.now() timestamp when the exchange started. */
|
|
534
|
+
asked?: number) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keploy/capture-sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"description": "Lightweight SDK to capture UI flows from real users - DOM recording, network interception, PII masking",
|
|
5
5
|
"homepage": "https://keploy.io/docs/running-keploy/ui-capture/",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"README.md"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"rrweb": "^2.
|
|
49
|
+
"rrweb": "^2.2.2"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@keploy/contract": "0.1.0",
|