@debugbundle/cli 1.15.0 → 1.16.0
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/dist/main.cjs +138 -15
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -74592,6 +74592,136 @@ var CaptureRulesFileSchema = external_exports.object({
|
|
|
74592
74592
|
rules: external_exports.array(CaptureRuleSchema)
|
|
74593
74593
|
});
|
|
74594
74594
|
|
|
74595
|
+
// ../../packages/shared-types/src/browser-resource-providers.ts
|
|
74596
|
+
var PROVIDERS = [
|
|
74597
|
+
{
|
|
74598
|
+
name: "Google Tag Manager",
|
|
74599
|
+
role: "tag_manager",
|
|
74600
|
+
hosts: ["www.googletagmanager.com"],
|
|
74601
|
+
paths: ["/gtm.js"]
|
|
74602
|
+
},
|
|
74603
|
+
{
|
|
74604
|
+
name: "Google tag (Analytics / Ads)",
|
|
74605
|
+
role: "analytics",
|
|
74606
|
+
hosts: ["www.googletagmanager.com"],
|
|
74607
|
+
paths: ["/gtag/js"]
|
|
74608
|
+
},
|
|
74609
|
+
{
|
|
74610
|
+
name: "Google Analytics",
|
|
74611
|
+
role: "analytics",
|
|
74612
|
+
hosts: ["www.google-analytics.com", "ssl.google-analytics.com"],
|
|
74613
|
+
paths: ["/analytics.js", "/ga.js"]
|
|
74614
|
+
},
|
|
74615
|
+
{
|
|
74616
|
+
name: "Meta Pixel",
|
|
74617
|
+
role: "advertising",
|
|
74618
|
+
hosts: ["connect.facebook.net"],
|
|
74619
|
+
paths: [/^\/[a-z]{2}_[A-Z]{2}\/fbevents\.js$/]
|
|
74620
|
+
},
|
|
74621
|
+
{
|
|
74622
|
+
name: "Microsoft Clarity",
|
|
74623
|
+
role: "analytics",
|
|
74624
|
+
hosts: ["www.clarity.ms"],
|
|
74625
|
+
paths: [/^\/tag\/[A-Za-z0-9]+$/]
|
|
74626
|
+
},
|
|
74627
|
+
{
|
|
74628
|
+
name: "Hotjar",
|
|
74629
|
+
role: "analytics",
|
|
74630
|
+
hosts: ["static.hotjar.com"],
|
|
74631
|
+
paths: [/^\/c\/hotjar-[0-9]+\.js$/]
|
|
74632
|
+
},
|
|
74633
|
+
{
|
|
74634
|
+
name: "Cloudflare Web Analytics",
|
|
74635
|
+
role: "analytics",
|
|
74636
|
+
hosts: ["static.cloudflareinsights.com"],
|
|
74637
|
+
paths: ["/beacon.min.js"]
|
|
74638
|
+
},
|
|
74639
|
+
{
|
|
74640
|
+
name: "Yandex Metrica",
|
|
74641
|
+
role: "analytics",
|
|
74642
|
+
hosts: ["mc.yandex.ru", "mc.yandex.com"],
|
|
74643
|
+
paths: ["/metrika/tag.js"]
|
|
74644
|
+
},
|
|
74645
|
+
{
|
|
74646
|
+
name: "WordPress.com / Jetpack Stats",
|
|
74647
|
+
role: "analytics",
|
|
74648
|
+
hosts: ["stats.wp.com"],
|
|
74649
|
+
paths: [/^\/e-[0-9]{6}\.js$/]
|
|
74650
|
+
},
|
|
74651
|
+
{
|
|
74652
|
+
name: "Microsoft Advertising UET",
|
|
74653
|
+
role: "advertising",
|
|
74654
|
+
hosts: ["bat.bing.com"],
|
|
74655
|
+
paths: ["/bat.js"]
|
|
74656
|
+
},
|
|
74657
|
+
{
|
|
74658
|
+
name: "LinkedIn Insight",
|
|
74659
|
+
role: "advertising",
|
|
74660
|
+
hosts: ["snap.licdn.com"],
|
|
74661
|
+
paths: ["/li.lms-analytics/insight.min.js"]
|
|
74662
|
+
},
|
|
74663
|
+
{
|
|
74664
|
+
name: "TikTok Pixel",
|
|
74665
|
+
role: "advertising",
|
|
74666
|
+
hosts: ["analytics.tiktok.com"],
|
|
74667
|
+
paths: ["/i18n/pixel/events.js"]
|
|
74668
|
+
},
|
|
74669
|
+
{ name: "Pinterest Tag", role: "advertising", hosts: ["s.pinimg.com"], paths: ["/ct/core.js"] },
|
|
74670
|
+
{
|
|
74671
|
+
name: "X Pixel",
|
|
74672
|
+
role: "advertising",
|
|
74673
|
+
hosts: ["static.ads-twitter.com", "platform.twitter.com"],
|
|
74674
|
+
paths: ["/uwt.js", "/oct.js"]
|
|
74675
|
+
},
|
|
74676
|
+
{
|
|
74677
|
+
name: "Segment",
|
|
74678
|
+
role: "analytics",
|
|
74679
|
+
hosts: ["cdn.segment.com"],
|
|
74680
|
+
paths: [/^\/analytics\.js\/v1\/[A-Za-z0-9_-]+\/analytics\.min\.js$/]
|
|
74681
|
+
},
|
|
74682
|
+
{
|
|
74683
|
+
name: "Mixpanel",
|
|
74684
|
+
role: "analytics",
|
|
74685
|
+
hosts: ["cdn.mxpnl.com"],
|
|
74686
|
+
paths: ["/libs/mixpanel-2-latest.min.js", "/libs/mixpanel-js/dist/mixpanel.module.js"]
|
|
74687
|
+
},
|
|
74688
|
+
{
|
|
74689
|
+
name: "Amplitude",
|
|
74690
|
+
role: "analytics",
|
|
74691
|
+
hosts: ["cdn.amplitude.com"],
|
|
74692
|
+
paths: [
|
|
74693
|
+
/^\/libs\/analytics-browser-[0-9]+\.[0-9]+\.[0-9]+-min\.js(?:\.gz)?$/,
|
|
74694
|
+
/^\/script\/[A-Za-z0-9_-]+\.js$/
|
|
74695
|
+
]
|
|
74696
|
+
},
|
|
74697
|
+
{
|
|
74698
|
+
name: "PostHog",
|
|
74699
|
+
role: "analytics",
|
|
74700
|
+
hosts: ["us-assets.i.posthog.com", "eu-assets.i.posthog.com", "app.posthog.com"],
|
|
74701
|
+
paths: ["/static/array.js"]
|
|
74702
|
+
},
|
|
74703
|
+
{
|
|
74704
|
+
name: "Plausible",
|
|
74705
|
+
role: "analytics",
|
|
74706
|
+
hosts: ["plausible.io"],
|
|
74707
|
+
paths: [/^\/js\/pa-[A-Za-z0-9_-]+\.js$/, /^\/js\/script(?:\.[a-z-]+)*\.js$/]
|
|
74708
|
+
},
|
|
74709
|
+
{
|
|
74710
|
+
name: "Google sign-in",
|
|
74711
|
+
role: "authentication",
|
|
74712
|
+
hosts: ["accounts.google.com"],
|
|
74713
|
+
paths: ["/gsi/client"]
|
|
74714
|
+
}
|
|
74715
|
+
];
|
|
74716
|
+
function identifyBrowserResourceProvider(host, path) {
|
|
74717
|
+
if (host === null) return null;
|
|
74718
|
+
return PROVIDERS.find(
|
|
74719
|
+
(provider) => provider.hosts.includes(host) && provider.paths.some(
|
|
74720
|
+
(pattern) => typeof pattern === "string" ? path === pattern : pattern.test(path)
|
|
74721
|
+
)
|
|
74722
|
+
) ?? null;
|
|
74723
|
+
}
|
|
74724
|
+
|
|
74595
74725
|
// ../../packages/shared-types/src/browser-resource.ts
|
|
74596
74726
|
function record(value) {
|
|
74597
74727
|
return value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
@@ -74650,18 +74780,10 @@ function describeBrowserResource(value) {
|
|
|
74650
74780
|
let role = location.first_party === true ? "application_asset" : "unknown";
|
|
74651
74781
|
let provider = null;
|
|
74652
74782
|
if (type === "script") {
|
|
74653
|
-
|
|
74654
|
-
|
|
74655
|
-
|
|
74656
|
-
|
|
74657
|
-
provider = "Meta Pixel";
|
|
74658
|
-
role = "advertising";
|
|
74659
|
-
} else if (location.host === "www.clarity.ms" && /^\/tag\/[A-Za-z0-9]+$/.test(location.path)) {
|
|
74660
|
-
provider = "Microsoft Clarity";
|
|
74661
|
-
role = "analytics";
|
|
74662
|
-
} else if (location.host === "accounts.google.com" && location.path === "/gsi/client") {
|
|
74663
|
-
provider = "Google sign-in";
|
|
74664
|
-
role = "authentication";
|
|
74783
|
+
const recognized = identifyBrowserResourceProvider(location.host, location.path);
|
|
74784
|
+
if (recognized !== null) {
|
|
74785
|
+
provider = recognized.name;
|
|
74786
|
+
role = recognized.role;
|
|
74665
74787
|
}
|
|
74666
74788
|
}
|
|
74667
74789
|
const file = location.path.split("/").filter(Boolean).at(-1) ?? location.path;
|
|
@@ -74685,7 +74807,8 @@ function describeBrowserResourceInterruption(value) {
|
|
|
74685
74807
|
const readyState = page?.["ready_state"];
|
|
74686
74808
|
const tag2 = typeof target?.["tag_name"] === "string" ? target["tag_name"].toLowerCase() : null;
|
|
74687
74809
|
const rel = typeof attributes?.["rel"] === "string" ? attributes["rel"].trim().toLowerCase() : null;
|
|
74688
|
-
if (visibility !== "hidden" && visibility !== "prerender" && visibility !== "unloaded" || readyState !== "loading" && readyState !== "interactive" || tag2 !== "link" || rel !== "preload" && rel !== "modulepreload" && rel !== "prefetch")
|
|
74810
|
+
if (visibility !== "hidden" && visibility !== "prerender" && visibility !== "unloaded" || readyState !== "loading" && readyState !== "interactive" || tag2 !== "link" || rel !== "preload" && rel !== "modulepreload" && rel !== "prefetch")
|
|
74811
|
+
return null;
|
|
74689
74812
|
return {
|
|
74690
74813
|
visibility_state: visibility,
|
|
74691
74814
|
ready_state: readyState,
|
|
@@ -76275,7 +76398,7 @@ function buildSkill() {
|
|
|
76275
76398
|
"",
|
|
76276
76399
|
"- Inspect the primary failure and routes: one resource can span pages, route coverage may be incomplete, and historical incidents stay separate. Related tracker evidence does not explain an application exception.",
|
|
76277
76400
|
'- If the cause is unknown, say "possibly blocked by privacy tools." Network/CSP/provider failures remain possible; provider recognition proves neither Pi-hole blocking nor optionality.',
|
|
76278
|
-
"- Review exact host/path, service, environment and
|
|
76401
|
+
"- Review exact resource host/path/type, service, environment and opacity, or the returned exact fingerprint when evidence is incomplete; never widen to a whole host. All resource incidents can offer explicit controls. Provider recognition does not establish that a dependency is optional; do not suppress authentication, app assets or unknown dependencies automatically.",
|
|
76279
76402
|
"- For confirmed optional dependencies, context (demote) retains diagnostics without new incidents/alerts/automation and may remain billable. Drop discards future matches; choose it only when evidence has no diagnostic value. Explain the tradeoff; neither deletes history. Use the returned suggestion ID.",
|
|
76280
76403
|
"- Check existing/disabled rules. Empty suggestions or pending/failed bundles do not justify broader rules. Applying requires user authorization and owner/admin access; preview is read-only. Verify subsequent matching and protected captures before claiming improvement; live tests need authorization.",
|
|
76281
76404
|
"- The official OpenAI connection cannot suggest or apply rules. When it is the only connection, review returned evidence and hand off through a returned safe dashboard URL; never invent tools or switch credentials.",
|
|
@@ -127208,7 +127331,7 @@ async function handleCaptureRuleCommand2(parsedArgv, dependencies) {
|
|
|
127208
127331
|
// package.json
|
|
127209
127332
|
var package_default = {
|
|
127210
127333
|
name: "@debugbundle/cli",
|
|
127211
|
-
version: "1.
|
|
127334
|
+
version: "1.16.0",
|
|
127212
127335
|
private: false,
|
|
127213
127336
|
description: "Command-line interface for DebugBundle",
|
|
127214
127337
|
license: "Apache-2.0",
|