@stacksjs/buddy 0.70.257 → 0.70.259

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.
Files changed (113) hide show
  1. package/dist/cli.d.ts +11 -1
  2. package/dist/cli.js +5 -164
  3. package/dist/commands/about.js +1 -35
  4. package/dist/commands/add.js +1 -25
  5. package/dist/commands/ai-context.js +4 -27
  6. package/dist/commands/auth.js +1 -68
  7. package/dist/commands/build.js +1 -221
  8. package/dist/commands/cd.js +8 -39
  9. package/dist/commands/changelog.js +1 -32
  10. package/dist/commands/clean.js +1 -44
  11. package/dist/commands/cloud.js +2 -519
  12. package/dist/commands/commit.js +1 -16
  13. package/dist/commands/completion.js +6 -42
  14. package/dist/commands/config-migrate.js +6 -94
  15. package/dist/commands/configure.js +2 -45
  16. package/dist/commands/create.js +1 -162
  17. package/dist/commands/deploy.d.ts +10 -4
  18. package/dist/commands/deploy.js +13 -1664
  19. package/dist/commands/desktop-apple.js +12 -399
  20. package/dist/commands/dev.js +6 -1083
  21. package/dist/commands/dns.js +3 -103
  22. package/dist/commands/docs/buddy-commands.js +10 -132
  23. package/dist/commands/docs/buddy-commands.test.js +1 -38
  24. package/dist/commands/docs/framework-repo.js +1 -14
  25. package/dist/commands/docs/framework-repo.test.js +1 -68
  26. package/dist/commands/docs/generated-artifacts.js +3 -70
  27. package/dist/commands/docs/generated-artifacts.test.js +1 -19
  28. package/dist/commands/docs/links.js +2 -85
  29. package/dist/commands/docs/links.test.js +4 -66
  30. package/dist/commands/docs.js +1 -24
  31. package/dist/commands/doctor.js +2 -478
  32. package/dist/commands/domains.js +2 -152
  33. package/dist/commands/email.js +31 -503
  34. package/dist/commands/env.js +1 -312
  35. package/dist/commands/extension.js +1 -239
  36. package/dist/commands/features.js +9 -345
  37. package/dist/commands/fresh.js +1 -46
  38. package/dist/commands/generate.js +2 -152
  39. package/dist/commands/http.js +1 -33
  40. package/dist/commands/index.js +1 -57
  41. package/dist/commands/install.js +1 -22
  42. package/dist/commands/key.js +1 -23
  43. package/dist/commands/link.js +2 -147
  44. package/dist/commands/lint.js +2 -46
  45. package/dist/commands/list.js +1 -140
  46. package/dist/commands/mail.js +15 -1477
  47. package/dist/commands/maintenance.js +1 -141
  48. package/dist/commands/make.js +1 -392
  49. package/dist/commands/migrate-project.js +1 -49
  50. package/dist/commands/migrate.js +27 -625
  51. package/dist/commands/outdated.js +1 -19
  52. package/dist/commands/package.js +1 -17
  53. package/dist/commands/phone.js +17 -181
  54. package/dist/commands/ports.js +2 -118
  55. package/dist/commands/prepublish.js +1 -17
  56. package/dist/commands/projects.js +1 -29
  57. package/dist/commands/protocol/craft-evidence.js +4 -98
  58. package/dist/commands/protocol/craft-evidence.test.js +1 -20
  59. package/dist/commands/protocol/desktop-lifecycle-report.js +3 -57
  60. package/dist/commands/protocol/desktop-lifecycle-report.test.js +1 -32
  61. package/dist/commands/protocol/desktop-support.js +2 -32
  62. package/dist/commands/protocol/desktop-workflow.test.js +3 -35
  63. package/dist/commands/protocol/driver-registry.js +2 -71
  64. package/dist/commands/protocol/pantry-evidence.js +4 -144
  65. package/dist/commands/protocol/pantry-evidence.test.js +1 -29
  66. package/dist/commands/protocol/release-manifest.js +3 -102
  67. package/dist/commands/protocol/release-manifest.test.js +2 -34
  68. package/dist/commands/protocol/run-conformance.js +4 -346
  69. package/dist/commands/protocol/run-conformance.test.js +1 -52
  70. package/dist/commands/protocol/run-driver-contracts.js +4 -83
  71. package/dist/commands/protocol/run-driver-contracts.test.js +1 -18
  72. package/dist/commands/protocol/source-manifest.js +3 -113
  73. package/dist/commands/protocol/sync-suite.js +3 -136
  74. package/dist/commands/protocol/sync-suite.test.js +1 -44
  75. package/dist/commands/protocol.js +1 -60
  76. package/dist/commands/publish.js +8 -500
  77. package/dist/commands/queue.js +1 -248
  78. package/dist/commands/release.js +1 -42
  79. package/dist/commands/route.js +1 -21
  80. package/dist/commands/run-tool.js +1 -9
  81. package/dist/commands/saas.js +1 -25
  82. package/dist/commands/schedule.js +1 -61
  83. package/dist/commands/search.js +1 -84
  84. package/dist/commands/seed.js +1 -47
  85. package/dist/commands/serve.js +1 -55
  86. package/dist/commands/setup-ai.js +2 -121
  87. package/dist/commands/setup.js +2 -305
  88. package/dist/commands/share.js +1 -214
  89. package/dist/commands/sms.js +32 -319
  90. package/dist/commands/stacks.js +1 -72
  91. package/dist/commands/telemetry.js +1 -74
  92. package/dist/commands/test.js +1 -130
  93. package/dist/commands/tinker.js +1 -37
  94. package/dist/commands/types.js +1 -18
  95. package/dist/commands/upgrade.js +1 -98
  96. package/dist/commands/user.js +3 -84
  97. package/dist/commands/version.js +1 -14
  98. package/dist/config.js +1 -231
  99. package/dist/custom-cli.js +1 -23
  100. package/dist/database-preflight.js +1 -88
  101. package/dist/global-options.js +1 -4
  102. package/dist/index.js +1 -1
  103. package/dist/lazy-commands.js +1 -241
  104. package/dist/migrators/index.js +2 -62
  105. package/dist/migrators/laravel/index.js +1 -148
  106. package/dist/migrators/laravel/migrations.js +4 -231
  107. package/dist/migrators/laravel/models.js +8 -111
  108. package/dist/migrators/rails/index.js +1 -11
  109. package/dist/production-server.js +1 -257
  110. package/dist/project-setup.js +1 -36
  111. package/dist/serve-entry.js +1 -5
  112. package/dist/version-info.js +1 -5
  113. package/package.json +54 -47
