An open source design system that's fully customizable and agent ready
TypeScript
1/n astryx init foolproof: remove TTY gating (init non-interactive) (#4147)
Joeye4867292547b
diff --git a/.github/scripts/codemod-verify.mjs b/.github/scripts/codemod-verify.mjsindex 009ef9af48..c3738dc7cd 100644--- a/.github/scripts/codemod-verify.mjs+++ b/.github/scripts/codemod-verify.mjs@@ -142,7 +142,7 @@ async function main() {continue;}- // Suppress clack output during verification+ // Suppress codemod log output during verificationconst origLog = console.log;const origErr = console.error;await runCodemods(manifests, {diff --git a/packages/cli/CONTRIBUTING.md b/packages/cli/CONTRIBUTING.mdindex 78751dbe98..08209a2054 100644--- a/packages/cli/CONTRIBUTING.md+++ b/packages/cli/CONTRIBUTING.md@@ -278,7 +278,7 @@ When `--json` is active, human-readable output must not contaminate stdout:// Simple commands: guard console.logif (!json) console.log(`✓ Done`);-// Clack-based commands: skip Clack calls+// Logger commands: skip term-log callsif (!json) p.intro('Welcome');if (!json) p.log.step('Running...');diff --git a/packages/cli/docs/getting-started.doc.mjs b/packages/cli/docs/getting-started.doc.mjsindex e0617a4245..94b9583bef 100644--- a/packages/cli/docs/getting-started.doc.mjs+++ b/packages/cli/docs/getting-started.doc.mjs@@ -40,7 +40,7 @@ export const docs = {},{type: 'prose',- text: 'Then run the init wizard to set up AI agent docs, pick a starter template, and learn about theming.',+ text: "Then run `astryx init` to install the AI agent cheat sheet (AGENTS.md/CLAUDE.md). It's non-interactive — no prompts — so it's safe for AI agents, CI, and scripts. Add `--all` for pointers to the theme and page-building workflows.",},{type: 'code',diff --git a/packages/cli/package-lock.json b/packages/cli/package-lock.jsonindex 1bd3af7a43..1c6ab138ee 100644--- a/packages/cli/package-lock.json+++ b/packages/cli/package-lock.json@@ -9,32 +9,12 @@"version": "0.0.10","license": "MIT","dependencies": {- "@clack/prompts": "^0.9.1","commander": "^12.1.0"},"bin": {"xds": "bin/astryx.mjs"}},- "node_modules/@clack/core": {- "version": "0.4.1",- "resolved": "https://registry.npmjs.org/@clack/core/-/core-0.4.1.tgz",- "integrity": "sha512-Pxhij4UXg8KSr7rPek6Zowm+5M22rbd2g1nfojHJkxp5YkFqiZ2+YLEM/XGVIzvGOcM0nqjIFxrpDwWRZYWYjA==",- "dependencies": {- "picocolors": "^1.0.0",- "sisteransi": "^1.0.5"- }- },- "node_modules/@clack/prompts": {- "version": "0.9.1",- "resolved": "https://registry.npmjs.org/@clack/prompts/-/prompts-0.9.1.tgz",- "integrity": "sha512-JIpyaboYZeWYlyP0H+OoPPxd6nqueG/CmN6ixBiNFsIDHREevjIf0n0Ohh5gr5C8pEDknzgvz+pIJ8dMhzWIeg==",- "dependencies": {- "@clack/core": "0.4.1",- "picocolors": "^1.0.0",- "sisteransi": "^1.0.5"- }- },"node_modules/commander": {"version": "12.1.0","resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz",@@ -42,52 +22,13 @@"engines": {"node": ">=18"}- },- "node_modules/picocolors": {- "version": "1.1.1",- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",- "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="- },- "node_modules/sisteransi": {- "version": "1.0.5",- "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",- "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg=="}},"dependencies": {- "@clack/core": {- "version": "0.4.1",- "resolved": "https://registry.npmjs.org/@clack/core/-/core-0.4.1.tgz",- "integrity": "sha512-Pxhij4UXg8KSr7rPek6Zowm+5M22rbd2g1nfojHJkxp5YkFqiZ2+YLEM/XGVIzvGOcM0nqjIFxrpDwWRZYWYjA==",- "requires": {- "picocolors": "^1.0.0",- "sisteransi": "^1.0.5"- }- },- "@clack/prompts": {- "version": "0.9.1",- "resolved": "https://registry.npmjs.org/@clack/prompts/-/prompts-0.9.1.tgz",- "integrity": "sha512-JIpyaboYZeWYlyP0H+OoPPxd6nqueG/CmN6ixBiNFsIDHREevjIf0n0Ohh5gr5C8pEDknzgvz+pIJ8dMhzWIeg==",- "requires": {- "@clack/core": "0.4.1",- "picocolors": "^1.0.0",- "sisteransi": "^1.0.5"- }- },"commander": {"version": "12.1.0","resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz","integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA=="- },- "picocolors": {- "version": "1.1.1",- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",- "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="- },- "sisteransi": {- "version": "1.0.5",- "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",- "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg=="}}}diff --git a/packages/cli/package.json b/packages/cli/package.jsonindex 9af55288ca..60a8cb2d70 100644--- a/packages/cli/package.json+++ b/packages/cli/package.json@@ -77,7 +77,6 @@"typecheck:json-api": "tsc --project tsconfig.json-api.json && tsc --project tsconfig.api-contract.json"},"dependencies": {- "@clack/prompts": "^1.7.0","commander": "^12.1.0","jiti": "^2.7.0","jscodeshift": "^17.3.0",diff --git a/packages/cli/src/codemods/ensure-jscodeshift.mjs b/packages/cli/src/codemods/ensure-jscodeshift.mjsindex 7a9734c773..efc2200847 100644--- a/packages/cli/src/codemods/ensure-jscodeshift.mjs+++ b/packages/cli/src/codemods/ensure-jscodeshift.mjs@@ -3,16 +3,15 @@/*** @file Lazy jscodeshift installer*- * Checks if jscodeshift is available and offers to install it on-demand.+ * Checks if jscodeshift is available and installs it on-demand.* Keeps the CLI lean — jscodeshift is only needed for codemods.*- * In non-interactive environments (CI, LLM agents), the interactive prompt- * is skipped. Pass `installDeps: true` to auto-install without prompting,- * or the command will fail with a helpful error message.+ * Non-interactive by default (no prompts): pass `installDeps: true` to+ * auto-install, otherwise the command fails fast with a helpful error.*/import {execSync} from 'node:child_process';-import * as p from '@clack/prompts';+import * as p from '../lib/term-log.mjs';import {detectPackageManager} from '../utils/package-manager.mjs';/**@@ -30,32 +29,17 @@ export async function ensureJscodeshift({installDeps = false, silent = false} =} catch {log.warn('jscodeshift is required for codemods but not installed.');- const isInteractive = process.stdout.isTTY && !process.env.CI;-if (installDeps) {- // Explicit opt-in — install without prompting+ // Explicit opt-in — install without prompting.return installJscodeshift(silent);}- if (!isInteractive || silent) {- // Non-interactive environment (or --json) — fail fast with a helpful message- log.error(- 'Cannot run codemods without jscodeshift. ' +- 'Use --install-deps to auto-install in non-interactive environments.',- );- return false;- }-- // Interactive TTY — prompt as before- const shouldInstall = await p.confirm({- message: 'Install jscodeshift now?',- initialValue: true,- });- if (p.isCancel(shouldInstall) || !shouldInstall) {- p.log.error('Cannot run codemods without jscodeshift.');- return false;- }- return installJscodeshift(silent);+ // Non-interactive by default: fail fast with a helpful message instead of+ // prompting (the CLI never blocks on a TTY).+ log.error(+ 'Cannot run codemods without jscodeshift. Use --install-deps to auto-install.',+ );+ return false;}}diff --git a/packages/cli/src/codemods/run-codemod.mjs b/packages/cli/src/codemods/run-codemod.mjsindex d8e82997bf..63d7ae7e15 100644--- a/packages/cli/src/codemods/run-codemod.mjs+++ b/packages/cli/src/codemods/run-codemod.mjs@@ -29,7 +29,7 @@import * as fs from 'node:fs';import * as path from 'node:path';-import * as p from '@clack/prompts';+import * as p from '../lib/term-log.mjs';import {findConfigPath} from '../lib/project.mjs';import {fixDirectiveCorruption, validateOutput} from './runner.mjs';diff --git a/packages/cli/src/codemods/runner.mjs b/packages/cli/src/codemods/runner.mjsindex 3e1c0b6a19..b76bbaaf9c 100644--- a/packages/cli/src/codemods/runner.mjs+++ b/packages/cli/src/codemods/runner.mjs@@ -10,7 +10,7 @@import * as fs from 'node:fs';import * as path from 'node:path';-import * as p from '@clack/prompts';+import * as p from '../lib/term-log.mjs';import {humanLog} from '../lib/json.mjs';import {runConfigCodemod} from './run-codemod.mjs';@@ -184,7 +184,7 @@ export async function runCodemods(versionManifests,{apply, path: srcPath, codemod, skipCodemods, silent = false},) {- // No-op stub object so silent mode skips clack stdout entirely without+ // No-op stub object so silent mode skips log output entirely without// littering the body with `if (!silent)` guards.const log = silent? {step() {}, info() {}, success() {}, warn() {}, error() {}, message() {}}diff --git a/packages/cli/src/commands/agent-docs.mjs b/packages/cli/src/commands/agent-docs.mjsindex b1fb93479c..b1dc97745b 100644--- a/packages/cli/src/commands/agent-docs.mjs+++ b/packages/cli/src/commands/agent-docs.mjs@@ -392,7 +392,7 @@ export function removeAgentDocs(targetDir) {/*** Programmatic entry point for installing agent docs.- * Used by the init wizard, upgrade command, and agent-docs command.+ * Used by the init command, upgrade command, and agent-docs command.** Strategy (when no agent/paths specified):* - Discover all existing agent doc files and update themdiff --git a/packages/cli/src/commands/build-theme.mjs b/packages/cli/src/commands/build-theme.mjsindex 828134ad4a..6d464db34a 100644--- a/packages/cli/src/commands/build-theme.mjs+++ b/packages/cli/src/commands/build-theme.mjs@@ -21,12 +21,11 @@ import {getRunPrefix} from '../utils/package-manager.mjs';import {sanitizeName,PathSafetyError,- isNonInteractive,} from '../utils/path-safety.mjs';import {jsonOut, humanLog} from '../lib/json.mjs';import {cliError} from '../lib/cli-error.mjs';import {ERROR_CODES} from '../lib/error-codes.mjs';-import {themeAdd, listThemes} from '../api/theme-add.mjs';+import {themeAdd} from '../api/theme-add.mjs';// Import shared theme processing from core. `astryx theme build` MUST produce the// exact same CSS as the `<Theme>` runtime, so it has exactly one generation@@ -1141,32 +1140,9 @@ Or with a <link> tag:.action(async (slug, targetPath, options) => {const json = program.opts().json || false;- // Only prompt with a real TTY on stdin — a piped/redirected stdin would- // make clack hang. Non-interactive callers fall through to the API's- // ERR_FILE_EXISTS guard.- const interactive =- !json && !isNonInteractive({json}) && Boolean(process.stdin.isTTY);- if (slug && !options.list && !options.overwrite && interactive) {- const collision = await detectThemeCollision(slug, targetPath);- if (collision) {- const rel = path.relative(process.cwd(), collision) || collision;- const p = await import('@clack/prompts');- const confirmed = await p.confirm({- message: `Overwrite existing file ${rel}?`,- initialValue: false,- });- if (p.isCancel(confirmed)) {- p.cancel('Cancelled.');- return;- }- if (!confirmed) {- humanLog('Aborted. Re-run with --overwrite to replace the file.');- return;- }- options.overwrite = true;- }- }-+ // The CLI is non-interactive: never prompt to confirm an overwrite.+ // Existing files require an explicit --overwrite; otherwise themeAdd's+ // ERR_FILE_EXISTS guard rejects the write.let result;try {result = await themeAdd(slug, {@@ -1219,40 +1195,3 @@ This is your copy of the ${displayName} theme — edit ${entry} to make it your});}-/**- * First existing file that scaffolding <slug> into <targetPath> would clobber,- * or null. Used to prompt before invoking the API; the API re-validates and- * owns any authoritative error.- *- * @param {string} slug- * @param {string} [targetPath]- * @returns {Promise<string|null>}- */-async function detectThemeCollision(slug, targetPath) {- let themes;- try {- themes = listThemes();- } catch {- return null;- }- const match = themes.find(t => t.slug.toLowerCase() === slug.toLowerCase());- if (!match) return null;-- const rawTarget = targetPath || path.join('src', 'themes', match.slug);- let resolvedDir;- try {- // Fail soft (null) on traversal; the API surfaces the real error.- const {assertWithin} = await import('../utils/path-safety.mjs');- resolvedDir = assertWithin(rawTarget, process.cwd(), {- label: 'theme target path',- });- } catch {- return null;- }-- for (const name of match.files) {- const dest = path.join(resolvedDir, name);- if (fs.existsSync(dest)) return dest;- }- return null;-}diff --git a/packages/cli/src/commands/init.mjs b/packages/cli/src/commands/init.mjsindex 8b5507fbba..1f9e241573 100644--- a/packages/cli/src/commands/init.mjs+++ b/packages/cli/src/commands/init.mjs@@ -1,19 +1,20 @@// Copyright (c) Meta Platforms, Inc. and affiliates./**- * @file init command — Interactive initialization wizard + feature installer+ * @file init command — non-interactive setup + feature installer*- * Interactive: `astryx init` walks through all features- * Non-interactive: `astryx init --features agents,theme,template`+ * `astryx init` is non-interactive by default: it installs the AGENTS.md/+ * CLAUDE.md cheat sheet with NO prompts, so it behaves identically for humans,+ * AI agents, CI, and piped I/O — it never hangs or errors on a missing TTY.+ * Non-interactive feature install: `astryx init --features agents,theme,template`* Re-runnable: safe to run multiple times, idempotent** Features:* agents — Install AGENTS.md/CLAUDE.md cheat sheet for AI coding agents- * theme — Scaffold a custom theme file+ * theme — Point to the theme workflow (`astryx theme`)* template — Copy a starter page template*/-import * as p from '@clack/prompts';import * as path from 'node:path';import * as fs from 'node:fs';import {CLI_ROOT} from '../utils/paths.mjs';@@ -24,7 +25,6 @@ import {listTemplates} from './template.mjs';import {humanLog} from '../lib/json.mjs';import {cliError} from '../lib/cli-error.mjs';import {ERROR_CODES} from '../lib/error-codes.mjs';-import {requireInteractive} from '../utils/interactive.mjs';const VALID_FEATURES = ['agents', 'theme', 'template'];const run = getRunPrefix();@@ -60,17 +60,9 @@ export function getNextSteps(runPrefix) {];}-function isCancel(value) {- if (p.isCancel(value)) {- p.cancel('Setup cancelled.');- process.exit(0);- }- return value;-}-// ─── Feature: agents ─────────────────────────────────────────────────────────-function runAgents(targetDir, {interactive = true, agent, agentDocsPath} = {}) {+function runAgents(targetDir, {agent, agentDocsPath} = {}) {try {const paths = agentDocsPath? Array.isArray(agentDocsPath)@@ -79,114 +71,55 @@ function runAgents(targetDir, {interactive = true, agent, agentDocsPath} = {}) {: undefined;const written = installAgentDocs(targetDir, {agent, paths});const summary = written.join(', ');- if (interactive) {- p.log.success(`AI agent docs installed → ${summary}`);- } else {- humanLog(`✓ AI agent docs installed → ${summary}`);- }+ humanLog(`✓ AI agent docs installed → ${summary}`);} catch (err) {// PathSafetyError carries a precise, user-actionable message —// surface it instead of the generic "could not install" warning so// misconfigured --agent-docs-path values aren't silently swallowed.if (err instanceof PathSafetyError) {- const msg = `Error: ${err.message}`;- if (interactive) {- p.log.error(msg);- } else {- console.error(msg);- }+ console.error(`Error: ${err.message}`);process.exitCode = 1;return;}- const msg = `Could not install agent docs. Try again with \`${run} astryx init --features agents\`.`;- if (interactive) {- p.log.warning(msg);- } else {- console.error(msg);- }+ console.error(`Could not install agent docs. Try again with \`${run} astryx init --features agents\`.`);}}// ─── Feature: theme ──────────────────────────────────────────────────────────-async function runTheme({interactive = true} = {}) {- if (!interactive) {- humanLog(`✓ Theme scaffolding requires interactive mode. Run \`${run} astryx theme\` instead.`);- return;- }-- p.note(- 'Create a custom theme with your brand colors.\n' +- `Run \`${run} astryx theme\` for the full theme wizard.\n` +- `Run \`${run} astryx theme --list\` to see existing themes.`,- 'Themes',- );+function runTheme() {+ humanLog(`✓ For a custom theme, run \`${run} astryx theme\` (browse) or \`${run} astryx theme add <slug>\` (scaffold).`);}// ─── Feature: template ───────────────────────────────────────────────────────-async function runTemplate(targetDir, {interactive = true, templateName} = {}) {+function runTemplate(targetDir, {templateName} = {}) {const templates = listTemplates();if (templates.length === 0) return;- if (!interactive) {- if (!templateName) {- // Point agents at the build workflow rather than dumping page-template- // names — `build` surfaces pages AND blocks AND components for an idea,- // and `build` with no args is the full how-to-build playbook.- humanLog('✓ To build UI, use these commands:');- humanLog('');- humanLog(` ${run} astryx build "<what you're building>" build a page — kit: closest template + blocks + components`);- humanLog(` ${run} astryx build the how-to-build workflow (read this first)`);- humanLog(` ${run} astryx search <query> find anything — components, docs, templates, blocks`);- humanLog('');- return;- }-- if (!templates.includes(templateName)) {- cliError(`Unknown template "${templateName}". Available: ${templates.join(', ')}`, {code: ERROR_CODES.ERR_UNKNOWN_TEMPLATE});- return;- }-- const outputDir = path.resolve(targetDir, `./src/pages/${templateName}`);- const srcPath = path.join(CLI_ROOT, 'templates', 'pages', templateName, 'page.tsx');- fs.mkdirSync(outputDir, {recursive: true});- fs.copyFileSync(srcPath, path.join(outputDir, 'page.tsx'));- humanLog(`✓ Template created at ${path.relative(targetDir, outputDir)}/page.tsx`);+ if (!templateName) {+ // Point agents at the build workflow rather than dumping page-template+ // names — `build` surfaces pages AND blocks AND components for an idea,+ // and `build` with no args is the full how-to-build playbook.+ humanLog('✓ To build UI, use these commands:');+ humanLog('');+ humanLog(` ${run} astryx build "<what you're building>" build a page — kit: closest template + blocks + components`);+ humanLog(` ${run} astryx build the how-to-build workflow (read this first)`);+ humanLog(` ${run} astryx search <query> find anything — components, docs, templates, blocks`);+ humanLog('');return;}- const TEMPLATE_OPTIONS = [- {value: 'skip', label: 'Skip — No template'},- {value: 'blank', label: 'Blank Page — Minimal scaffold'},- {value: 'table', label: 'Table Page — Data table with actions'},- {value: 'login', label: 'Login Page — Auth form with inputs'},- ];-- const templateChoice = isCancel(- await p.select({- message: 'Start with a page template?',- options: TEMPLATE_OPTIONS,- }),- );-- if (templateChoice === 'skip') return;-- const targetPath = isCancel(- await p.text({- message: 'Where should the template be created?',- initialValue: `./src/pages/${templateChoice}`,- placeholder: `./src/pages/${templateChoice}`,- }),- );-- const outputDir = path.resolve(targetDir, targetPath);- const srcPath = path.join(CLI_ROOT, 'templates', 'pages', templateChoice, 'page.tsx');+ if (!templates.includes(templateName)) {+ cliError(`Unknown template "${templateName}". Available: ${templates.join(', ')}`, {code: ERROR_CODES.ERR_UNKNOWN_TEMPLATE});+ return;+ }+ const outputDir = path.resolve(targetDir, `./src/pages/${templateName}`);+ const srcPath = path.join(CLI_ROOT, 'templates', 'pages', templateName, 'page.tsx');fs.mkdirSync(outputDir, {recursive: true});fs.copyFileSync(srcPath, path.join(outputDir, 'page.tsx'));-- p.log.success(`Template created at ${path.relative(targetDir, outputDir)}/page.tsx`);+ humanLog(`✓ Template created at ${path.relative(targetDir, outputDir)}/page.tsx`);}// ─── Command ─────────────────────────────────────────────────────────────────@@ -200,7 +133,7 @@ export function registerInit(program) {.option('--remove-agents', 'Remove AI agent docs from all agent doc files').option('--agent <tool>', 'Target AI tool for agent docs: claude, cursor, codex, hermes, all').option('--agent-docs-path <path...>', 'Explicit file path(s) for agent docs')- .action(async (options) => {+ .action((options) => {const targetDir = process.cwd();// Remove mode@@ -224,62 +157,25 @@ export function registerInit(program) {for (const feature of features) {if (feature === 'agents') runAgents(targetDir, {- interactive: false,agent: options.agent,agentDocsPath: options.agentDocsPath,});- if (feature === 'theme') await runTheme({interactive: false});- if (feature === 'template') await runTemplate(targetDir, {interactive: false});+ if (feature === 'theme') runTheme();+ if (feature === 'template') runTemplate(targetDir, {});}return;}- // Interactive wizard- //- // Guard: this wizard blocks on prompts. In a non-interactive context- // (CI, piped stdin/stdout, no TTY) it would hang forever. Fail fast- // with actionable guidance via the shared interactivity contract.- requireInteractive({- command: 'init',- hint: `\`${run} astryx init --all\` or \`--features agents,theme,template\``,+ // No flags: TTY-free default. `astryx init` installs the AI agent cheat+ // sheet with NO prompts, so it behaves identically for humans, agents, CI,+ // and piped I/O — it never hangs or errors on a missing TTY. (A guided+ // `--interactive` setup may return later as an explicit opt-in.)+ runAgents(targetDir, {+ agent: options.agent,+ agentDocsPath: options.agentDocsPath,});-- p.intro('Welcome to the design system');-- p.note(- 'A design system for building internal tools\nwith 300+ React components.',- 'About',- );-- // Feature: agents- const shouldInstallAgents = isCancel(- await p.confirm({- message: 'Install AI agent support? (adds a design system cheat sheet to AGENTS.md)',- initialValue: true,- }),- );-- if (shouldInstallAgents) {- const s = p.spinner();- s.start('Installing agent docs');- runAgents(targetDir);- s.stop('Done');- }-- // Feature: swizzle awareness- p.note(- `You can customize any component with:\n ${run} astryx swizzle Button\n ${run} astryx swizzle --list`,- 'Component Customization',- );-- // Feature: template- await runTemplate(targetDir);-- // Feature: theme awareness- await runTheme();-- // Outro- p.outro('Design system initialized!');+ humanLog('');+ humanLog(` Tip: \`${run} astryx init --all\` also points you to the theme and page-building workflows.`);for (const line of getNextSteps(run)) {humanLog(line);diff --git a/packages/cli/src/commands/interactive-guard.test.mjs b/packages/cli/src/commands/interactive-guard.test.mjsindex deada2871e..fba41b09ed 100644--- a/packages/cli/src/commands/interactive-guard.test.mjs+++ b/packages/cli/src/commands/interactive-guard.test.mjs@@ -1,15 +1,13 @@// Copyright (c) Meta Platforms, Inc. and affiliates./**- * @file Subprocess no-hang tests for the interactivity contract.+ * @file Subprocess no-hang tests for `astryx init`.*- * The wizard command `init` blocks on @clack/prompts. In a- * non-interactive context it must fail fast (exit 1) instead of hanging.- * These tests spawn the CLI as a real subprocess with stdin/stdout NOT a TTY- * (stdio 'ignore'/'pipe'), which is exactly the CI / piped condition. If the- * guard were missing, spawnSync would hit the timeout (signal SIGTERM,- * status null) — so asserting `signal === null && status === 1` proves the- * process exited cleanly rather than hanging.+ * TTY was removed from the CLI: `init` is non-interactive by default and must+ * run cleanly (exit 0, writing the agent cheat sheet) instead of hanging on a+ * prompt. These tests spawn the CLI with stdin/stdout NOT a TTY (the CI / piped+ * / agent condition). A hang would show as signal SIGTERM + status null; we+ * assert `signal === null && status === 0` to prove it exits cleanly and works.*/import {describe, it, expect, beforeEach, afterEach} from 'vitest';@@ -42,25 +40,24 @@ afterEach(() => {fs.rmSync(tmpDir, {recursive: true, force: true});});-describe('init non-interactive safety', () => {- it('fails fast (exit 1, no hang) and writes no files', () => {+describe('init is non-interactive by default (no TTY needed)', () => {+ it('runs cleanly (exit 0, no hang) and writes agent docs', () => {const r = runCli(['init']);- expect(r.signal).toBeNull();- expect(r.status).toBe(1);- expect(fs.readdirSync(tmpDir)).toEqual([]);+ expect(r.signal).toBeNull(); // did not hang+ expect(r.status).toBe(0); // succeeded without a TTY+ expect(fs.readdirSync(tmpDir).length).toBeGreaterThan(0); // wrote the cheat sheet});- it('prints actionable guidance (--all / --features)', () => {- const out = (() => {- const r = runCli(['init']);- return r.stderr + r.stdout;- })();- expect(out).toMatch(/requires a TTY/i);- expect(out).toMatch(/--all/);- expect(out).toMatch(/--features/);+ it('writes an agent-doc file containing the ASTRYX cheat-sheet marker', () => {+ runCli(['init']);+ // init injects into AGENTS.md/CLAUDE.md if present, else creates .claude/CLAUDE.md+ const candidates = ['AGENTS.md', 'CLAUDE.md', '.cursorrules', path.join('.claude', 'CLAUDE.md')];+ const doc = candidates.find(f => fs.existsSync(path.join(tmpDir, f)));+ expect(doc).toBeTruthy();+ expect(fs.readFileSync(path.join(tmpDir, doc), 'utf8')).toMatch(/ASTRYX:START/);});- it('still runs --features agents non-interactively (guard does not over-catch)', () => {+ it('still runs --features agents non-interactively', () => {const r = runCli(['init', '--features', 'agents']);expect(r.signal).toBeNull();expect(r.status).toBe(0);diff --git a/packages/cli/src/commands/json-contract.test.mjs b/packages/cli/src/commands/json-contract.test.mjsindex 361a412de9..72e6c0cf8d 100644--- a/packages/cli/src/commands/json-contract.test.mjs+++ b/packages/cli/src/commands/json-contract.test.mjs@@ -45,7 +45,7 @@ function runCli(args, {cwd} = {}) {function parseJson(stdout) {// CLI emits a single JSON document. If anything else snuck onto stdout- // (clack output, console.log strings, etc.) JSON.parse will throw —+ // (log output, console.log strings, etc.) JSON.parse will throw —// which is exactly the failure mode we want to catch in tests.return JSON.parse(stdout);}diff --git a/packages/cli/src/commands/layout.mjs b/packages/cli/src/commands/layout.mjsindex ac1fb9c09b..01cda8b16a 100644--- a/packages/cli/src/commands/layout.mjs+++ b/packages/cli/src/commands/layout.mjs@@ -20,7 +20,7 @@ import {layoutExpand, layoutCheck, layoutGrammar} from '../api/layout.mjs';/** Resolve the expression from arg, --file, or stdin ('-'). */async function readExpression(expr, options) {if (options.file) return fs.readFileSync(options.file, 'utf-8');- if (expr === '-' || (!expr && !process.stdin.isTTY)) {+ if (expr === '-') {const chunks = [];for await (const chunk of process.stdin) chunks.push(chunk);return Buffer.concat(chunks).toString('utf-8');diff --git a/packages/cli/src/commands/swizzle.mjs b/packages/cli/src/commands/swizzle.mjsindex 93bdddc679..490514d5c1 100644--- a/packages/cli/src/commands/swizzle.mjs+++ b/packages/cli/src/commands/swizzle.mjs@@ -15,12 +15,10 @@import * as fs from 'node:fs';import * as path from 'node:path';-import * as p from '@clack/prompts';import {findCoreDir, listComponents} from '../utils/paths.mjs';import {assertWithin,PathSafetyError,- isNonInteractive,} from '../utils/path-safety.mjs';import {jsonOut, humanLog} from '../lib/json.mjs';import {cliError} from '../lib/cli-error.mjs';@@ -99,14 +97,6 @@ function buildFeedback(component, issuesUrl) {return feedback;}-function isCancel(value) {- if (p.isCancel(value)) {- p.cancel('Cancelled.');- process.exit(0);- }- return value;-}-/*** Load the configured integrations + core issues URL for `cwd`, swallowing any* config errors so swizzle never hard-fails on a malformed/absent config. An@@ -314,25 +304,11 @@ export function registerSwizzle(program) {if (existingFiles.length > 0 && !options.overwrite) {const relOutputForMsg = path.relative(process.cwd(), outputDir) || '.';- if (json || isNonInteractive({json})) {- const msg =- `Refusing to overwrite ${existingFiles.length} existing file(s) in ${relOutputForMsg}/. ` +- `Re-run with --overwrite (or -f) to replace them.`;- cliError(msg, {code: ERROR_CODES.ERR_FILE_EXISTS});- return;- }- const confirmed = isCancel(- await p.confirm({- message:- `Overwrite ${existingFiles.length} existing file(s) in ${relOutputForMsg}/? ` +- `(${existingFiles.slice(0, 3).join(', ')}${existingFiles.length > 3 ? ', …' : ''})`,- initialValue: false,- }),- );- if (!confirmed) {- humanLog('Aborted. Re-run with --overwrite to replace files.');- return;- }+ const msg =+ `Refusing to overwrite ${existingFiles.length} existing file(s) in ${relOutputForMsg}/. ` ++ `Re-run with --overwrite (or -f) to replace them.`;+ cliError(msg, {code: ERROR_CODES.ERR_FILE_EXISTS});+ return;}fs.mkdirSync(outputDir, {recursive: true});diff --git a/packages/cli/src/commands/template.mjs b/packages/cli/src/commands/template.mjsindex c90400d911..e591116bf5 100644--- a/packages/cli/src/commands/template.mjs+++ b/packages/cli/src/commands/template.mjs@@ -6,8 +6,6 @@import * as path from 'node:path';import * as fs from 'node:fs';-import * as p from '@clack/prompts';-import {isNonInteractive} from '../utils/path-safety.mjs';import {jsonOut, humanLog} from '../lib/json.mjs';import {cliError} from '../lib/cli-error.mjs';import {ERROR_CODES} from '../lib/error-codes.mjs';@@ -17,14 +15,6 @@ import {warnOnIntegrationIssues} from '../lib/integration-warnings.mjs';export {discoverTemplates, listTemplates} from '../api/template.mjs';-function isCancel(value) {- if (p.isCancel(value)) {- p.cancel('Cancelled.');- process.exit(0);- }- return value;-}-export function registerTemplate(program) {program.command('template [name] [path]')@@ -59,23 +49,11 @@ export function registerTemplate(program) {const collision = await detectTemplateCollision(name, targetPath);if (collision && !options.overwrite) {const rel = path.relative(process.cwd(), collision) || collision;- if (json || isNonInteractive({json})) {- const msg =- `Refusing to overwrite existing file ${rel}. ` +- `Re-run with --overwrite (or -f) to replace it.`;- cliError(msg, {code: ERROR_CODES.ERR_FILE_EXISTS});- return;- }- const confirmed = isCancel(- await p.confirm({- message: `Overwrite existing file ${rel}?`,- initialValue: false,- }),- );- if (!confirmed) {- humanLog('Aborted. Re-run with --overwrite to replace the file.');- return;- }+ const msg =+ `Refusing to overwrite existing file ${rel}. ` ++ `Re-run with --overwrite (or -f) to replace it.`;+ cliError(msg, {code: ERROR_CODES.ERR_FILE_EXISTS});+ return;}}diff --git a/packages/cli/src/commands/upgrade.mjs b/packages/cli/src/commands/upgrade.mjsindex 2228a82b33..c7e4b19f86 100644--- a/packages/cli/src/commands/upgrade.mjs+++ b/packages/cli/src/commands/upgrade.mjs@@ -37,7 +37,7 @@ import * as fs from 'node:fs';import * as path from 'node:path';import {execFile} from 'node:child_process';import {promisify} from 'node:util';-import * as p from '@clack/prompts';+import * as p from '../lib/term-log.mjs';import {ensureJscodeshift} from '../codemods/ensure-jscodeshift.mjs';import {getTransformsBetween, latestVersion} from '../codemods/registry.mjs';import {runCodemods} from '../codemods/runner.mjs';diff --git a/packages/cli/src/commands/upgrade.test.mjs b/packages/cli/src/commands/upgrade.test.mjsindex 5ea039415c..d5c134e55a 100644--- a/packages/cli/src/commands/upgrade.test.mjs+++ b/packages/cli/src/commands/upgrade.test.mjs@@ -24,7 +24,7 @@ beforeEach(() => {logCalls.push(args.join(' '));});vi.spyOn(console, 'error').mockImplementation(() => {});- // @clack/prompts writes directly to process.stdout — capture that too.+ // Some human logs are written straight to process.stdout — capture that too.vi.spyOn(process.stdout, 'write').mockImplementation((chunk) => {stdoutCalls.push(typeof chunk === 'string' ? chunk : chunk.toString());return true;diff --git a/packages/cli/src/index.mjs b/packages/cli/src/index.mjsindex 91e1897d97..9151fc4ceb 100644--- a/packages/cli/src/index.mjs+++ b/packages/cli/src/index.mjs@@ -174,7 +174,7 @@ function fullCommandName(actionCommand) {** If --json is set on a command that is not on the JSON_SUPPORTED allowlist,* emit a structured error envelope and exit 1 — without running the command's- * action (so no filesystem mutations, no clack prompts, no spawned processes).+ * action (so no filesystem mutations, no interactive prompts, no spawned processes).** This is the single source of truth for "command does not support --json".* Individual commands should NOT re-check this; they may assume that if their@@ -323,7 +323,7 @@ ${line('')}${line(' Design system installed!')}${line('')}${line(' Get started:')}-${line(` ${r} init Interactive setup`)}+${line(` ${r} init Setup + AI agent docs`)}${line(` ${r} --help See all commands`)}${line('')}${line(' Or run directly:')}diff --git a/packages/cli/src/lib/term-log.mjs b/packages/cli/src/lib/term-log.mjsnew file mode 100644index 0000000000..a781262970--- /dev/null+++ b/packages/cli/src/lib/term-log.mjs@@ -0,0 +1,48 @@+// Copyright (c) Meta Platforms, Inc. and affiliates.++/**+ * @file Minimal non-interactive terminal logger.+ *+ * @input message strings from CLI commands/codemods+ * @output plain lines on stdout via humanLog (suppressed in --json mode)+ * @position src/lib — shared output helper, no side effects on import+ *+ * The CLI is fully non-interactive: it never prompts, so it only needs plain,+ * unbuffered output. This provides the *output-only* surface (`log.*`, `intro`,+ * `outro`) the CLI needs, so it has no dependency on any prompt library.+ *+ * All output is routed through `humanLog`, the CLI's stdout-discipline+ * primitive, which is a no-op in `--json` mode — so these human logs can never+ * corrupt a JSON envelope.+ *+ * Call sites use it as `import * as p from '../lib/term-log.mjs'` and call+ * `p.log.info(...)`, `p.intro(...)`, `p.outro(...)`.+ */++import {humanLog} from './json.mjs';++const toStr = (msg) => (msg === undefined || msg === null ? '' : String(msg));++/**+ * Human-facing log surface (the small `log` API the CLI uses). All lines go to+ * stdout via humanLog; the level prefixes are cosmetic. `--json` mode suppresses+ * every one of these, keeping machine-readable stdout clean.+ */+export const log = {+ message: (msg) => humanLog(toStr(msg)),+ info: (msg) => humanLog(toStr(msg)),+ step: (msg) => humanLog(toStr(msg)),+ success: (msg) => humanLog(`✓ ${toStr(msg)}`),+ warn: (msg) => humanLog(`⚠ ${toStr(msg)}`),+ error: (msg) => humanLog(`✗ ${toStr(msg)}`),+};++/** Banner printed at the start of a multi-step command. */+export function intro(title) {+ humanLog(`\n${toStr(title)}`);+}++/** Footer printed at the end of a multi-step command. */+export function outro(message) {+ humanLog(`${toStr(message)}\n`);+}diff --git a/packages/cli/src/utils/interactive.mjs b/packages/cli/src/utils/interactive.mjsdeleted file mode 100644index 5a3eab74ae..0000000000--- a/packages/cli/src/utils/interactive.mjs+++ /dev/null@@ -1,76 +0,0 @@-// Copyright (c) Meta Platforms, Inc. and affiliates.--/**- * @file Interactivity contract for the CLI.- *- * A single source of truth for "can this process prompt the user?". Several- * commands launch @clack/prompts wizards; in a non-interactive context (CI,- * piped stdin/stdout, no TTY) those prompts block forever. Historically each- * command answered this question differently — some checked `stdout.isTTY`,- * one checked `stdin.isTTY`, one added `!process.env.CI`, and some had no- * guard at all. This module centralizes the check so every command behaves- * identically.- *- * Two entry points, for two situations:- *- * - `requireInteractive()` — for commands whose prompt IS the work- * (e.g. `astryx init`, `astryx theme`). With no TTY there is nothing to do, so- * fail fast (exit 1) with actionable, non-interactive guidance.- *- * - `isInteractive()` — for commands with an OPTIONAL secondary prompt- * that runs after the primary work has already succeeded; callers use- * this to skip the prompt gracefully in non-interactive contexts.- */--/**- * True when the process can safely run an interactive prompt.- *- * Requires BOTH stdin and stdout to be TTYs (clack reads stdin and renders to- * stdout) and that we are not in a CI environment. A CI runner may allocate a- * pseudo-TTY, so `process.env.CI` is an explicit override: never prompt in CI.- *- * @param {object} [env] - Override hook for tests.- * @param {boolean} [env.stdinTTY=process.stdin.isTTY]- * @param {boolean} [env.stdoutTTY=process.stdout.isTTY]- * @param {boolean} [env.ci=Boolean(process.env.CI)]- * @returns {boolean}- */-export function isInteractive({- stdinTTY = Boolean(process.stdin && process.stdin.isTTY),- stdoutTTY = Boolean(process.stdout && process.stdout.isTTY),- ci = Boolean(process.env.CI),-} = {}) {- if (ci) return false;- return stdinTTY && stdoutTTY;-}--/**- * Guard for commands whose primary action is an interactive wizard. When the- * process is non-interactive, prints an actionable error and exits 1 instead- * of hanging on a prompt that will never receive input.- *- * @param {object} options- * @param {string} options.command - Command name for the message, e.g. 'init'.- * @param {string} options.hint - Concrete non-interactive invocation, e.g.- * '`pnpm astryx init --all` or `--features agents,theme,template`'.- * @param {boolean} [options.json=false] - When true, the command does not- * support --json; we still exit 1 but skip the human-formatted guidance.- * @param {object} [env] - Forwarded to isInteractive (test hook).- * @returns {void} Returns when interactive; otherwise calls process.exit(1).- */-export function requireInteractive({command, hint, json = false} = {}, env) {- if (isInteractive(env)) return;- const name = command ? `astryx ${command}` : 'this command';- console.error(- `Error: \`${name}\` with no flags is interactive and requires a TTY.`,- );- if (hint) {- console.error(`Run non-interactively with: ${hint}`);- }- if (!json) {- console.error(- 'Detected a non-interactive environment (no TTY, piped I/O, or CI=1).',- );- }- process.exit(1);-}diff --git a/packages/cli/src/utils/interactive.test.mjs b/packages/cli/src/utils/interactive.test.mjsdeleted file mode 100644index 37b69e7d30..0000000000--- a/packages/cli/src/utils/interactive.test.mjs+++ /dev/null@@ -1,70 +0,0 @@-// Copyright (c) Meta Platforms, Inc. and affiliates.--/**- * @file Unit tests for the interactivity contract.- *- * isInteractive() is pure given its injected env, so these are fast unit- * tests. The "does the command actually fail fast instead of hanging" proof- * lives in the per-command subprocess tests (init/theme non-interactive).- */--import {describe, it, expect, vi, afterEach} from 'vitest';-import {isInteractive, requireInteractive} from './interactive.mjs';--describe('isInteractive', () => {- it('is true only when stdin AND stdout are TTYs and not CI', () => {- expect(isInteractive({stdinTTY: true, stdoutTTY: true, ci: false})).toBe(true);- });-- it('is false when stdin is not a TTY (piped input)', () => {- expect(isInteractive({stdinTTY: false, stdoutTTY: true, ci: false})).toBe(false);- });-- it('is false when stdout is not a TTY (piped output)', () => {- expect(isInteractive({stdinTTY: true, stdoutTTY: false, ci: false})).toBe(false);- });-- it('is false in CI even with a pseudo-TTY on both streams', () => {- expect(isInteractive({stdinTTY: true, stdoutTTY: true, ci: true})).toBe(false);- });-});--describe('requireInteractive', () => {- afterEach(() => {- vi.restoreAllMocks();- });-- it('returns (does not exit) when interactive', () => {- const exit = vi.spyOn(process, 'exit').mockImplementation(() => {- throw new Error('exit should not be called');- });- expect(() =>- requireInteractive(- {command: 'init', hint: '`astryx init --all`'},- {stdinTTY: true, stdoutTTY: true, ci: false},- ),- ).not.toThrow();- expect(exit).not.toHaveBeenCalled();- });-- it('exits 1 with actionable guidance when non-interactive', () => {- const exit = vi- .spyOn(process, 'exit')- .mockImplementation(() => {- throw new Error('__exit__');- });- const err = vi.spyOn(console, 'error').mockImplementation(() => {});- expect(() =>- requireInteractive(- {command: 'theme', hint: '`astryx theme <preset>`'},- {stdinTTY: false, stdoutTTY: false, ci: false},- ),- ).toThrow('__exit__');- expect(exit).toHaveBeenCalledWith(1);- const output = err.mock.calls.map(c => c.join(' ')).join('\n');- expect(output).toMatch(/requires a TTY/i);- expect(output).toMatch(/astryx theme <preset>/);- expect(output).toMatch(/`astryx theme`/);- expect(output).not.toMatch(/\bxds\b/);- });-});diff --git a/packages/cli/src/utils/path-safety.mjs b/packages/cli/src/utils/path-safety.mjsindex 2cc99ff332..eea1afa110 100644--- a/packages/cli/src/utils/path-safety.mjs+++ b/packages/cli/src/utils/path-safety.mjs@@ -165,21 +165,3 @@ export function isFilePathArg(pathArg) {const ext = path.extname(base).toLowerCase();return ext.length > 0 && FILE_EXTENSIONS.has(ext);}--/**- * True when the process is running non-interactively (no TTY) or when the- * caller has signaled JSON / scripted use. Commands consult this before- * prompting for confirmation; in scripted mode they require an explicit- * `--overwrite` flag instead.- *- * @param {object} [options]- * @param {boolean} [options.json] - Caller's --json flag.- * @returns {boolean}- */-export function isNonInteractive({json = false} = {}) {- if (json) return true;- // stdin not a TTY means piped input or scripted execution.- if (process.stdin && process.stdin.isTTY === false) return true;- if (process.stdout && process.stdout.isTTY === false) return true;- return false;-}diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 60d44c344c..71268a38dc 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -534,9 +534,6 @@ importers:packages/cli:dependencies:- '@clack/prompts':- specifier: ^1.7.0- version: 1.7.0commander:specifier: ^12.1.0version: 12.1.0@@ -1163,14 +1160,6 @@ packages:'@changesets/[email protected]':resolution: {integrity: sha512-CdTLvIOPiCNuH71pyDu3rA+Q0n65cmAbXnwWH84rKGiFumFzkmHNT8KHTMEchcxN+Kl8I54xGUhJ7l3E7X396Q==}- '@clack/[email protected]':- resolution: {integrity: sha512-/kr3UWNtdJfxZtPgDqUOmG2pvwlmcLGheex5yiZKdwbzZJxhV+HMNR9QNmyY5cGwTNV6LrR7Jtp+KjhUAP1qBQ==}- engines: {node: '>= 20.12.0'}-- '@clack/[email protected]':- resolution: {integrity: sha512-y7/yvZ2TPAnR9+jnc00klvNNLkJiXFFrQA/hlLCcxA9a2A4zQIOimyFQ9XfwYKiGD1fb5GY8vbKIIgO8d5Tb2A==}- engines: {node: '>= 20.12.0'}-'@csstools/[email protected]':resolution: {integrity: sha512-064IFJdjTfUqnjpCVpMOdbr8FLQBhinbZj6yRv2An2E41O/pLEXqfFRWqGq/SxlE5PEUYTlvWsG2r8MswAVvkg==}engines: {node: '>=20.19.0'}@@ -4095,18 +4084,9 @@ packages:resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==}- resolution: {integrity: sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g==}-- resolution: {integrity: sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg==}-resolution: {integrity: sha512-i70LwGWUduXqzicKXWshooq+sWL1K3WUU5rKZNG/0i3a1OSoX3HqhH5WbWwTmqWfor4urUakGPiRQcleRZTwOg==}- resolution: {integrity: sha512-7F2Fl+TjRSenLqlU3UjSH0iyqopqoZIu7eZVpEirP2g1GtWa2G/ecEmBdgz31+Mxr+ELclgg6sokpSFIQiZ02Q==}-resolution: {integrity: sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==}@@ -5288,9 +5268,6 @@ packages:resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==}engines: {node: '>=14'}- resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==}-resolution: {integrity: sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==}engines: {node: '>=6'}@@ -6532,18 +6509,6 @@ snapshots:human-id: 4.2.0prettier: 3.9.4- '@clack/[email protected]':- dependencies:- fast-wrap-ansi: 0.2.2- sisteransi: 1.0.5-- '@clack/[email protected]':- dependencies:- '@clack/core': 1.4.3- fast-string-width: 3.0.2- fast-wrap-ansi: 0.2.2- sisteransi: 1.0.5-'@csstools/[email protected]': {}'@csstools/[email protected](@csstools/[email protected](@csstools/[email protected]))(@csstools/[email protected])':@@ -9224,18 +9189,8 @@ snapshots:- [email protected]: {}-- dependencies:- fast-string-truncated-width: 3.0.3-- dependencies:- fast-string-width: 3.0.2-dependencies:reusify: 1.1.0@@ -10483,8 +10438,6 @@ snapshots:- [email protected]: {}-