UNPKG

@smooai/utils

Version:

A collection of shared utilities and tools used across SmooAI projects. This package provides common functionality to standardize and simplify development across all SmooAI repositories.

1 lines 1.14 kB
{"version":3,"file":"zx-factory.cjs","names":[],"sources":["../../src/utils/zx-factory.ts"],"sourcesContent":["import { $ } from 'zx';\n\n// Base zx instance with configuration\nexport const $$ = $({\n verbose: false,\n});\n\n// Quiet zx instance for silent operations\nexport const $$quiet = $({ quiet: true });\n\n// Factory function to create zx instances with custom options\nexport function createZxInstance(options: { cwd?: string; quiet?: boolean; verbose?: boolean } = {}) {\n return $({\n verbose: options.verbose ?? false,\n quiet: options.quiet ?? false,\n ...options,\n });\n}\n\n// Common patterns\nexport const $$cwd = (cwd: string) => createZxInstance({ cwd });\nexport const $$quietCwd = (cwd: string) => createZxInstance({ cwd, quiet: true });\n"],"mappings":";;;;AAGA,MAAa,MAAA,GAAA,GAAA,GAAO,EAChB,SAAS,MACb,CAAC;AAGD,MAAa,WAAA,GAAA,GAAA,GAAY,EAAE,OAAO,KAAK,CAAC;AAGxC,SAAgB,iBAAiB,UAAgE,CAAC,GAAG;CACjG,QAAA,GAAA,GAAA,GAAS;EACL,SAAS,QAAQ,WAAW;EAC5B,OAAO,QAAQ,SAAS;EACxB,GAAG;CACP,CAAC;AACL;AAGA,MAAa,SAAS,QAAgB,iBAAiB,EAAE,IAAI,CAAC;AAC9D,MAAa,cAAc,QAAgB,iBAAiB;CAAE;CAAK,OAAO;AAAK,CAAC"}