@tailglow/cli 0.2.0 → 0.4.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/src/flags.js CHANGED
@@ -274,6 +274,7 @@ export function buildRequestParts(command, flags, { consumed_path_fields = new S
274
274
  const query_by_flag = new Map(
275
275
  command.query_params.map((field) => [toFlagName(field.name), field])
276
276
  );
277
+
277
278
  const body_by_flag = new Map(command.body_fields.map((field) => [toFlagName(field.name), field]));
278
279
  const consumed_flags = new Set([...consumed_path_fields].map(toFlagName));
279
280
 
package/src/help.js CHANGED
@@ -111,8 +111,8 @@ function renderGlobalFlag(entry) {
111
111
  * One command's flags, named the way they are typed rather than the way the API names them.
112
112
  *
113
113
  * The registry stores wire names, so handing it over unchanged tells a reader that the flag is
114
- * `--show_onboarding_ui`. It is not; it is `--show-onboarding-ui`, and that cost a model three
115
- * attempts to create one project.
114
+ * `--start_at`. It is not; it is `--start-at`, and that cost a model three attempts to create one
115
+ * project.
116
116
  *
117
117
  * @param {import("./types.d.ts").CliCommand} command
118
118
  */
@@ -141,6 +141,7 @@ export function describeCommandFlags(command) {
141
141
  command.path_params.filter((field) => placeholders.has(field.name)),
142
142
  "path"
143
143
  );
144
+
144
145
  const claimed = new Set(path_flags.map((entry) => entry.field));
145
146
 
146
147
  return [
@@ -278,6 +279,7 @@ function renderFields({ fields, title }) {
278
279
  const required = field.required ? " (required)" : "";
279
280
  const allowed =
280
281
  field.allowed_values.length > 0 ? ` [${field.allowed_values.join(", ")}]` : "";
282
+
281
283
  const description = field.description ? ` ${field.description}` : "";
282
284
 
283
285
  return ` ${describeFlagSyntax(flag, field.type)}${required}${allowed}${description}`;
package/src/output.js CHANGED
@@ -79,6 +79,7 @@ export function formatTable(data) {
79
79
  const body = rows.map((row) =>
80
80
  columns.map((column) => toCell(/** @type {Record<string, unknown>} */ (row)[column]))
81
81
  );
82
+
82
83
  const widths = header.map((_, index) =>
83
84
  Math.max(header[index].length, ...body.map((cells) => cells[index].length))
84
85
  );
package/src/request.js CHANGED
@@ -30,6 +30,7 @@ export function formatValidationIssues(message) {
30
30
  Array.isArray(issue?.path) && issue.path.length > 0
31
31
  ? sanitizeText(issue.path.join("."))
32
32
  : null;
33
+
33
34
  const detail = sanitizeText(
34
35
  typeof issue?.message === "string" ? issue.message : JSON.stringify(issue)
35
36
  );