Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4581,27 +4581,27 @@
let updates: Record<string, unknown> = {};

if (options.fromJson) {
const { readFileSync } = await import("node:fs");
updates = JSON.parse(readFileSync(options.fromJson, "utf-8")) as Record<string, unknown>;
const { readFile } = await import("node:fs/promises");
updates = JSON.parse(await readFile(options.fromJson, "utf-8")) as Record<string, unknown>;
} else if (options.fromYaml) {
const { readFileSync } = await import("node:fs");
const { readFile } = await import("node:fs/promises");
const yaml = await import("js-yaml");
updates = yaml.load(readFileSync(options.fromYaml, "utf-8")) as Record<string, unknown>;
updates = yaml.load(await readFile(options.fromYaml, "utf-8")) as Record<string, unknown>;
} else {
if (options.name) updates.name = options.name;

Check failure on line 4591 in src/cli.ts

View workflow job for this annotation

GitHub Actions / Index Signature Strictness

Property 'name' comes from an index signature, so it must be accessed with ['name'].
if (options.description) updates.description = options.description;

Check failure on line 4592 in src/cli.ts

View workflow job for this annotation

GitHub Actions / Index Signature Strictness

Property 'description' comes from an index signature, so it must be accessed with ['description'].
if (options.heroText) updates.hero_text = options.heroText;

Check failure on line 4593 in src/cli.ts

View workflow job for this annotation

GitHub Actions / Index Signature Strictness

Property 'hero_text' comes from an index signature, so it must be accessed with ['hero_text'].
if (options.logoUrl) updates.logo_url = options.logoUrl;

Check failure on line 4594 in src/cli.ts

View workflow job for this annotation

GitHub Actions / Index Signature Strictness

Property 'logo_url' comes from an index signature, so it must be accessed with ['logo_url'].
if (options.faviconUrl) updates.favicon_url = options.faviconUrl;

Check failure on line 4595 in src/cli.ts

View workflow job for this annotation

GitHub Actions / Index Signature Strictness

Property 'favicon_url' comes from an index signature, so it must be accessed with ['favicon_url'].
if (
options.primaryColor ||
options.secondaryColor ||
options.backgroundColor ||
options.textColor
) {
updates.colors = {};

Check failure on line 4602 in src/cli.ts

View workflow job for this annotation

GitHub Actions / Index Signature Strictness

Property 'colors' comes from an index signature, so it must be accessed with ['colors'].
if (options.primaryColor)
(updates.colors as Record<string, string>).primary = options.primaryColor;

Check failure on line 4604 in src/cli.ts

View workflow job for this annotation

GitHub Actions / Index Signature Strictness

Property 'colors' comes from an index signature, so it must be accessed with ['colors'].
if (options.secondaryColor)
(updates.colors as Record<string, string>).secondary = options.secondaryColor;
if (options.backgroundColor)
Expand Down
Loading