@stacksjs/buddy 0.70.87 → 0.70.88

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 (143) hide show
  1. package/package.json +2 -2
  2. package/dist/cli.d.ts +0 -1
  3. package/dist/cli.js +0 -165
  4. package/dist/commands/about.d.ts +0 -2
  5. package/dist/commands/about.js +0 -35
  6. package/dist/commands/add.d.ts +0 -2
  7. package/dist/commands/add.js +0 -33
  8. package/dist/commands/auth.d.ts +0 -2
  9. package/dist/commands/auth.js +0 -68
  10. package/dist/commands/build.d.ts +0 -2
  11. package/dist/commands/build.js +0 -153
  12. package/dist/commands/cd.d.ts +0 -20
  13. package/dist/commands/cd.js +0 -39
  14. package/dist/commands/changelog.d.ts +0 -2
  15. package/dist/commands/changelog.js +0 -32
  16. package/dist/commands/clean.d.ts +0 -2
  17. package/dist/commands/clean.js +0 -37
  18. package/dist/commands/cloud.d.ts +0 -2
  19. package/dist/commands/cloud.js +0 -503
  20. package/dist/commands/commit.d.ts +0 -2
  21. package/dist/commands/commit.js +0 -16
  22. package/dist/commands/completion.d.ts +0 -2
  23. package/dist/commands/completion.js +0 -143
  24. package/dist/commands/config-migrate.d.ts +0 -26
  25. package/dist/commands/config-migrate.js +0 -94
  26. package/dist/commands/configure.d.ts +0 -2
  27. package/dist/commands/configure.js +0 -48
  28. package/dist/commands/create.d.ts +0 -2
  29. package/dist/commands/create.js +0 -141
  30. package/dist/commands/deploy.d.ts +0 -107
  31. package/dist/commands/deploy.js +0 -1439
  32. package/dist/commands/dev.d.ts +0 -10
  33. package/dist/commands/dev.js +0 -907
  34. package/dist/commands/dns.d.ts +0 -2
  35. package/dist/commands/dns.js +0 -102
  36. package/dist/commands/doctor.d.ts +0 -2
  37. package/dist/commands/doctor.js +0 -285
  38. package/dist/commands/domains.d.ts +0 -2
  39. package/dist/commands/domains.js +0 -159
  40. package/dist/commands/email.d.ts +0 -2
  41. package/dist/commands/email.js +0 -524
  42. package/dist/commands/env.d.ts +0 -2
  43. package/dist/commands/env.js +0 -246
  44. package/dist/commands/extension.d.ts +0 -8
  45. package/dist/commands/extension.js +0 -78
  46. package/dist/commands/features.d.ts +0 -180
  47. package/dist/commands/features.js +0 -422
  48. package/dist/commands/fresh.d.ts +0 -2
  49. package/dist/commands/fresh.js +0 -39
  50. package/dist/commands/generate.d.ts +0 -2
  51. package/dist/commands/generate.js +0 -104
  52. package/dist/commands/http.d.ts +0 -2
  53. package/dist/commands/http.js +0 -33
  54. package/dist/commands/index.d.ts +0 -53
  55. package/dist/commands/index.js +0 -53
  56. package/dist/commands/install.d.ts +0 -2
  57. package/dist/commands/install.js +0 -22
  58. package/dist/commands/key.d.ts +0 -2
  59. package/dist/commands/key.js +0 -23
  60. package/dist/commands/lint.d.ts +0 -2
  61. package/dist/commands/lint.js +0 -46
  62. package/dist/commands/list.d.ts +0 -2
  63. package/dist/commands/list.js +0 -108
  64. package/dist/commands/mail.d.ts +0 -2
  65. package/dist/commands/mail.js +0 -693
  66. package/dist/commands/maintenance.d.ts +0 -2
  67. package/dist/commands/maintenance.js +0 -141
  68. package/dist/commands/make.d.ts +0 -2
  69. package/dist/commands/make.js +0 -375
  70. package/dist/commands/migrate-project.d.ts +0 -2
  71. package/dist/commands/migrate-project.js +0 -49
  72. package/dist/commands/migrate.d.ts +0 -4
  73. package/dist/commands/migrate.js +0 -455
  74. package/dist/commands/outdated.d.ts +0 -2
  75. package/dist/commands/outdated.js +0 -19
  76. package/dist/commands/package.d.ts +0 -2
  77. package/dist/commands/package.js +0 -17
  78. package/dist/commands/phone.d.ts +0 -2
  79. package/dist/commands/phone.js +0 -188
  80. package/dist/commands/ports.d.ts +0 -2
  81. package/dist/commands/ports.js +0 -118
  82. package/dist/commands/prepublish.d.ts +0 -2
  83. package/dist/commands/prepublish.js +0 -17
  84. package/dist/commands/projects.d.ts +0 -2
  85. package/dist/commands/projects.js +0 -29
  86. package/dist/commands/publish.d.ts +0 -2
  87. package/dist/commands/publish.js +0 -172
  88. package/dist/commands/queue.d.ts +0 -2
  89. package/dist/commands/queue.js +0 -248
  90. package/dist/commands/release.d.ts +0 -2
  91. package/dist/commands/release.js +0 -30
  92. package/dist/commands/route.d.ts +0 -2
  93. package/dist/commands/route.js +0 -21
  94. package/dist/commands/saas.d.ts +0 -2
  95. package/dist/commands/saas.js +0 -25
  96. package/dist/commands/schedule.d.ts +0 -2
  97. package/dist/commands/schedule.js +0 -61
  98. package/dist/commands/search.d.ts +0 -2
  99. package/dist/commands/search.js +0 -84
  100. package/dist/commands/seed.d.ts +0 -2
  101. package/dist/commands/seed.js +0 -71
  102. package/dist/commands/serve.d.ts +0 -25
  103. package/dist/commands/serve.js +0 -182
  104. package/dist/commands/setup.d.ts +0 -12
  105. package/dist/commands/setup.js +0 -215
  106. package/dist/commands/share.d.ts +0 -2
  107. package/dist/commands/share.js +0 -214
  108. package/dist/commands/sms.d.ts +0 -2
  109. package/dist/commands/sms.js +0 -328
  110. package/dist/commands/stacks.d.ts +0 -2
  111. package/dist/commands/stacks.js +0 -69
  112. package/dist/commands/telemetry.d.ts +0 -2
  113. package/dist/commands/telemetry.js +0 -74
  114. package/dist/commands/test.d.ts +0 -2
  115. package/dist/commands/test.js +0 -130
  116. package/dist/commands/tinker.d.ts +0 -2
  117. package/dist/commands/tinker.js +0 -37
  118. package/dist/commands/types.d.ts +0 -2
  119. package/dist/commands/types.js +0 -18
  120. package/dist/commands/upgrade.d.ts +0 -2
  121. package/dist/commands/upgrade.js +0 -98
  122. package/dist/commands/version.d.ts +0 -2
  123. package/dist/commands/version.js +0 -16
  124. package/dist/config.d.ts +0 -43
  125. package/dist/config.js +0 -223
  126. package/dist/custom-cli.d.ts +0 -1
  127. package/dist/custom-cli.js +0 -23
  128. package/dist/index.d.ts +0 -1
  129. package/dist/index.js +0 -1
  130. package/dist/lazy-commands.d.ts +0 -61
  131. package/dist/lazy-commands.js +0 -188
  132. package/dist/migrators/index.d.ts +0 -9
  133. package/dist/migrators/index.js +0 -62
  134. package/dist/migrators/laravel/index.d.ts +0 -2
  135. package/dist/migrators/laravel/index.js +0 -148
  136. package/dist/migrators/laravel/migrations.d.ts +0 -52
  137. package/dist/migrators/laravel/migrations.js +0 -232
  138. package/dist/migrators/laravel/models.d.ts +0 -34
  139. package/dist/migrators/laravel/models.js +0 -134
  140. package/dist/migrators/rails/index.d.ts +0 -2
  141. package/dist/migrators/rails/index.js +0 -11
  142. package/dist/migrators/types.d.ts +0 -44
  143. package/dist/migrators/types.js +0 -0
