@stacksjs/buddy 0.75.634 → 0.75.635

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.
@@ -1 +1 @@
1
- import{run as runAgentCounts}from"./docs/agent-counts";import{run as runArtifacts}from"./docs/generated-artifacts";import{run as runBuddyDocs}from"./docs/buddy-commands";import{run as runCapabilities}from"./docs/capabilities";import{run as runSnippets}from"./docs/snippets";import{run as runDesktopMatrix}from"./docs/desktop-matrix";import{run as runLinks}from"./docs/links";import{run as runNativeSkills}from"./docs/native-skills";import{runTool}from"./run-tool";export function docs(buddy){buddy.command("docs:screenshots","Capture and verify an explicit UI inventory with Bun WebView").option("--config <path>","Screenshot configuration path",{default:"config/screenshots.ts"}).option("--out <directory>","Override the output directory").option("--only <ids>","Comma-separated screen ids to capture").option("--viewport <names>","Comma-separated configured viewport names").option("--list","Validate screen coverage without opening a browser",{default:false}).option("--check","Verify the complete saved inventory and image hashes",{default:false}).option("--json","Print the inventory, model plan and capture report as JSON",{default:false}).example("buddy docs:screenshots --list").example("buddy docs:screenshots --only welcome,calendar --viewport mobile").action(async(options)=>{const{captureScreenshots}=await import("@stacksjs/docs/screenshots");const report=await captureScreenshots({config:options.config,outDir:options.out,only:options.only?.split(",").map((value)=>value.trim()).filter(Boolean),viewports:options.viewport?.split(",").map((value)=>value.trim()).filter(Boolean),list:options.list,check:options.check,onProgress:(result)=>{if(!options.json)console.log(`${result.status} ${result.id}/${result.profile}/${result.viewport.name}`)}});if(options.json){console.log(JSON.stringify(report,null,2));if(report.results.some((result)=>result.status==="failed"))process.exitCode=1;return}if(options.list)for(const screen of report.inventory)console.log(`${screen.id} ${screen.path}${screen.skip?` [excluded: ${screen.skip}]`:""}`);if(options.list)for(const model of report.models.models)console.log(`${model.name} (${model.table||"table inferred"}, key ${model.primaryKey}): ${model.factoryFields.length} factories, seeder count ${model.seederCount??"not declared"}, parents ${model.parents.join(", ")||"none"}, required overrides ${model.requiredWithoutFactory.join(", ")||"none"}, sensitive fields ${model.sensitiveFields.join(", ")||"none"}, states ${model.suggestedStates.join(", ")}`);if(options.list&&report.models.cycles.length)console.log(`Cyclic model dependencies: ${report.models.cycles.join(", ")}`);if(options.list&&report.models.externalParents.length)console.log(`Parent fixtures outside this model set: ${report.models.externalParents.join(", ")}`);const failed=report.results.filter((result)=>result.status==="failed");for(const result of failed)console.error(`${result.id}/${result.profile}/${result.viewport.name}: ${result.error}`);console.log(options.list?"Screenshot configuration and template coverage verified.":`${report.results.filter((result)=>result.status==="captured").length} captures, ${failed.length} failed, ${report.results.filter((result)=>result.status==="skipped").length} explained exclusions.`);if(failed.length)process.exitCode=1});for(const check of[false,true]){buddy.command(check?"docs:style-guide:check":"docs:style-guide",check?"Verify generated application style guide freshness":"Generate a branded application component style guide").option("--config <path>","Style guide configuration path",{default:"config/style-guide.ts"}).action(async(options)=>{const{runStyleGuide}=await import("@stacksjs/docs/style-guide");const result=await runStyleGuide({config:options.config,check});console.log(`${check?"Verified":"Generated"} style guide: ${result.components} components, ${result.stories} stories, ${result.variants} variants.`)})}buddy.command("docs:native-skills","Regenerate native skill package coverage and driver evidence").action(async()=>{await runTool(runNativeSkills,"--write")});buddy.command("docs:native-skills:check","Verify native skills cover current packages and driver capabilities").action(async()=>{await runTool(runNativeSkills,"--check")});buddy.command("docs:buddy","Regenerate the buddy command reference doc").action(async()=>{await runTool(runBuddyDocs,"--write")});buddy.command("docs:buddy:check","Verify the buddy command reference doc is current").action(async()=>{await runTool(runBuddyDocs,"--check")});buddy.command("docs:artifacts","Regenerate the generated API artifacts (OpenAPI + types)").action(async()=>{await runTool(runArtifacts,"--write")});buddy.command("docs:artifacts:check","Verify the generated API artifacts are current").action(async()=>{await runTool(runArtifacts,"--check")});buddy.command("docs:agent-counts","Rewrite the counts AGENTS.md and the skills state, from the tree").action(async()=>{await runTool(runAgentCounts,"--write")});buddy.command("docs:agent-counts:check","Verify the counts AGENTS.md and the skills state are current").action(async()=>{await runTool(runAgentCounts,"--check")});buddy.command("docs:capabilities","Regenerate the driver capability matrix in docs/features/capabilities.md").action(async()=>{await runTool(runCapabilities,"--write")});buddy.command("docs:capabilities:check","Verify the published capability matrix matches its registry").action(async()=>{await runTool(runCapabilities,"--check")});buddy.command("docs:desktop-matrix","Regenerate the desktop support matrix in docs/packages/desktop.md").action(async()=>{await runTool(runDesktopMatrix,"--write")});buddy.command("docs:desktop-matrix:check","Verify the published desktop support matrix matches its source").action(async()=>{await runTool(runDesktopMatrix,"--check")});buddy.command("docs:snippets","Record the documented imports that do not compile, as the baseline").action(async()=>{await runTool(runSnippets,"--write")});buddy.command("docs:snippets:check","Verify no NEW documented import fails to compile").action(async()=>{await runTool(runSnippets,"--check")});buddy.command("docs:links","Report internal documentation links").action(async()=>{await runTool(runLinks)});buddy.command("docs:links:check","Verify internal documentation links resolve").action(async()=>{await runTool(runLinks,"--check")})}
1
+ import{run as runAgentCounts}from"./docs/agent-counts";import{run as runArtifacts}from"./docs/generated-artifacts";import{run as runBuddyDocs}from"./docs/buddy-commands";import{run as runCapabilities}from"./docs/capabilities";import{run as runSnippets}from"./docs/snippets";import{run as runDesktopMatrix}from"./docs/desktop-matrix";import{run as runLinks}from"./docs/links";import{run as runNativeSkills}from"./docs/native-skills";import{runTool}from"./run-tool";export function docs(buddy){buddy.command("docs:stories","Record browser and native user stories with video, scene screenshots and docs").option("--config <path>","Story configuration path",{default:"config/stories.ts"}).option("--out <directory>","Generated documentation and media directory").option("--only <ids>","Comma-separated story ids").option("--list","Validate and list stories without starting drivers",{default:false}).option("--check","Verify complete recordings, configuration and artifact hashes",{default:false}).option("--json","Print the story report as JSON",{default:false}).example("buddy docs:stories").example("buddy docs:stories --only checkout-ios,checkout-android").example("buddy docs:stories --check").action(async(options)=>{const{recordStories}=await import("@stacksjs/docs/stories");const report=await recordStories({config:options.config,outDir:options.out,only:options.only?.split(",").map((value)=>value.trim()).filter(Boolean),list:options.list,check:options.check,onProgress:(result)=>{if(!options.json)console.log(`${result.status} ${result.id} (${result.platform})`)}});if(options.json)console.log(JSON.stringify(report,null,2));else if(options.list)for(const story of report.inventory)console.log(`${story.id} (${story.platform}): ${story.scenes.map((scene)=>scene.id).join(", ")}`);else console.log(`Story documentation: ${report.outDir}/index.md`);if(!options.list&&report.results.some((result)=>result.status!=="passed"))process.exitCode=1});buddy.command("docs:screenshots","Capture and verify an explicit UI inventory with Bun WebView").option("--config <path>","Screenshot configuration path",{default:"config/screenshots.ts"}).option("--out <directory>","Override the output directory").option("--only <ids>","Comma-separated screen ids to capture").option("--viewport <names>","Comma-separated configured viewport names").option("--list","Validate screen coverage without opening a browser",{default:false}).option("--check","Verify the complete saved inventory and image hashes",{default:false}).option("--json","Print the inventory, model plan and capture report as JSON",{default:false}).example("buddy docs:screenshots --list").example("buddy docs:screenshots --only welcome,calendar --viewport mobile").action(async(options)=>{const{captureScreenshots}=await import("@stacksjs/docs/screenshots");const report=await captureScreenshots({config:options.config,outDir:options.out,only:options.only?.split(",").map((value)=>value.trim()).filter(Boolean),viewports:options.viewport?.split(",").map((value)=>value.trim()).filter(Boolean),list:options.list,check:options.check,onProgress:(result)=>{if(!options.json)console.log(`${result.status} ${result.id}/${result.profile}/${result.viewport.name}`)}});if(options.json){console.log(JSON.stringify(report,null,2));if(report.results.some((result)=>result.status==="failed"))process.exitCode=1;return}if(options.list)for(const screen of report.inventory)console.log(`${screen.id} ${screen.path}${screen.skip?` [excluded: ${screen.skip}]`:""}`);if(options.list)for(const model of report.models.models)console.log(`${model.name} (${model.table||"table inferred"}, key ${model.primaryKey}): ${model.factoryFields.length} factories, seeder count ${model.seederCount??"not declared"}, parents ${model.parents.join(", ")||"none"}, required overrides ${model.requiredWithoutFactory.join(", ")||"none"}, sensitive fields ${model.sensitiveFields.join(", ")||"none"}, states ${model.suggestedStates.join(", ")}`);if(options.list&&report.models.cycles.length)console.log(`Cyclic model dependencies: ${report.models.cycles.join(", ")}`);if(options.list&&report.models.externalParents.length)console.log(`Parent fixtures outside this model set: ${report.models.externalParents.join(", ")}`);const failed=report.results.filter((result)=>result.status==="failed");for(const result of failed)console.error(`${result.id}/${result.profile}/${result.viewport.name}: ${result.error}`);console.log(options.list?"Screenshot configuration and template coverage verified.":`${report.results.filter((result)=>result.status==="captured").length} captures, ${failed.length} failed, ${report.results.filter((result)=>result.status==="skipped").length} explained exclusions.`);if(failed.length)process.exitCode=1});for(const check of[false,true]){buddy.command(check?"docs:style-guide:check":"docs:style-guide",check?"Verify generated application style guide freshness":"Generate a branded application component style guide").option("--config <path>","Style guide configuration path",{default:"config/style-guide.ts"}).action(async(options)=>{const{runStyleGuide}=await import("@stacksjs/docs/style-guide");const result=await runStyleGuide({config:options.config,check});console.log(`${check?"Verified":"Generated"} style guide: ${result.components} components, ${result.stories} stories, ${result.variants} variants.`)})}buddy.command("docs:native-skills","Regenerate native skill package coverage and driver evidence").action(async()=>{await runTool(runNativeSkills,"--write")});buddy.command("docs:native-skills:check","Verify native skills cover current packages and driver capabilities").action(async()=>{await runTool(runNativeSkills,"--check")});buddy.command("docs:buddy","Regenerate the buddy command reference doc").action(async()=>{await runTool(runBuddyDocs,"--write")});buddy.command("docs:buddy:check","Verify the buddy command reference doc is current").action(async()=>{await runTool(runBuddyDocs,"--check")});buddy.command("docs:artifacts","Regenerate the generated API artifacts (OpenAPI + types)").action(async()=>{await runTool(runArtifacts,"--write")});buddy.command("docs:artifacts:check","Verify the generated API artifacts are current").action(async()=>{await runTool(runArtifacts,"--check")});buddy.command("docs:agent-counts","Rewrite the counts AGENTS.md and the skills state, from the tree").action(async()=>{await runTool(runAgentCounts,"--write")});buddy.command("docs:agent-counts:check","Verify the counts AGENTS.md and the skills state are current").action(async()=>{await runTool(runAgentCounts,"--check")});buddy.command("docs:capabilities","Regenerate the driver capability matrix in docs/features/capabilities.md").action(async()=>{await runTool(runCapabilities,"--write")});buddy.command("docs:capabilities:check","Verify the published capability matrix matches its registry").action(async()=>{await runTool(runCapabilities,"--check")});buddy.command("docs:desktop-matrix","Regenerate the desktop support matrix in docs/packages/desktop.md").action(async()=>{await runTool(runDesktopMatrix,"--write")});buddy.command("docs:desktop-matrix:check","Verify the published desktop support matrix matches its source").action(async()=>{await runTool(runDesktopMatrix,"--check")});buddy.command("docs:snippets","Record the documented imports that do not compile, as the baseline").action(async()=>{await runTool(runSnippets,"--write")});buddy.command("docs:snippets:check","Verify no NEW documented import fails to compile").action(async()=>{await runTool(runSnippets,"--check")});buddy.command("docs:links","Report internal documentation links").action(async()=>{await runTool(runLinks)});buddy.command("docs:links:check","Verify internal documentation links resolve").action(async()=>{await runTool(runLinks,"--check")})}
@@ -1,2 +1,3 @@
1
- import process from"node:process";import{runAction}from"@stacksjs/actions/run-action";import{intro,log,onUnknownSubcommand,outro}from"@stacksjs/cli";import{Action}from"@stacksjs/enums";import{projectPath}from"@stacksjs/path";import{ExitCode}from"@stacksjs/types";import{resultFailed}from"../result";function testPathEnv(paths){return paths?.length?{STACKS_TEST_PATHS:JSON.stringify(paths)}:undefined}function scopedTests(label,paths){if(!paths?.length)return label;return`${label} for ${paths.length===1?paths[0]:`${paths.length} paths`}`}export function test(buddy){const descriptions={command:"Runs your test suite",types:"Typechecks your codebase",coverage:"Generates a test coverage report",ui:"Runs your test suite in the browser",unit:"Runs your unit tests",feature:"Runs your feature tests",showReport:"Show the test report",project:"Target a specific project",verbose:"Enable verbose output"};buddy.command("test [...paths]",descriptions.command).option("-f, --feature",descriptions.feature,{default:false}).option("-u, --unit",descriptions.unit,{default:false}).option("-p, --project [project]",descriptions.project,{default:false}).option("--verbose",descriptions.verbose,{default:true}).example("buddy test").example("buddy test tests/unit/auth.test.ts").example("buddy test storage/framework/core/scheduler/tests").action(async(paths,options)=>{const perf=await intro("buddy test");const env=testPathEnv(paths);if(options.feature&&options.unit){const result=await runAction(Action.Test,{...options,cwd:projectPath(),env});if(resultFailed(result)){await outro("While running `buddy test`, there was an issue",{startTime:perf,useSeconds:true},result.error);process.exit(ExitCode.FatalError)}}if(options.feature&&!options.unit){log.info("Running Feature tests...");const result=await runAction(Action.TestFeature,{...options,cwd:projectPath(),env});if(resultFailed(result)){await outro("While running `buddy test`, there was an issue",{startTime:perf,useSeconds:true},result.error);process.exit(ExitCode.FatalError)}}if(!options.feature&&options.unit){log.info("Running Unit tests...");const result=await runAction(Action.TestUnit,{...options,cwd:projectPath(),env});if(resultFailed(result)){await outro("While running `buddy test`, there was an issue",{startTime:perf,useSeconds:true},result.error);process.exit(ExitCode.FatalError)}}if(!options.feature&&!options.unit){const result=await runAction(Action.Test,{...options,cwd:projectPath(),env});if(resultFailed(result)){await outro("While running `buddy test`, there was an issue",{startTime:perf,useSeconds:true},result.error);process.exit(ExitCode.FatalError)}}await outro(scopedTests("Finished running tests",paths),{startTime:perf,useSeconds:true});process.exit(ExitCode.Success)});buddy.command("test:unit [...paths]",descriptions.unit).option("--verbose",descriptions.verbose,{default:false}).example("buddy test:unit").example("buddy test:unit tests/unit/auth.test.ts").action(async(paths,options)=>{const perf=await intro("buddy test:unit");const result=await runAction(Action.TestUnit,{...options,verbose:true,cwd:projectPath(),env:testPathEnv(paths)});if(resultFailed(result)){await outro("While running `buddy test:unit`, there was an issue",{startTime:perf,useSeconds:true},result.error);process.exit(ExitCode.FatalError)}await outro(scopedTests("Finished running unit tests",paths),{startTime:perf,useSeconds:true})});buddy.command("test:feature [...paths]",descriptions.feature).option("--verbose",descriptions.verbose,{default:false}).example("buddy test:feature").example("buddy test:feature tests/feature/login.test.ts").action(async(paths,options)=>{const perf=await intro("buddy test:feature");const result=await runAction(Action.TestFeature,{...options,verbose:true,cwd:projectPath(),env:testPathEnv(paths)});if(resultFailed(result)){await outro("While running `buddy test:feature`, there was an issue",{startTime:perf,useSeconds:true},result.error);process.exit(ExitCode.FatalError)}await outro(scopedTests("Finished running feature tests",paths),{startTime:perf,useSeconds:true})});buddy.command("test:ui",descriptions.command).option("--verbose",descriptions.verbose,{default:false}).action(async(options)=>{const perf=await intro("buddy test:ui");const result=await runAction(Action.TestUi,{...options,verbose:true,cwd:projectPath()});if(resultFailed(result)){await outro("While running `buddy test:ui`, there was an issue",{startTime:perf,useSeconds:true},result.error);process.exit(ExitCode.FatalError)}await outro("Finished running tests in the browser",{startTime:perf,useSeconds:true})});buddy.command("test:types",descriptions.types).alias("typecheck").option("--verbose",descriptions.verbose,{default:false}).action(async(options)=>{const perf=await intro("buddy test:types");const result=await runAction(Action.Typecheck,{...options,verbose:true,cwd:projectPath()});if(resultFailed(result)){await outro("While running `buddy test:types`, there was an issue",{startTime:perf,useSeconds:true},result.error);process.exit(ExitCode.FatalError)}await outro("Finished running typecheck",{startTime:perf,useSeconds:true})});buddy.command("test:page-audit","Loads pages in headless Chrome and reports duplicate API requests, failed requests and console errors").option("--url <urls>","Page URLs to audit, comma-separated (paths resolve against --base)").option("--base [base]","Origin that paths in --url resolve against",{default:"http://localhost:3000"}).option("--quiet-ms [ms]","How long the network must stay quiet before a page counts as loaded",{default:1000}).option("--timeout [ms]","Give up waiting for a page to settle after this long",{default:15000}).option("--mobile","Audit at a 390px phone viewport instead of 1440px",{default:false}).option("--json","Print the reports as JSON",{default:false}).example("buddy test:page-audit --url /,/dashboard --base http://localhost:3000").example("buddy test:page-audit --url http://localhost:3000/pricing --json").action(async(options)=>{const targets=String(options.url??"").split(",").map((url)=>url.trim()).filter(Boolean);if(!targets.length){await log.error("Pass the pages to audit with --url (comma-separated URLs or paths)");process.exit(ExitCode.InvalidArgument)}const{auditPage,formatPageAudit,launch,pageAuditClean}=await import("@stacksjs/testing/browser");const viewport=options.mobile?{width:390,height:844,mobile:true,deviceScaleFactor:2}:{width:1440,height:900};const{cdp,close}=await launch({viewport});const reports=[];try{for(const target of targets){const url=new URL(target,options.base||"http://localhost:3000").href;const report=await auditPage(url,{cdp,quietMs:Number(options.quietMs)||1000,timeoutMs:Number(options.timeout)||15000});reports.push(report);if(!options.json)await log.info(formatPageAudit(report))}}finally{await close()}if(options.json)process.stdout.write(`${JSON.stringify(reports,null,2)}
2
- `);process.exit(reports.every(pageAuditClean)?ExitCode.Success:ExitCode.FatalError)});onUnknownSubcommand(buddy,"test")}
1
+ import process from"node:process";import{runAction}from"@stacksjs/actions/run-action";import{intro,log,onUnknownSubcommand,outro}from"@stacksjs/cli";import{Action}from"@stacksjs/enums";import{projectPath}from"@stacksjs/path";import{ExitCode}from"@stacksjs/types";import{resultFailed}from"../result";function testPathEnv(paths){return paths?.length?{STACKS_TEST_PATHS:JSON.stringify(paths)}:undefined}function scopedTests(label,paths){if(!paths?.length)return label;return`${label} for ${paths.length===1?paths[0]:`${paths.length} paths`}`}export function test(buddy){const descriptions={command:"Runs your test suite",types:"Typechecks your codebase",coverage:"Generates a test coverage report",ui:"Runs your test suite in the browser",unit:"Runs your unit tests",feature:"Runs your feature tests",showReport:"Show the test report",project:"Target a specific project",verbose:"Enable verbose output"};buddy.command("test [...paths]",descriptions.command).option("-f, --feature",descriptions.feature,{default:false}).option("-u, --unit",descriptions.unit,{default:false}).option("-p, --project [project]",descriptions.project,{default:false}).option("--verbose",descriptions.verbose,{default:true}).example("buddy test").example("buddy test tests/unit/auth.test.ts").example("buddy test storage/framework/core/scheduler/tests").action(async(paths,options)=>{const perf=await intro("buddy test");const env=testPathEnv(paths);if(options.feature&&options.unit){const result=await runAction(Action.Test,{...options,cwd:projectPath(),env});if(resultFailed(result)){await outro("While running `buddy test`, there was an issue",{startTime:perf,useSeconds:true},result.error);process.exit(ExitCode.FatalError)}}if(options.feature&&!options.unit){log.info("Running Feature tests...");const result=await runAction(Action.TestFeature,{...options,cwd:projectPath(),env});if(resultFailed(result)){await outro("While running `buddy test`, there was an issue",{startTime:perf,useSeconds:true},result.error);process.exit(ExitCode.FatalError)}}if(!options.feature&&options.unit){log.info("Running Unit tests...");const result=await runAction(Action.TestUnit,{...options,cwd:projectPath(),env});if(resultFailed(result)){await outro("While running `buddy test`, there was an issue",{startTime:perf,useSeconds:true},result.error);process.exit(ExitCode.FatalError)}}if(!options.feature&&!options.unit){const result=await runAction(Action.Test,{...options,cwd:projectPath(),env});if(resultFailed(result)){await outro("While running `buddy test`, there was an issue",{startTime:perf,useSeconds:true},result.error);process.exit(ExitCode.FatalError)}}await outro(scopedTests("Finished running tests",paths),{startTime:perf,useSeconds:true});process.exit(ExitCode.Success)});buddy.command("test:unit [...paths]",descriptions.unit).option("--verbose",descriptions.verbose,{default:false}).example("buddy test:unit").example("buddy test:unit tests/unit/auth.test.ts").action(async(paths,options)=>{const perf=await intro("buddy test:unit");const result=await runAction(Action.TestUnit,{...options,verbose:true,cwd:projectPath(),env:testPathEnv(paths)});if(resultFailed(result)){await outro("While running `buddy test:unit`, there was an issue",{startTime:perf,useSeconds:true},result.error);process.exit(ExitCode.FatalError)}await outro(scopedTests("Finished running unit tests",paths),{startTime:perf,useSeconds:true})});buddy.command("test:feature [...paths]",descriptions.feature).option("--verbose",descriptions.verbose,{default:false}).example("buddy test:feature").example("buddy test:feature tests/feature/login.test.ts").action(async(paths,options)=>{const perf=await intro("buddy test:feature");const result=await runAction(Action.TestFeature,{...options,verbose:true,cwd:projectPath(),env:testPathEnv(paths)});if(resultFailed(result)){await outro("While running `buddy test:feature`, there was an issue",{startTime:perf,useSeconds:true},result.error);process.exit(ExitCode.FatalError)}await outro(scopedTests("Finished running feature tests",paths),{startTime:perf,useSeconds:true})});buddy.command("test:ui",descriptions.command).option("--verbose",descriptions.verbose,{default:false}).action(async(options)=>{const perf=await intro("buddy test:ui");const result=await runAction(Action.TestUi,{...options,verbose:true,cwd:projectPath()});if(resultFailed(result)){await outro("While running `buddy test:ui`, there was an issue",{startTime:perf,useSeconds:true},result.error);process.exit(ExitCode.FatalError)}await outro("Finished running tests in the browser",{startTime:perf,useSeconds:true})});buddy.command("test:types",descriptions.types).alias("typecheck").option("--verbose",descriptions.verbose,{default:false}).action(async(options)=>{const perf=await intro("buddy test:types");const result=await runAction(Action.Typecheck,{...options,verbose:true,cwd:projectPath()});if(resultFailed(result)){await outro("While running `buddy test:types`, there was an issue",{startTime:perf,useSeconds:true},result.error);process.exit(ExitCode.FatalError)}await outro("Finished running typecheck",{startTime:perf,useSeconds:true})});buddy.command("test:page-audit","Loads pages in headless Chrome and reports duplicate API requests, failed requests and console errors").option("--url <urls>","Page URLs to audit, comma-separated (paths resolve against --base)").option("--base [base]","Origin that paths in --url resolve against",{default:"http://localhost:3000"}).option("--quiet-ms [ms]","How long the network must stay quiet before a page counts as loaded",{default:1000}).option("--timeout [ms]","Give up waiting for a page to settle after this long",{default:15000}).option("--mobile","Audit at a 390px phone viewport instead of 1440px",{default:false}).option("--json","Print the reports as JSON",{default:false}).option("--lighthouse","Also measure Performance, Accessibility, Best Practices and SEO with Lighthouse",{default:false}).option("--sitemap <file>","Audit every page in a local sitemap on --base").option("--device <device>","Lighthouse profile: mobile, desktop or both",{default:"both"}).option("--basic-auth","Authenticate on --base using STACKS_AUDIT_USERNAME and STACKS_AUDIT_PASSWORD",{default:false}).option("--min-score <score>","Required Lighthouse score in every category, from 0 to 100",{default:100}).option("--output <directory>","Directory for Lighthouse JSON, HTML and summary reports",{default:"storage/framework/testing/lighthouse"}).example("buddy test:page-audit --url /,/dashboard --base http://localhost:3000").example("buddy test:page-audit --url http://localhost:3000/pricing --json").example("buddy test:page-audit --lighthouse --sitemap public/sitemap.xml --base http://localhost:3000 --min-score 100").action(async(options)=>{const{auditLighthouse,basicAuditOrigin,formatLighthouseResult,lighthouseTargets}=await import("@stacksjs/testing/lighthouse");const base=options.base||"http://localhost:3000";const username=process.env.STACKS_AUDIT_USERNAME;const password=process.env.STACKS_AUDIT_PASSWORD;let targets;let authOrigin;try{targets=await lighthouseTargets(options);if(options.basicAuth){authOrigin=basicAuditOrigin(base,targets);if(!username||!password)throw new TypeError("Set STACKS_AUDIT_USERNAME and STACKS_AUDIT_PASSWORD for --basic-auth");delete process.env.STACKS_AUDIT_USERNAME;delete process.env.STACKS_AUDIT_PASSWORD}if(options.lighthouse){if(!["mobile","desktop","both"].includes(options.device||"both"))throw new TypeError("Choose mobile, desktop or both");const minimum=Number(options.minScore??100);if(!Number.isFinite(minimum)||minimum<0||minimum>100)throw new TypeError("Minimum score must be between 0 and 100")}}catch(error){await log.error(error instanceof Error?error.message:String(error));process.exit(ExitCode.InvalidArgument)}const{auditPage,formatPageAudit,installBasicAuth,launch,pageAuditClean}=await import("@stacksjs/testing/browser");const viewport=options.mobile?{width:390,height:844,mobile:true,deviceScaleFactor:2}:{width:1440,height:900};const{cdp,close,port}=await launch({viewport,shared:authOrigin?false:undefined});const reports=[];let lighthouse=[];try{if(authOrigin)await installBasicAuth(cdp,authOrigin,username,password);for(const target of targets){const url=new URL(target,base).href;const report=await auditPage(url,{cdp,quietMs:Number(options.quietMs)||1000,timeoutMs:Number(options.timeout)||15000});reports.push(report);if(!options.json)await log.info(formatPageAudit(report))}if(!authOrigin)await close();if(options.lighthouse){if(authOrigin)await cdp.send("Page.navigate",{url:"about:blank"});lighthouse=await auditLighthouse({urls:targets,outputDir:options.output||projectPath("storage/framework/testing/lighthouse"),device:options.device,minimum:Number(options.minScore??100),chromePort:authOrigin?port:undefined,onResult:(result)=>{if(!options.json)process.stdout.write(`${formatLighthouseResult(result)}
2
+ `)}})}}finally{await close()}if(options.json)process.stdout.write(`${JSON.stringify(options.lighthouse?{pages:reports,lighthouse}:reports,null,2)}
3
+ `);process.exit(reports.every(pageAuditClean)&&lighthouse.every((result)=>result.passed)?ExitCode.Success:ExitCode.FatalError)});onUnknownSubcommand(buddy,"test")}
@@ -1 +1 @@
1
- export async function withTimeout(work,ms){let timeoutId;const deadline=new Promise((_,reject)=>{timeoutId=setTimeout(()=>reject(new Error("timeout")),ms)});try{return await Promise.race([work,deadline])}finally{if(timeoutId!==undefined)clearTimeout(timeoutId)}}const commandRegistry={about:{path:"./commands/about.js",load:()=>import("./commands/about.js"),exportName:"about"},add:{path:"./commands/add.js",load:()=>import("./commands/add.js"),exportName:"add"},"ai:access":{path:"./commands/ai-access.js",load:()=>import("./commands/ai-access.js"),exportName:"aiAccess"},"ai:context":{path:"./commands/ai-context.js",load:()=>import("./commands/ai-context.js"),exportName:"aiContext"},auth:{path:"./commands/auth.js",load:()=>import("./commands/auth.js"),exportName:"auth"},build:{path:"./commands/build.js",load:()=>import("./commands/build.js"),exportName:"build"},cd:{path:"./commands/cd.js",load:()=>import("./commands/cd.js"),exportName:"cd"},daemon:{path:"./commands/daemon.js",load:()=>import("./commands/daemon.js"),exportName:"daemon"},dashboard:{path:"./commands/dashboard.js",load:()=>import("./commands/dashboard.js"),exportName:"dashboard"},changelog:{path:"./commands/changelog.js",load:()=>import("./commands/changelog.js"),exportName:"changelog"},clean:{path:"./commands/clean.js",load:()=>import("./commands/clean.js"),exportName:"clean"},cloud:{path:"./commands/cloud.js",load:()=>import("./commands/cloud.js"),exportName:"cloud"},commit:{path:"./commands/commit.js",load:()=>import("./commands/commit.js"),exportName:"commit"},completion:{path:"./commands/completion.js",load:()=>import("./commands/completion.js"),exportName:"completion"},"config:migrate":{path:"./commands/config-migrate.js",load:()=>import("./commands/config-migrate.js"),exportName:"configMigrate"},configure:{path:"./commands/configure.js",load:()=>import("./commands/configure.js"),exportName:"configure"},create:{path:"./commands/create.js",load:()=>import("./commands/create.js"),exportName:"create"},new:{path:"./commands/create.js",load:()=>import("./commands/create.js"),exportName:"create"},deploy:{path:"./commands/deploy.js",load:()=>import("./commands/deploy.js"),exportName:"deploy"},"deploy:rollback":{path:"./commands/deploy.js",load:()=>import("./commands/deploy.js"),exportName:"deploy"},dev:{path:"./commands/dev.js",load:()=>import("./commands/dev.js"),exportName:"dev"},"desktop:apple:doctor":{path:"./commands/desktop-apple.js",load:()=>import("./commands/desktop-apple.js"),exportName:"desktopApple"},"desktop:apple:csr":{path:"./commands/desktop-apple.js",load:()=>import("./commands/desktop-apple.js"),exportName:"desktopApple"},"desktop:apple:init":{path:"./commands/desktop-apple.js",load:()=>import("./commands/desktop-apple.js"),exportName:"desktopApple"},"desktop:apple:package":{path:"./commands/desktop-apple.js",load:()=>import("./commands/desktop-apple.js"),exportName:"desktopApple"},"desktop:apple:provision":{path:"./commands/desktop-apple.js",load:()=>import("./commands/desktop-apple.js"),exportName:"desktopApple"},"desktop:apple:publish":{path:"./commands/desktop-apple.js",load:()=>import("./commands/desktop-apple.js"),exportName:"desktopApple"},"desktop:update:keypair":{path:"./commands/desktop-release.js",load:()=>import("./commands/desktop-release.js"),exportName:"desktopRelease"},"release:desktop":{path:"./commands/desktop-release.js",load:()=>import("./commands/desktop-release.js"),exportName:"desktopRelease"},"desktop:probe":{path:"./commands/desktop-probe.js",load:()=>import("./commands/desktop-probe.js"),exportName:"desktopProbe"},"integrations:probe":{path:"./commands/integrations-probe.js",load:()=>import("./commands/integrations-probe.js"),exportName:"integrationsProbe"},dns:{path:"./commands/dns.js",load:()=>import("./commands/dns.js"),exportName:"dns"},"dns:pull":{path:"./commands/dns.js",load:()=>import("./commands/dns.js"),exportName:"dns"},"dns:diff":{path:"./commands/dns.js",load:()=>import("./commands/dns.js"),exportName:"dns"},"dns:sync":{path:"./commands/dns.js",load:()=>import("./commands/dns.js"),exportName:"dns"},doctor:{path:"./commands/doctor.js",load:()=>import("./commands/doctor.js"),exportName:"doctor"},domains:{path:"./commands/domains.js",load:()=>import("./commands/domains.js"),exportName:"domains"},email:{path:"./commands/email.js",load:()=>import("./commands/email.js"),exportName:"email"},env:{path:"./commands/env.js",load:()=>import("./commands/env.js"),exportName:"env"},"extension:init":{path:"./commands/extension.js",load:()=>import("./commands/extension.js"),exportName:"extension"},"extension:build":{path:"./commands/extension.js",load:()=>import("./commands/extension.js"),exportName:"extension"},"extension:package":{path:"./commands/extension.js",load:()=>import("./commands/extension.js"),exportName:"extension"},"extension:chrome:publish":{path:"./commands/extension.js",load:()=>import("./commands/extension.js"),exportName:"extension"},"extension:chrome:status":{path:"./commands/extension.js",load:()=>import("./commands/extension.js"),exportName:"extension"},"extension:firefox:publish":{path:"./commands/extension.js",load:()=>import("./commands/extension.js"),exportName:"extension"},"extension:safari:init":{path:"./commands/extension.js",load:()=>import("./commands/extension.js"),exportName:"extension"},"extension:safari:provision":{path:"./commands/extension.js",load:()=>import("./commands/extension.js"),exportName:"extension"},"extension:safari:app":{path:"./commands/extension.js",load:()=>import("./commands/extension.js"),exportName:"extension"},"extension:safari:publish":{path:"./commands/extension.js",load:()=>import("./commands/extension.js"),exportName:"extension"},"dashboard:install":{path:"./commands/features.js",load:()=>import("./commands/features.js"),exportName:"features"},"dashboard:uninstall":{path:"./commands/features.js",load:()=>import("./commands/features.js"),exportName:"features"},"commerce:install":{path:"./commands/features.js",load:()=>import("./commands/features.js"),exportName:"features"},"commerce:uninstall":{path:"./commands/features.js",load:()=>import("./commands/features.js"),exportName:"features"},"commerce:import":{path:"./commands/commerce-import.js",load:()=>import("./commands/commerce-import.js"),exportName:"commerceImport"},"cms:install":{path:"./commands/features.js",load:()=>import("./commands/features.js"),exportName:"features"},"cms:uninstall":{path:"./commands/features.js",load:()=>import("./commands/features.js"),exportName:"features"},"marketing:install":{path:"./commands/features.js",load:()=>import("./commands/features.js"),exportName:"features"},"marketing:uninstall":{path:"./commands/features.js",load:()=>import("./commands/features.js"),exportName:"features"},"monitoring:install":{path:"./commands/features.js",load:()=>import("./commands/features.js"),exportName:"features"},"monitoring:uninstall":{path:"./commands/features.js",load:()=>import("./commands/features.js"),exportName:"features"},"realtime:install":{path:"./commands/features.js",load:()=>import("./commands/features.js"),exportName:"features"},"realtime:uninstall":{path:"./commands/features.js",load:()=>import("./commands/features.js"),exportName:"features"},"queue:install":{path:"./commands/features.js",load:()=>import("./commands/features.js"),exportName:"features"},"queue:uninstall":{path:"./commands/features.js",load:()=>import("./commands/features.js"),exportName:"features"},"db:backup":{path:"./commands/db.js",load:()=>import("./commands/db.js"),exportName:"db"},"db:backups":{path:"./commands/db.js",load:()=>import("./commands/db.js"),exportName:"db"},"db:restore":{path:"./commands/db.js",load:()=>import("./commands/db.js"),exportName:"db"},"storage:backup":{path:"./commands/storage-backup.js",load:()=>import("./commands/storage-backup.js"),exportName:"storageBackup"},"storage:backups":{path:"./commands/storage-backup.js",load:()=>import("./commands/storage-backup.js"),exportName:"storageBackup"},"storage:restore":{path:"./commands/storage-backup.js",load:()=>import("./commands/storage-backup.js"),exportName:"storageBackup"},"feedback:invite":{path:"./commands/feedback.js",load:()=>import("./commands/feedback.js"),exportName:"feedback"},"feedback:tokens":{path:"./commands/feedback.js",load:()=>import("./commands/feedback.js"),exportName:"feedback"},"feedback:revoke":{path:"./commands/feedback.js",load:()=>import("./commands/feedback.js"),exportName:"feedback"},"socials:identities":{path:"./commands/socials.js",load:()=>import("./commands/socials.js"),exportName:"socials"},"socials:authorize":{path:"./commands/socials.js",load:()=>import("./commands/socials.js"),exportName:"socials"},fresh:{path:"./commands/fresh.js",load:()=>import("./commands/fresh.js"),exportName:"fresh"},generate:{path:"./commands/generate.js",load:()=>import("./commands/generate.js"),exportName:"generate"},"gdpr:export":{path:"./commands/gdpr.js",load:()=>import("./commands/gdpr.js"),exportName:"gdpr"},"gdpr:erase":{path:"./commands/gdpr.js",load:()=>import("./commands/gdpr.js"),exportName:"gdpr"},"gdpr:prune":{path:"./commands/gdpr.js",load:()=>import("./commands/gdpr.js"),exportName:"gdpr"},"gdpr:register":{path:"./commands/gdpr.js",load:()=>import("./commands/gdpr.js"),exportName:"gdpr"},"gdpr:register:check":{path:"./commands/gdpr.js",load:()=>import("./commands/gdpr.js"),exportName:"gdpr"},"hq:connect":{path:"./commands/hq.js",load:()=>import("./commands/hq.js"),exportName:"hq"},"support:install":{path:"./commands/hq.js",load:()=>import("./commands/hq.js"),exportName:"hq"},"support:doctor":{path:"./commands/hq.js",load:()=>import("./commands/hq.js"),exportName:"hq"},"hq:status":{path:"./commands/hq.js",load:()=>import("./commands/hq.js"),exportName:"hq"},"hq:sync":{path:"./commands/hq.js",load:()=>import("./commands/hq.js"),exportName:"hq"},http:{path:"./commands/http.js",load:()=>import("./commands/http.js"),exportName:"http"},install:{path:"./commands/install.js",load:()=>import("./commands/install.js"),exportName:"install"},key:{path:"./commands/key.js",load:()=>import("./commands/key.js"),exportName:"key"},license:{path:"./commands/license.js",load:()=>import("./commands/license.js"),exportName:"license"},"license:keygen":{path:"./commands/license.js",load:()=>import("./commands/license.js"),exportName:"license"},lint:{path:"./commands/lint.js",load:()=>import("./commands/lint.js"),exportName:"lint"},format:{path:"./commands/lint.js",load:()=>import("./commands/lint.js"),exportName:"lint"},"format:check":{path:"./commands/lint.js",load:()=>import("./commands/lint.js"),exportName:"lint"},libs:{path:"./commands/libs.js",load:()=>import("./commands/libs.js"),exportName:"libs"},libraries:{path:"./commands/libs.js",load:()=>import("./commands/libs.js"),exportName:"libs"},list:{path:"./commands/list.js",load:()=>import("./commands/list.js"),exportName:"list"},mail:{path:"./commands/mail.js",load:()=>import("./commands/mail.js"),exportName:"mailCommands"},"mail:preview":{path:"./commands/mail.js",load:()=>import("./commands/mail.js"),exportName:"mailCommands"},maintenance:{path:"./commands/maintenance.js",load:()=>import("./commands/maintenance.js"),exportName:"maintenance"},down:{path:"./commands/maintenance.js",load:()=>import("./commands/maintenance.js"),exportName:"maintenance"},up:{path:"./commands/maintenance.js",load:()=>import("./commands/maintenance.js"),exportName:"maintenance"},status:{path:"./commands/maintenance.js",load:()=>import("./commands/maintenance.js"),exportName:"maintenance"},"coming-soon":{path:"./commands/maintenance.js",load:()=>import("./commands/maintenance.js"),exportName:"maintenance"},"coming-soon:status":{path:"./commands/maintenance.js",load:()=>import("./commands/maintenance.js"),exportName:"maintenance"},launch:{path:"./commands/maintenance.js",load:()=>import("./commands/maintenance.js"),exportName:"maintenance"},make:{path:"./commands/make.js",load:()=>import("./commands/make.js"),exportName:"make"},"scaffold:crud":{path:"./commands/make.js",load:()=>import("./commands/make.js"),exportName:"make"},migrate:{path:"./commands/migrate.js",load:()=>import("./commands/migrate.js"),exportName:"migrate"},"migrate:fresh":{path:"./commands/migrate.js",load:()=>import("./commands/migrate.js"),exportName:"migrate"},"migrate:switch":{path:"./commands/migrate.js",load:()=>import("./commands/migrate.js"),exportName:"migrate"},"migrate:project":{path:"./commands/migrate-project.js",load:()=>import("./commands/migrate-project.js"),exportName:"migrateProject"},outdated:{path:"./commands/outdated.js",load:()=>import("./commands/outdated.js"),exportName:"outdated"},package:{path:"./commands/package.js",load:()=>import("./commands/package.js"),exportName:"packageCommands"},phone:{path:"./commands/phone.js",load:()=>import("./commands/phone.js"),exportName:"phone"},ports:{path:"./commands/ports.js",load:()=>import("./commands/ports.js"),exportName:"ports"},"security:scan":{path:"./commands/security.js",load:()=>import("./commands/security.js"),exportName:"security"},audit:{path:"./commands/security.js",load:()=>import("./commands/security.js"),exportName:"security"},"server:flash":{path:"./commands/server.js",load:()=>import("./commands/server.js"),exportName:"server"},"server:first-boot":{path:"./commands/server.js",load:()=>import("./commands/server.js"),exportName:"server"},"server:doctor":{path:"./commands/server.js",load:()=>import("./commands/server.js"),exportName:"server"},"server:setup":{path:"./commands/server.js",load:()=>import("./commands/server.js"),exportName:"server"},"server:trust":{path:"./commands/server.js",load:()=>import("./commands/server.js"),exportName:"server"},"link:core":{path:"./commands/link.js",load:()=>import("./commands/link.js"),exportName:"link"},"comments:list":{path:"./commands/comments.js",load:()=>import("./commands/comments.js"),exportName:"commentsCommands"},"comments:approve":{path:"./commands/comments.js",load:()=>import("./commands/comments.js"),exportName:"commentsCommands"},"comments:reject":{path:"./commands/comments.js",load:()=>import("./commands/comments.js"),exportName:"commentsCommands"},"comments:delete":{path:"./commands/comments.js",load:()=>import("./commands/comments.js"),exportName:"commentsCommands"},"user:add":{path:"./commands/user.js",load:()=>import("./commands/user.js"),exportName:"user"},"user:list":{path:"./commands/user.js",load:()=>import("./commands/user.js"),exportName:"user"},"user:audit":{path:"./commands/user.js",load:()=>import("./commands/user.js"),exportName:"user"},"unlink:core":{path:"./commands/link.js",load:()=>import("./commands/link.js"),exportName:"link"},prepublish:{path:"./commands/prepublish.js",load:()=>import("./commands/prepublish.js"),exportName:"prepublish"},projects:{path:"./commands/projects.js",load:()=>import("./commands/projects.js"),exportName:"projects"},publish:{path:"./commands/publish.js",load:()=>import("./commands/publish.js"),exportName:"publish"},"publish:model":{path:"./commands/publish.js",load:()=>import("./commands/publish.js"),exportName:"publish"},"publish:controller":{path:"./commands/publish.js",load:()=>import("./commands/publish.js"),exportName:"publish"},"publish:middleware":{path:"./commands/publish.js",load:()=>import("./commands/publish.js"),exportName:"publish"},"publish:action":{path:"./commands/publish.js",load:()=>import("./commands/publish.js"),exportName:"publish"},"publish:component":{path:"./commands/publish.js",load:()=>import("./commands/publish.js"),exportName:"publish"},"publish:view":{path:"./commands/publish.js",load:()=>import("./commands/publish.js"),exportName:"publish"},"publish:core":{path:"./commands/publish.js",load:()=>import("./commands/publish.js"),exportName:"publish"},"core:status":{path:"./commands/publish.js",load:()=>import("./commands/publish.js"),exportName:"publish"},"publish:defaults":{path:"./commands/publish.js",load:()=>import("./commands/publish.js"),exportName:"publish"},unpublish:{path:"./commands/publish.js",load:()=>import("./commands/publish.js"),exportName:"publish"},queue:{path:"./commands/queue.js",load:()=>import("./commands/queue.js"),exportName:"queue"},release:{path:"./commands/release.js",load:()=>import("./commands/release.js"),exportName:"release"},route:{path:"./commands/route.js",load:()=>import("./commands/route.js"),exportName:"route"},saas:{path:"./commands/saas.js",load:()=>import("./commands/saas.js"),exportName:"saas"},"stripe:setup":{path:"./commands/saas.js",load:()=>import("./commands/saas.js"),exportName:"saas"},schedule:{path:"./commands/schedule.js",load:()=>import("./commands/schedule.js"),exportName:"schedule"},search:{path:"./commands/search.js",load:()=>import("./commands/search.js"),exportName:"search"},"search-engine:update":{path:"./commands/search.js",load:()=>import("./commands/search.js"),exportName:"search"},"search-engine:settings":{path:"./commands/search.js",load:()=>import("./commands/search.js"),exportName:"search"},screenshot:{path:"./commands/screenshot.js",load:()=>import("./commands/screenshot.js"),exportName:"screenshot"},seed:{path:"./commands/seed.js",load:()=>import("./commands/seed.js"),exportName:"seed"},"seed:roles":{path:"./commands/seed.js",load:()=>import("./commands/seed.js"),exportName:"seed"},"roles:seed":{path:"./commands/seed.js",load:()=>import("./commands/seed.js"),exportName:"seed"},"seed:admins":{path:"./commands/seed.js",load:()=>import("./commands/seed.js"),exportName:"seed"},"admins:seed":{path:"./commands/seed.js",load:()=>import("./commands/seed.js"),exportName:"seed"},preview:{path:"./commands/serve.js",load:()=>import("./commands/serve.js"),exportName:"preview"},serve:{path:"./commands/serve.js",load:()=>import("./commands/serve.js"),exportName:"serve"},"serve:api":{path:"./commands/serve.js",load:()=>import("./commands/serve.js"),exportName:"serveApi"},"workflow:setup":{path:"./commands/workflow.js",load:()=>import("./commands/workflow.js"),exportName:"workflow"},"workflow:step":{path:"./commands/workflow.js",load:()=>import("./commands/workflow.js"),exportName:"workflow"},"workflow:release-state":{path:"./commands/workflow.js",load:()=>import("./commands/workflow.js"),exportName:"workflow"},"workflow:runs":{path:"./commands/workflow.js",load:()=>import("./commands/workflow.js"),exportName:"workflow"},"workflow:show":{path:"./commands/workflow.js",load:()=>import("./commands/workflow.js"),exportName:"workflow"},"workflow:run":{path:"./commands/workflow.js",load:()=>import("./commands/workflow.js"),exportName:"workflow"},"workflow:artifacts":{path:"./commands/workflow.js",load:()=>import("./commands/workflow.js"),exportName:"workflow"},setup:{path:"./commands/setup.js",load:()=>import("./commands/setup.js"),exportName:"setup"},ensure:{path:"./commands/setup.js",load:()=>import("./commands/setup.js"),exportName:"setup"},"setup:ai":{path:"./commands/setup.js",load:()=>import("./commands/setup.js"),exportName:"setup"},"setup:ssl":{path:"./commands/setup.js",load:()=>import("./commands/setup.js"),exportName:"setup"},"setup:ios":{path:"./commands/setup.js",load:()=>import("./commands/setup.js"),exportName:"setup"},"setup:oh-my-zsh":{path:"./commands/setup.js",load:()=>import("./commands/setup.js"),exportName:"setup"},"ai:setup":{path:"./commands/setup.js",load:()=>import("./commands/setup.js"),exportName:"setup"},share:{path:"./commands/share.js",load:()=>import("./commands/share.js"),exportName:"share"},"simulator:doctor":{path:"./commands/simulator.js",load:()=>import("./commands/simulator.js"),exportName:"simulator"},"simulator:open":{path:"./commands/simulator.js",load:()=>import("./commands/simulator.js"),exportName:"simulator"},stack:{path:"./commands/stacks.js",load:()=>import("./commands/stacks.js"),exportName:"stacks"},sms:{path:"./commands/sms.js",load:()=>import("./commands/sms.js"),exportName:"sms"},telemetry:{path:"./commands/telemetry.js",load:()=>import("./commands/telemetry.js"),exportName:"telemetryCommand"},test:{path:"./commands/test.js",load:()=>import("./commands/test.js"),exportName:"test"},tinker:{path:"./commands/tinker.js",load:()=>import("./commands/tinker.js"),exportName:"tinker"},types:{path:"./commands/types.js",load:()=>import("./commands/types.js"),exportName:"types"},undeploy:{path:"./commands/cloud.js",load:()=>import("./commands/cloud.js"),exportName:"cloud"},upgrade:{path:"./commands/upgrade.js",load:()=>import("./commands/upgrade.js"),exportName:"upgrade"},version:{path:"./commands/version.js",load:()=>import("./commands/version.js"),exportName:"version"},"docs:screenshots":{path:"./commands/docs.js",load:()=>import("./commands/docs.js"),exportName:"docs"},"docs:style-guide":{path:"./commands/docs.js",load:()=>import("./commands/docs.js"),exportName:"docs"},"docs:style-guide:check":{path:"./commands/docs.js",load:()=>import("./commands/docs.js"),exportName:"docs"},"docs:buddy":{path:"./commands/docs.js",load:()=>import("./commands/docs.js"),exportName:"docs"},"docs:native-skills":{path:"./commands/docs.js",load:()=>import("./commands/docs.js"),exportName:"docs"},"docs:native-skills:check":{path:"./commands/docs.js",load:()=>import("./commands/docs.js"),exportName:"docs"},"docs:buddy:check":{path:"./commands/docs.js",load:()=>import("./commands/docs.js"),exportName:"docs"},"docs:artifacts":{path:"./commands/docs.js",load:()=>import("./commands/docs.js"),exportName:"docs"},"docs:artifacts:check":{path:"./commands/docs.js",load:()=>import("./commands/docs.js"),exportName:"docs"},"docs:links":{path:"./commands/docs.js",load:()=>import("./commands/docs.js"),exportName:"docs"},"docs:links:check":{path:"./commands/docs.js",load:()=>import("./commands/docs.js"),exportName:"docs"}};const commandGroups={minimal:["version","help"],development:["dev","build","test","lint"],database:["migrate","seed","fresh"],scaffolding:["make","generate"],deployment:["deploy","release","cloud","server"],info:["about","doctor","list"]};const loadedRegistrars=new WeakMap;function loaderKey(loader){return`${loader.path}#${loader.exportName}`}export function markLoaded(buddy,commandName){const loader=commandRegistry[commandName];if(!loader)return;let set=loadedRegistrars.get(buddy);if(!set){set=new Set;loadedRegistrars.set(buddy,set)}set.add(loaderKey(loader))}export async function loadCommand(commandName,buddy){const loader=commandRegistry[commandName];if(!loader){return false}let set=loadedRegistrars.get(buddy);if(!set){set=new Set;loadedRegistrars.set(buddy,set)}const key=loaderKey(loader);if(set.has(key))return true;set.add(key);try{const module=await loader.load();const commandFunction=module[loader.exportName];if(typeof commandFunction==="function"){commandFunction(buddy);return true}else{return false}}catch{return false}}export async function loadCommands(commandNames,buddy){const seen=new Set;const unique=[];for(const name of commandNames){const loader=commandRegistry[name];const key=loader?`${loader.path}#${loader.exportName}`:`name:${name}`;if(seen.has(key))continue;seen.add(key);unique.push(name)}await Promise.all(unique.map(async(name)=>{try{await withTimeout(loadCommand(name,buddy),5000)}catch{}}))}export async function loadCommandGroup(groupName,buddy){const commands=commandGroups[groupName];if(commands){await loadCommands(commands,buddy)}}export async function loadAllCommands(buddy){const allCommands=Object.keys(commandRegistry);await loadCommands(allCommands,buddy)}export function getCommandNames(){return Object.keys(commandRegistry)}export function getCommandsToLoad(args){const requestedCommand=args[0];const isVersionFlag=requestedCommand==="--version"||requestedCommand==="-v";const isHelpFlag=requestedCommand==="--help"||requestedCommand==="-h";const isHelpWord=requestedCommand==="help";if(isVersionFlag)return["version"];if(!requestedCommand||isHelpFlag||isHelpWord)return Object.keys(commandRegistry);const baseCommand=requestedCommand.split(":")[0];if(baseCommand==="list"){return["list",...Object.keys(commandRegistry).filter((k)=>k!=="list")]}if(commandRegistry[requestedCommand]){return[requestedCommand]}if(commandRegistry[baseCommand]){return[baseCommand]}return Object.keys(commandRegistry)}
1
+ export async function withTimeout(work,ms){let timeoutId;const deadline=new Promise((_,reject)=>{timeoutId=setTimeout(()=>reject(new Error("timeout")),ms)});try{return await Promise.race([work,deadline])}finally{if(timeoutId!==undefined)clearTimeout(timeoutId)}}const commandRegistry={about:{path:"./commands/about.js",load:()=>import("./commands/about.js"),exportName:"about"},add:{path:"./commands/add.js",load:()=>import("./commands/add.js"),exportName:"add"},"ai:access":{path:"./commands/ai-access.js",load:()=>import("./commands/ai-access.js"),exportName:"aiAccess"},"ai:context":{path:"./commands/ai-context.js",load:()=>import("./commands/ai-context.js"),exportName:"aiContext"},auth:{path:"./commands/auth.js",load:()=>import("./commands/auth.js"),exportName:"auth"},build:{path:"./commands/build.js",load:()=>import("./commands/build.js"),exportName:"build"},cd:{path:"./commands/cd.js",load:()=>import("./commands/cd.js"),exportName:"cd"},daemon:{path:"./commands/daemon.js",load:()=>import("./commands/daemon.js"),exportName:"daemon"},dashboard:{path:"./commands/dashboard.js",load:()=>import("./commands/dashboard.js"),exportName:"dashboard"},changelog:{path:"./commands/changelog.js",load:()=>import("./commands/changelog.js"),exportName:"changelog"},clean:{path:"./commands/clean.js",load:()=>import("./commands/clean.js"),exportName:"clean"},cloud:{path:"./commands/cloud.js",load:()=>import("./commands/cloud.js"),exportName:"cloud"},commit:{path:"./commands/commit.js",load:()=>import("./commands/commit.js"),exportName:"commit"},completion:{path:"./commands/completion.js",load:()=>import("./commands/completion.js"),exportName:"completion"},"config:migrate":{path:"./commands/config-migrate.js",load:()=>import("./commands/config-migrate.js"),exportName:"configMigrate"},configure:{path:"./commands/configure.js",load:()=>import("./commands/configure.js"),exportName:"configure"},create:{path:"./commands/create.js",load:()=>import("./commands/create.js"),exportName:"create"},new:{path:"./commands/create.js",load:()=>import("./commands/create.js"),exportName:"create"},deploy:{path:"./commands/deploy.js",load:()=>import("./commands/deploy.js"),exportName:"deploy"},"deploy:rollback":{path:"./commands/deploy.js",load:()=>import("./commands/deploy.js"),exportName:"deploy"},dev:{path:"./commands/dev.js",load:()=>import("./commands/dev.js"),exportName:"dev"},"desktop:apple:doctor":{path:"./commands/desktop-apple.js",load:()=>import("./commands/desktop-apple.js"),exportName:"desktopApple"},"desktop:apple:csr":{path:"./commands/desktop-apple.js",load:()=>import("./commands/desktop-apple.js"),exportName:"desktopApple"},"desktop:apple:init":{path:"./commands/desktop-apple.js",load:()=>import("./commands/desktop-apple.js"),exportName:"desktopApple"},"desktop:apple:package":{path:"./commands/desktop-apple.js",load:()=>import("./commands/desktop-apple.js"),exportName:"desktopApple"},"desktop:apple:provision":{path:"./commands/desktop-apple.js",load:()=>import("./commands/desktop-apple.js"),exportName:"desktopApple"},"desktop:apple:publish":{path:"./commands/desktop-apple.js",load:()=>import("./commands/desktop-apple.js"),exportName:"desktopApple"},"desktop:update:keypair":{path:"./commands/desktop-release.js",load:()=>import("./commands/desktop-release.js"),exportName:"desktopRelease"},"release:desktop":{path:"./commands/desktop-release.js",load:()=>import("./commands/desktop-release.js"),exportName:"desktopRelease"},"desktop:probe":{path:"./commands/desktop-probe.js",load:()=>import("./commands/desktop-probe.js"),exportName:"desktopProbe"},"integrations:probe":{path:"./commands/integrations-probe.js",load:()=>import("./commands/integrations-probe.js"),exportName:"integrationsProbe"},dns:{path:"./commands/dns.js",load:()=>import("./commands/dns.js"),exportName:"dns"},"dns:pull":{path:"./commands/dns.js",load:()=>import("./commands/dns.js"),exportName:"dns"},"dns:diff":{path:"./commands/dns.js",load:()=>import("./commands/dns.js"),exportName:"dns"},"dns:sync":{path:"./commands/dns.js",load:()=>import("./commands/dns.js"),exportName:"dns"},doctor:{path:"./commands/doctor.js",load:()=>import("./commands/doctor.js"),exportName:"doctor"},domains:{path:"./commands/domains.js",load:()=>import("./commands/domains.js"),exportName:"domains"},email:{path:"./commands/email.js",load:()=>import("./commands/email.js"),exportName:"email"},env:{path:"./commands/env.js",load:()=>import("./commands/env.js"),exportName:"env"},"extension:init":{path:"./commands/extension.js",load:()=>import("./commands/extension.js"),exportName:"extension"},"extension:build":{path:"./commands/extension.js",load:()=>import("./commands/extension.js"),exportName:"extension"},"extension:package":{path:"./commands/extension.js",load:()=>import("./commands/extension.js"),exportName:"extension"},"extension:chrome:publish":{path:"./commands/extension.js",load:()=>import("./commands/extension.js"),exportName:"extension"},"extension:chrome:status":{path:"./commands/extension.js",load:()=>import("./commands/extension.js"),exportName:"extension"},"extension:firefox:publish":{path:"./commands/extension.js",load:()=>import("./commands/extension.js"),exportName:"extension"},"extension:safari:init":{path:"./commands/extension.js",load:()=>import("./commands/extension.js"),exportName:"extension"},"extension:safari:provision":{path:"./commands/extension.js",load:()=>import("./commands/extension.js"),exportName:"extension"},"extension:safari:app":{path:"./commands/extension.js",load:()=>import("./commands/extension.js"),exportName:"extension"},"extension:safari:publish":{path:"./commands/extension.js",load:()=>import("./commands/extension.js"),exportName:"extension"},"dashboard:install":{path:"./commands/features.js",load:()=>import("./commands/features.js"),exportName:"features"},"dashboard:uninstall":{path:"./commands/features.js",load:()=>import("./commands/features.js"),exportName:"features"},"commerce:install":{path:"./commands/features.js",load:()=>import("./commands/features.js"),exportName:"features"},"commerce:uninstall":{path:"./commands/features.js",load:()=>import("./commands/features.js"),exportName:"features"},"commerce:import":{path:"./commands/commerce-import.js",load:()=>import("./commands/commerce-import.js"),exportName:"commerceImport"},"cms:install":{path:"./commands/features.js",load:()=>import("./commands/features.js"),exportName:"features"},"cms:uninstall":{path:"./commands/features.js",load:()=>import("./commands/features.js"),exportName:"features"},"marketing:install":{path:"./commands/features.js",load:()=>import("./commands/features.js"),exportName:"features"},"marketing:uninstall":{path:"./commands/features.js",load:()=>import("./commands/features.js"),exportName:"features"},"monitoring:install":{path:"./commands/features.js",load:()=>import("./commands/features.js"),exportName:"features"},"monitoring:uninstall":{path:"./commands/features.js",load:()=>import("./commands/features.js"),exportName:"features"},"realtime:install":{path:"./commands/features.js",load:()=>import("./commands/features.js"),exportName:"features"},"realtime:uninstall":{path:"./commands/features.js",load:()=>import("./commands/features.js"),exportName:"features"},"queue:install":{path:"./commands/features.js",load:()=>import("./commands/features.js"),exportName:"features"},"queue:uninstall":{path:"./commands/features.js",load:()=>import("./commands/features.js"),exportName:"features"},"db:backup":{path:"./commands/db.js",load:()=>import("./commands/db.js"),exportName:"db"},"db:backups":{path:"./commands/db.js",load:()=>import("./commands/db.js"),exportName:"db"},"db:restore":{path:"./commands/db.js",load:()=>import("./commands/db.js"),exportName:"db"},"storage:backup":{path:"./commands/storage-backup.js",load:()=>import("./commands/storage-backup.js"),exportName:"storageBackup"},"storage:backups":{path:"./commands/storage-backup.js",load:()=>import("./commands/storage-backup.js"),exportName:"storageBackup"},"storage:restore":{path:"./commands/storage-backup.js",load:()=>import("./commands/storage-backup.js"),exportName:"storageBackup"},"feedback:invite":{path:"./commands/feedback.js",load:()=>import("./commands/feedback.js"),exportName:"feedback"},"feedback:tokens":{path:"./commands/feedback.js",load:()=>import("./commands/feedback.js"),exportName:"feedback"},"feedback:revoke":{path:"./commands/feedback.js",load:()=>import("./commands/feedback.js"),exportName:"feedback"},"socials:identities":{path:"./commands/socials.js",load:()=>import("./commands/socials.js"),exportName:"socials"},"socials:authorize":{path:"./commands/socials.js",load:()=>import("./commands/socials.js"),exportName:"socials"},fresh:{path:"./commands/fresh.js",load:()=>import("./commands/fresh.js"),exportName:"fresh"},generate:{path:"./commands/generate.js",load:()=>import("./commands/generate.js"),exportName:"generate"},"gdpr:export":{path:"./commands/gdpr.js",load:()=>import("./commands/gdpr.js"),exportName:"gdpr"},"gdpr:erase":{path:"./commands/gdpr.js",load:()=>import("./commands/gdpr.js"),exportName:"gdpr"},"gdpr:prune":{path:"./commands/gdpr.js",load:()=>import("./commands/gdpr.js"),exportName:"gdpr"},"gdpr:register":{path:"./commands/gdpr.js",load:()=>import("./commands/gdpr.js"),exportName:"gdpr"},"gdpr:register:check":{path:"./commands/gdpr.js",load:()=>import("./commands/gdpr.js"),exportName:"gdpr"},"hq:connect":{path:"./commands/hq.js",load:()=>import("./commands/hq.js"),exportName:"hq"},"support:install":{path:"./commands/hq.js",load:()=>import("./commands/hq.js"),exportName:"hq"},"support:doctor":{path:"./commands/hq.js",load:()=>import("./commands/hq.js"),exportName:"hq"},"hq:status":{path:"./commands/hq.js",load:()=>import("./commands/hq.js"),exportName:"hq"},"hq:sync":{path:"./commands/hq.js",load:()=>import("./commands/hq.js"),exportName:"hq"},http:{path:"./commands/http.js",load:()=>import("./commands/http.js"),exportName:"http"},install:{path:"./commands/install.js",load:()=>import("./commands/install.js"),exportName:"install"},key:{path:"./commands/key.js",load:()=>import("./commands/key.js"),exportName:"key"},license:{path:"./commands/license.js",load:()=>import("./commands/license.js"),exportName:"license"},"license:keygen":{path:"./commands/license.js",load:()=>import("./commands/license.js"),exportName:"license"},lint:{path:"./commands/lint.js",load:()=>import("./commands/lint.js"),exportName:"lint"},format:{path:"./commands/lint.js",load:()=>import("./commands/lint.js"),exportName:"lint"},"format:check":{path:"./commands/lint.js",load:()=>import("./commands/lint.js"),exportName:"lint"},libs:{path:"./commands/libs.js",load:()=>import("./commands/libs.js"),exportName:"libs"},libraries:{path:"./commands/libs.js",load:()=>import("./commands/libs.js"),exportName:"libs"},list:{path:"./commands/list.js",load:()=>import("./commands/list.js"),exportName:"list"},mail:{path:"./commands/mail.js",load:()=>import("./commands/mail.js"),exportName:"mailCommands"},"mail:preview":{path:"./commands/mail.js",load:()=>import("./commands/mail.js"),exportName:"mailCommands"},maintenance:{path:"./commands/maintenance.js",load:()=>import("./commands/maintenance.js"),exportName:"maintenance"},down:{path:"./commands/maintenance.js",load:()=>import("./commands/maintenance.js"),exportName:"maintenance"},up:{path:"./commands/maintenance.js",load:()=>import("./commands/maintenance.js"),exportName:"maintenance"},status:{path:"./commands/maintenance.js",load:()=>import("./commands/maintenance.js"),exportName:"maintenance"},"coming-soon":{path:"./commands/maintenance.js",load:()=>import("./commands/maintenance.js"),exportName:"maintenance"},"coming-soon:status":{path:"./commands/maintenance.js",load:()=>import("./commands/maintenance.js"),exportName:"maintenance"},launch:{path:"./commands/maintenance.js",load:()=>import("./commands/maintenance.js"),exportName:"maintenance"},make:{path:"./commands/make.js",load:()=>import("./commands/make.js"),exportName:"make"},"scaffold:crud":{path:"./commands/make.js",load:()=>import("./commands/make.js"),exportName:"make"},migrate:{path:"./commands/migrate.js",load:()=>import("./commands/migrate.js"),exportName:"migrate"},"migrate:fresh":{path:"./commands/migrate.js",load:()=>import("./commands/migrate.js"),exportName:"migrate"},"migrate:switch":{path:"./commands/migrate.js",load:()=>import("./commands/migrate.js"),exportName:"migrate"},"migrate:project":{path:"./commands/migrate-project.js",load:()=>import("./commands/migrate-project.js"),exportName:"migrateProject"},outdated:{path:"./commands/outdated.js",load:()=>import("./commands/outdated.js"),exportName:"outdated"},package:{path:"./commands/package.js",load:()=>import("./commands/package.js"),exportName:"packageCommands"},phone:{path:"./commands/phone.js",load:()=>import("./commands/phone.js"),exportName:"phone"},ports:{path:"./commands/ports.js",load:()=>import("./commands/ports.js"),exportName:"ports"},"security:scan":{path:"./commands/security.js",load:()=>import("./commands/security.js"),exportName:"security"},audit:{path:"./commands/security.js",load:()=>import("./commands/security.js"),exportName:"security"},"server:flash":{path:"./commands/server.js",load:()=>import("./commands/server.js"),exportName:"server"},"server:first-boot":{path:"./commands/server.js",load:()=>import("./commands/server.js"),exportName:"server"},"server:doctor":{path:"./commands/server.js",load:()=>import("./commands/server.js"),exportName:"server"},"server:setup":{path:"./commands/server.js",load:()=>import("./commands/server.js"),exportName:"server"},"server:trust":{path:"./commands/server.js",load:()=>import("./commands/server.js"),exportName:"server"},"link:core":{path:"./commands/link.js",load:()=>import("./commands/link.js"),exportName:"link"},"comments:list":{path:"./commands/comments.js",load:()=>import("./commands/comments.js"),exportName:"commentsCommands"},"comments:approve":{path:"./commands/comments.js",load:()=>import("./commands/comments.js"),exportName:"commentsCommands"},"comments:reject":{path:"./commands/comments.js",load:()=>import("./commands/comments.js"),exportName:"commentsCommands"},"comments:delete":{path:"./commands/comments.js",load:()=>import("./commands/comments.js"),exportName:"commentsCommands"},"user:add":{path:"./commands/user.js",load:()=>import("./commands/user.js"),exportName:"user"},"user:list":{path:"./commands/user.js",load:()=>import("./commands/user.js"),exportName:"user"},"user:audit":{path:"./commands/user.js",load:()=>import("./commands/user.js"),exportName:"user"},"unlink:core":{path:"./commands/link.js",load:()=>import("./commands/link.js"),exportName:"link"},prepublish:{path:"./commands/prepublish.js",load:()=>import("./commands/prepublish.js"),exportName:"prepublish"},projects:{path:"./commands/projects.js",load:()=>import("./commands/projects.js"),exportName:"projects"},publish:{path:"./commands/publish.js",load:()=>import("./commands/publish.js"),exportName:"publish"},"publish:model":{path:"./commands/publish.js",load:()=>import("./commands/publish.js"),exportName:"publish"},"publish:controller":{path:"./commands/publish.js",load:()=>import("./commands/publish.js"),exportName:"publish"},"publish:middleware":{path:"./commands/publish.js",load:()=>import("./commands/publish.js"),exportName:"publish"},"publish:action":{path:"./commands/publish.js",load:()=>import("./commands/publish.js"),exportName:"publish"},"publish:component":{path:"./commands/publish.js",load:()=>import("./commands/publish.js"),exportName:"publish"},"publish:view":{path:"./commands/publish.js",load:()=>import("./commands/publish.js"),exportName:"publish"},"publish:core":{path:"./commands/publish.js",load:()=>import("./commands/publish.js"),exportName:"publish"},"core:status":{path:"./commands/publish.js",load:()=>import("./commands/publish.js"),exportName:"publish"},"publish:defaults":{path:"./commands/publish.js",load:()=>import("./commands/publish.js"),exportName:"publish"},unpublish:{path:"./commands/publish.js",load:()=>import("./commands/publish.js"),exportName:"publish"},queue:{path:"./commands/queue.js",load:()=>import("./commands/queue.js"),exportName:"queue"},release:{path:"./commands/release.js",load:()=>import("./commands/release.js"),exportName:"release"},route:{path:"./commands/route.js",load:()=>import("./commands/route.js"),exportName:"route"},saas:{path:"./commands/saas.js",load:()=>import("./commands/saas.js"),exportName:"saas"},"stripe:setup":{path:"./commands/saas.js",load:()=>import("./commands/saas.js"),exportName:"saas"},schedule:{path:"./commands/schedule.js",load:()=>import("./commands/schedule.js"),exportName:"schedule"},search:{path:"./commands/search.js",load:()=>import("./commands/search.js"),exportName:"search"},"search-engine:update":{path:"./commands/search.js",load:()=>import("./commands/search.js"),exportName:"search"},"search-engine:settings":{path:"./commands/search.js",load:()=>import("./commands/search.js"),exportName:"search"},screenshot:{path:"./commands/screenshot.js",load:()=>import("./commands/screenshot.js"),exportName:"screenshot"},seed:{path:"./commands/seed.js",load:()=>import("./commands/seed.js"),exportName:"seed"},"seed:roles":{path:"./commands/seed.js",load:()=>import("./commands/seed.js"),exportName:"seed"},"roles:seed":{path:"./commands/seed.js",load:()=>import("./commands/seed.js"),exportName:"seed"},"seed:admins":{path:"./commands/seed.js",load:()=>import("./commands/seed.js"),exportName:"seed"},"admins:seed":{path:"./commands/seed.js",load:()=>import("./commands/seed.js"),exportName:"seed"},preview:{path:"./commands/serve.js",load:()=>import("./commands/serve.js"),exportName:"preview"},serve:{path:"./commands/serve.js",load:()=>import("./commands/serve.js"),exportName:"serve"},"serve:api":{path:"./commands/serve.js",load:()=>import("./commands/serve.js"),exportName:"serveApi"},"workflow:setup":{path:"./commands/workflow.js",load:()=>import("./commands/workflow.js"),exportName:"workflow"},"workflow:step":{path:"./commands/workflow.js",load:()=>import("./commands/workflow.js"),exportName:"workflow"},"workflow:release-state":{path:"./commands/workflow.js",load:()=>import("./commands/workflow.js"),exportName:"workflow"},"workflow:runs":{path:"./commands/workflow.js",load:()=>import("./commands/workflow.js"),exportName:"workflow"},"workflow:show":{path:"./commands/workflow.js",load:()=>import("./commands/workflow.js"),exportName:"workflow"},"workflow:run":{path:"./commands/workflow.js",load:()=>import("./commands/workflow.js"),exportName:"workflow"},"workflow:artifacts":{path:"./commands/workflow.js",load:()=>import("./commands/workflow.js"),exportName:"workflow"},setup:{path:"./commands/setup.js",load:()=>import("./commands/setup.js"),exportName:"setup"},ensure:{path:"./commands/setup.js",load:()=>import("./commands/setup.js"),exportName:"setup"},"setup:ai":{path:"./commands/setup.js",load:()=>import("./commands/setup.js"),exportName:"setup"},"setup:ssl":{path:"./commands/setup.js",load:()=>import("./commands/setup.js"),exportName:"setup"},"setup:ios":{path:"./commands/setup.js",load:()=>import("./commands/setup.js"),exportName:"setup"},"setup:oh-my-zsh":{path:"./commands/setup.js",load:()=>import("./commands/setup.js"),exportName:"setup"},"ai:setup":{path:"./commands/setup.js",load:()=>import("./commands/setup.js"),exportName:"setup"},share:{path:"./commands/share.js",load:()=>import("./commands/share.js"),exportName:"share"},"simulator:doctor":{path:"./commands/simulator.js",load:()=>import("./commands/simulator.js"),exportName:"simulator"},"simulator:open":{path:"./commands/simulator.js",load:()=>import("./commands/simulator.js"),exportName:"simulator"},stack:{path:"./commands/stacks.js",load:()=>import("./commands/stacks.js"),exportName:"stacks"},sms:{path:"./commands/sms.js",load:()=>import("./commands/sms.js"),exportName:"sms"},telemetry:{path:"./commands/telemetry.js",load:()=>import("./commands/telemetry.js"),exportName:"telemetryCommand"},test:{path:"./commands/test.js",load:()=>import("./commands/test.js"),exportName:"test"},tinker:{path:"./commands/tinker.js",load:()=>import("./commands/tinker.js"),exportName:"tinker"},types:{path:"./commands/types.js",load:()=>import("./commands/types.js"),exportName:"types"},undeploy:{path:"./commands/cloud.js",load:()=>import("./commands/cloud.js"),exportName:"cloud"},upgrade:{path:"./commands/upgrade.js",load:()=>import("./commands/upgrade.js"),exportName:"upgrade"},version:{path:"./commands/version.js",load:()=>import("./commands/version.js"),exportName:"version"},"docs:screenshots":{path:"./commands/docs.js",load:()=>import("./commands/docs.js"),exportName:"docs"},"docs:stories":{path:"./commands/docs.js",load:()=>import("./commands/docs.js"),exportName:"docs"},"docs:style-guide":{path:"./commands/docs.js",load:()=>import("./commands/docs.js"),exportName:"docs"},"docs:style-guide:check":{path:"./commands/docs.js",load:()=>import("./commands/docs.js"),exportName:"docs"},"docs:buddy":{path:"./commands/docs.js",load:()=>import("./commands/docs.js"),exportName:"docs"},"docs:native-skills":{path:"./commands/docs.js",load:()=>import("./commands/docs.js"),exportName:"docs"},"docs:native-skills:check":{path:"./commands/docs.js",load:()=>import("./commands/docs.js"),exportName:"docs"},"docs:buddy:check":{path:"./commands/docs.js",load:()=>import("./commands/docs.js"),exportName:"docs"},"docs:artifacts":{path:"./commands/docs.js",load:()=>import("./commands/docs.js"),exportName:"docs"},"docs:artifacts:check":{path:"./commands/docs.js",load:()=>import("./commands/docs.js"),exportName:"docs"},"docs:links":{path:"./commands/docs.js",load:()=>import("./commands/docs.js"),exportName:"docs"},"docs:links:check":{path:"./commands/docs.js",load:()=>import("./commands/docs.js"),exportName:"docs"}};const commandGroups={minimal:["version","help"],development:["dev","build","test","lint"],database:["migrate","seed","fresh"],scaffolding:["make","generate"],deployment:["deploy","release","cloud","server"],info:["about","doctor","list"]};const loadedRegistrars=new WeakMap;function loaderKey(loader){return`${loader.path}#${loader.exportName}`}export function markLoaded(buddy,commandName){const loader=commandRegistry[commandName];if(!loader)return;let set=loadedRegistrars.get(buddy);if(!set){set=new Set;loadedRegistrars.set(buddy,set)}set.add(loaderKey(loader))}export async function loadCommand(commandName,buddy){const loader=commandRegistry[commandName];if(!loader){return false}let set=loadedRegistrars.get(buddy);if(!set){set=new Set;loadedRegistrars.set(buddy,set)}const key=loaderKey(loader);if(set.has(key))return true;set.add(key);try{const module=await loader.load();const commandFunction=module[loader.exportName];if(typeof commandFunction==="function"){commandFunction(buddy);return true}else{return false}}catch{return false}}export async function loadCommands(commandNames,buddy){const seen=new Set;const unique=[];for(const name of commandNames){const loader=commandRegistry[name];const key=loader?`${loader.path}#${loader.exportName}`:`name:${name}`;if(seen.has(key))continue;seen.add(key);unique.push(name)}await Promise.all(unique.map(async(name)=>{try{await withTimeout(loadCommand(name,buddy),5000)}catch{}}))}export async function loadCommandGroup(groupName,buddy){const commands=commandGroups[groupName];if(commands){await loadCommands(commands,buddy)}}export async function loadAllCommands(buddy){const allCommands=Object.keys(commandRegistry);await loadCommands(allCommands,buddy)}export function getCommandNames(){return Object.keys(commandRegistry)}export function getCommandsToLoad(args){const requestedCommand=args[0];const isVersionFlag=requestedCommand==="--version"||requestedCommand==="-v";const isHelpFlag=requestedCommand==="--help"||requestedCommand==="-h";const isHelpWord=requestedCommand==="help";if(isVersionFlag)return["version"];if(!requestedCommand||isHelpFlag||isHelpWord)return Object.keys(commandRegistry);const baseCommand=requestedCommand.split(":")[0];if(baseCommand==="list"){return["list",...Object.keys(commandRegistry).filter((k)=>k!=="list")]}if(commandRegistry[requestedCommand]){return[requestedCommand]}if(commandRegistry[baseCommand]){return[baseCommand]}return Object.keys(commandRegistry)}
@@ -1,4 +1,4 @@
1
- export function nativeWorkflowSecretNames(config,step){switch(step){case"native-build":case"native-accept":case"native-sign":case"native-upload":case"native-verify":case"native-cleanup":return config.stepSecrets?.[step]??(step==="native-sign"?config.secrets?.ios??[]:[]);default:return[]}}export function nativeReleaseSecretNames(config){return[...new Set(["native-sign","native-upload","native-verify","native-cleanup"].flatMap((step)=>nativeWorkflowSecretNames(config,step)))]}function relativePath(value){return typeof value==="string"&&!!value&&!/^[A-Za-z]:|^[\\/]|[\\\r\n\x00]/.test(value)&&!value.split("/").some((segment)=>segment==="."||segment==="..")}export function validateWorkflowConfig(config){const origin=new URL(config.origin);if(config.provider!=="reviewos"||origin.protocol!=="https:"||origin.username||origin.password||origin.pathname!=="/"||origin.search||origin.hash||!/^[\w.-]+\/[\w.-]+$/.test(config.repository)||config.repository.split("/").some((part)=>part==="."||part===".."))throw new Error("Configure a canonical ReviewOS origin and owner/repository");for(const group of["checks",...config.deploy?["deploy"]:[],...config.native?["ios"]:[]]){const labels=config.runners[group];if(!Array.isArray(labels)||!labels.includes("self-hosted")||labels.some((label)=>!/^[\w.-]+$/.test(label)))throw new Error(`Declare the owned ${group} runner labels`)}if(config.priorities!==undefined&&(!config.priorities||typeof config.priorities!=="object"||Array.isArray(config.priorities)||Object.entries(config.priorities).some(([stage,value])=>!["checks","deploy","ios"].includes(stage)||!Number.isInteger(value)||value<-1000||value>1000)))throw new Error("Workflow priorities must name checks, deploy or ios with integer values from -1000 to 1000");for(const values of Object.values(config.env??{})){if(!values||typeof values!=="object"||Array.isArray(values)||Object.entries(values).some(([name,value])=>!/^[A-Z_][A-Z0-9_]*$/.test(name)||typeof value!=="string"||value.includes("\x00")))throw new Error("Workflow environment settings must be named string values")}for(const names of Object.values(config.secrets??{})){if(!Array.isArray(names)||names.some((name)=>!/^[A-Z_][A-Z0-9_]*$/.test(name)))throw new Error("Workflow secrets must be environment variable names")}for(const[step,names]of Object.entries(config.stepSecrets??{})){if(!["native-build","native-accept","native-sign","native-upload","native-verify","native-cleanup"].includes(step)||!Array.isArray(names)||names.some((name)=>!config.secrets?.ios?.includes(name)))throw new Error("Step credentials must name declared native secrets")}if(config.native&&(!config.native.artifacts.length||![...config.native.artifacts,config.native.downloadDirectory,config.native.archivePattern,...config.native.evidence??[],...config.native.releaseArtifacts??[]].every(relativePath)))throw new Error("Native artifacts must stay inside the workspace");if(config.deploy&&!config.commands?.["after-deploy"]?.length)throw new Error("Configure deployed application verification");if(config.native&&["native-build","native-accept"].some((step)=>!config.commands?.[step]?.length))throw new Error("Configure native build and downloaded acceptance commands");if(config.release&&(!config.native||["native-sign","native-upload","native-verify","native-cleanup"].some((step)=>!config.commands?.[step]?.length)))throw new Error("Configure native signing, upload, verification and cleanup before releasing");if(config.release&&(!relativePath(config.release.versionFile)||config.release.notesDirectory!==undefined&&!relativePath(config.release.notesDirectory)||config.release.locales?.some((locale)=>!/^[a-z]{2}(?:-[A-Z]{2})?$/.test(locale))))throw new Error("Release files and locales must stay inside the workspace");for(const commands of Object.values(config.commands??{})){if(!Array.isArray(commands)||commands.some((argv)=>!Array.isArray(argv)||!argv.length||argv.some((arg)=>typeof arg!=="string"||arg.includes("\x00"))))throw new Error("Workflow commands must be nonempty argv arrays")}}export function renderReviewOsWorkflow(config){validateWorkflowConfig(config);const branch=config.branch??"main";if(!/^[\w./-]+$/.test(branch)||branch.includes(".."))throw new Error("Configure a branch name");const main=`github.ref == 'refs/heads/${branch}' && github.event_name != 'pull_request'`;const upload="steps.release.outputs.upload == 'true'";const secretEnv=(group)=>Object.fromEntries((config.secrets?.[group]??[]).map((name)=>[name,"${{ secrets."+name+" }}"]));const nativeSecrets=(step)=>{const names=nativeWorkflowSecretNames(config,step);return names.length?{env:Object.fromEntries(names.map((name)=>[name,"${{ secrets."+name+" }}"]))}:{}};const bootstrap=()=>[{name:"Checkout the exact source",uses:"actions/checkout@11d5960a326750d5838078e36cf38b85af677262",with:{"fetch-depth":0,"persist-credentials":false}},{name:"Set up the pinned tools",uses:"pantry-pm/pantry/packages/action@624cd6674f8c5c2d4e4204c11ece62a00d7fac0a",with:{version:config.pantry??"0.11.199",install:"false",packages:`bun.sh@${config.bun??"1.4.4"}`}},{name:"Install the frozen application dependencies",run:"bun install --frozen-lockfile"},{name:"Prepare declared application inputs",run:"./buddy workflow:step prepare"}];const jobPriority=(stage)=>{const value=config.priorities?.[stage];return value===undefined?{}:{priority:value}};const jobs={};for(const name of["lint","typecheck","test","build"])jobs[name]={"runs-on":config.runners.checks,"timeout-minutes":name==="test"?90:30,reviewos:{...jobPriority("checks"),secrets:config.secrets?.checks??[]},env:{...config.env?.checks,...secretEnv("checks")},steps:[...bootstrap(),{name:`Run ${name}`,run:`./buddy workflow:step ${name}`}]};if(config.deploy)jobs.deploy={needs:["lint","typecheck","test","build"],if:main,"runs-on":config.runners.deploy,"timeout-minutes":60,environment:"production",reviewos:{...jobPriority("deploy"),secrets:[...config.secrets?.checks??[],...config.secrets?.deploy??[]]},env:{...config.env?.checks,...config.env?.deploy,...secretEnv("checks"),...secretEnv("deploy")},steps:[...bootstrap(),{name:"Deploy the qualified source",run:"./buddy workflow:step deploy"},{name:"Verify the deployed application",run:"./buddy workflow:step after-deploy"}]};if(config.native)jobs.native={needs:config.deploy?["deploy"]:["lint","typecheck","test","build"],if:main,"runs-on":config.runners.ios,"timeout-minutes":90,environment:"ios-testflight",reviewos:{...jobPriority("ios"),secrets:[...config.secrets?.checks??[],...config.secrets?.ios??[]]},env:{...config.env?.checks,...config.env?.ios,...secretEnv("checks")},steps:[...bootstrap(),{name:"Read the committed release identity",id:"release",run:"./buddy workflow:release-state",env:{WORKFLOW_UPLOAD_REQUESTED:"${{ inputs.upload && 'true' || 'false' }}"}},{name:"Validate native acceptance credentials",run:"./buddy workflow:check-credentials native-accept",...nativeSecrets("native-accept")},...config.release?[{name:"Validate release credentials",if:upload,run:"./buddy workflow:check-credentials native-release",...nativeReleaseSecretNames(config).length?{env:Object.fromEntries(nativeReleaseSecretNames(config).map((name)=>[name,"${{ secrets."+name+" }}"]))}:{}}]:[],{name:"Build the simulator application",run:"./buddy workflow:step native-build",...nativeSecrets("native-build")},{name:"Publish the simulator application",uses:"actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02",with:{name:"native-simulator-${{ github.run_id }}-${{ github.run_attempt }}",path:config.native.artifacts.join(`
2
- `),"if-no-files-found":"error","retention-days":7}},{name:"Download the published application",uses:"actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093",with:{name:"native-simulator-${{ github.run_id }}-${{ github.run_attempt }}",path:config.native.downloadDirectory}},{name:"Accept the downloaded application",run:"./buddy workflow:step native-accept",...nativeSecrets("native-accept")},{name:"Prepare temporary signing material",if:upload,run:"./buddy workflow:step native-sign",...nativeSecrets("native-sign")},{name:"Upload the accepted application",if:upload,run:"./buddy workflow:step native-upload",...nativeSecrets("native-upload")},{name:"Verify tester availability",if:upload,run:"./buddy workflow:step native-verify",...nativeSecrets("native-verify")},{name:"Remove temporary signing material",if:"always()",run:"./buddy workflow:step native-cleanup",...nativeSecrets("native-cleanup")},...[...config.native.evidence??[],...config.native.releaseArtifacts??[]].length?[{name:"Preserve acceptance and release receipts",if:"always()",uses:"actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02",with:{name:"native-evidence-${{ github.run_id }}-${{ github.run_attempt }}",path:[...config.native.evidence??[],...config.native.releaseArtifacts??[]].join(`
1
+ export function nativeWorkflowSecretNames(config,step){switch(step){case"native-build":case"native-accept":case"native-sign":case"native-upload":case"native-verify":case"native-cleanup":return config.stepSecrets?.[step]??(step==="native-sign"?config.secrets?.ios??[]:[]);default:return[]}}export function nativeReleaseSecretNames(config){return[...new Set(["native-sign","native-upload","native-verify","native-cleanup"].flatMap((step)=>nativeWorkflowSecretNames(config,step)))]}function relativePath(value){return typeof value==="string"&&!!value&&!/^[A-Za-z]:|^[\\/]|[\\\r\n\x00]/.test(value)&&!value.split("/").some((segment)=>segment==="."||segment==="..")}export function validateWorkflowConfig(config){const origin=new URL(config.origin);if(config.provider!=="reviewos"||origin.protocol!=="https:"||origin.username||origin.password||origin.pathname!=="/"||origin.search||origin.hash||!/^[\w.-]+\/[\w.-]+$/.test(config.repository)||config.repository.split("/").some((part)=>part==="."||part===".."))throw new Error("Configure a canonical ReviewOS origin and owner/repository");for(const group of["checks",...config.deploy?["deploy"]:[],...config.native?["ios"]:[]]){const labels=config.runners[group];if(!Array.isArray(labels)||!labels.includes("self-hosted")||labels.some((label)=>!/^[\w.-]+$/.test(label)))throw new Error(`Declare the owned ${group} runner labels`)}if(config.priorities!==undefined&&(!config.priorities||typeof config.priorities!=="object"||Array.isArray(config.priorities)||Object.entries(config.priorities).some(([stage,value])=>!["checks","deploy","ios"].includes(stage)||!Number.isInteger(value)||value<-1000||value>1000)))throw new Error("Workflow priorities must name checks, deploy or ios with integer values from -1000 to 1000");for(const values of Object.values(config.env??{})){if(!values||typeof values!=="object"||Array.isArray(values)||Object.entries(values).some(([name,value])=>!/^[A-Z_][A-Z0-9_]*$/.test(name)||typeof value!=="string"||value.includes("\x00")))throw new Error("Workflow environment settings must be named string values")}for(const names of Object.values(config.secrets??{})){if(!Array.isArray(names)||names.some((name)=>!/^[A-Z_][A-Z0-9_]*$/.test(name)))throw new Error("Workflow secrets must be environment variable names")}for(const[step,names]of Object.entries(config.stepSecrets??{})){if(!["native-build","native-accept","native-sign","native-upload","native-verify","native-cleanup"].includes(step)||!Array.isArray(names)||names.some((name)=>!config.secrets?.ios?.includes(name)))throw new Error("Step credentials must name declared native secrets")}if(config.native&&(!config.native.artifacts.length||![...config.native.artifacts,config.native.downloadDirectory,config.native.archivePattern,...config.native.evidence??[],...config.native.releaseArtifacts??[]].every(relativePath)))throw new Error("Native artifacts must stay inside the workspace");if(config.deploy&&!config.commands?.["after-deploy"]?.length)throw new Error("Configure deployed application verification");if(config.native&&["native-build","native-accept"].some((step)=>!config.commands?.[step]?.length))throw new Error("Configure native build and downloaded acceptance commands");if(config.release&&(!config.native||["native-sign","native-upload","native-verify","native-cleanup"].some((step)=>!config.commands?.[step]?.length)))throw new Error("Configure native signing, upload, verification and cleanup before releasing");if(config.release&&(!relativePath(config.release.versionFile)||config.release.notesDirectory!==undefined&&!relativePath(config.release.notesDirectory)||config.release.locales?.some((locale)=>!/^[a-z]{2}(?:-[A-Z]{2})?$/.test(locale))))throw new Error("Release files and locales must stay inside the workspace");for(const commands of Object.values(config.commands??{})){if(!Array.isArray(commands)||commands.some((argv)=>!Array.isArray(argv)||!argv.length||argv.some((arg)=>typeof arg!=="string"||arg.includes("\x00"))))throw new Error("Workflow commands must be nonempty argv arrays")}}export function renderReviewOsWorkflow(config){validateWorkflowConfig(config);const branch=config.branch??"main";if(!/^[\w./-]+$/.test(branch)||branch.includes(".."))throw new Error("Configure a branch name");const main=`github.ref == 'refs/heads/${branch}' && github.event_name != 'pull_request'`;const upload="steps.release.outputs.upload == 'true'";const secretEnv=(group)=>Object.fromEntries((config.secrets?.[group]??[]).map((name)=>[name,"${{ secrets."+name+" }}"]));const nativeSecrets=(step)=>{const names=nativeWorkflowSecretNames(config,step);return names.length?{env:Object.fromEntries(names.map((name)=>[name,"${{ secrets."+name+" }}"]))}:{}};const bootstrap=()=>[{name:"Checkout the exact source",uses:"actions/checkout@11d5960a326750d5838078e36cf38b85af677262",with:{"fetch-depth":0,"persist-credentials":false}},{name:"Set up the pinned tools",uses:"pantry-pm/pantry/packages/action@624cd6674f8c5c2d4e4204c11ece62a00d7fac0a",with:{version:config.pantry??"0.11.199",install:"false",packages:`bun.sh@${config.bun??"1.4.4"}`}},{name:"Install the frozen application dependencies",run:"bun install --frozen-lockfile"},{name:"Prepare declared application inputs",run:"./buddy workflow:step prepare"}];const jobPriority=(stage)=>{const value=config.priorities?.[stage];return value===undefined?{}:{priority:value}};const jobs={};for(const name of["lint","typecheck","test","build"])jobs[name]={"runs-on":config.runners.checks,"timeout-minutes":name==="test"?90:30,reviewos:{...jobPriority("checks"),secrets:config.secrets?.checks??[]},env:{...config.env?.checks,...secretEnv("checks")},steps:[...bootstrap(),{name:`Run ${name}`,run:`./buddy workflow:step ${name}`}]};if(config.deploy)jobs.deploy={needs:["lint","typecheck","test","build"],if:main,"runs-on":config.runners.deploy,"timeout-minutes":60,environment:"production",reviewos:{...jobPriority("deploy"),secrets:[...config.secrets?.checks??[],...config.secrets?.deploy??[]]},env:{...config.env?.checks,...config.env?.deploy,...secretEnv("checks"),...secretEnv("deploy")},steps:[...bootstrap(),{name:"Deploy the qualified source",run:"./buddy workflow:step deploy"},{name:"Verify the deployed application",run:"./buddy workflow:step after-deploy"}]};if(config.native)jobs.native={needs:config.deploy?["deploy"]:["lint","typecheck","test","build"],if:main,"runs-on":config.runners.ios,"timeout-minutes":90,environment:"ios-testflight",reviewos:{...jobPriority("ios"),secrets:[...config.secrets?.checks??[],...config.secrets?.ios??[]]},env:{...config.env?.checks,...config.env?.ios,...secretEnv("checks")},steps:[...bootstrap(),{name:"Read the committed release identity",id:"release",run:"./buddy workflow:release-state",env:{WORKFLOW_UPLOAD_REQUESTED:"${{ inputs.upload }}"}},{name:"Validate native acceptance credentials",run:"./buddy workflow:check-credentials native-accept",...nativeSecrets("native-accept")},...config.release?[{name:"Validate release credentials",if:upload,run:"./buddy workflow:check-credentials native-release",...nativeReleaseSecretNames(config).length?{env:Object.fromEntries(nativeReleaseSecretNames(config).map((name)=>[name,"${{ secrets."+name+" }}"]))}:{}}]:[],{name:"Build the simulator application",run:"./buddy workflow:step native-build",...nativeSecrets("native-build")},{name:"Publish the simulator application",uses:"actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02",with:{name:"native-simulator-${{ github.run_id }}-${{ github.run_attempt }}-${{ reviewos.job_attempt }}",path:config.native.artifacts.join(`
2
+ `),"if-no-files-found":"error","retention-days":7}},{name:"Download the published application",uses:"actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093",with:{name:"native-simulator-${{ github.run_id }}-${{ github.run_attempt }}-${{ reviewos.job_attempt }}",path:config.native.downloadDirectory}},{name:"Accept the downloaded application",run:"./buddy workflow:step native-accept",...nativeSecrets("native-accept")},{name:"Prepare temporary signing material",if:upload,run:"./buddy workflow:step native-sign",...nativeSecrets("native-sign")},{name:"Upload the accepted application",if:upload,run:"./buddy workflow:step native-upload",...nativeSecrets("native-upload")},{name:"Verify tester availability",if:upload,run:"./buddy workflow:step native-verify",...nativeSecrets("native-verify")},{name:"Remove temporary signing material",if:"always()",run:"./buddy workflow:step native-cleanup",...nativeSecrets("native-cleanup")},...[...config.native.evidence??[],...config.native.releaseArtifacts??[]].length?[{name:"Preserve acceptance and release receipts",if:"always()",uses:"actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02",with:{name:"native-evidence-${{ github.run_id }}-${{ github.run_attempt }}-${{ reviewos.job_attempt }}",path:[...config.native.evidence??[],...config.native.releaseArtifacts??[]].join(`
3
3
  `),"if-no-files-found":"warn","retention-days":7}}]:[]]};return`# Generated by buddy workflow:setup from config/workflows.ts.
4
4
  `+Bun.YAML.stringify({name:"CI",on:{push:{branches:[branch]},pull_request:{branches:[branch]},workflow_dispatch:{inputs:{upload:{type:"boolean",default:false,description:"Upload a committed release after native acceptance"}}}},concurrency:{group:"stacks-app-${{ github.ref }}","cancel-in-progress":`\${{ github.ref != 'refs/heads/${branch}' }}`},permissions:{contents:"read"},jobs},null,2)}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/buddy",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.75.634",
5
+ "version": "0.75.635",
6
6
  "description": "Meet Buddy. The Stacks runtime.",
7
7
  "author": "Chris Breuer",
8
8
  "contributors": [
@@ -95,71 +95,71 @@
95
95
  "prepublishOnly": "bun run build"
96
96
  },
97
97
  "dependencies": {
98
- "@stacksjs/actions": "0.75.634",
99
- "@stacksjs/docs": "0.75.634",
100
- "@stacksjs/ai": "0.75.634",
101
- "@stacksjs/alias": "0.75.634",
102
- "@stacksjs/analytics": "0.75.634",
103
- "@stacksjs/api": "0.75.634",
104
- "@stacksjs/arrays": "0.75.634",
105
- "@stacksjs/auth": "0.75.634",
106
- "@stacksjs/browser-extension": "0.75.634",
107
- "@stacksjs/build": "0.75.634",
98
+ "@stacksjs/actions": "0.75.635",
99
+ "@stacksjs/docs": "0.75.635",
100
+ "@stacksjs/ai": "0.75.635",
101
+ "@stacksjs/alias": "0.75.635",
102
+ "@stacksjs/analytics": "0.75.635",
103
+ "@stacksjs/api": "0.75.635",
104
+ "@stacksjs/arrays": "0.75.635",
105
+ "@stacksjs/auth": "0.75.635",
106
+ "@stacksjs/browser-extension": "0.75.635",
107
+ "@stacksjs/build": "0.75.635",
108
108
  "@stacksjs/bumpx": "^0.2.32",
109
- "@stacksjs/cache": "0.75.634",
110
- "@stacksjs/chat": "0.75.634",
109
+ "@stacksjs/cache": "0.75.635",
110
+ "@stacksjs/chat": "0.75.635",
111
111
  "@stacksjs/clapp": "^0.2.17",
112
- "@stacksjs/cli": "0.75.634",
113
- "@stacksjs/cloud": "0.75.634",
114
- "@stacksjs/cms": "0.75.634",
115
- "@stacksjs/collections": "0.75.634",
116
- "@stacksjs/commerce": "0.75.634",
117
- "@stacksjs/config": "0.75.634",
118
- "@stacksjs/database": "0.75.634",
119
- "@stacksjs/desktop-build": "0.75.634",
120
- "@stacksjs/dns": "0.75.634",
112
+ "@stacksjs/cli": "0.75.635",
113
+ "@stacksjs/cloud": "0.75.635",
114
+ "@stacksjs/cms": "0.75.635",
115
+ "@stacksjs/collections": "0.75.635",
116
+ "@stacksjs/commerce": "0.75.635",
117
+ "@stacksjs/config": "0.75.635",
118
+ "@stacksjs/database": "0.75.635",
119
+ "@stacksjs/desktop-build": "0.75.635",
120
+ "@stacksjs/dns": "0.75.635",
121
121
  "@stacksjs/dnsx": "^0.2.3",
122
- "@stacksjs/email": "0.75.634",
123
- "@stacksjs/enums": "0.75.634",
124
- "@stacksjs/env": "0.75.634",
125
- "@stacksjs/error-handling": "0.75.634",
126
- "@stacksjs/events": "0.75.634",
127
- "@stacksjs/features": "0.75.634",
128
- "@stacksjs/git": "0.75.634",
122
+ "@stacksjs/email": "0.75.635",
123
+ "@stacksjs/enums": "0.75.635",
124
+ "@stacksjs/env": "0.75.635",
125
+ "@stacksjs/error-handling": "0.75.635",
126
+ "@stacksjs/events": "0.75.635",
127
+ "@stacksjs/features": "0.75.635",
128
+ "@stacksjs/git": "0.75.635",
129
129
  "@stacksjs/gitit": "^0.2.5",
130
- "@stacksjs/health": "0.75.634",
131
- "@stacksjs/hq": "0.75.634",
130
+ "@stacksjs/health": "0.75.635",
131
+ "@stacksjs/hq": "0.75.635",
132
132
  "@stacksjs/httx": "^0.1.10",
133
- "@stacksjs/image": "0.75.634",
134
- "@stacksjs/lint": "0.75.634",
135
- "@stacksjs/logging": "0.75.634",
136
- "@stacksjs/notifications": "0.75.634",
137
- "@stacksjs/objects": "0.75.634",
138
- "@stacksjs/orm": "0.75.634",
139
- "@stacksjs/path": "0.75.634",
140
- "@stacksjs/payments": "0.75.634",
141
- "@stacksjs/realtime": "0.75.634",
142
- "@stacksjs/router": "0.75.634",
133
+ "@stacksjs/image": "0.75.635",
134
+ "@stacksjs/lint": "0.75.635",
135
+ "@stacksjs/logging": "0.75.635",
136
+ "@stacksjs/notifications": "0.75.635",
137
+ "@stacksjs/objects": "0.75.635",
138
+ "@stacksjs/orm": "0.75.635",
139
+ "@stacksjs/path": "0.75.635",
140
+ "@stacksjs/payments": "0.75.635",
141
+ "@stacksjs/realtime": "0.75.635",
142
+ "@stacksjs/router": "0.75.635",
143
143
  "@stacksjs/rpx": "^0.11.54",
144
- "@stacksjs/scheduler": "0.75.634",
145
- "@stacksjs/search-engine": "0.75.634",
146
- "@stacksjs/security": "0.75.634",
147
- "@stacksjs/server": "0.75.634",
148
- "@stacksjs/sites": "0.75.634",
149
- "@stacksjs/skills": "0.75.634",
150
- "@stacksjs/socials": "0.75.634",
151
- "@stacksjs/storage": "0.75.634",
152
- "@stacksjs/strings": "0.75.634",
144
+ "@stacksjs/scheduler": "0.75.635",
145
+ "@stacksjs/search-engine": "0.75.635",
146
+ "@stacksjs/security": "0.75.635",
147
+ "@stacksjs/server": "0.75.635",
148
+ "@stacksjs/sites": "0.75.635",
149
+ "@stacksjs/skills": "0.75.635",
150
+ "@stacksjs/socials": "0.75.635",
151
+ "@stacksjs/storage": "0.75.635",
152
+ "@stacksjs/strings": "0.75.635",
153
153
  "@stacksjs/stx": "^0.2.908",
154
- "@stacksjs/testing": "0.75.634",
155
- "@stacksjs/tinker": "0.75.634",
154
+ "@stacksjs/testing": "0.75.635",
155
+ "@stacksjs/tinker": "0.75.635",
156
156
  "@stacksjs/tlsx": "^0.13.19",
157
157
  "@stacksjs/ts-cloud": "^0.16.144",
158
- "@stacksjs/tunnel": "0.75.634",
159
- "@stacksjs/types": "0.75.634",
160
- "@stacksjs/ui": "0.75.634",
161
- "@stacksjs/utils": "0.75.634",
162
- "@stacksjs/validation": "0.75.634",
158
+ "@stacksjs/tunnel": "0.75.635",
159
+ "@stacksjs/types": "0.75.635",
160
+ "@stacksjs/ui": "0.75.635",
161
+ "@stacksjs/utils": "0.75.635",
162
+ "@stacksjs/validation": "0.75.635",
163
163
  "ajv": "^8.20.0",
164
164
  "ajv-formats": "^3.0.1",
165
165
  "bun-plugin-stx": "^0.2.908",