@@ -1,39 +1,8 @@
1
- import { basename } from "node:path";
2
- import process from "node:process";
3
- import { ExitCode } from "@stacksjs/types";
4
- import { findStacksProjects } from "@stacksjs/utils";
5
- export function cd(buddy) {
6
- buddy.command("cd [name]", "Print the absolute path of a Stacks project by name").option("--eval", 'Emit `cd "path"` instead of just the path \u2014 pair with `eval "$(buddy cd <name> --eval)"` for real shell-cd', { default: !1 }).option("--root <dir>", "Search root for the project scan (overrides STACKS_PROJECTS_ROOT and the home-dir default)").option("--verbose", "Enable verbose output", { default: !1 }).action(async (name, options) => {
7
- if (!name) {
8
- process.stderr.write(`Usage: buddy cd <project-name> [--eval] [--root <dir>]
9
- `);
10
- process.stderr.write('Tip: add `bcd() { eval "$(buddy cd "$1" --eval)"; }` to your shell rc to make this act like a real `cd`.\n');
11
- process.exit(ExitCode.FatalError);
12
- }
13
- const root = options.root ?? process.env.STACKS_PROJECTS_ROOT ?? void 0, projects = await findStacksProjects(root, { quiet: !0 }), needle = name.toLowerCase(), exact = projects.filter((p) => basename(p).toLowerCase() === needle), matches = exact.length > 0 ? exact : projects.filter((p) => basename(p).toLowerCase().includes(needle));
14
- if (matches.length === 0) {
15
- process.stderr.write(`No Stacks project matched: ${name}
16
- `);
17
- if (!root)
18
- process.stderr.write(`(Scanned home dir, excluding ~/Documents, ~/Library, ~/Pictures, ~/.Trash. Set STACKS_PROJECTS_ROOT or pass --root <dir> to scan elsewhere.)
19
- `);
20
- process.exit(ExitCode.FatalError);
21
- }
22
- if (matches.length > 1) {
23
- process.stderr.write(`Ambiguous project name "${name}". Matches:
24
- `);
25
- for (const m of matches)
26
- process.stderr.write(` - ${basename(m)} \u2192 ${m}
27
- `);
28
- process.exit(ExitCode.FatalError);
29
- }
30
- const dest = matches[0];
31
- if (options.eval)
32
- process.stdout.write(`cd ${JSON.stringify(dest)}
33
- `);
34
- else
35
- process.stdout.write(`${dest}
36
- `);
37
- process.exit(ExitCode.Success);
38
- });
39
- }
1
+ import{basename}from"node:path";import process from"node:process";import{ExitCode}from"@stacksjs/types";import{findStacksProjects}from"@stacksjs/utils";export function cd(buddy){buddy.command("cd [name]","Print the absolute path of a Stacks project by name").option("--eval",'Emit `cd "path"` instead of just the path \u2014 pair with `eval "$(buddy cd <name> --eval)"` for real shell-cd',{default:!1}).option("--root <dir>","Search root for the project scan (overrides STACKS_PROJECTS_ROOT and the home-dir default)").option("--verbose","Enable verbose output",{default:!1}).action(async(name,options)=>{if(!name){process.stderr.write(`Usage: buddy cd <project-name> [--eval] [--root <dir>]
2
+ `);process.stderr.write('Tip: add `bcd() { eval "$(buddy cd "$1" --eval)"; }` to your shell rc to make this act like a real `cd`.\n');process.exit(ExitCode.FatalError)}const root=options.root??process.env.STACKS_PROJECTS_ROOT??void 0,projects=await findStacksProjects(root,{quiet:!0}),needle=name.toLowerCase(),exact=projects.filter((p)=>basename(p).toLowerCase()===needle),matches=exact.length>0?exact:projects.filter((p)=>basename(p).toLowerCase().includes(needle));if(matches.length===0){process.stderr.write(`No Stacks project matched: ${name}
3
+ `);if(!root)process.stderr.write(`(Scanned home dir, excluding ~/Documents, ~/Library, ~/Pictures, ~/.Trash. Set STACKS_PROJECTS_ROOT or pass --root <dir> to scan elsewhere.)
4
+ `);process.exit(ExitCode.FatalError)}if(matches.length>1){process.stderr.write(`Ambiguous project name "${name}". Matches:
5
+ `);for(const m of matches)process.stderr.write(` - ${basename(m)} \u2192 ${m}
6
+ `);process.exit(ExitCode.FatalError)}const dest=matches[0];if(options.eval)process.stdout.write(`cd ${JSON.stringify(dest)}
7
+ `);else process.stdout.write(`${dest}
8
+ `);process.exit(ExitCode.Success)})}
@@ -1,32 +1 @@
1
- import process from "node:process";
2
- import { runAction } from "@stacksjs/actions";
3
- import { intro, log, onUnknownSubcommand, outro } from "@stacksjs/cli";
4
- import { Action } from "@stacksjs/enums";
5
- import { ExitCode } from "@stacksjs/types";
6
- export function changelog(buddy) {
7
- const descriptions = {
8
- changelog: "Create a CHANGELOG.md file",
9
- quiet: "Minimal output",
10
- dryRun: "Do not write the file, just output the changes",
11
- from: "Start git revision for generated changelog",
12
- project: "Target a specific project",
13
- to: "End git revision for generated changelog",
14
- verbose: "Enable verbose output",
15
- version: "Version heading to use for the generated changelog entry"
16
- };
17
- buddy.command("changelog", descriptions.changelog).option("-q, --quiet", descriptions.quiet, { default: !1 }).option("-d, --dry-run", descriptions.dryRun, { default: !1 }).option("-p, --project [project]", descriptions.project, { default: !1 }).option("--from <revision>", descriptions.from).option("--to <revision>", descriptions.to).option("--version <version>", descriptions.version).option("--verbose", descriptions.verbose, { default: !1 }).action(async (options) => {
18
- log.debug("Running `buddy changelog` ...", options);
19
- const perf = await intro("buddy changelog"), result = await runAction(Action.Changelog, options);
20
- if (result.isErr) {
21
- await outro("While running the changelog command, there was an issue", { ...options, startTime: perf, useSeconds: !0 }, result.error);
22
- process.exit(ExitCode.FatalError);
23
- }
24
- await outro("Generated CHANGELOG.md", {
25
- ...options,
26
- startTime: perf,
27
- useSeconds: !0,
28
- type: "success"
29
- });
30
- });
31
- onUnknownSubcommand(buddy, "changelog");
32
- }
1
+ import process from"node:process";import{runAction}from"@stacksjs/actions";import{intro,log,onUnknownSubcommand,outro}from"@stacksjs/cli";import{Action}from"@stacksjs/enums";import{ExitCode}from"@stacksjs/types";export function changelog(buddy){const descriptions={changelog:"Create a CHANGELOG.md file",quiet:"Minimal output",dryRun:"Do not write the file, just output the changes",from:"Start git revision for generated changelog",project:"Target a specific project",to:"End git revision for generated changelog",verbose:"Enable verbose output",version:"Version heading to use for the generated changelog entry"};buddy.command("changelog",descriptions.changelog).option("-q, --quiet",descriptions.quiet,{default:!1}).option("-d, --dry-run",descriptions.dryRun,{default:!1}).option("-p, --project [project]",descriptions.project,{default:!1}).option("--from <revision>",descriptions.from).option("--to <revision>",descriptions.to).option("--version <version>",descriptions.version).option("--verbose",descriptions.verbose,{default:!1}).action(async(options)=>{log.debug("Running `buddy changelog` ...",options);const perf=await intro("buddy changelog"),result=await runAction(Action.Changelog,options);if(result.isErr){await outro("While running the changelog command, there was an issue",{...options,startTime:perf,useSeconds:!0},result.error);process.exit(ExitCode.FatalError)}await outro("Generated CHANGELOG.md",{...options,startTime:perf,useSeconds:!0,type:"success"})});onUnknownSubcommand(buddy,"changelog")}
@@ -1,44 +1 @@
1
- import process from "node:process";
2
- import { runAction } from "@stacksjs/actions";
3
- import { intro, log, onUnknownSubcommand, outro } from "@stacksjs/cli";
4
- import { hasTTY, isCI } from "@stacksjs/env";
5
- import { Action } from "@stacksjs/enums";
6
- import { ExitCode } from "@stacksjs/types";
7
- export function clean(buddy) {
8
- const descriptions = {
9
- clean: "Removes all node_modules & lock files",
10
- project: "Target a specific project",
11
- force: "Skip the confirmation prompt (required in CI/non-interactive shells)",
12
- verbose: "Enable verbose output"
13
- };
14
- buddy.command("clean", descriptions.clean).option("-p, --project [project]", descriptions.project, { default: !1 }).option("-f, --force", descriptions.force, { default: !1 }).option("--verbose", descriptions.verbose, { default: !1 }).action(async (options) => {
15
- log.debug("Running `buddy clean` ...", options);
16
- const skipConfirm = options.force === !0 || Boolean(buddy.isForce) || Boolean(buddy.isNoInteraction);
17
- if (!skipConfirm && (isCI || !hasTTY || !process.stdin.isTTY)) {
18
- log.syncError("Refusing to run `buddy clean` from a non-interactive shell without confirmation.");
19
- log.fatal(" \u27A1\uFE0F Re-run with `--force` to proceed: `buddy clean --force`");
20
- }
21
- if (!skipConfirm) {
22
- const { confirm } = await import("@stacksjs/cli");
23
- if (!await confirm({
24
- message: "This will remove all node_modules and lock files. Continue?",
25
- initial: !1
26
- })) {
27
- log.info("Clean cancelled");
28
- process.exit(ExitCode.Success);
29
- }
30
- }
31
- const perf = await intro("buddy clean"), result = await runAction(Action.Clean, options);
32
- if (result.isErr) {
33
- await outro("While running the clean command, there was an issue", { startTime: perf, useSeconds: !0 }, result.error);
34
- process.exit(ExitCode.FatalError);
35
- }
36
- await outro("Cleaned up", {
37
- startTime: perf,
38
- useSeconds: !0,
39
- message: "Cleaned up"
40
- });
41
- process.exit(ExitCode.Success);
42
- });
43
- onUnknownSubcommand(buddy, "clean");
44
- }
1
+ import process from"node:process";import{runAction}from"@stacksjs/actions";import{intro,log,onUnknownSubcommand,outro}from"@stacksjs/cli";import{hasTTY,isCI}from"@stacksjs/env";import{Action}from"@stacksjs/enums";import{ExitCode}from"@stacksjs/types";export function clean(buddy){const descriptions={clean:"Removes all node_modules & lock files",project:"Target a specific project",force:"Skip the confirmation prompt (required in CI/non-interactive shells)",verbose:"Enable verbose output"};buddy.command("clean",descriptions.clean).option("-p, --project [project]",descriptions.project,{default:!1}).option("-f, --force",descriptions.force,{default:!1}).option("--verbose",descriptions.verbose,{default:!1}).action(async(options)=>{log.debug("Running `buddy clean` ...",options);const skipConfirm=options.force===!0||Boolean(buddy.isForce)||Boolean(buddy.isNoInteraction);if(!skipConfirm&&(isCI||!hasTTY||!process.stdin.isTTY)){log.syncError("Refusing to run `buddy clean` from a non-interactive shell without confirmation.");log.fatal(" \u27A1\uFE0F Re-run with `--force` to proceed: `buddy clean --force`")}if(!skipConfirm){const{confirm}=await import("@stacksjs/cli");if(!await confirm({message:"This will remove all node_modules and lock files. Continue?",initial:!1})){log.info("Clean cancelled");process.exit(ExitCode.Success)}}const perf=await intro("buddy clean"),result=await runAction(Action.Clean,options);if(result.isErr){await outro("While running the clean command, there was an issue",{startTime:perf,useSeconds:!0},result.error);process.exit(ExitCode.FatalError)}await outro("Cleaned up",{startTime:perf,useSeconds:!0,message:"Cleaned up"});process.exit(ExitCode.Success)});onUnknownSubcommand(buddy,"clean")}