stacks 0.58.56 → 0.58.58

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 (110) hide show
  1. package/core/actions/dist/src/index.js +9 -3
  2. package/core/actions/dist/src/release.js +9 -3
  3. package/core/actions/dist/src/upgrade.js +1 -1
  4. package/core/actions/package.json +1 -1
  5. package/core/actions/src/action.ts +11 -3
  6. package/core/ai/dist/index.js +4 -4
  7. package/core/ai/package.json +3 -3
  8. package/core/alias/package.json +1 -1
  9. package/core/analytics/package.json +1 -1
  10. package/core/api/package.json +1 -1
  11. package/core/arrays/package.json +1 -1
  12. package/core/auth/package.json +1 -1
  13. package/core/buddy/dist/{chunk-d52e40a990b45728.js → chunk-e9c0ec1a3b7be088.js} +120 -92
  14. package/core/buddy/dist/cli.js +1 -1
  15. package/core/buddy/dist/index.js +1 -1
  16. package/core/buddy/package.json +1 -1
  17. package/core/buddy/src/commands/configure.ts +38 -27
  18. package/core/buddy/src/commands/deploy.ts +81 -56
  19. package/core/buddy/src/commands/setup.ts +11 -9
  20. package/core/build/package.json +1 -1
  21. package/core/bun-create/bud/package.json +1 -1
  22. package/core/bun-create/buddy/package.json +1 -1
  23. package/core/bun-create/stack/package.json +1 -1
  24. package/core/bun-create/stacks/package.json +1 -1
  25. package/core/bun-create/stx/package.json +1 -1
  26. package/core/bun-plugin-yaml/package.json +1 -1
  27. package/core/cache/package.json +2 -2
  28. package/core/chat/package.json +8 -8
  29. package/core/cli/dist/index.js +7 -1
  30. package/core/cli/package.json +1 -1
  31. package/core/cli/src/exec.ts +8 -0
  32. package/core/cloud/deploy.ts +3 -2
  33. package/core/cloud/dist/index.js +145 -54
  34. package/core/cloud/package.json +28 -28
  35. package/core/cloud/src/cloud/aws-sdk-layer/nodejs/package-lock.json +6 -6
  36. package/core/cloud/src/cloud/aws-sdk-layer/nodejs/package.json +2 -2
  37. package/core/cloud/src/cloud/index.ts +76 -50
  38. package/core/cloud/src/cloud/queue.ts +106 -9
  39. package/core/cloud/src/cloud/router-layer/nodejs/package.json +2 -2
  40. package/core/collections/package.json +1 -1
  41. package/core/config/package.json +1 -1
  42. package/core/database/package.json +1 -1
  43. package/core/datetime/package.json +1 -1
  44. package/core/desktop/package.json +9 -9
  45. package/core/development/package.json +1 -1
  46. package/core/dns/package.json +4 -4
  47. package/core/docs/package.json +1 -1
  48. package/core/email/package.json +12 -12
  49. package/core/enums/package.json +1 -1
  50. package/core/env/package.json +1 -1
  51. package/core/error-handling/package.json +1 -1
  52. package/core/eslint-config/package.json +1 -1
  53. package/core/events/package.json +1 -1
  54. package/core/faker/package.json +1 -1
  55. package/core/git/package.json +1 -1
  56. package/core/health/package.json +1 -1
  57. package/core/http/package.json +1 -1
  58. package/core/lint/package.json +1 -1
  59. package/core/logging/dist/index.js +161 -4
  60. package/core/logging/package.json +1 -1
  61. package/core/logging/src/index.ts +55 -12
  62. package/core/notifications/package.json +22 -22
  63. package/core/objects/package.json +1 -1
  64. package/core/orm/package.json +1 -1
  65. package/core/path/dist/index.js +1 -1
  66. package/core/path/package.json +1 -1
  67. package/core/path/src/index.ts +1 -1
  68. package/core/payments/package.json +1 -1
  69. package/core/push/package.json +5 -5
  70. package/core/query-builder/package.json +1 -1
  71. package/core/queue/dist/index.js +5 -1
  72. package/core/queue/package.json +1 -1
  73. package/core/queue/src/index.ts +5 -1
  74. package/core/raycast/package.json +1 -1
  75. package/core/realtime/package.json +1 -1
  76. package/core/repl/package.json +1 -1
  77. package/core/router/package.json +1 -1
  78. package/core/scheduler/dist/index.js +4 -0
  79. package/core/scheduler/package.json +1 -1
  80. package/core/scheduler/src/index.ts +1 -0
  81. package/core/scheduler/src/schedule.ts +5 -0
  82. package/core/search-engine/package.json +1 -1
  83. package/core/security/package.json +1 -1
  84. package/core/server/package.json +1 -1
  85. package/core/signals/package.json +1 -1
  86. package/core/slug/package.json +1 -1
  87. package/core/sms/package.json +11 -11
  88. package/core/storage/package.json +1 -1
  89. package/core/strings/package.json +1 -1
  90. package/core/tables/package.json +1 -1
  91. package/core/testing/package.json +1 -1
  92. package/core/tinker/package.json +1 -1
  93. package/core/tunnel/package.json +1 -1
  94. package/core/types/dist/index.js +8 -3
  95. package/core/types/package.json +3 -3
  96. package/core/types/src/configure.ts +7 -0
  97. package/core/types/src/cron-jobs.ts +14 -4
  98. package/core/ui/package.json +6 -6
  99. package/core/utils/dist/index.js +32 -1
  100. package/core/utils/package.json +1 -1
  101. package/core/utils/src/index.ts +1 -0
  102. package/core/utils/src/retry.ts +33 -0
  103. package/core/validation/package.json +1 -1
  104. package/core/vite/dist/index.js +1 -1
  105. package/core/vite/package.json +1 -1
  106. package/core/whois/package.json +1 -1
  107. package/core/x-ray/package.json +1 -1
  108. package/core/zsh-buddy/package.json +1 -1
  109. package/ide/vscode/package.json +1 -1
  110. package/package.json +1 -1
