Skip to content

Commit af23231

Browse files
committed
chore: wip
chore: wip chore: wip chore: wip chore: wip chore: wip chore: wip
1 parent 871a4dd commit af23231

File tree

11 files changed

+333
-86
lines changed

11 files changed

+333
-86
lines changed

.stacks/core/actions/src/deploy/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { log, runCommand } from '@stacksjs/cli'
22
import { path as p } from '@stacksjs/path'
3-
import { hashDirectory } from '@stacksjs/storage'
3+
import { originRequestFunctionCodeHash } from '@stacksjs/utils'
44

55
await runCommand('bun run build', {
66
cwd: p.frameworkPath(),
@@ -27,7 +27,6 @@ log.info('Preparing deployment...')
2727

2828
// Calculate the hash of the Lambda function's source code
2929
// to future self: there is a chance that in the future the source will be in more places than just the edge folder
30-
const originRequestFunctionCodeHash = hashDirectory(p.cloudPath('src/edge'))
3130
log.info(`Lambda function code hash: ${originRequestFunctionCodeHash}`)
3231

3332
await runCommand(`bunx cdk deploy --profile stacks --require-approval never --context originRequestFunctionCodeHash=${originRequestFunctionCodeHash}`, {

.stacks/core/buddy/src/commands/cloud.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { addJumpBox, deleteCdkRemnants, deleteJumpBox, deleteLogGroups, deleteSt
44
import { path as p } from '@stacksjs/path'
55
import type { CLI, CloudCliOptions } from '@stacksjs/types'
66
import { ExitCode } from '@stacksjs/types'
7-
import { loop } from '@stacksjs/utils'
7+
import { loop, originRequestFunctionCodeHash } from '@stacksjs/utils'
88

99
export function cloud(buddy: CLI) {
1010
const descriptions = {
@@ -136,7 +136,7 @@ export function cloud(buddy: CLI) {
136136
// sleep for 2 seconds to get the user to read the message
137137
await new Promise(resolve => setTimeout(resolve, 2000))
138138

139-
const result = await runCommand('bunx cdk destroy --profile stacks', {
139+
const result = await runCommand(`bunx cdk destroy --profile stacks --context originRequestFunctionCodeHash=${originRequestFunctionCodeHash}`, {
140140
...options,
141141
cwd: p.cloudPath(),
142142
stdin: 'inherit',

0 commit comments

Comments
 (0)