@@ -1,53 +0,0 @@
1
- export * from "./about";
2
- export * from "./auth";
3
- export * from "./build";
4
- export * from "./cd";
5
- export * from "./changelog";
6
- export * from "./clean";
7
- export * from "./cloud";
8
- export * from "./commit";
9
- export * from "./completion";
10
- export * from "./config-migrate";
11
- export * from "./configure";
12
- export * from "./create";
13
- export * from "./deploy";
14
- export * from "./dev";
15
- export * from "./dns";
16
- export * from "./doctor";
17
- export * from "./domains";
18
- export * from "./email";
19
- export * from "./env";
20
- export * from "./features";
21
- export * from "./fresh";
22
- export * from "./generate";
23
- export * from "./http";
24
- export * from "./install";
25
- export * from "./key";
26
- export * from "./lint";
27
- export * from "./list";
28
- export * from "./mail";
29
- export * from "./make";
30
- export * from "./migrate";
31
- export * from "./migrate-project";
32
- export * from "./outdated";
33
- export * from "./phone";
34
- export * from "./ports";
35
- export * from "./prepublish";
36
- export * from "./projects";
37
- export * from "./publish";
38
- export * from "./queue";
39
- export * from "./release";
40
- export * from "./route";
41
- export * from "./saas";
42
- export * from "./schedule";
43
- export * from "./search";
44
- export * from "./seed";
45
- export * from "./serve";
46
- export * from "./setup";
47
- export * from "./sms";
48
- export * from "./telemetry";
49
- export * from "./test";
50
- export * from "./tinker";
51
- export * from "./types";
52
- export * from "./upgrade";
53
- export * from "./version";
@@ -1,2 +0,0 @@
1
- import type { CLI } from '@stacksjs/types';
2
- export declare function install(buddy: CLI): void;
@@ -1,22 +0,0 @@
1
- import process from "node:process";
2
- import { log, onUnknownSubcommand, runCommand } from "@stacksjs/cli";
3
- import { path as p } from "@stacksjs/path";
4
- import { ExitCode } from "@stacksjs/types";
5
- export function install(buddy) {
6
- const descriptions = {
7
- install: "Install your dependencies",
8
- project: "Target a specific project",
9
- verbose: "Enable verbose output"
10
- };
11
- buddy.command("install", descriptions.install).option("-p, --project [project]", descriptions.project, { default: !1 }).option("-v, --verbose", descriptions.verbose, { default: !1 }).action(async (options) => {
12
- log.debug("Running `buddy install` ...", options);
13
- if ((await runCommand("bun install", {
14
- ...options,
15
- cwd: p.projectPath()
16
- })).isErr) {
17
- log.error("bun install failed");
18
- process.exit(ExitCode.FatalError);
19
- }
20
- });
21
- onUnknownSubcommand(buddy, "install");
22
- }
@@ -1,2 +0,0 @@
1
- import type { CLI } from '@stacksjs/types';
2
- export declare function key(buddy: CLI): void;
@@ -1,23 +0,0 @@
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 key(buddy) {
7
- const descriptions = {
8
- command: "Generate & set the application key.",
9
- project: "Target a specific project",
10
- verbose: "Enable verbose output"
11
- };
12
- buddy.command("key:generate", descriptions.command).option("-p, --project [project]", descriptions.project, { default: !1 }).option("--verbose", descriptions.verbose, { default: !1 }).action(async (options) => {
13
- log.debug("Running `buddy key:generate` ...", options);
14
- await intro("buddy key:generate");
15
- const result = await runAction(Action.KeyGenerate, options);
16
- if (result.isErr) {
17
- log.error("Failed to set random application key.", result.error);
18
- process.exit(ExitCode.FatalError);
19
- }
20
- await outro("Random application key set.");
21
- });
22
- onUnknownSubcommand(buddy, "key");
23
- }
@@ -1,2 +0,0 @@
1
- import type { CLI } from '@stacksjs/types';
2
- export declare function lint(buddy: CLI): void;
@@ -1,46 +0,0 @@
1
- import process from "node:process";
2
- import { intro, log, onUnknownSubcommand, outro } from "@stacksjs/cli";
3
- import { ExitCode } from "@stacksjs/types";
4
- async function runStyleAction(entry, label, options) {
5
- const actions = await import("@stacksjs/actions"), { ok } = await actions[entry](options);
6
- if (!ok) {
7
- log.error(`${label} reported failure`);
8
- process.exit(ExitCode.FatalError);
9
- }
10
- }
11
- export function lint(buddy) {
12
- const descriptions = {
13
- lint: "Automagically lints your project codebase",
14
- lintFix: "Automagically fixes all lint errors",
15
- format: "Format your project codebase",
16
- formatCheck: "Check formatting without making changes",
17
- project: "Target a specific project",
18
- verbose: "Enable verbose output"
19
- };
20
- buddy.command("lint", descriptions.lint).option("-f, --fix", descriptions.lintFix, { default: !1 }).option("-p, --project [project]", descriptions.project, { default: !1 }).option("--verbose", descriptions.verbose, { default: !1 }).action(async (options) => {
21
- log.debug("Running `buddy lint` ...", options);
22
- const startTime = await intro("buddy lint");
23
- await runStyleAction(options.fix ? "lintFix" : "lintProject", "lint");
24
- await outro("Linted your project", { startTime, useSeconds: !0 });
25
- });
26
- buddy.command("lint:fix", descriptions.lintFix).option("-p, --project [project]", descriptions.project, { default: !1 }).option("--verbose", descriptions.verbose, { default: !1 }).action(async (options) => {
27
- log.debug("Running `buddy lint:fix` ...", options);
28
- const startTime = await intro("buddy lint:fix");
29
- log.info("Fixing lint errors...");
30
- await runStyleAction("lintFix", "lint:fix");
31
- await outro("Fixed lint errors", { startTime, useSeconds: !0 });
32
- });
33
- buddy.command("format", descriptions.format).option("-w, --write", "Write changes to files", { default: !1 }).option("-c, --check", descriptions.formatCheck, { default: !1 }).option("--verbose", descriptions.verbose, { default: !1 }).action(async (options) => {
34
- log.debug("Running `buddy format` ...", options);
35
- const startTime = await intro("buddy format");
36
- await runStyleAction("formatProject", "format", options.check ? { check: !0 } : { write: !0 });
37
- await outro("Formatted your project", { startTime, useSeconds: !0 });
38
- });
39
- buddy.command("format:check", descriptions.formatCheck).option("--verbose", descriptions.verbose, { default: !1 }).action(async (options) => {
40
- log.debug("Running `buddy format:check` ...", options);
41
- const startTime = await intro("buddy format:check");
42
- await runStyleAction("formatProject", "format:check", { check: !0 });
43
- await outro("Format check complete", { startTime, useSeconds: !0 });
44
- });
45
- onUnknownSubcommand(buddy, "lint");
46
- }
@@ -1,2 +0,0 @@
1
- import type { CLI } from '@stacksjs/types';
2
- export declare function list(buddy: CLI): void;
@@ -1,108 +0,0 @@
1
- import process from "node:process";
2
- import { log } from "@stacksjs/logging";
3
- import { onUnknownSubcommand } from "@stacksjs/cli";
4
- export function list(buddy) {
5
- const descriptions = {
6
- list: "List all available Buddy commands",
7
- project: "Target a specific project",
8
- verbose: "Enable verbose output",
9
- filter: "Filter commands by name or group",
10
- namespace: "Filter commands by namespace (e.g., make, env, db)",
11
- grouped: "Group commands by category",
12
- format: "Output format (text, json)"
13
- };
14
- buddy.command("list", descriptions.list).option("-p, --project [project]", descriptions.project, { default: !1 }).option("-f, --filter [filter]", descriptions.filter).option("-n, --namespace [namespace]", descriptions.namespace).option("-g, --grouped", descriptions.grouped, { default: !0 }).option("--format [format]", descriptions.format, { default: "text" }).option("--verbose", descriptions.verbose, { default: !1 }).example("buddy list").example("buddy list --filter=make").example("buddy list --namespace=make").example("buddy list --namespace=env").example("buddy list --no-grouped").example("buddy list --format=json").action(async (options) => {
15
- log.debug("Running `buddy list` ...", options);
16
- const { bold, dim, green } = await import("@stacksjs/cli"), commands = buddy.commands || [];
17
- let filteredCommands = commands;
18
- if (options.filter) {
19
- const filterStr = String(options.filter).toLowerCase();
20
- filteredCommands = commands.filter((cmd) => {
21
- const name = cmd.name || "", desc = cmd.description || "";
22
- return name.toLowerCase().includes(filterStr) || desc.toLowerCase().includes(filterStr);
23
- });
24
- }
25
- if (options.namespace) {
26
- const namespaceStr = String(options.namespace).toLowerCase();
27
- filteredCommands = filteredCommands.filter((cmd) => {
28
- return (cmd.namespace || "").toLowerCase() === namespaceStr;
29
- });
30
- }
31
- if (filteredCommands.length === 0) {
32
- if (options.format === "json")
33
- console.log(JSON.stringify({ commands: [], total: 0 }, null, 2));
34
- else {
35
- console.log(dim("No commands found"));
36
- if (options.filter)
37
- console.log(dim(`Try removing the filter: ${options.filter}`));
38
- }
39
- return;
40
- }
41
- if (options.format === "json") {
42
- const jsonOutput = filteredCommands.map((cmd) => ({
43
- name: cmd.name || "",
44
- description: cmd.description || "",
45
- aliases: cmd.aliasNames || []
46
- }));
47
- console.log(JSON.stringify({ commands: jsonOutput, total: jsonOutput.length }, null, 2));
48
- return;
49
- }
50
- if (options.grouped) {
51
- const groups = new Map;
52
- for (const cmd of filteredCommands) {
53
- const name = cmd.name || "";
54
- if (!name)
55
- continue;
56
- let group = "General";
57
- if (name.includes(":"))
58
- group = name.split(":")[0] ?? "General";
59
- else if (["dev", "build", "test", "lint"].includes(name))
60
- group = "Development";
61
- else if (["deploy", "release", "publish"].includes(name))
62
- group = "Deployment";
63
- else if (["migrate", "seed", "fresh"].includes(name))
64
- group = "Database";
65
- else if (["doctor", "about", "version"].includes(name))
66
- group = "Info";
67
- if (!groups.has(group))
68
- groups.set(group, []);
69
- groups.get(group).push(cmd);
70
- }
71
- console.log("");
72
- console.log(bold(green("Available Commands:")));
73
- console.log("");
74
- const sortedGroups = Array.from(groups.entries()).sort((a, b) => {
75
- const order = ["Development", "General", "Info"], aIndex = order.indexOf(a[0]), bIndex = order.indexOf(b[0]);
76
- if (aIndex >= 0 && bIndex >= 0)
77
- return aIndex - bIndex;
78
- if (aIndex >= 0)
79
- return -1;
80
- if (bIndex >= 0)
81
- return 1;
82
- return a[0].localeCompare(b[0]);
83
- });
84
- for (const [group, cmds] of sortedGroups) {
85
- console.log(bold(`${group}:`));
86
- cmds.sort((a, b) => (a.name || "").localeCompare(b.name || ""));
87
- for (const cmd of cmds) {
88
- const name = (cmd.name || "").padEnd(20), desc = cmd.description || "";
89
- console.log(` ${green(name)} ${dim(desc)}`);
90
- }
91
- console.log("");
92
- }
93
- } else {
94
- console.log("");
95
- console.log(bold(green("Available Commands:")));
96
- console.log("");
97
- filteredCommands.sort((a, b) => (a.name || "").localeCompare(b.name || ""));
98
- for (const cmd of filteredCommands) {
99
- const name = (cmd.name || "").padEnd(20), desc = cmd.description || "";
100
- console.log(` ${green(name)} ${dim(desc)}`);
101
- }
102
- console.log("");
103
- }
104
- console.log(dim(`Total: ${filteredCommands.length} commands`));
105
- console.log("");
106
- });
107
- onUnknownSubcommand(buddy, "list");
108
- }
@@ -1,2 +0,0 @@
1
- import { CLI } from '@stacksjs/clapp';
2
- export declare function mailCommands(buddy: CLI): void;