@@ -2,7 +2,6 @@ import process from 'node:process'
2
2
  import type { CLI, ConfigureOptions } from '@stacksjs/types'
3
3
  import { log, outro, runCommand } from '@stacksjs/cli'
4
4
  import { path as p } from '@stacksjs/path'
5
- import { config } from '@stacksjs/config'
6
5
  import { ExitCode } from '@stacksjs/types'
7
6
 
8
7
  export function configure(buddy: CLI) {
@@ -10,6 +9,7 @@ export function configure(buddy: CLI) {
10
9
  configure: 'Configure options',
11
10
  aws: 'Configure the AWS connection',
12
11
  project: 'Target a specific project',
12
+ profile: 'The AWS profile to use',
13
13
  verbose: 'Enable verbose output',
14
14
  }
15
15
 
@@ -20,19 +20,7 @@ export function configure(buddy: CLI) {
20
20
  .option('--verbose', descriptions.verbose, { default: false })
21
21
  .action(async (options?: ConfigureOptions) => {
22
22
  if (options?.aws) {
23
- const startTime = performance.now()
24
- const result = await runCommand('aws configure', {
25
- ...options,
26
- cwd: p.projectPath(),
27
- stdin: 'inherit',
28
- })
29
-
30
- if (result.isErr()) {
31
- await outro('While running the configure command, there was an issue', { startTime, useSeconds: true }, result.error)
32
- process.exit(ExitCode.FatalError)
33
- }
34
-
35
- await outro('Exited', { startTime, useSeconds: true })
23
+ await configureAws(options)
36
24
  process.exit(ExitCode.Success)
37
25
  }
38
26
 
@@ -43,21 +31,15 @@ export function configure(buddy: CLI) {
43
31
  buddy
44
32
  .command('configure:aws', descriptions.aws)
45
33
  .option('-p, --project', descriptions.project, { default: false })
34
+ .option('--profile', descriptions.profile, { default: process.env.AWS_PROFILE })
46
35
  .option('--verbose', descriptions.verbose, { default: false })
36
+ .option('--access-key-id', 'The AWS access key')
37
+ .option('--secret-access-key', 'The AWS secret access key')
38
+ .option('--region', 'The AWS region')
39
+ .option('--output', 'The AWS output format')
40
+ .option('--quiet', 'Suppress output')
47
41
  .action(async (options?: ConfigureOptions) => {
48
- const startTime = performance.now()
49
- const result = await runCommand(`aws configure --profile ${config.app.url}`, {
50
- ...options,
51
- cwd: p.cloudPath(),
52
- stdin: 'inherit',
53
- })
54
-
55
- if (result.isErr()) {
56
- await outro('While running the cloud command, there was an issue', { startTime, useSeconds: true }, result.error)
57
- process.exit(ExitCode.FatalError)
58
- }
59
-
60
- await outro('Exited', { startTime, useSeconds: true })
42
+ await configureAws(options)
61
43
  process.exit(ExitCode.Success)
62
44
  })
63
45
 
@@ -66,3 +48,32 @@ export function configure(buddy: CLI) {
66
48
  process.exit(ExitCode.FatalError)
67
49
  })
68
50
  }
51
+
52
+ async function configureAws(options: ConfigureOptions) {
53
+ const startTime = performance.now()
54
+
55
+ const awsAccessKeyId = options?.accessKeyId ?? process.env.AWS_ACCESS_KEY_ID
56
+ const awsSecretAccessKey = options?.secretAccessKey ?? process.env.AWS_SECRET_ACCESS_KEY
57
+ const defaultRegion = 'us-east-1' // we only support `us-east-1` for now
58
+ const defaultOutputFormat = options?.output ?? 'json'
59
+
60
+ const command = `aws configure --profile ${options.profile ?? process.env.AWS_PROFILE}`
61
+ const input = `${awsAccessKeyId}\n${awsSecretAccessKey}\n${defaultRegion}\n${defaultOutputFormat}\n`
62
+
63
+ const result = await runCommand(command, {
64
+ ...options,
65
+ cwd: p.projectPath(),
66
+ stdin: 'pipe', // set stdin mode to 'pipe' to write to it
67
+ input, // the actual input to write
68
+ })
69
+
70
+ if (result.isErr()) {
71
+ await outro('While running the cloud command, there was an issue', { startTime, useSeconds: true }, result.error)
72
+ process.exit(ExitCode.FatalError)
73
+ }
74
+
75
+ if (options.quiet)
76
+ return
77
+
78
+ await outro('Exited', { startTime, useSeconds: true })
79
+ }
@@ -3,7 +3,7 @@ import process from 'node:process'
3
3
  import { ExitCode } from '@stacksjs/types'
4
4
  import type { CLI, DeployOptions } from '@stacksjs/types'
5
5
  import { runAction } from '@stacksjs/actions'
6
- import { intro, italic, log, outro } from '@stacksjs/cli'
6
+ import { intro, italic, log, outro, runCommand } from '@stacksjs/cli'
7
7
  import { Action } from '@stacksjs/enums'
8
8
  import { app } from '@stacksjs/config'
9
9
  import { addDomain, hasUserDomainBeenAddedToCloud } from '@stacksjs/dns'
@@ -25,72 +25,24 @@ export function deploy(buddy: CLI) {
25
25
  const domain = options.domain || app.url
26
26
 
27
27
  if (!domain) {
28
- log.info('We could not identify a domain to deploy to.')
29
- log.info('Please set your .env or ./config/app.ts properly.')
30
- console.log('')
31
- log.info('Alternatively, specify a domain to deploy via the `--domain` flag.')
32
- console.log('')
33
- log.info(' ➡️ Example: `buddy deploy --domain example.com`')
34
- console.log('')
28
+ log.info('No domain found in your .env or ./config/app.ts')
29
+ log.info('Please ensure your domain is properly configured.')
30
+ log.info('For more info, check out the docs or join our Discord.')
35
31
  process.exit(ExitCode.FatalError)
36
32
  }
37
33
 
38
- // TODO: we can improve this check at some point, otherwise domains that legitimately include the word localhost will fail
39
- // TODO: add check for whether the local APP_ENV is getting deployed, if so, ask if the user meant to deploy `dev`
40
- if (domain.includes('localhost')) {
41
- log.info('You are deploying to a local environment.')
42
- log.info('Please set your .env or ./config/app.ts properly.')
43
- console.log('')
44
- log.info('Alternatively, specify a domain to deploy via the `--domain` flag.')
45
- console.log('')
46
- log.info(' ➡️ Example: `buddy deploy --domain example.com`')
47
- console.log('')
48
- process.exit(ExitCode.FatalError)
49
- }
50
-
51
- if (await hasUserDomainBeenAddedToCloud(domain)) {
52
- log.info('Domain is properly configured')
53
- log.info('Your cloud is deploying...')
54
-
55
- log.info(`${italic('This may take a while...')}`)
56
- options.domain = domain
34
+ await checkIfAwsIsConfigured()
57
35
 
58
- // now that we know the domain has been added to the users (AWS) cloud, we can deploy
59
- const result = await runAction(Action.Deploy, options)
60
-
61
- if (result.isErr()) {
62
- await outro('While running the `buddy deploy`, there was an issue', { startTime, useSeconds: true }, result.error)
63
- process.exit(ExitCode.FatalError)
64
- }
65
-
66
- await outro('Deployment succeeded.', { startTime, useSeconds: true })
67
-
68
- process.exit(ExitCode.Success)
69
- }
36
+ options.domain = await configureDomain(domain, options, startTime)
70
37
 
71
- // if the domain hasn't been added to the user's (AWS) cloud, we will add it for them
72
- // and then exit the process with prompts for the user to update their nameservers
73
- console.log('')
74
- log.info(` 👋 It appears to be your first ${italic(domain)} deployment.`)
75
- console.log('')
76
- log.info(italic('Let’s ensure it is all connected properly.'))
77
- log.info(italic('One moment...'))
78
- console.log('')
79
-
80
- options.domain = domain
81
- const result = await addDomain({
82
- ...options,
83
- deploy: true,
84
- startTime,
85
- })
38
+ const result = await runAction(Action.Deploy, options)
86
39
 
87
40
  if (result.isErr()) {
88
41
  await outro('While running the `buddy deploy`, there was an issue', { startTime, useSeconds: true }, result.error)
89
42
  process.exit(ExitCode.FatalError)
90
43
  }
91
44
 
92
- await outro('Added your domain.', { startTime, useSeconds: true })
93
- process.exit(ExitCode.Success)
45
+ await outro('Project deployed.', { startTime, useSeconds: true })
94
46
  })
95
47
 
96
48
  buddy.on('deploy:*', () => {
@@ -98,3 +50,76 @@ export function deploy(buddy: CLI) {
98
50
  process.exit(1)
99
51
  })
100
52
  }
53
+
54
+ async function configureDomain(domain: string, options: DeployOptions, startTime: number) {
55
+ if (!domain) {
56
+ log.info('We could not identify a domain to deploy to.')
57
+ log.info('Please set your .env or ./config/app.ts properly.')
58
+ console.log('')
59
+ log.info('Alternatively, specify a domain to deploy via the `--domain` flag.')
60
+ console.log('')
61
+ log.info(' ➡️ Example: `buddy deploy --domain example.com`')
62
+ console.log('')
63
+ process.exit(ExitCode.FatalError)
64
+ }
65
+
66
+ // TODO: we can improve this check at some point, otherwise domains that legitimately include the word localhost will fail
67
+ // TODO: add check for whether the local APP_ENV is getting deployed, if so, ask if the user meant to deploy `dev`
68
+ if (domain.includes('localhost')) {
69
+ log.info('You are deploying to a local environment.')
70
+ log.info('Please set your .env or ./config/app.ts properly.')
71
+ console.log('')
72
+ log.info('Alternatively, specify a domain to deploy via the `--domain` flag.')
73
+ console.log('')
74
+ log.info(' ➡️ Example: `buddy deploy --domain example.com`')
75
+ console.log('')
76
+ process.exit(ExitCode.FatalError)
77
+ }
78
+
79
+ if (await hasUserDomainBeenAddedToCloud(domain)) {
80
+ log.info('Domain is properly configured')
81
+ log.info('Your cloud is deploying...')
82
+
83
+ log.info(`${italic('This may take a while...')}`)
84
+
85
+ return domain
86
+ }
87
+
88
+ // if the domain hasn't been added to the user's (AWS) cloud, we will add it for them
89
+ // and then exit the process with prompts for the user to update their nameservers
90
+ console.log('')
91
+ log.info(` 👋 It appears to be your first ${italic(domain)} deployment.`)
92
+ console.log('')
93
+ log.info(italic('Let’s ensure it is all connected properly.'))
94
+ log.info(italic('One moment...'))
95
+ console.log('')
96
+
97
+ const result = await addDomain({
98
+ ...options,
99
+ deploy: true,
100
+ startTime,
101
+ })
102
+
103
+ if (result.isErr()) {
104
+ await outro('While running the `buddy deploy`, there was an issue', { startTime, useSeconds: true }, result.error)
105
+ process.exit(ExitCode.FatalError)
106
+ }
107
+
108
+ await outro('Added your domain.', { startTime, useSeconds: true })
109
+ process.exit(ExitCode.Success)
110
+ }
111
+
112
+ async function checkIfAwsIsConfigured() {
113
+ log.info('Ensuring AWS is configured...')
114
+ const result = await runCommand('buddy configure:aws --quiet', {
115
+ silent: true,
116
+ })
117
+
118
+ if (result.isErr()) {
119
+ log.error('AWS is not configured properly.')
120
+ log.error('Please run `buddy configure:aws` to set up your AWS credentials.')
121
+ process.exit(ExitCode.FatalError)
122
+ }
123
+
124
+ log.success('AWS is configured')
125
+ }
@@ -79,9 +79,11 @@ export function setup(buddy: CLI) {
79
79
  }
80
80
  }
81
81
 
82
- log.success('Oh My Zsh setup complete.')
82
+ log.success('Oh My Zsh setup complete')
83
83
  log.info('To see changes reflect, you may need to:')
84
- log.info('⌘⇧P workbench.action.reloadWindow')
84
+ // if on vscode show the message
85
+ // log.info('⌘⇧P workbench.action.reloadWindow')
86
+ // else show the message
85
87
  })
