@stacksjs/buddy 0.70.258 → 0.70.260
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.js +13 -1676
- 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 -84
- 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 +53 -46
package/dist/commands/domains.js
CHANGED
|
@@ -1,107 +1,4 @@
|
|
|
1
|
-
import process from
|
|
2
|
-
import { runAction } from "@stacksjs/actions";
|
|
3
|
-
import { bgCyan, bold, intro, italic, log, onUnknownSubcommand, outro, prompts } from "@stacksjs/cli";
|
|
4
|
-
import { config } from "@stacksjs/config";
|
|
5
|
-
import { addDomain } from "@stacksjs/dns";
|
|
6
|
-
import { Action } from "@stacksjs/enums";
|
|
7
|
-
import { ExitCode } from "@stacksjs/types";
|
|
8
|
-
export function domains(buddy) {
|
|
9
|
-
const descriptions = {
|
|
10
|
-
purchase: "Purchase a domain",
|
|
11
|
-
add: "Add a domain to your cloud",
|
|
12
|
-
remove: "Remove a domain from your cloud",
|
|
13
|
-
skip: "Skip the confirmation prompt",
|
|
14
|
-
project: "Target a specific project",
|
|
15
|
-
verbose: "Enable verbose output"
|
|
16
|
-
}, c = config.dns.contactInfo;
|
|
17
|
-
buddy.command("domains:purchase <domain>", descriptions.purchase).option("--years <years>", "Number of years to purchase the domain for", {
|
|
18
|
-
default: 1
|
|
19
|
-
}).option("--privacy", "Enable privacy protection", { default: !0 }).option("--auto-renew", "Enable auto-renew", { default: !0 }).option("--first-name <firstName>", "Registrant first name", {
|
|
20
|
-
default: c?.firstName
|
|
21
|
-
}).option("--last-name <lastName>", "Registrant last name", {
|
|
22
|
-
default: c?.lastName
|
|
23
|
-
}).option("--organization <organization>", "Registrant organization name", {
|
|
24
|
-
default: c?.organizationName
|
|
25
|
-
}).option("--address-line1 <address>", "Registrant address line 1", {
|
|
26
|
-
default: c?.addressLine1
|
|
27
|
-
}).option("--address-line2 <address>", "Registrant address line 2", {
|
|
28
|
-
default: c?.addressLine2
|
|
29
|
-
}).option("--city <city>", "Registrant city", { default: c?.city }).option("--state <state>", "Registrant state", { default: c?.state }).option("--country <country>", "Registrant country code", {
|
|
30
|
-
default: c?.countryCode
|
|
31
|
-
}).option("--zip <zip>", "Registrant zip", { default: c?.zip }).option("--phone <phone>", "Registrant phone", { default: c?.phoneNumber }).option("--email <email>", "Registrant email", { default: c?.email }).option("--admin-first-name <firstName>", "Admin first name", {
|
|
32
|
-
default: c?.admin?.firstName || c?.firstName
|
|
33
|
-
}).option("--admin-last-name <lastName>", "Admin last name", {
|
|
34
|
-
default: c?.admin?.lastName || c?.lastName
|
|
35
|
-
}).option("--admin-organization <organization>", "Admin organization", {
|
|
36
|
-
default: c?.admin?.organizationName || c?.organizationName
|
|
37
|
-
}).option("--admin-address-line1 <address>", "Admin address line 1", {
|
|
38
|
-
default: c?.admin?.addressLine1 || c?.addressLine1
|
|
39
|
-
}).option("--admin-address-line2 <address>", "Admin address line 2", {
|
|
40
|
-
default: c?.admin?.addressLine2 || c?.addressLine2
|
|
41
|
-
}).option("--admin-city <city>", "Admin city", {
|
|
42
|
-
default: c?.admin?.city || c?.city
|
|
43
|
-
}).option("--admin-state <state>", "Admin state", {
|
|
44
|
-
default: c?.admin?.state || c?.state
|
|
45
|
-
}).option("--admin-country <country>", "Admin country code", {
|
|
46
|
-
default: c?.admin?.countryCode || c?.countryCode
|
|
47
|
-
}).option("--admin-zip <zip>", "Admin zip", {
|
|
48
|
-
default: c?.admin?.zip || c?.zip
|
|
49
|
-
}).option("--admin-phone <phone>", "Admin phone number", {
|
|
50
|
-
default: c?.admin?.phoneNumber || c?.phoneNumber
|
|
51
|
-
}).option("--admin-email <email>", "Admin email", {
|
|
52
|
-
default: c?.admin?.email || c?.email
|
|
53
|
-
}).option("--tech-first-name <firstName>", "Tech first name", {
|
|
54
|
-
default: c?.tech?.firstName || c?.firstName
|
|
55
|
-
}).option("--tech-last-name <lastName>", "Tech last name", {
|
|
56
|
-
default: c?.tech?.lastName || c?.lastName
|
|
57
|
-
}).option("--tech-organization <organization>", "Tech organization name", {
|
|
58
|
-
default: c?.tech?.organizationName || c?.organizationName
|
|
59
|
-
}).option("--tech-address-line1 <address>", "Tech address line 1", {
|
|
60
|
-
default: c?.tech?.addressLine1 || c?.addressLine1
|
|
61
|
-
}).option("--tech-address-line2 <address>", "Tech address line 2", {
|
|
62
|
-
default: c?.tech?.addressLine2 || c?.addressLine2
|
|
63
|
-
}).option("--tech-city <city>", "Tech city", {
|
|
64
|
-
default: c?.tech?.city || c?.city
|
|
65
|
-
}).option("--tech-state <state>", "Tech state", {
|
|
66
|
-
default: c?.tech?.state || c?.state
|
|
67
|
-
}).option("--tech-country <country>", "Tech country", {
|
|
68
|
-
default: c?.tech?.countryCode || c?.countryCode
|
|
69
|
-
}).option("--tech-zip <zip>", "Tech zip", { default: c?.tech?.zip || c?.zip }).option("--tech-phone <phone>", "Tech phone", {
|
|
70
|
-
default: c?.tech?.phoneNumber || c?.phoneNumber
|
|
71
|
-
}).option("--tech-email <email>", "Tech email", {
|
|
72
|
-
default: c?.tech?.email || c?.email
|
|
73
|
-
}).option("--privacy-admin", "Enable privacy protection for admin", {
|
|
74
|
-
default: c?.privacyAdmin || c?.privacy || !0
|
|
75
|
-
}).option("--privacy-tech", "Enable privacy protection for tech", {
|
|
76
|
-
default: c?.privacyTech || c?.privacy || !0
|
|
77
|
-
}).option("--privacy-registrant", "Enable privacy protection for registrant", {
|
|
78
|
-
default: c?.privacyRegistrant || c?.privacy || !0
|
|
79
|
-
}).option("--contact-type <type>", "Contact type", { default: "person" }).option("-p, --project [project]", descriptions.project, { default: !1 }).option("--verbose", descriptions.verbose, { default: !1 }).action(async (domain, options) => {
|
|
80
|
-
log.debug("Running `buddy domains:purchase <domain>` ...", options);
|
|
81
|
-
options.domain = domain;
|
|
82
|
-
const startTime = await intro("buddy domains:purchase"), result = await runAction(Action.DomainsPurchase, options);
|
|
83
|
-
if (result.isErr) {
|
|
84
|
-
await outro("While running the domains:purchase command, there was an issue", { startTime, useSeconds: !0 }, result.error);
|
|
85
|
-
process.exit(ExitCode.FatalError);
|
|
86
|
-
}
|
|
87
|
-
const { confirm } = await prompts({
|
|
88
|
-
name: "confirm",
|
|
89
|
-
type: "confirm",
|
|
90
|
-
message: `Would you like to set ${domain} as your APP_URL?`
|
|
91
|
-
});
|
|
92
|
-
if (!confirm) {
|
|
93
|
-
await outro(`Alrighty! ${italic(domain)} was added to your account.`, {
|
|
94
|
-
startTime,
|
|
95
|
-
useSeconds: !0,
|
|
96
|
-
type: "success"
|
|
97
|
-
});
|
|
98
|
-
log.info(`Please note, you may need to validate your email address. Check your ${italic(options.registrantEmail)} inbox.`);
|
|
99
|
-
process.exit(ExitCode.Success);
|
|
100
|
-
}
|
|
101
|
-
const { writeEnv } = await import("@stacksjs/env");
|
|
102
|
-
writeEnv("APP_URL", domain);
|
|
103
|
-
let message = `Great! ${italic(domain)} was added to your account.`;
|
|
104
|
-
message += `
|
|
1
|
+
import process from"node:process";import{runAction}from"@stacksjs/actions";import{bgCyan,bold,intro,italic,log,onUnknownSubcommand,outro,prompts}from"@stacksjs/cli";import{config}from"@stacksjs/config";import{addDomain}from"@stacksjs/dns";import{Action}from"@stacksjs/enums";import{ExitCode}from"@stacksjs/types";export function domains(buddy){const descriptions={purchase:"Purchase a domain",add:"Add a domain to your cloud",remove:"Remove a domain from your cloud",skip:"Skip the confirmation prompt",project:"Target a specific project",verbose:"Enable verbose output"},c=config.dns.contactInfo;buddy.command("domains:purchase <domain>",descriptions.purchase).option("--years <years>","Number of years to purchase the domain for",{default:1}).option("--privacy","Enable privacy protection",{default:!0}).option("--auto-renew","Enable auto-renew",{default:!0}).option("--first-name <firstName>","Registrant first name",{default:c?.firstName}).option("--last-name <lastName>","Registrant last name",{default:c?.lastName}).option("--organization <organization>","Registrant organization name",{default:c?.organizationName}).option("--address-line1 <address>","Registrant address line 1",{default:c?.addressLine1}).option("--address-line2 <address>","Registrant address line 2",{default:c?.addressLine2}).option("--city <city>","Registrant city",{default:c?.city}).option("--state <state>","Registrant state",{default:c?.state}).option("--country <country>","Registrant country code",{default:c?.countryCode}).option("--zip <zip>","Registrant zip",{default:c?.zip}).option("--phone <phone>","Registrant phone",{default:c?.phoneNumber}).option("--email <email>","Registrant email",{default:c?.email}).option("--admin-first-name <firstName>","Admin first name",{default:c?.admin?.firstName||c?.firstName}).option("--admin-last-name <lastName>","Admin last name",{default:c?.admin?.lastName||c?.lastName}).option("--admin-organization <organization>","Admin organization",{default:c?.admin?.organizationName||c?.organizationName}).option("--admin-address-line1 <address>","Admin address line 1",{default:c?.admin?.addressLine1||c?.addressLine1}).option("--admin-address-line2 <address>","Admin address line 2",{default:c?.admin?.addressLine2||c?.addressLine2}).option("--admin-city <city>","Admin city",{default:c?.admin?.city||c?.city}).option("--admin-state <state>","Admin state",{default:c?.admin?.state||c?.state}).option("--admin-country <country>","Admin country code",{default:c?.admin?.countryCode||c?.countryCode}).option("--admin-zip <zip>","Admin zip",{default:c?.admin?.zip||c?.zip}).option("--admin-phone <phone>","Admin phone number",{default:c?.admin?.phoneNumber||c?.phoneNumber}).option("--admin-email <email>","Admin email",{default:c?.admin?.email||c?.email}).option("--tech-first-name <firstName>","Tech first name",{default:c?.tech?.firstName||c?.firstName}).option("--tech-last-name <lastName>","Tech last name",{default:c?.tech?.lastName||c?.lastName}).option("--tech-organization <organization>","Tech organization name",{default:c?.tech?.organizationName||c?.organizationName}).option("--tech-address-line1 <address>","Tech address line 1",{default:c?.tech?.addressLine1||c?.addressLine1}).option("--tech-address-line2 <address>","Tech address line 2",{default:c?.tech?.addressLine2||c?.addressLine2}).option("--tech-city <city>","Tech city",{default:c?.tech?.city||c?.city}).option("--tech-state <state>","Tech state",{default:c?.tech?.state||c?.state}).option("--tech-country <country>","Tech country",{default:c?.tech?.countryCode||c?.countryCode}).option("--tech-zip <zip>","Tech zip",{default:c?.tech?.zip||c?.zip}).option("--tech-phone <phone>","Tech phone",{default:c?.tech?.phoneNumber||c?.phoneNumber}).option("--tech-email <email>","Tech email",{default:c?.tech?.email||c?.email}).option("--privacy-admin","Enable privacy protection for admin",{default:c?.privacyAdmin||c?.privacy||!0}).option("--privacy-tech","Enable privacy protection for tech",{default:c?.privacyTech||c?.privacy||!0}).option("--privacy-registrant","Enable privacy protection for registrant",{default:c?.privacyRegistrant||c?.privacy||!0}).option("--contact-type <type>","Contact type",{default:"person"}).option("-p, --project [project]",descriptions.project,{default:!1}).option("--verbose",descriptions.verbose,{default:!1}).action(async(domain,options)=>{log.debug("Running `buddy domains:purchase <domain>` ...",options);options.domain=domain;const startTime=await intro("buddy domains:purchase"),result=await runAction(Action.DomainsPurchase,options);if(result.isErr){await outro("While running the domains:purchase command, there was an issue",{startTime,useSeconds:!0},result.error);process.exit(ExitCode.FatalError)}const{confirm}=await prompts({name:"confirm",type:"confirm",message:`Would you like to set ${domain} as your APP_URL?`});if(!confirm){await outro(`Alrighty! ${italic(domain)} was added to your account.`,{startTime,useSeconds:!0,type:"success"});log.info(`Please note, you may need to validate your email address. Check your ${italic(options.registrantEmail)} inbox.`);process.exit(ExitCode.Success)}const{writeEnv}=await import("@stacksjs/env");writeEnv("APP_URL",domain);let message=`Great! ${italic(domain)} was added to your account.`;message+=`
|
|
105
2
|
|
|
106
3
|
And your APP_URL has been set to ${italic(domain)}.
|
|
107
4
|
|
|
@@ -109,51 +6,4 @@ Please note, this change has not been deployed yet.
|
|
|
109
6
|
|
|
110
7
|
The next time you run ${bgCyan(italic(bold(" buddy deploy ")))}, your app will deploy to ${italic(domain)}.
|
|
111
8
|
|
|
112
|
-
${italic("You may need to deploy 2-3 times for the changes to take effect. Issue tracked here: https://github.com/stacksjs/stacks/issues/685")}`;
|
|
113
|
-
await outro(message, { startTime, useSeconds: !0, type: "info" });
|
|
114
|
-
process.exit(ExitCode.Success);
|
|
115
|
-
});
|
|
116
|
-
buddy.command("domains:add <domain>", descriptions.add).option("--verbose", descriptions.verbose, { default: !1 }).action(async (options) => {
|
|
117
|
-
log.debug("Running `buddy domains:add <domain>` ...", options);
|
|
118
|
-
const startTime = await intro("buddy domains:add"), result = await addDomain({
|
|
119
|
-
...options,
|
|
120
|
-
startTime
|
|
121
|
-
});
|
|
122
|
-
if (result.isErr) {
|
|
123
|
-
await outro("While running the `buddy deploy`, there was an issue", { startTime, useSeconds: !0 }, result.error);
|
|
124
|
-
process.exit(ExitCode.FatalError);
|
|
125
|
-
}
|
|
126
|
-
await outro("Added your domain.", { startTime, useSeconds: !0 });
|
|
127
|
-
process.exit(ExitCode.Success);
|
|
128
|
-
});
|
|
129
|
-
buddy.command("domains:remove <domain>", descriptions.remove).option("--yes", descriptions.skip, { default: !1 }).option("--verbose", descriptions.verbose, { default: !1 }).action(async (options) => {
|
|
130
|
-
log.debug("Running `buddy domains:remove <domain>` ...", options);
|
|
131
|
-
const domain = options.domain || config.app.url, opts = { ...options, domain }, startTime = await intro("buddy domains:remove");
|
|
132
|
-
if (!opts.yes) {
|
|
133
|
-
const { confirm } = await prompts({
|
|
134
|
-
name: "confirm",
|
|
135
|
-
type: "confirm",
|
|
136
|
-
message: `Are you sure you want to remove ${domain}?`
|
|
137
|
-
});
|
|
138
|
-
if (!confirm) {
|
|
139
|
-
await outro("Cancelled the domains:remove command", {
|
|
140
|
-
startTime,
|
|
141
|
-
useSeconds: !0,
|
|
142
|
-
type: "info"
|
|
143
|
-
});
|
|
144
|
-
process.exit(ExitCode.Success);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
const result = await runAction(Action.DomainsRemove, opts);
|
|
148
|
-
if (result.isErr) {
|
|
149
|
-
await outro("While running the domains:remove command, there was an issue", { startTime, useSeconds: !0 }, result.error);
|
|
150
|
-
process.exit(ExitCode.FatalError);
|
|
151
|
-
}
|
|
152
|
-
await outro("Removed your domain DNS records.", {
|
|
153
|
-
startTime,
|
|
154
|
-
useSeconds: !0
|
|
155
|
-
});
|
|
156
|
-
process.exit(ExitCode.Success);
|
|
157
|
-
});
|
|
158
|
-
onUnknownSubcommand(buddy, "domains");
|
|
159
|
-
}
|
|
9
|
+
${italic("You may need to deploy 2-3 times for the changes to take effect. Issue tracked here: https://github.com/stacksjs/stacks/issues/685")}`;await outro(message,{startTime,useSeconds:!0,type:"info"});process.exit(ExitCode.Success)});buddy.command("domains:add <domain>",descriptions.add).option("--verbose",descriptions.verbose,{default:!1}).action(async(options)=>{log.debug("Running `buddy domains:add <domain>` ...",options);const startTime=await intro("buddy domains:add"),result=await addDomain({...options,startTime});if(result.isErr){await outro("While running the `buddy deploy`, there was an issue",{startTime,useSeconds:!0},result.error);process.exit(ExitCode.FatalError)}await outro("Added your domain.",{startTime,useSeconds:!0});process.exit(ExitCode.Success)});buddy.command("domains:remove <domain>",descriptions.remove).option("--yes",descriptions.skip,{default:!1}).option("--verbose",descriptions.verbose,{default:!1}).action(async(options)=>{log.debug("Running `buddy domains:remove <domain>` ...",options);const domain=options.domain||config.app.url,opts={...options,domain},startTime=await intro("buddy domains:remove");if(!opts.yes){const{confirm}=await prompts({name:"confirm",type:"confirm",message:`Are you sure you want to remove ${domain}?`});if(!confirm){await outro("Cancelled the domains:remove command",{startTime,useSeconds:!0,type:"info"});process.exit(ExitCode.Success)}}const result=await runAction(Action.DomainsRemove,opts);if(result.isErr){await outro("While running the domains:remove command, there was an issue",{startTime,useSeconds:!0},result.error);process.exit(ExitCode.FatalError)}await outro("Removed your domain DNS records.",{startTime,useSeconds:!0});process.exit(ExitCode.Success)});onUnknownSubcommand(buddy,"domains")}
|