@stacksjs/buddy 0.58.59 → 0.58.61
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/{chunk-7b24d1e3e585766e.js → chunk-6658b07ce4c24cac.js} +62 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/commands/build.ts +25 -25
- package/src/commands/deploy.ts +1 -1
- package/src/commands/dev.ts +33 -34
- package/src/commands/upgrade.ts +23 -24
|
@@ -63,6 +63,22 @@ function build(buddy) {
|
|
|
63
63
|
default:
|
|
64
64
|
break;
|
|
65
65
|
}
|
|
66
|
+
if (hasNoOptions(options)) {
|
|
67
|
+
let answers = await log.prompt.require().multiselect(descriptions.select, {
|
|
68
|
+
options: [
|
|
69
|
+
{ label: "Components", value: "components" },
|
|
70
|
+
{ label: "Web Components", value: "web-components" },
|
|
71
|
+
{ label: "Functions", value: "functions" },
|
|
72
|
+
{ label: "Views", value: "views" },
|
|
73
|
+
{ label: "Documentation", value: "docs" }
|
|
74
|
+
]
|
|
75
|
+
});
|
|
76
|
+
if (answers !== null)
|
|
77
|
+
process.exit(ExitCode.InvalidArgument);
|
|
78
|
+
if (isString(answers))
|
|
79
|
+
answers = [answers];
|
|
80
|
+
options = answers.reduce((a, v) => ({ ...a, [v]: true }), {});
|
|
81
|
+
}
|
|
66
82
|
await runAction(Action.BuildStacks, options);
|
|
67
83
|
process.exit(ExitCode.Success);
|
|
68
84
|
});
|
|
@@ -131,6 +147,9 @@ function build(buddy) {
|
|
|
131
147
|
process.exit(1);
|
|
132
148
|
});
|
|
133
149
|
}
|
|
150
|
+
var hasNoOptions = function(options) {
|
|
151
|
+
return !options.components && !options.vueComponents && !options.webComponents && !options.elements && !options.functions && !options.views && !options.docs && !options.stacks && !options.buddy;
|
|
152
|
+
};
|
|
134
153
|
|
|
135
154
|
// src/commands/changelog.ts
|
|
136
155
|
import process2 from "process";
|
|
@@ -732,7 +751,7 @@ async function configureDomain(domain, options, startTime) {
|
|
|
732
751
|
}
|
|
733
752
|
async function checkIfAwsIsConfigured() {
|
|
734
753
|
log8.info("Ensuring AWS is configured...");
|
|
735
|
-
const result = await runCommand4("buddy configure:aws
|
|
754
|
+
const result = await runCommand4("buddy configure:aws", {
|
|
736
755
|
silent: true
|
|
737
756
|
});
|
|
738
757
|
if (result.isErr()) {
|
|
@@ -804,6 +823,30 @@ function dev(buddy) {
|
|
|
804
823
|
default:
|
|
805
824
|
}
|
|
806
825
|
if (wantsInteractive(options)) {
|
|
826
|
+
const answer = await log9.prompt.require().select(descriptions.select, {
|
|
827
|
+
options: [
|
|
828
|
+
{ value: "all", label: "All" },
|
|
829
|
+
{ value: "frontend", label: "Frontend" },
|
|
830
|
+
{ value: "api", label: "Backend" },
|
|
831
|
+
{ value: "dashboard", label: "Dashboard" },
|
|
832
|
+
{ value: "desktop", label: "Desktop" },
|
|
833
|
+
{ value: "email", label: "Email" },
|
|
834
|
+
{ value: "components", label: "Components" },
|
|
835
|
+
{ value: "docs", label: "Documentation" }
|
|
836
|
+
]
|
|
837
|
+
});
|
|
838
|
+
if (answer === "components") {
|
|
839
|
+
await runComponentsDevServer(options);
|
|
840
|
+
} else if (answer === "api") {
|
|
841
|
+
await runApiDevServer(options);
|
|
842
|
+
} else if (answer === "dashboard") {
|
|
843
|
+
await runDashboardDevServer(options);
|
|
844
|
+
} else if (answer === "docs") {
|
|
845
|
+
await runDocsDevServer(options);
|
|
846
|
+
} else {
|
|
847
|
+
log9.error("Invalid option during interactive mode");
|
|
848
|
+
process10.exit(ExitCode8.InvalidArgument);
|
|
849
|
+
}
|
|
807
850
|
} else {
|
|
808
851
|
if (options.components)
|
|
809
852
|
await runComponentsDevServer(options);
|
|
@@ -1807,6 +1850,21 @@ function upgrade(buddy) {
|
|
|
1807
1850
|
buddy.command("upgrade", descriptions2.command).option("-c, --framework", descriptions2.framework, { default: false }).option("-d, --dependencies", descriptions2.dependencies, { default: false }).option("-b, --bun", descriptions2.bun, { default: false }).option("-a, --all", descriptions2.all, { default: false }).option("-f, --force", descriptions2.force, { default: false }).option("-p, --project", descriptions2.project, { default: false }).option("--verbose", descriptions2.verbose, { default: false }).alias("update").example("buddy upgrade -a --verbose").action(async (options) => {
|
|
1808
1851
|
log24.debug("Running `buddy upgrade` ...", options);
|
|
1809
1852
|
const perf = await intro18("buddy upgrade");
|
|
1853
|
+
if (hasNoOptions2(options)) {
|
|
1854
|
+
let answers = await log24.prompt.require().multiselect(descriptions2.select, {
|
|
1855
|
+
options: [
|
|
1856
|
+
{ value: "dependencies", label: "Dependencies" },
|
|
1857
|
+
{ value: "framework", label: "Framework" },
|
|
1858
|
+
{ value: "node", label: "Node.js" },
|
|
1859
|
+
{ value: "package-manager", label: "Package Manager" }
|
|
1860
|
+
]
|
|
1861
|
+
});
|
|
1862
|
+
if (answers !== null)
|
|
1863
|
+
process29.exit(ExitCode20.InvalidArgument);
|
|
1864
|
+
if (isString(answers))
|
|
1865
|
+
answers = [answers];
|
|
1866
|
+
options = answers.reduce((a, v) => ({ ...a, [v]: true }), {});
|
|
1867
|
+
}
|
|
1810
1868
|
const result = await runAction17(Action17.Upgrade, options);
|
|
1811
1869
|
if (result.isErr()) {
|
|
1812
1870
|
await outro18("While running the buddy:upgrade command, there was an issue", { startTime: perf, useSeconds: true }, result.error);
|
|
@@ -1842,6 +1900,9 @@ function upgrade(buddy) {
|
|
|
1842
1900
|
process29.exit(1);
|
|
1843
1901
|
});
|
|
1844
1902
|
}
|
|
1903
|
+
var hasNoOptions2 = function(options) {
|
|
1904
|
+
return !options.framework && !options.dependencies && !options.packageManager && !options.node && !options.all;
|
|
1905
|
+
};
|
|
1845
1906
|
|
|
1846
1907
|
// src/commands/version.ts
|
|
1847
1908
|
import process30 from "process";
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
package/src/commands/build.ts
CHANGED
|
@@ -78,28 +78,28 @@ export function build(buddy: CLI) {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
// TODO: uncomment this when prompt is available
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
81
|
+
if (hasNoOptions(options)) {
|
|
82
|
+
let answers = await log.prompt.require()
|
|
83
|
+
.multiselect(descriptions.select, {
|
|
84
|
+
options: [
|
|
85
|
+
{ label: 'Components', value: 'components' },
|
|
86
|
+
// { label: 'Vue Components', value: 'vue-components' },
|
|
87
|
+
{ label: 'Web Components', value: 'web-components' },
|
|
88
|
+
{ label: 'Functions', value: 'functions' },
|
|
89
|
+
{ label: 'Views', value: 'views' },
|
|
90
|
+
{ label: 'Documentation', value: 'docs' },
|
|
91
|
+
],
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
if (answers !== null)
|
|
95
|
+
process.exit(ExitCode.InvalidArgument)
|
|
96
|
+
|
|
97
|
+
if (isString(answers))
|
|
98
|
+
answers = [answers]
|
|
99
|
+
|
|
100
|
+
// creates an object out of array and sets answers to true
|
|
101
|
+
options = answers.reduce((a: any, v: any) => ({ ...a, [v]: true }), {})
|
|
102
|
+
}
|
|
103
103
|
|
|
104
104
|
await runAction(Action.BuildStacks, options)
|
|
105
105
|
|
|
@@ -254,6 +254,6 @@ export function build(buddy: CLI) {
|
|
|
254
254
|
})
|
|
255
255
|
}
|
|
256
256
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
257
|
+
function hasNoOptions(options: BuildOptions) {
|
|
258
|
+
return !options.components && !options.vueComponents && !options.webComponents && !options.elements && !options.functions && !options.views && !options.docs && !options.stacks && !options.buddy
|
|
259
|
+
}
|
package/src/commands/deploy.ts
CHANGED
|
@@ -113,7 +113,7 @@ async function configureDomain(domain: string, options: DeployOptions, startTime
|
|
|
113
113
|
|
|
114
114
|
async function checkIfAwsIsConfigured() {
|
|
115
115
|
log.info('Ensuring AWS is configured...')
|
|
116
|
-
const result = await runCommand('buddy configure:aws
|
|
116
|
+
const result = await runCommand('buddy configure:aws', {
|
|
117
117
|
silent: true,
|
|
118
118
|
})
|
|
119
119
|
|
package/src/commands/dev.ts
CHANGED
|
@@ -91,40 +91,39 @@ export function dev(buddy: CLI) {
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
if (wantsInteractive(options)) {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
//
|
|
118
|
-
//
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
// }
|
|
94
|
+
const answer = await log.prompt.require()
|
|
95
|
+
.select(descriptions.select, {
|
|
96
|
+
options: [
|
|
97
|
+
{ value: 'all', label: 'All' },
|
|
98
|
+
{ value: 'frontend', label: 'Frontend' },
|
|
99
|
+
{ value: 'api', label: 'Backend' },
|
|
100
|
+
{ value: 'dashboard', label: 'Dashboard' },
|
|
101
|
+
{ value: 'desktop', label: 'Desktop' },
|
|
102
|
+
{ value: 'email', label: 'Email' },
|
|
103
|
+
{ value: 'components', label: 'Components' },
|
|
104
|
+
{ value: 'docs', label: 'Documentation' },
|
|
105
|
+
],
|
|
106
|
+
})
|
|
107
|
+
|
|
108
|
+
if (answer === 'components') {
|
|
109
|
+
await runComponentsDevServer(options)
|
|
110
|
+
}
|
|
111
|
+
else if (answer === 'api') {
|
|
112
|
+
await runApiDevServer(options)
|
|
113
|
+
}
|
|
114
|
+
else if (answer === 'dashboard') {
|
|
115
|
+
await runDashboardDevServer(options)
|
|
116
|
+
}
|
|
117
|
+
// else if (answer === 'email')
|
|
118
|
+
// await runEmailDevServer(options)
|
|
119
|
+
else if (answer === 'docs') {
|
|
120
|
+
await runDocsDevServer(options)
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
else {
|
|
124
|
+
log.error('Invalid option during interactive mode')
|
|
125
|
+
process.exit(ExitCode.InvalidArgument)
|
|
126
|
+
}
|
|
128
127
|
}
|
|
129
128
|
|
|
130
129
|
else {
|
package/src/commands/upgrade.ts
CHANGED
|
@@ -34,27 +34,26 @@ export function upgrade(buddy: CLI) {
|
|
|
34
34
|
|
|
35
35
|
const perf = await intro('buddy upgrade')
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
// }
|
|
37
|
+
if (hasNoOptions(options)) {
|
|
38
|
+
let answers = await log.prompt.require()
|
|
39
|
+
.multiselect(descriptions.select, {
|
|
40
|
+
options: [
|
|
41
|
+
{ value: 'dependencies', label: 'Dependencies' },
|
|
42
|
+
{ value: 'framework', label: 'Framework' },
|
|
43
|
+
{ value: 'node', label: 'Node.js' },
|
|
44
|
+
{ value: 'package-manager', label: 'Package Manager' },
|
|
45
|
+
],
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
if (answers !== null)
|
|
49
|
+
process.exit(ExitCode.InvalidArgument)
|
|
50
|
+
|
|
51
|
+
if (isString(answers))
|
|
52
|
+
answers = [answers]
|
|
53
|
+
|
|
54
|
+
// creates an object out of array and sets answers to true
|
|
55
|
+
options = answers.reduce((a: any, v: any) => ({ ...a, [v]: true }), {})
|
|
56
|
+
}
|
|
58
57
|
|
|
59
58
|
const result = await runAction(Action.Upgrade, options)
|
|
60
59
|
|
|
@@ -122,6 +121,6 @@ export function upgrade(buddy: CLI) {
|
|
|
122
121
|
})
|
|
123
122
|
}
|
|
124
123
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
function hasNoOptions(options: UpgradeOptions) {
|
|
125
|
+
return !options.framework && !options.dependencies && !options.packageManager && !options.node && !options.all
|
|
126
|
+
}
|