86
88
 
87
89
  buddy.on('setup:*', () => {
@@ -149,14 +151,14 @@ async function initializeProject(options: CliOptions): Promise<void> {
149
151
 
150
152
  log.info('Ensuring AWS is connected...')
151
153
 
152
- // const awsResult = await runCommand('buddy configure:aws', {
153
- // cwd: options.cwd || p.projectPath(),
154
- // })
154
+ const awsResult = await runCommand('buddy configure:aws', {
155
+ cwd: options.cwd || p.projectPath(),
156
+ })
155
157
 
156
- // if (awsResult.isErr()) {
157
- // handleError(awsResult.error)
158
- // process.exit(ExitCode.FatalError)
159
- // }
158
+ if (awsResult.isErr()) {
159
+ handleError(awsResult.error)
160
+ process.exit(ExitCode.FatalError)
161
+ }
160
162
 
161
163
  log.success('Configured AWS')
162
164
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/build",
3
3
  "type": "module",
4
- "version": "0.58.56",
4
+ "version": "0.58.58",
5
5
  "description": "The Stacks framework build tools and configurations.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bun-examples/bud",
3
3
  "type": "module",
4
- "version": "0.58.56",
4
+ "version": "0.58.58",
5
5
  "description": "Your project description.",
6
6
  "author": "your-name <your-email>",
7
7
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bun-examples/buddy",
3
3
  "type": "module",
4
- "version": "0.58.56",
4
+ "version": "0.58.58",
5
5
  "description": "Your project description.",
6
6
  "author": "your-name <your-email>",
7
7
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bun-examples/stack",
3
3
  "type": "module",
4
- "version": "0.58.56",
4
+ "version": "0.58.58",
5
5
  "description": "Your project description.",
6
6
  "author": "your-name <your-email>",
7
7
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bun-examples/stacks",
3
3
  "type": "module",
4
- "version": "0.58.56",
4
+ "version": "0.58.58",
5
5
  "description": "Your project description.",
6
6
  "author": "your-name <your-email>",
7
7
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bun-examples/stx",
3
3
  "type": "module",
4
- "version": "0.58.56",
4
+ "version": "0.58.58",
5
5
  "description": "Your project description.",
6
6
  "author": "your-name <your-email>",
7
7
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bun-plugin-yaml",
3
3
  "type": "module",
4
- "version": "0.58.56",
4
+ "version": "0.58.58",
5
5
  "description": "A Bun plugin to load yaml files",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/cache",
3
3
  "type": "module",
4
- "version": "0.58.56",
4
+ "version": "0.58.58",
5
5
  "description": "Caching the Stacks way.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -57,7 +57,7 @@
57
57
  "@stacksjs/config": "workspace:*"
58
58
  },
59
59
  "optionalDependencies": {
60
- "@aws-sdk/client-dynamodb": "^3.507.0",
60
+ "@aws-sdk/client-dynamodb": "^3.509.0",
61
61
  "ioredis": "^5.3.2"
62
62
  },
63
63
  "devDependencies": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/chat",
3
3
  "type": "module",
4
- "version": "0.58.56",
4
+ "version": "0.58.58",
5
5
  "description": "Easily interact with chat APIs.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -48,25 +48,25 @@
48
48
  "prepublishOnly": "bun --bun run build"
49
49
  },
50
50
  "peerDependencies": {
51
- "@novu/stateless": "^0.23.0",
51
+ "@novu/stateless": "^0.23.1",
52
52
  "@stacksjs/cli": "workspace:*",
53
53
  "@stacksjs/config": "workspace:*",
54
54
  "@stacksjs/error-handling": "workspace:*",
55
55
  "@stacksjs/types": "workspace:*"
56
56
  },
57
57
  "dependencies": {
58
- "@novu/stateless": "^0.23.0",
58
+ "@novu/stateless": "^0.23.1",
59
59
  "@stacksjs/cli": "workspace:*",
60
60
  "@stacksjs/config": "workspace:*",
61
61
  "@stacksjs/error-handling": "workspace:*",
62
62
  "@stacksjs/types": "workspace:*"
63
63
  },
64
64
  "optionalDependencies": {
65
- "@novu/discord": "^0.23.0",
66
- "@novu/ms-teams": "^0.23.0",
67
- "@novu/node": "^0.23.0",
68
- "@novu/slack": "^0.23.0",
69
- "@novu/stateless": "^0.23.0"
65
+ "@novu/discord": "^0.23.1",
66
+ "@novu/ms-teams": "^0.23.1",
67
+ "@novu/node": "^0.23.1",
68
+ "@novu/slack": "^0.23.1",
69
+ "@novu/stateless": "^0.23.1"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@stacksjs/development": "workspace:*"
@@ -14,7 +14,7 @@ async function installStack(name, options) {
14
14
  // src/cli.ts
15
15
  import cac from "cac";
16
16
  // package.json
17
- var version = "0.58.56";
17
+ var version = "0.58.58";
18
18
 
19
19
  // src/cli.ts
20
20
  function cli(name, options) {
@@ -58,6 +58,12 @@ async function exec(command, options) {
58
58
  process.exit(exitCode);
59
59
  }
60
60
  });
61
+ if (options?.stdin === "pipe" && options.input) {
62
+ if (proc.stdin) {
63
+ proc.stdin.write(options.input);
64
+ proc.stdin.end();
65
+ }
66
+ }
61
67
  const exited = await proc.exited;
62
68
  if (exited === ExitCode.Success)
63
69
  return ok(proc);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/cli",
3
3
  "type": "module",
4
- "version": "0.58.56",
4
+ "version": "0.58.58",
5
5
  "description": "TypeScript framework for CLI artisans. Build beautiful console apps with ease.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -46,6 +46,14 @@ export async function exec(command: string | string[], options?: CliOptions): Pr
46
46
  },
47
47
  })
48
48
 
49
+ // Check if we need to write to stdin
50
+ if (options?.stdin === 'pipe' && options.input) {
51
+ if (proc.stdin) {
52
+ proc.stdin.write(options.input)
53
+ proc.stdin.end()
54
+ }
55
+ }
56
+
49
57
  const exited = await proc.exited
50
58
  if (exited === ExitCode.Success)
51
59
  return ok(proc)
@@ -1,4 +1,3 @@
1
- /* eslint-disable no-new */
2
1
  import 'source-map-support/register'
3
2
  import process from 'node:process'
4
3
  import { config } from '@stacksjs/config'
@@ -76,9 +75,11 @@ export const options = {
76
75
  timestamp,
77
76
  } satisfies CloudOptions
78
77
 
79
- new Cloud(app, name, {
78
+ const cloud = new Cloud(app, name, {
80
79
  ...options,
81
80
  description: `The Stacks Cloud`,
82
81
  })
83
82
 
83
+ await cloud.init()
84
+
84
85
  app.synth()