stacks 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/core/actions/dist/src/clean.js +2 -2
- package/core/actions/dist/src/lint/fix.js +4 -1
- package/core/actions/dist/src/upgrade.js +10 -7
- package/core/actions/package.json +1 -1
- package/core/actions/src/action.ts +18 -8
- package/core/actions/src/clean.ts +2 -2
- package/core/actions/src/dev/api.ts +1 -2
- package/core/actions/src/domains/add.ts +12 -27
- package/core/actions/src/lint/fix.ts +6 -1
- package/core/actions/src/migrate/dns.ts +1 -1
- package/core/actions/src/upgrade.ts +5 -2
- package/core/ai/package.json +2 -2
- package/core/alias/package.json +4 -4
- package/core/analytics/package.json +1 -1
- package/core/api/package.json +4 -4
- package/core/arrays/package.json +4 -4
- package/core/auth/package.json +1 -1
- package/core/buddy/dist/{chunk-7b24d1e3e585766e.js → chunk-6658b07ce4c24cac.js} +62 -1
- package/core/buddy/dist/cli.js +1 -1
- package/core/buddy/dist/index.js +1 -1
- package/core/buddy/package.json +1 -1
- package/core/buddy/src/commands/build.ts +25 -25
- package/core/buddy/src/commands/deploy.ts +1 -1
- package/core/buddy/src/commands/dev.ts +33 -34
- package/core/buddy/src/commands/upgrade.ts +23 -24
- package/core/build/package.json +1 -1
- package/core/bun-create/bud/package.json +1 -1
- package/core/bun-create/buddy/package.json +1 -1
- package/core/bun-create/stack/package.json +1 -1
- package/core/bun-create/stacks/package.json +1 -1
- package/core/bun-create/stx/package.json +1 -1
- package/core/bun-create/tmp.json +0 -0
- package/core/bun-plugin-yaml/package.json +4 -4
- package/core/cache/package.json +4 -4
- package/core/chat/package.json +10 -10
- package/core/cli/dist/index.js +27 -20
- package/core/cli/package.json +1 -1
- package/core/cli/src/console.ts +18 -18
- package/core/cli/src/exec.ts +9 -6
- package/core/cli/src/parse.ts +3 -3
- package/core/cloud/dist/index.js +2 -2
- package/core/cloud/package.json +2 -2
- package/core/cloud/src/cloud/aws-sdk-layer/nodejs/package.json +1 -1
- package/core/cloud/src/cloud/dashboard.ts +86 -85
- package/core/cloud/src/cloud/docs.ts +2 -2
- package/core/cloud/src/cloud/router-layer/nodejs/package.json +2 -2
- package/core/cloud/zip.ts +1 -1
- package/core/collections/package.json +2 -2
- package/core/collections/tmp.json +0 -0
- package/core/config/dist/index.js +3 -3
- package/core/config/package.json +1 -1
- package/core/config/src/defaults.ts +4 -2
- package/core/database/package.json +1 -1
- package/core/database/src/kysely-bun-worker/worker.ts +0 -1
- package/core/datetime/package.json +1 -1
- package/core/desktop/package.json +1 -1
- package/core/development/package.json +1 -1
- package/core/dns/package.json +13 -13
- package/core/docs/package.json +1 -1
- package/core/email/package.json +2 -1
- package/core/email/src/server/converter.ts +19 -19
- package/core/email/src/server/inbound.ts +24 -8
- package/core/email/src/server/outbound.ts +17 -17
- package/core/enums/package.json +1 -1
- package/core/env/dist/index.js +1 -1
- package/core/env/package.json +4 -4
- package/core/env/tmp.json +0 -0
- package/core/error-handling/package.json +1 -1
- package/core/eslint-config/build.ts +1 -1
- package/core/eslint-config/package.json +3 -1
- package/core/eslint-config/test/cli.spec.ts +2 -1
- package/core/eslint-config/tsconfig.json +2 -2
- package/core/events/package.json +1 -1
- package/core/faker/package.json +1 -1
- package/core/git/package.json +1 -1
- package/core/health/package.json +1 -1
- package/core/http/package.json +1 -1
- package/core/lint/package.json +1 -1
- package/core/logging/build.ts +1 -1
- package/core/logging/dist/index.js +13 -11043
- package/core/logging/package.json +5 -5
- package/core/notifications/package.json +1 -1
- package/core/objects/package.json +1 -1
- package/core/orm/package.json +8 -8
- package/core/path/dist/index.js +5 -0
- package/core/path/package.json +3 -3
- package/core/path/src/index.ts +5 -0
- package/core/path/tmp.json +0 -0
- package/core/payments/package.json +1 -1
- package/core/push/package.json +1 -1
- package/core/query-builder/package.json +1 -1
- package/core/queue/package.json +2 -2
- package/core/queue/tmp.json +0 -0
- package/core/raycast/package.json +1 -1
- package/core/raycast/tmp.json +0 -0
- package/core/realtime/package.json +1 -1
- package/core/repl/package.json +4 -4
- package/core/router/dist/index.js +4 -0
- package/core/router/package.json +1 -1
- package/core/scheduler/package.json +3 -2
- package/core/scheduler/tests/cron.test.ts +11 -9
- package/core/search-engine/package.json +1 -1
- package/core/security/package.json +9 -9
- package/core/server/package.json +1 -1
- package/core/signals/package.json +1 -1
- package/core/slug/package.json +1 -1
- package/core/sms/package.json +11 -11
- package/core/storage/package.json +13 -13
- package/core/strings/package.json +1 -1
- package/core/tables/package.json +6 -6
- package/core/testing/package.json +6 -4
- package/core/tinker/package.json +4 -4
- package/core/tunnel/package.json +1 -1
- package/core/types/package.json +1 -1
- package/core/types/src/app.ts +1 -1
- package/core/types/src/docs.ts +3 -3
- package/core/types/src/team.ts +1 -1
- package/core/ui/package.json +2 -2
- package/core/utils/dist/index.js +15 -13
- package/core/utils/package.json +21 -21
- package/core/utils/src/clean.ts +3 -3
- package/core/utils/src/hash.ts +9 -9
- package/core/validation/package.json +7 -7
- package/core/vite/dist/index.js +1 -1
- package/core/vite/package.json +1 -1
- package/core/vite/src/example-wc.ts +1 -4
- package/core/vite/src/plugin/auto-imports.ts +1 -2
- package/core/vite/src/plugin/components.ts +1 -2
- package/core/vite/src/plugin/docs.ts +1 -1
- package/core/whois/package.json +4 -4
- package/core/x-ray/package.json +4 -4
- package/core/zsh-buddy/package.json +3 -3
- package/ide/vscode/package.json +3 -4
- package/package.json +1 -1
- package/core/cloud/cdk.json +0 -62
- package/core/cloud/deploy.ts +0 -85
|
@@ -5,5 +5,8 @@ import {projectPath} from "@stacksjs/path";
|
|
|
5
5
|
import {NpmScript} from "@stacksjs/enums";
|
|
6
6
|
log.info("Ensuring Code Style...");
|
|
7
7
|
var options = parseOptions();
|
|
8
|
-
await runCommand(NpmScript.LintFix, {
|
|
8
|
+
await runCommand(NpmScript.LintFix, {
|
|
9
|
+
cwd: projectPath(),
|
|
10
|
+
...options
|
|
11
|
+
});
|
|
9
12
|
log.success("Linted");
|
|
@@ -5,33 +5,36 @@ import {intro, outro, runCommand} from "@stacksjs/cli";
|
|
|
5
5
|
import {log} from "@stacksjs/logging";
|
|
6
6
|
import {projectPath} from "@stacksjs/path";
|
|
7
7
|
import * as storage from "@stacksjs/storage";
|
|
8
|
+
import {NpmScript} from "@stacksjs/enums";
|
|
8
9
|
// package.json
|
|
9
|
-
var version = "0.58.
|
|
10
|
+
var version = "0.58.61";
|
|
10
11
|
|
|
11
12
|
// src/upgrade.ts
|
|
12
|
-
function checkForUncommittedChanges(
|
|
13
|
+
function checkForUncommittedChanges(options) {
|
|
13
14
|
try {
|
|
14
15
|
} catch (error) {
|
|
15
16
|
if (error.status === 1) {
|
|
16
|
-
if (!
|
|
17
|
+
if (!options?.force) {
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
|
-
async function downloadFrameworkUpdate(
|
|
22
|
+
async function downloadFrameworkUpdate(options) {
|
|
22
23
|
const tempFolderName = "updates";
|
|
23
24
|
const tempUpdatePath = projectPath(tempFolderName);
|
|
24
25
|
if (storage.doesFolderExist(tempUpdatePath))
|
|
25
26
|
await deleteFolder(tempUpdatePath);
|
|
26
27
|
log.info("Downloading framework updates...");
|
|
27
|
-
await runCommand(`giget stacks ${tempFolderName}`,
|
|
28
|
+
await runCommand(`giget stacks ${tempFolderName}`, options);
|
|
28
29
|
log.success(`Your framework updated correctly to version: v${version}`);
|
|
29
30
|
}
|
|
30
31
|
async function updateDependencies() {
|
|
31
32
|
const perf = await intro("buddy upgrade:dependencies");
|
|
32
|
-
const result = await runCommand(NpmScript.UpgradeDependencies,
|
|
33
|
+
const result = await runCommand(NpmScript.UpgradeDependencies, {
|
|
34
|
+
cwd: projectPath()
|
|
35
|
+
});
|
|
33
36
|
if (result.isErr()) {
|
|
34
|
-
outro("While running the upgrade:dependencies command, there was an issue", { startTime: perf, useSeconds: true }, result.error);
|
|
37
|
+
await outro("While running the upgrade:dependencies command, there was an issue", { startTime: perf, useSeconds: true }, result.error);
|
|
35
38
|
process.exit();
|
|
36
39
|
}
|
|
37
40
|
await outro("Freshly updated your dependencies.", { startTime: perf, useSeconds: true });
|
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
import type { JobOptions } from '@stacksjs/types'
|
|
2
2
|
|
|
3
|
+
interface ActionOptions {
|
|
4
|
+
name?: string
|
|
5
|
+
description?: string
|
|
6
|
+
handle: () => Promise<any> | any
|
|
7
|
+
rate?: JobOptions['rate']
|
|
8
|
+
tries?: JobOptions['tries']
|
|
9
|
+
backoff?: JobOptions['backoff']
|
|
10
|
+
enabled?: JobOptions['enabled']
|
|
11
|
+
}
|
|
12
|
+
|
|
3
13
|
export class Action {
|
|
4
|
-
name
|
|
5
|
-
description
|
|
6
|
-
rate
|
|
7
|
-
tries
|
|
8
|
-
backoff
|
|
9
|
-
enabled
|
|
10
|
-
handle: () => Promise<
|
|
14
|
+
name?: string
|
|
15
|
+
description?: string
|
|
16
|
+
rate?: JobOptions['rate']
|
|
17
|
+
tries?: JobOptions['tries']
|
|
18
|
+
backoff?: JobOptions['backoff']
|
|
19
|
+
enabled?: JobOptions['enabled']
|
|
20
|
+
handle: () => Promise<any>
|
|
11
21
|
|
|
12
|
-
constructor({ name, description, handle, rate, tries, backoff, enabled }:
|
|
22
|
+
constructor({ name, description, handle, rate, tries, backoff, enabled }: ActionOptions) {
|
|
13
23
|
this.name = name
|
|
14
24
|
this.description = description
|
|
15
25
|
this.rate = rate
|
|
@@ -5,8 +5,7 @@ import { config } from '@stacksjs/config'
|
|
|
5
5
|
|
|
6
6
|
const options = parseOptions()
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
log.info('Running API dev server via', `bunx vite --config ${p.vitePath('src/api.ts')}`, options)
|
|
8
|
+
log.debug('Running API dev server via', `bunx vite --config ${p.vitePath('src/api.ts')}`, options)
|
|
10
9
|
|
|
11
10
|
serve({
|
|
12
11
|
port: config.app.ports?.api, // defaults to 3999
|
|
@@ -1,34 +1,20 @@
|
|
|
1
1
|
import process from 'node:process'
|
|
2
2
|
import { createHostedZone, getNameservers, updateNameservers } from '@stacksjs/dns'
|
|
3
3
|
import { app } from '@stacksjs/config'
|
|
4
|
-
import {
|
|
5
|
-
import { italic, parseOptions, runCommand } from '@stacksjs/cli'
|
|
4
|
+
import { italic, log, parseOptions, runCommand } from '@stacksjs/cli'
|
|
6
5
|
import { whois } from '@stacksjs/whois'
|
|
7
6
|
import { logger } from '@stacksjs/logging'
|
|
8
7
|
import { projectConfigPath } from '@stacksjs/path'
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
verbose: boolean
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const parsedOptions = parseOptions()
|
|
16
|
-
const options: AddOptions = {
|
|
17
|
-
domain: parsedOptions.domain as string,
|
|
18
|
-
verbose: parsedOptions.verbose as boolean,
|
|
19
|
-
}
|
|
9
|
+
const options = parseOptions()
|
|
10
|
+
const domain = (options.domain as string | undefined) ?? app.url
|
|
20
11
|
|
|
21
|
-
if (!
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
handleError('there was no domain provided when')
|
|
27
|
-
process.exit(1)
|
|
28
|
-
}
|
|
12
|
+
if (!domain) {
|
|
13
|
+
log.error('There was no Domain or App URL provided. Please provide a domain using the --domain flag or add a url to your app config.')
|
|
14
|
+
process.exit(1)
|
|
29
15
|
}
|
|
30
16
|
|
|
31
|
-
const result = await createHostedZone(
|
|
17
|
+
const result = await createHostedZone(domain)
|
|
32
18
|
|
|
33
19
|
if (result.isErr()) {
|
|
34
20
|
handleError(result.error)
|
|
@@ -36,22 +22,21 @@ if (result.isErr()) {
|
|
|
36
22
|
}
|
|
37
23
|
|
|
38
24
|
// Update the nameservers
|
|
39
|
-
const nameServers = await getNameservers(
|
|
25
|
+
const nameServers = await getNameservers(domain)
|
|
40
26
|
|
|
41
27
|
if (!nameServers) {
|
|
42
|
-
handleError(`No nameservers found for domain: ${
|
|
28
|
+
handleError(`No nameservers found for domain: ${domain}. Please ensure the Hosted Zone exists in Route53.`)
|
|
43
29
|
process.exit(1)
|
|
44
30
|
}
|
|
45
31
|
|
|
46
32
|
await updateNameservers(nameServers)
|
|
47
33
|
|
|
48
|
-
const
|
|
49
|
-
const registrar: string = (await whois(options.domain, true)).parsedData.Registrar
|
|
34
|
+
const registrar: string = (await whois(domain, true)).parsedData.Registrar
|
|
50
35
|
|
|
51
36
|
// usually for Route53 registered domains, we don't need to update create a hosted zone as it's already
|
|
52
37
|
// done for us. But in case it's not, we still need to ensure it's created before we can deploy
|
|
53
38
|
if (registrar.includes('Amazon')) {
|
|
54
|
-
if (
|
|
39
|
+
if (options.deploy) {
|
|
55
40
|
await runCommand('buddy deploy')
|
|
56
41
|
}
|
|
57
42
|
else {
|
|
@@ -70,7 +55,7 @@ logger.log(` update your ${registrar} nameservers to the following:`)
|
|
|
70
55
|
|
|
71
56
|
const emojis = ['1️⃣', '2️⃣', '3️⃣', '4️⃣']
|
|
72
57
|
logger.log('')
|
|
73
|
-
|
|
58
|
+
nameServers.forEach((nameserver: string, index: number) => {
|
|
74
59
|
logger.log(` ${emojis[index]} Nameserver: ${nameserver}`)
|
|
75
60
|
})
|
|
76
61
|
logger.log('')
|
|
@@ -3,6 +3,11 @@ import { projectPath } from '@stacksjs/path'
|
|
|
3
3
|
import { NpmScript } from '@stacksjs/enums'
|
|
4
4
|
|
|
5
5
|
log.info('Ensuring Code Style...')
|
|
6
|
+
|
|
6
7
|
const options = parseOptions()
|
|
7
|
-
await runCommand(NpmScript.LintFix, {
|
|
8
|
+
await runCommand(NpmScript.LintFix, {
|
|
9
|
+
cwd: projectPath(),
|
|
10
|
+
...options,
|
|
11
|
+
})
|
|
12
|
+
|
|
8
13
|
log.success('Linted')
|
|
@@ -3,6 +3,7 @@ import { intro, outro, runCommand } from '@stacksjs/cli'
|
|
|
3
3
|
import { log } from '@stacksjs/logging'
|
|
4
4
|
import { projectPath } from '@stacksjs/path'
|
|
5
5
|
import * as storage from '@stacksjs/storage'
|
|
6
|
+
import { NpmScript } from '@stacksjs/enums'
|
|
6
7
|
import type { UpgradeOptions } from '@stacksjs/types'
|
|
7
8
|
import { version } from '../package.json'
|
|
8
9
|
|
|
@@ -53,10 +54,12 @@ export async function downloadFrameworkUpdate(options: UpgradeOptions) {
|
|
|
53
54
|
// export async function updateDependencies(options: UpgradeOptions) {
|
|
54
55
|
export async function updateDependencies() {
|
|
55
56
|
const perf = await intro('buddy upgrade:dependencies')
|
|
56
|
-
const result = await runCommand(NpmScript.UpgradeDependencies,
|
|
57
|
+
const result = await runCommand(NpmScript.UpgradeDependencies, {
|
|
58
|
+
cwd: projectPath(),
|
|
59
|
+
})
|
|
57
60
|
|
|
58
61
|
if (result.isErr()) {
|
|
59
|
-
outro('While running the upgrade:dependencies command, there was an issue', { startTime: perf, useSeconds: true }, result.error)
|
|
62
|
+
await outro('While running the upgrade:dependencies command, there was an issue', { startTime: perf, useSeconds: true }, result.error)
|
|
60
63
|
process.exit()
|
|
61
64
|
}
|
|
62
65
|
|
package/core/ai/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/ai",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.58.
|
|
4
|
+
"version": "0.58.61",
|
|
5
5
|
"description": "Stacks Artificial Intelligence.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"license": "MIT",
|
|
@@ -55,6 +55,6 @@
|
|
|
55
55
|
"@aws-sdk/client-bedrock-runtime": "^3.511.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@stacksjs/development": "
|
|
58
|
+
"@stacksjs/development": "latest"
|
|
59
59
|
}
|
|
60
60
|
}
|
package/core/alias/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/alias",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.58.
|
|
4
|
+
"version": "0.58.61",
|
|
5
5
|
"description": "The Stacks aliases.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"license": "MIT",
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
"prepublishOnly": "bun --bun run build"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@stacksjs/path": "
|
|
44
|
+
"@stacksjs/path": "latest"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@stacksjs/path": "
|
|
47
|
+
"@stacksjs/path": "latest"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@stacksjs/development": "
|
|
50
|
+
"@stacksjs/development": "latest"
|
|
51
51
|
}
|
|
52
52
|
}
|
package/core/api/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/api",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.58.
|
|
4
|
+
"version": "0.58.61",
|
|
5
5
|
"description": "The Stacks array utilities.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"license": "MIT",
|
|
@@ -49,14 +49,14 @@
|
|
|
49
49
|
"prepublishOnly": "bun --bun run build"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@stacksjs/utils": "
|
|
52
|
+
"@stacksjs/utils": "latest"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@flareapp/flare-client": "^3.0.5",
|
|
56
|
-
"@stacksjs/utils": "
|
|
56
|
+
"@stacksjs/utils": "latest",
|
|
57
57
|
"ofetch": "^1.3.3"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@stacksjs/development": "
|
|
60
|
+
"@stacksjs/development": "latest"
|
|
61
61
|
}
|
|
62
62
|
}
|
package/core/arrays/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/arrays",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.58.
|
|
4
|
+
"version": "0.58.61",
|
|
5
5
|
"description": "The Stacks array utilities.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"license": "MIT",
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
"prepublishOnly": "bun --bun run build"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@stacksjs/utils": "
|
|
52
|
+
"@stacksjs/utils": "latest"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@stacksjs/utils": "
|
|
55
|
+
"@stacksjs/utils": "latest"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@stacksjs/development": "
|
|
58
|
+
"@stacksjs/development": "latest"
|
|
59
59
|
}
|
|
60
60
|
}
|
package/core/auth/package.json
CHANGED
|
@@ -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/core/buddy/dist/cli.js
CHANGED
package/core/buddy/dist/index.js
CHANGED
package/core/buddy/package.json
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
|
+
}
|
|
@@ -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
|
|
|
@@ -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 {
|