@debugbundle/cli 1.3.0 → 1.4.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 +365 -6
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -16830,6 +16830,9 @@ function createRetrievalApi(client) {
|
|
|
16830
16830
|
if (input2.severity !== void 0) {
|
|
16831
16831
|
query.set("severity", input2.severity);
|
|
16832
16832
|
}
|
|
16833
|
+
if (input2.firstSeenAfter !== void 0) {
|
|
16834
|
+
query.set("first_seen_after", input2.firstSeenAfter);
|
|
16835
|
+
}
|
|
16833
16836
|
if (input2.cursor !== void 0) {
|
|
16834
16837
|
query.set("cursor", input2.cursor);
|
|
16835
16838
|
}
|
|
@@ -17086,6 +17089,88 @@ function createRetrievalApi(client) {
|
|
|
17086
17089
|
};
|
|
17087
17090
|
}
|
|
17088
17091
|
|
|
17092
|
+
// ../../packages/storage/src/account-analytics-store.ts
|
|
17093
|
+
var ACCOUNT_METRIC_KEYS = [
|
|
17094
|
+
"account_created",
|
|
17095
|
+
"account_deleted",
|
|
17096
|
+
"project_created",
|
|
17097
|
+
"project_deleted",
|
|
17098
|
+
"raw_events_accepted",
|
|
17099
|
+
"raw_events_rejected",
|
|
17100
|
+
"events_rejected_malformed",
|
|
17101
|
+
"events_rejected_rate_limited",
|
|
17102
|
+
"events_rejected_quota",
|
|
17103
|
+
"events_rejected_capture_policy",
|
|
17104
|
+
"events_rejected_capture_rule",
|
|
17105
|
+
"billable_events_counted",
|
|
17106
|
+
"incident_signal_events_counted",
|
|
17107
|
+
"context_signal_events_counted",
|
|
17108
|
+
"operational_signal_events_counted",
|
|
17109
|
+
"local_verification_events_accepted",
|
|
17110
|
+
"cloud_verification_events_accepted",
|
|
17111
|
+
"incidents_opened",
|
|
17112
|
+
"incidents_resolved",
|
|
17113
|
+
"incidents_reopened",
|
|
17114
|
+
"incidents_regressed",
|
|
17115
|
+
"incident_occurrences",
|
|
17116
|
+
"incident_occurrences_high_severity",
|
|
17117
|
+
"incident_occurrences_critical_severity",
|
|
17118
|
+
"incidents_auto_detected_spiking",
|
|
17119
|
+
"failure_bundles_created",
|
|
17120
|
+
"failure_bundles_updated",
|
|
17121
|
+
"failure_bundle_generations_failed",
|
|
17122
|
+
"improvement_bundles_created",
|
|
17123
|
+
"improvement_bundles_updated",
|
|
17124
|
+
"improvement_bundle_generations_failed",
|
|
17125
|
+
"reproductions_created",
|
|
17126
|
+
"reproductions_failed",
|
|
17127
|
+
"retention_bundle_owners_rotated",
|
|
17128
|
+
"improvements_opened",
|
|
17129
|
+
"improvements_resolved",
|
|
17130
|
+
"improvements_reopened",
|
|
17131
|
+
"improvements_snoozed",
|
|
17132
|
+
"recurring_incident_improvements_opened",
|
|
17133
|
+
"post_deploy_regression_improvements_opened",
|
|
17134
|
+
"slow_request_improvements_opened",
|
|
17135
|
+
"request_failure_improvements_opened",
|
|
17136
|
+
"warning_log_improvements_opened",
|
|
17137
|
+
"alert_deliveries_created",
|
|
17138
|
+
"alert_deliveries_delivered",
|
|
17139
|
+
"alert_deliveries_failed",
|
|
17140
|
+
"alert_email_digests_sent",
|
|
17141
|
+
"operational_emails_sent",
|
|
17142
|
+
"weekly_reports_sent",
|
|
17143
|
+
"weekly_reports_failed",
|
|
17144
|
+
"webhook_deliveries_created",
|
|
17145
|
+
"webhook_deliveries_delivered",
|
|
17146
|
+
"webhook_deliveries_failed",
|
|
17147
|
+
"webhooks_auto_disabled",
|
|
17148
|
+
"github_dispatches_created",
|
|
17149
|
+
"github_dispatches_delivered",
|
|
17150
|
+
"github_dispatches_failed",
|
|
17151
|
+
"github_dispatch_rules_created",
|
|
17152
|
+
"github_dispatch_rules_deleted",
|
|
17153
|
+
"remote_probe_activations_created",
|
|
17154
|
+
"remote_probe_activations_expired",
|
|
17155
|
+
"probe_events_accepted",
|
|
17156
|
+
"capture_rules_created",
|
|
17157
|
+
"capture_rules_deleted",
|
|
17158
|
+
"capture_policy_updates",
|
|
17159
|
+
"trial_started",
|
|
17160
|
+
"trial_converted",
|
|
17161
|
+
"trial_expired",
|
|
17162
|
+
"plan_upgraded",
|
|
17163
|
+
"plan_downgraded",
|
|
17164
|
+
"capacity_units_purchased",
|
|
17165
|
+
"capacity_units_reduced",
|
|
17166
|
+
"allowance_warning_emails_sent",
|
|
17167
|
+
"allowance_limit_emails_sent",
|
|
17168
|
+
"projects_existing_at_account_deletion",
|
|
17169
|
+
"open_incidents_existing_at_account_deletion",
|
|
17170
|
+
"open_improvements_existing_at_account_deletion"
|
|
17171
|
+
];
|
|
17172
|
+
var AccountMetricKeySchema = external_exports.enum(ACCOUNT_METRIC_KEYS);
|
|
17173
|
+
|
|
17089
17174
|
// ../../packages/storage/src/incident-context.ts
|
|
17090
17175
|
function isRecord2(value) {
|
|
17091
17176
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -17371,6 +17456,9 @@ function deriveIncidentReasonFromSourceEventTypes(eventTypes) {
|
|
|
17371
17456
|
// ../../packages/auth/src/primitives.ts
|
|
17372
17457
|
var import_argon2 = require("@node-rs/argon2");
|
|
17373
17458
|
|
|
17459
|
+
// ../../packages/auth/src/account-deletion-auth.ts
|
|
17460
|
+
var DEFAULT_ACCOUNT_DELETION_CODE_LIFETIME_MS = 1e3 * 60 * 10;
|
|
17461
|
+
|
|
17374
17462
|
// ../../packages/auth/src/web-session-auth.ts
|
|
17375
17463
|
var DEFAULT_SESSION_LIFETIME_MS = 1e3 * 60 * 60 * 24 * 7;
|
|
17376
17464
|
var DEFAULT_EMAIL_AUTH_CODE_LIFETIME_MS = 1e3 * 60 * 10;
|
|
@@ -18082,6 +18170,26 @@ var STORAGE_BOOTSTRAP_STATEMENTS = [
|
|
|
18082
18170
|
CREATE INDEX email_auth_challenges_code_hash_idx
|
|
18083
18171
|
ON email_auth_challenges (code_hash)
|
|
18084
18172
|
`,
|
|
18173
|
+
`
|
|
18174
|
+
CREATE TABLE account_deletion_challenges (
|
|
18175
|
+
id uuid PRIMARY KEY,
|
|
18176
|
+
organization_id uuid NOT NULL REFERENCES organizations(id) ON DELETE CASCADE,
|
|
18177
|
+
user_id uuid NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
|
18178
|
+
email text NOT NULL,
|
|
18179
|
+
code_hash text NOT NULL,
|
|
18180
|
+
created_at timestamptz NOT NULL DEFAULT now(),
|
|
18181
|
+
expires_at timestamptz NOT NULL,
|
|
18182
|
+
used_at timestamptz
|
|
18183
|
+
)
|
|
18184
|
+
`,
|
|
18185
|
+
`
|
|
18186
|
+
CREATE INDEX account_deletion_challenges_scope_idx
|
|
18187
|
+
ON account_deletion_challenges (organization_id, user_id, lower(email), created_at DESC)
|
|
18188
|
+
`,
|
|
18189
|
+
`
|
|
18190
|
+
CREATE INDEX account_deletion_challenges_code_hash_idx
|
|
18191
|
+
ON account_deletion_challenges (code_hash)
|
|
18192
|
+
`,
|
|
18085
18193
|
`
|
|
18086
18194
|
CREATE TABLE github_device_authorizations (
|
|
18087
18195
|
id uuid PRIMARY KEY,
|
|
@@ -18792,6 +18900,103 @@ var STORAGE_BOOTSTRAP_STATEMENTS = [
|
|
|
18792
18900
|
PRIMARY KEY (organization_id, period_starts_at)
|
|
18793
18901
|
)
|
|
18794
18902
|
`,
|
|
18903
|
+
`
|
|
18904
|
+
CREATE TABLE project_usage_counters (
|
|
18905
|
+
project_id uuid NOT NULL REFERENCES projects(id) ON DELETE CASCADE,
|
|
18906
|
+
period_starts_at timestamptz NOT NULL,
|
|
18907
|
+
raw_ingested_events integer NOT NULL DEFAULT 0,
|
|
18908
|
+
updated_at timestamptz NOT NULL DEFAULT now(),
|
|
18909
|
+
PRIMARY KEY (project_id, period_starts_at)
|
|
18910
|
+
)
|
|
18911
|
+
`,
|
|
18912
|
+
`
|
|
18913
|
+
CREATE TABLE account_analytics_accounts (
|
|
18914
|
+
analytics_account_id uuid PRIMARY KEY,
|
|
18915
|
+
organization_id uuid UNIQUE,
|
|
18916
|
+
organization_id_hash text NOT NULL UNIQUE,
|
|
18917
|
+
created_at timestamptz NOT NULL,
|
|
18918
|
+
first_seen_at timestamptz NOT NULL,
|
|
18919
|
+
metrics_collection_started_at timestamptz NOT NULL,
|
|
18920
|
+
backfilled_from_retained_rows_at timestamptz,
|
|
18921
|
+
deleted_at timestamptz,
|
|
18922
|
+
initial_plan text,
|
|
18923
|
+
latest_known_plan text,
|
|
18924
|
+
latest_capacity_units integer,
|
|
18925
|
+
account_deleted boolean NOT NULL DEFAULT false,
|
|
18926
|
+
metrics_schema_version integer NOT NULL DEFAULT 1,
|
|
18927
|
+
updated_at timestamptz NOT NULL DEFAULT now()
|
|
18928
|
+
)
|
|
18929
|
+
`,
|
|
18930
|
+
`
|
|
18931
|
+
CREATE TABLE account_metric_periods (
|
|
18932
|
+
analytics_account_id uuid NOT NULL REFERENCES account_analytics_accounts(analytics_account_id),
|
|
18933
|
+
period_grain text NOT NULL CHECK (period_grain IN ('day', 'month', 'year', 'lifetime')),
|
|
18934
|
+
period_starts_at timestamptz NOT NULL,
|
|
18935
|
+
metric_key text NOT NULL,
|
|
18936
|
+
metric_value bigint NOT NULL DEFAULT 0,
|
|
18937
|
+
updated_at timestamptz NOT NULL DEFAULT now(),
|
|
18938
|
+
PRIMARY KEY (analytics_account_id, period_grain, period_starts_at, metric_key)
|
|
18939
|
+
)
|
|
18940
|
+
`,
|
|
18941
|
+
`
|
|
18942
|
+
CREATE INDEX account_metric_periods_grain_period_metric_idx
|
|
18943
|
+
ON account_metric_periods (period_grain, period_starts_at, metric_key)
|
|
18944
|
+
`,
|
|
18945
|
+
`
|
|
18946
|
+
CREATE INDEX account_metric_periods_account_grain_period_idx
|
|
18947
|
+
ON account_metric_periods (analytics_account_id, period_grain, period_starts_at)
|
|
18948
|
+
`,
|
|
18949
|
+
`
|
|
18950
|
+
CREATE TABLE account_metric_events (
|
|
18951
|
+
dedupe_key_hash text PRIMARY KEY,
|
|
18952
|
+
analytics_account_id uuid NOT NULL REFERENCES account_analytics_accounts(analytics_account_id),
|
|
18953
|
+
metric_source text NOT NULL,
|
|
18954
|
+
occurred_at timestamptz NOT NULL,
|
|
18955
|
+
recorded_at timestamptz NOT NULL DEFAULT now(),
|
|
18956
|
+
metric_deltas jsonb NOT NULL
|
|
18957
|
+
)
|
|
18958
|
+
`,
|
|
18959
|
+
`
|
|
18960
|
+
CREATE TABLE account_payment_retention_records (
|
|
18961
|
+
id uuid PRIMARY KEY,
|
|
18962
|
+
analytics_account_id uuid NOT NULL REFERENCES account_analytics_accounts(analytics_account_id),
|
|
18963
|
+
organization_id_hash text NOT NULL,
|
|
18964
|
+
provider text NOT NULL,
|
|
18965
|
+
plan text,
|
|
18966
|
+
billing_state text,
|
|
18967
|
+
stripe_customer_id text,
|
|
18968
|
+
stripe_subscription_id text,
|
|
18969
|
+
billing_period_starts_at timestamptz,
|
|
18970
|
+
billing_period_ends_at timestamptz,
|
|
18971
|
+
additional_capacity_units integer,
|
|
18972
|
+
last_billing_event_id text,
|
|
18973
|
+
account_deleted_at timestamptz NOT NULL,
|
|
18974
|
+
recorded_at timestamptz NOT NULL DEFAULT now(),
|
|
18975
|
+
updated_at timestamptz NOT NULL DEFAULT now(),
|
|
18976
|
+
UNIQUE (analytics_account_id, provider)
|
|
18977
|
+
)
|
|
18978
|
+
`,
|
|
18979
|
+
`
|
|
18980
|
+
CREATE INDEX account_payment_retention_records_provider_idx
|
|
18981
|
+
ON account_payment_retention_records (provider, account_deleted_at DESC)
|
|
18982
|
+
`,
|
|
18983
|
+
`
|
|
18984
|
+
CREATE TABLE account_payment_provider_events (
|
|
18985
|
+
provider_event_key text PRIMARY KEY,
|
|
18986
|
+
analytics_account_id uuid NOT NULL REFERENCES account_analytics_accounts(analytics_account_id),
|
|
18987
|
+
organization_id_hash text NOT NULL,
|
|
18988
|
+
provider text NOT NULL,
|
|
18989
|
+
provider_event_id text NOT NULL,
|
|
18990
|
+
provider_event_type text NOT NULL,
|
|
18991
|
+
processed_at timestamptz NOT NULL,
|
|
18992
|
+
account_deleted_at timestamptz NOT NULL,
|
|
18993
|
+
recorded_at timestamptz NOT NULL DEFAULT now()
|
|
18994
|
+
)
|
|
18995
|
+
`,
|
|
18996
|
+
`
|
|
18997
|
+
CREATE UNIQUE INDEX account_payment_provider_events_provider_event_key
|
|
18998
|
+
ON account_payment_provider_events (provider, provider_event_id)
|
|
18999
|
+
`,
|
|
18795
19000
|
`
|
|
18796
19001
|
CREATE TABLE operational_email_deliveries (
|
|
18797
19002
|
id uuid PRIMARY KEY,
|
|
@@ -19560,6 +19765,141 @@ var STORAGE_SCHEMA_MIGRATIONS = [
|
|
|
19560
19765
|
statements: [
|
|
19561
19766
|
"ALTER TABLE capture_policies ADD COLUMN IF NOT EXISTS immediate_client_error_path_rules jsonb"
|
|
19562
19767
|
]
|
|
19768
|
+
}),
|
|
19769
|
+
defineStorageSchemaMigration({
|
|
19770
|
+
id: "202606100001_add_project_usage_counters",
|
|
19771
|
+
description: "Add durable project-level raw ingestion counters for project dashboard metrics.",
|
|
19772
|
+
statements: [
|
|
19773
|
+
`
|
|
19774
|
+
CREATE TABLE IF NOT EXISTS project_usage_counters (
|
|
19775
|
+
project_id uuid NOT NULL REFERENCES projects(id) ON DELETE CASCADE,
|
|
19776
|
+
period_starts_at timestamptz NOT NULL,
|
|
19777
|
+
raw_ingested_events integer NOT NULL DEFAULT 0,
|
|
19778
|
+
updated_at timestamptz NOT NULL DEFAULT now(),
|
|
19779
|
+
PRIMARY KEY (project_id, period_starts_at)
|
|
19780
|
+
)
|
|
19781
|
+
`
|
|
19782
|
+
]
|
|
19783
|
+
}),
|
|
19784
|
+
defineStorageSchemaMigration({
|
|
19785
|
+
id: "202606100002_add_account_deletion_challenges",
|
|
19786
|
+
description: "Add scoped OTP challenges for account deletion confirmation.",
|
|
19787
|
+
statements: [
|
|
19788
|
+
`
|
|
19789
|
+
CREATE TABLE IF NOT EXISTS account_deletion_challenges (
|
|
19790
|
+
id uuid PRIMARY KEY,
|
|
19791
|
+
organization_id uuid NOT NULL REFERENCES organizations(id) ON DELETE CASCADE,
|
|
19792
|
+
user_id uuid NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
|
19793
|
+
email text NOT NULL,
|
|
19794
|
+
code_hash text NOT NULL,
|
|
19795
|
+
created_at timestamptz NOT NULL DEFAULT now(),
|
|
19796
|
+
expires_at timestamptz NOT NULL,
|
|
19797
|
+
used_at timestamptz
|
|
19798
|
+
)
|
|
19799
|
+
`,
|
|
19800
|
+
`
|
|
19801
|
+
CREATE INDEX IF NOT EXISTS account_deletion_challenges_scope_idx
|
|
19802
|
+
ON account_deletion_challenges (organization_id, user_id, lower(email), created_at DESC)
|
|
19803
|
+
`,
|
|
19804
|
+
`
|
|
19805
|
+
CREATE INDEX IF NOT EXISTS account_deletion_challenges_code_hash_idx
|
|
19806
|
+
ON account_deletion_challenges (code_hash)
|
|
19807
|
+
`
|
|
19808
|
+
]
|
|
19809
|
+
}),
|
|
19810
|
+
defineStorageSchemaMigration({
|
|
19811
|
+
id: "202606100003_add_account_analytics_and_payment_retention",
|
|
19812
|
+
description: "Add deletion-safe account analytics and payment retention ledgers.",
|
|
19813
|
+
statements: [
|
|
19814
|
+
`
|
|
19815
|
+
CREATE TABLE IF NOT EXISTS account_analytics_accounts (
|
|
19816
|
+
analytics_account_id uuid PRIMARY KEY,
|
|
19817
|
+
organization_id uuid UNIQUE,
|
|
19818
|
+
organization_id_hash text NOT NULL UNIQUE,
|
|
19819
|
+
created_at timestamptz NOT NULL,
|
|
19820
|
+
first_seen_at timestamptz NOT NULL,
|
|
19821
|
+
metrics_collection_started_at timestamptz NOT NULL,
|
|
19822
|
+
backfilled_from_retained_rows_at timestamptz,
|
|
19823
|
+
deleted_at timestamptz,
|
|
19824
|
+
initial_plan text,
|
|
19825
|
+
latest_known_plan text,
|
|
19826
|
+
latest_capacity_units integer,
|
|
19827
|
+
account_deleted boolean NOT NULL DEFAULT false,
|
|
19828
|
+
metrics_schema_version integer NOT NULL DEFAULT 1,
|
|
19829
|
+
updated_at timestamptz NOT NULL DEFAULT now()
|
|
19830
|
+
)
|
|
19831
|
+
`,
|
|
19832
|
+
`
|
|
19833
|
+
CREATE TABLE IF NOT EXISTS account_metric_periods (
|
|
19834
|
+
analytics_account_id uuid NOT NULL REFERENCES account_analytics_accounts(analytics_account_id),
|
|
19835
|
+
period_grain text NOT NULL CHECK (period_grain IN ('day', 'month', 'year', 'lifetime')),
|
|
19836
|
+
period_starts_at timestamptz NOT NULL,
|
|
19837
|
+
metric_key text NOT NULL,
|
|
19838
|
+
metric_value bigint NOT NULL DEFAULT 0,
|
|
19839
|
+
updated_at timestamptz NOT NULL DEFAULT now(),
|
|
19840
|
+
PRIMARY KEY (analytics_account_id, period_grain, period_starts_at, metric_key)
|
|
19841
|
+
)
|
|
19842
|
+
`,
|
|
19843
|
+
`
|
|
19844
|
+
CREATE INDEX IF NOT EXISTS account_metric_periods_grain_period_metric_idx
|
|
19845
|
+
ON account_metric_periods (period_grain, period_starts_at, metric_key)
|
|
19846
|
+
`,
|
|
19847
|
+
`
|
|
19848
|
+
CREATE INDEX IF NOT EXISTS account_metric_periods_account_grain_period_idx
|
|
19849
|
+
ON account_metric_periods (analytics_account_id, period_grain, period_starts_at)
|
|
19850
|
+
`,
|
|
19851
|
+
`
|
|
19852
|
+
CREATE TABLE IF NOT EXISTS account_metric_events (
|
|
19853
|
+
dedupe_key_hash text PRIMARY KEY,
|
|
19854
|
+
analytics_account_id uuid NOT NULL REFERENCES account_analytics_accounts(analytics_account_id),
|
|
19855
|
+
metric_source text NOT NULL,
|
|
19856
|
+
occurred_at timestamptz NOT NULL,
|
|
19857
|
+
recorded_at timestamptz NOT NULL DEFAULT now(),
|
|
19858
|
+
metric_deltas jsonb NOT NULL
|
|
19859
|
+
)
|
|
19860
|
+
`,
|
|
19861
|
+
`
|
|
19862
|
+
CREATE TABLE IF NOT EXISTS account_payment_retention_records (
|
|
19863
|
+
id uuid PRIMARY KEY,
|
|
19864
|
+
analytics_account_id uuid NOT NULL REFERENCES account_analytics_accounts(analytics_account_id),
|
|
19865
|
+
organization_id_hash text NOT NULL,
|
|
19866
|
+
provider text NOT NULL,
|
|
19867
|
+
plan text,
|
|
19868
|
+
billing_state text,
|
|
19869
|
+
stripe_customer_id text,
|
|
19870
|
+
stripe_subscription_id text,
|
|
19871
|
+
billing_period_starts_at timestamptz,
|
|
19872
|
+
billing_period_ends_at timestamptz,
|
|
19873
|
+
additional_capacity_units integer,
|
|
19874
|
+
last_billing_event_id text,
|
|
19875
|
+
account_deleted_at timestamptz NOT NULL,
|
|
19876
|
+
recorded_at timestamptz NOT NULL DEFAULT now(),
|
|
19877
|
+
updated_at timestamptz NOT NULL DEFAULT now(),
|
|
19878
|
+
UNIQUE (analytics_account_id, provider)
|
|
19879
|
+
)
|
|
19880
|
+
`,
|
|
19881
|
+
`
|
|
19882
|
+
CREATE INDEX IF NOT EXISTS account_payment_retention_records_provider_idx
|
|
19883
|
+
ON account_payment_retention_records (provider, account_deleted_at DESC)
|
|
19884
|
+
`,
|
|
19885
|
+
`
|
|
19886
|
+
CREATE TABLE IF NOT EXISTS account_payment_provider_events (
|
|
19887
|
+
provider_event_key text PRIMARY KEY,
|
|
19888
|
+
analytics_account_id uuid NOT NULL REFERENCES account_analytics_accounts(analytics_account_id),
|
|
19889
|
+
organization_id_hash text NOT NULL,
|
|
19890
|
+
provider text NOT NULL,
|
|
19891
|
+
provider_event_id text NOT NULL,
|
|
19892
|
+
provider_event_type text NOT NULL,
|
|
19893
|
+
processed_at timestamptz NOT NULL,
|
|
19894
|
+
account_deleted_at timestamptz NOT NULL,
|
|
19895
|
+
recorded_at timestamptz NOT NULL DEFAULT now()
|
|
19896
|
+
)
|
|
19897
|
+
`,
|
|
19898
|
+
`
|
|
19899
|
+
CREATE UNIQUE INDEX IF NOT EXISTS account_payment_provider_events_provider_event_key
|
|
19900
|
+
ON account_payment_provider_events (provider, provider_event_id)
|
|
19901
|
+
`
|
|
19902
|
+
]
|
|
19563
19903
|
})
|
|
19564
19904
|
];
|
|
19565
19905
|
|
|
@@ -19763,7 +20103,7 @@ async function listLocalIncidents(input2, dependencies) {
|
|
|
19763
20103
|
return true;
|
|
19764
20104
|
}
|
|
19765
20105
|
return incident.status === input2.status;
|
|
19766
|
-
}).filter((incident) => input2.severity === void 0 ? true : incident.severity === input2.severity).sort(sortIncidentsDescending);
|
|
20106
|
+
}).filter((incident) => input2.severity === void 0 ? true : incident.severity === input2.severity).filter((incident) => input2.firstSeenAfter === void 0 ? true : incident.first_seen_at >= input2.firstSeenAfter).sort(sortIncidentsDescending);
|
|
19767
20107
|
const startIndex = input2.cursor === void 0 ? 0 : incidents.findIndex((incident) => buildCursor(incident) === input2.cursor) + 1;
|
|
19768
20108
|
const pagedIncidents = input2.limit === void 0 ? incidents.slice(startIndex) : incidents.slice(startIndex, startIndex + input2.limit);
|
|
19769
20109
|
const hasMore = input2.limit !== void 0 && startIndex + input2.limit < incidents.length;
|
|
@@ -20307,6 +20647,10 @@ var import_node_path9 = require("node:path");
|
|
|
20307
20647
|
|
|
20308
20648
|
// ../../packages/project-management-client/src/index.ts
|
|
20309
20649
|
var ProjectMetricsSchema = external_exports.object({
|
|
20650
|
+
open_incidents: external_exports.number().int().nonnegative().default(0),
|
|
20651
|
+
regressed_incidents: external_exports.number().int().nonnegative().default(0),
|
|
20652
|
+
opened_incidents_today: external_exports.number().int().nonnegative().default(0),
|
|
20653
|
+
opened_incidents_month: external_exports.number().int().nonnegative().default(0),
|
|
20310
20654
|
monthly_bundle_requests: external_exports.number().int().nonnegative(),
|
|
20311
20655
|
monthly_raw_ingested_events: external_exports.number().int().nonnegative(),
|
|
20312
20656
|
retained_bundles: external_exports.number().int().nonnegative(),
|
|
@@ -27321,6 +27665,7 @@ async function listAllCloudIncidents(input2, api) {
|
|
|
27321
27665
|
...input2.service === void 0 ? {} : { service: input2.service },
|
|
27322
27666
|
...input2.status === void 0 ? {} : { status: input2.status },
|
|
27323
27667
|
...input2.severity === void 0 ? {} : { severity: input2.severity },
|
|
27668
|
+
...input2.firstSeenAfter === void 0 ? {} : { firstSeenAfter: input2.firstSeenAfter },
|
|
27324
27669
|
...cursor === void 0 ? {} : { cursor }
|
|
27325
27670
|
});
|
|
27326
27671
|
incidents.push(
|
|
@@ -27341,7 +27686,8 @@ async function mapCombinedIncidentListResult(input2, api, dependencies) {
|
|
|
27341
27686
|
...input2.environment === void 0 ? {} : { environment: input2.environment },
|
|
27342
27687
|
...input2.service === void 0 ? {} : { service: input2.service },
|
|
27343
27688
|
...input2.status === void 0 ? {} : { status: input2.status },
|
|
27344
|
-
...input2.severity === void 0 ? {} : { severity: input2.severity }
|
|
27689
|
+
...input2.severity === void 0 ? {} : { severity: input2.severity },
|
|
27690
|
+
...input2.firstSeenAfter === void 0 ? {} : { firstSeenAfter: input2.firstSeenAfter }
|
|
27345
27691
|
},
|
|
27346
27692
|
dependencies
|
|
27347
27693
|
);
|
|
@@ -27352,7 +27698,8 @@ async function mapCombinedIncidentListResult(input2, api, dependencies) {
|
|
|
27352
27698
|
...input2.environment === void 0 ? {} : { environment: input2.environment },
|
|
27353
27699
|
...input2.service === void 0 ? {} : { service: input2.service },
|
|
27354
27700
|
...input2.status === void 0 ? {} : { status: input2.status },
|
|
27355
|
-
...input2.severity === void 0 ? {} : { severity: input2.severity }
|
|
27701
|
+
...input2.severity === void 0 ? {} : { severity: input2.severity },
|
|
27702
|
+
...input2.firstSeenAfter === void 0 ? {} : { firstSeenAfter: input2.firstSeenAfter }
|
|
27356
27703
|
},
|
|
27357
27704
|
api
|
|
27358
27705
|
);
|
|
@@ -27391,6 +27738,9 @@ async function listIncidentsCommand(input2, api) {
|
|
|
27391
27738
|
if (input2.severity !== void 0) {
|
|
27392
27739
|
requestInput.severity = input2.severity;
|
|
27393
27740
|
}
|
|
27741
|
+
if (input2.firstSeenAfter !== void 0) {
|
|
27742
|
+
requestInput.firstSeenAfter = input2.firstSeenAfter;
|
|
27743
|
+
}
|
|
27394
27744
|
if (input2.cursor !== void 0) {
|
|
27395
27745
|
requestInput.cursor = input2.cursor;
|
|
27396
27746
|
}
|
|
@@ -27422,6 +27772,7 @@ async function listIncidentsWithAuthCommand(input2, dependencies) {
|
|
|
27422
27772
|
...input2.service === void 0 ? {} : { service: input2.service },
|
|
27423
27773
|
...input2.status === void 0 ? {} : { status: input2.status },
|
|
27424
27774
|
...input2.severity === void 0 ? {} : { severity: input2.severity },
|
|
27775
|
+
...input2.firstSeenAfter === void 0 ? {} : { firstSeenAfter: input2.firstSeenAfter },
|
|
27425
27776
|
...input2.cursor === void 0 ? {} : { cursor: input2.cursor },
|
|
27426
27777
|
...input2.limit === void 0 ? {} : { limit: input2.limit }
|
|
27427
27778
|
},
|
|
@@ -27446,6 +27797,7 @@ async function listIncidentsWithAuthCommand(input2, dependencies) {
|
|
|
27446
27797
|
...input2.service === void 0 ? {} : { service: input2.service },
|
|
27447
27798
|
...input2.status === void 0 ? {} : { status: input2.status },
|
|
27448
27799
|
...input2.severity === void 0 ? {} : { severity: input2.severity },
|
|
27800
|
+
...input2.firstSeenAfter === void 0 ? {} : { firstSeenAfter: input2.firstSeenAfter },
|
|
27449
27801
|
...input2.cursor === void 0 ? {} : { cursor: input2.cursor },
|
|
27450
27802
|
...input2.limit === void 0 ? {} : { limit: input2.limit },
|
|
27451
27803
|
...input2.json === void 0 ? {} : { json: input2.json }
|
|
@@ -27481,6 +27833,9 @@ async function listIncidentsWithAuthCommand(input2, dependencies) {
|
|
|
27481
27833
|
if (input2.severity !== void 0) {
|
|
27482
27834
|
commandInput.severity = input2.severity;
|
|
27483
27835
|
}
|
|
27836
|
+
if (input2.firstSeenAfter !== void 0) {
|
|
27837
|
+
commandInput.firstSeenAfter = input2.firstSeenAfter;
|
|
27838
|
+
}
|
|
27484
27839
|
if (input2.cursor !== void 0) {
|
|
27485
27840
|
commandInput.cursor = input2.cursor;
|
|
27486
27841
|
}
|
|
@@ -29205,7 +29560,7 @@ var CLI_USAGE_LINES = [
|
|
|
29205
29560
|
" debugbundle login --github-device [--label <label>] [--base-url <url>] [--auth-file <path>] [--json]",
|
|
29206
29561
|
" debugbundle profile validate [--json]",
|
|
29207
29562
|
" debugbundle whoami [--auth-file <path>] [--json]",
|
|
29208
|
-
" debugbundle incidents [--source <local|cloud>] [--project-id <id>] [--environment <name>] [--service <name>] [--status <status>] [--severity <severity>] [--cursor <cursor>] [--limit <n>] [--auth-file <path>] [--json]",
|
|
29563
|
+
" debugbundle incidents [--source <local|cloud>] [--project-id <id>] [--environment <name>] [--service <name>] [--status <status>] [--severity <severity>] [--first-seen-after <ISO8601>] [--cursor <cursor>] [--limit <n>] [--auth-file <path>] [--json]",
|
|
29209
29564
|
" debugbundle inspect <incident-id> [--source <local|cloud>] [--auth-file <path>] [--json]",
|
|
29210
29565
|
" debugbundle explain <incident-id> [--source <local|cloud>] [--auth-file <path>] [--json]",
|
|
29211
29566
|
" debugbundle resolve <incident-id> [incident-id ...] [--source <local|cloud>] [--auth-file <path>] [--json]",
|
|
@@ -34903,7 +35258,7 @@ async function handleCaptureRuleCommand2(parsedArgv, dependencies) {
|
|
|
34903
35258
|
// package.json
|
|
34904
35259
|
var package_default = {
|
|
34905
35260
|
name: "@debugbundle/cli",
|
|
34906
|
-
version: "1.
|
|
35261
|
+
version: "1.4.0",
|
|
34907
35262
|
private: false,
|
|
34908
35263
|
description: "Command-line interface for DebugBundle",
|
|
34909
35264
|
license: "AGPL-3.0-only",
|
|
@@ -35194,7 +35549,7 @@ ${formatUsage()}`
|
|
|
35194
35549
|
return await (dependencies.whoamiCommand ?? whoamiCommand)(appendCommonAuthOptions(parsedArgv, {}));
|
|
35195
35550
|
}
|
|
35196
35551
|
if (command === "incidents") {
|
|
35197
|
-
expectNoUnknownOptions(parsedArgv, ["auth-file", "json", "source", "project-id", "environment", "service", "status", "severity", "cursor", "limit"]);
|
|
35552
|
+
expectNoUnknownOptions(parsedArgv, ["auth-file", "json", "source", "project-id", "environment", "service", "status", "severity", "first-seen-after", "cursor", "limit"]);
|
|
35198
35553
|
ensureNoExtraPositionals(parsedArgv, 1);
|
|
35199
35554
|
const input2 = appendCommonAuthOptions(parsedArgv, {});
|
|
35200
35555
|
const source = readRetrievalSource(parsedArgv);
|
|
@@ -35221,6 +35576,10 @@ ${formatUsage()}`
|
|
|
35221
35576
|
if (severity !== void 0) {
|
|
35222
35577
|
input2.severity = severity;
|
|
35223
35578
|
}
|
|
35579
|
+
const firstSeenAfter = readStringOption(parsedArgv, "first-seen-after");
|
|
35580
|
+
if (firstSeenAfter !== void 0) {
|
|
35581
|
+
input2.firstSeenAfter = firstSeenAfter;
|
|
35582
|
+
}
|
|
35224
35583
|
const cursor = readStringOption(parsedArgv, "cursor");
|
|
35225
35584
|
if (cursor !== void 0) {
|
|
35226
35585
|
input2.cursor = cursor;
|