@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.
- package/dist/cli.d.ts +11 -1
- package/dist/cli.js +5 -164
- package/dist/commands/about.js +1 -35
- package/dist/commands/add.js +1 -25
- package/dist/commands/ai-context.js +4 -27
- package/dist/commands/auth.js +1 -68
- package/dist/commands/build.js +1 -221
- package/dist/commands/cd.js +8 -39
- package/dist/commands/changelog.js +1 -32
- package/dist/commands/clean.js +1 -44
- package/dist/commands/cloud.js +2 -519
- package/dist/commands/commit.js +1 -16
- package/dist/commands/completion.js +6 -42
- package/dist/commands/config-migrate.js +6 -94
- package/dist/commands/configure.js +2 -45
- package/dist/commands/create.js +1 -162
- package/dist/commands/deploy.d.ts +10 -4
- package/dist/commands/deploy.js +13 -1664
- package/dist/commands/desktop-apple.js +12 -399
- package/dist/commands/dev.js +6 -1083
- package/dist/commands/dns.js +3 -103
- package/dist/commands/docs/buddy-commands.js +10 -132
- package/dist/commands/docs/buddy-commands.test.js +1 -38
- package/dist/commands/docs/framework-repo.js +1 -14
- package/dist/commands/docs/framework-repo.test.js +1 -68
- package/dist/commands/docs/generated-artifacts.js +3 -70
- package/dist/commands/docs/generated-artifacts.test.js +1 -19
- package/dist/commands/docs/links.js +2 -85
- package/dist/commands/docs/links.test.js +4 -66
- package/dist/commands/docs.js +1 -24
- package/dist/commands/doctor.js +2 -478
- package/dist/commands/domains.js +2 -152
- package/dist/commands/email.js +31 -503
- package/dist/commands/env.js +1 -312
- package/dist/commands/extension.js +1 -239
- package/dist/commands/features.js +9 -345
- package/dist/commands/fresh.js +1 -46
- package/dist/commands/generate.js +2 -152
- package/dist/commands/http.js +1 -33
- package/dist/commands/index.js +1 -57
- package/dist/commands/install.js +1 -22
- package/dist/commands/key.js +1 -23
- package/dist/commands/link.js +2 -147
- package/dist/commands/lint.js +2 -46
- package/dist/commands/list.js +1 -140
- package/dist/commands/mail.js +15 -1477
- package/dist/commands/maintenance.js +1 -141
- package/dist/commands/make.js +1 -392
- package/dist/commands/migrate-project.js +1 -49
- package/dist/commands/migrate.js +27 -625
- package/dist/commands/outdated.js +1 -19
- package/dist/commands/package.js +1 -17
- package/dist/commands/phone.js +17 -181
- package/dist/commands/ports.js +2 -118
- package/dist/commands/prepublish.js +1 -17
- package/dist/commands/projects.js +1 -29
- package/dist/commands/protocol/craft-evidence.js +4 -98
- package/dist/commands/protocol/craft-evidence.test.js +1 -20
- package/dist/commands/protocol/desktop-lifecycle-report.js +3 -57
- package/dist/commands/protocol/desktop-lifecycle-report.test.js +1 -32
- package/dist/commands/protocol/desktop-support.js +2 -32
- package/dist/commands/protocol/desktop-workflow.test.js +3 -35
- package/dist/commands/protocol/driver-registry.js +2 -71
- package/dist/commands/protocol/pantry-evidence.js +4 -144
- package/dist/commands/protocol/pantry-evidence.test.js +1 -29
- package/dist/commands/protocol/release-manifest.js +3 -102
- package/dist/commands/protocol/release-manifest.test.js +2 -34
- package/dist/commands/protocol/run-conformance.js +4 -346
- package/dist/commands/protocol/run-conformance.test.js +1 -52
- package/dist/commands/protocol/run-driver-contracts.js +4 -83
- package/dist/commands/protocol/run-driver-contracts.test.js +1 -18
- package/dist/commands/protocol/source-manifest.js +3 -113
- package/dist/commands/protocol/sync-suite.js +3 -136
- package/dist/commands/protocol/sync-suite.test.js +1 -44
- package/dist/commands/protocol.js +1 -60
- package/dist/commands/publish.js +8 -500
- package/dist/commands/queue.js +1 -248
- package/dist/commands/release.js +1 -42
- package/dist/commands/route.js +1 -21
- package/dist/commands/run-tool.js +1 -9
- package/dist/commands/saas.js +1 -25
- package/dist/commands/schedule.js +1 -61
- package/dist/commands/search.js +1 -84
- package/dist/commands/seed.js +1 -47
- package/dist/commands/serve.js +1 -55
- package/dist/commands/setup-ai.js +2 -121
- package/dist/commands/setup.js +2 -305
- package/dist/commands/share.js +1 -214
- package/dist/commands/sms.js +32 -319
- package/dist/commands/stacks.js +1 -72
- package/dist/commands/telemetry.js +1 -74
- package/dist/commands/test.js +1 -130
- package/dist/commands/tinker.js +1 -37
- package/dist/commands/types.js +1 -18
- package/dist/commands/upgrade.js +1 -98
- package/dist/commands/user.js +3 -84
- package/dist/commands/version.js +1 -14
- package/dist/config.js +1 -231
- package/dist/custom-cli.js +1 -23
- package/dist/database-preflight.js +1 -88
- package/dist/global-options.js +1 -4
- package/dist/index.js +1 -1
- package/dist/lazy-commands.js +1 -241
- package/dist/migrators/index.js +2 -62
- package/dist/migrators/laravel/index.js +1 -148
- package/dist/migrators/laravel/migrations.js +4 -231
- package/dist/migrators/laravel/models.js +8 -111
- package/dist/migrators/rails/index.js +1 -11
- package/dist/production-server.js +1 -257
- package/dist/project-setup.js +1 -36
- package/dist/serve-entry.js +1 -5
- package/dist/version-info.js +1 -5
- package/package.json +54 -47
package/dist/commands/cd.js
CHANGED
|
@@ -1,39 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
|
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")}
|
package/dist/commands/clean.js
CHANGED
|
@@ -1,44 +1 @@
|
|
|
1
|
-
import process from
|
|
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")}
|