File tree Expand file tree Collapse file tree 5 files changed +13
-5
lines changed
Expand file tree Collapse file tree 5 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 55 * Similar to 'gh api' for GitHub.
66 */
77
8- import { buildCommand } from "@stricli/core" ;
98import type { SentryContext } from "../context.js" ;
109import { rawApiRequest } from "../lib/api-client.js" ;
10+ import { buildCommand } from "../lib/command.js" ;
1111import type { Writer } from "../types/index.js" ;
1212
1313type HttpMethod = "GET" | "POST" | "PUT" | "DELETE" | "PATCH" ;
Original file line number Diff line number Diff line change 44 * View detailed information about a Sentry log entry.
55 */
66
7- import { buildCommand } from "@stricli/core" ;
87import type { SentryContext } from "../../context.js" ;
98import { getLog } from "../../lib/api-client.js" ;
109import {
1110 parseOrgProjectArg ,
1211 parseSlashSeparatedArg ,
1312} from "../../lib/arg-parsing.js" ;
1413import { openInBrowser } from "../../lib/browser.js" ;
14+ import { buildCommand } from "../../lib/command.js" ;
1515import { ContextError , ValidationError } from "../../lib/errors.js" ;
1616import { formatLogDetails , writeJson } from "../../lib/formatters/index.js" ;
1717import {
Original file line number Diff line number Diff line change 44 * List recent traces from Sentry projects.
55 */
66
7- import { buildCommand } from "@stricli/core" ;
87import type { SentryContext } from "../../context.js" ;
98import { listTransactions } from "../../lib/api-client.js" ;
109import { validateLimit } from "../../lib/arg-parsing.js" ;
10+ import { buildCommand } from "../../lib/command.js" ;
1111import {
1212 formatTraceRow ,
1313 formatTracesHeader ,
Original file line number Diff line number Diff line change 44 * View detailed information about a distributed trace.
55 */
66
7- import { buildCommand } from "@stricli/core" ;
87import type { SentryContext } from "../../context.js" ;
98import { getDetailedTrace } from "../../lib/api-client.js" ;
109import {
@@ -13,6 +12,7 @@ import {
1312 spansFlag ,
1413} from "../../lib/arg-parsing.js" ;
1514import { openInBrowser } from "../../lib/browser.js" ;
15+ import { buildCommand } from "../../lib/command.js" ;
1616import { ContextError , ValidationError } from "../../lib/errors.js" ;
1717import {
1818 computeTraceSummary ,
Original file line number Diff line number Diff line change 22 * Command Builder with Telemetry
33 *
44 * Wraps Stricli's buildCommand to automatically capture flag usage for telemetry.
5- * Commands should import buildCommand from this module instead of @stricli/core.
5+ *
6+ * ALL commands MUST import `buildCommand` from this module, NOT from `@stricli/core`.
7+ * Importing directly from `@stricli/core` silently bypasses flag/arg telemetry capture.
8+ *
9+ * Correct: import { buildCommand } from "../../lib/command.js";
10+ * Incorrect: import { buildCommand } from "@stricli/core"; // skips telemetry!
11+ *
12+ * Exception: `help.ts` may import from `@stricli/core` because it also needs `run`,
13+ * and the help command has no meaningful flags to capture.
614 */
715
816import {
You can’t perform that action at this time.
0 commit comments