Skip to content

Commit 7c14627

Browse files
committed
chore: merge dev into database wrapper branch
2 parents 876ce31 + 2b3ddf9 commit 7c14627

127 files changed

Lines changed: 14067 additions & 539 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.git
2+
.opencode
3+
.sst
4+
.turbo
5+
.wrangler
6+
node_modules
7+
**/node_modules
8+
**/.output
9+
**/dist
10+
**/.turbo
11+
**/.vite
12+
**/coverage

.github/workflows/deploy.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,15 @@ on:
99

1010
concurrency: ${{ github.workflow }}-${{ github.ref }}
1111

12+
permissions:
13+
contents: read
14+
id-token: write
15+
1216
jobs:
1317
deploy:
18+
if: github.repository == 'anomalyco/opencode' && (github.ref_name == 'dev' || github.ref_name == 'production')
1419
runs-on: ubuntu-latest
20+
environment: ${{ github.ref_name }}
1521
steps:
1622
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
1723

@@ -21,6 +27,12 @@ jobs:
2127
with:
2228
node-version: "24"
2329

30+
- uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4.3.1
31+
with:
32+
role-to-assume: ${{ vars.AWS_DEPLOY_ROLE_ARN }}
33+
role-session-name: opencode-${{ github.run_id }}
34+
aws-region: us-east-1
35+
2436
- run: bun sst deploy --stage=${{ github.ref_name }}
2537
env:
2638
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}

bun.lock

Lines changed: 115 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

infra/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const api = new sst.cloudflare.Worker("Api", {
3030
transform: {
3131
worker: (args) => {
3232
args.logpush = true
33-
if ($app.stage === "vimtor") return
33+
if ($app.stage === "vimtor" || $app.stage === "adam") return
3434
args.bindings = $resolve(args.bindings).apply((bindings) => [
3535
...bindings,
3636
{

infra/console.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
import { domain } from "./stage"
1+
import { deployAws, domain } from "./stage"
22
import { EMAILOCTOPUS_API_KEY } from "./app"
33
import { SECRET } from "./secret"
44

5+
const lake = deployAws ? await import("./lake") : undefined
6+
57
////////////////
68
// DATABASE
79
////////////////
@@ -240,7 +242,7 @@ const SALESFORCE_INSTANCE_URL = new sst.Secret("SALESFORCE_INSTANCE_URL")
240242

241243
const logProcessor = new sst.cloudflare.Worker("LogProcessor", {
242244
handler: "packages/console/function/src/log-processor.ts",
243-
link: [new sst.Secret("HONEYCOMB_API_KEY")],
245+
link: [SECRET.HoneycombApiKey, ...(lake?.lakeIngest ? [lake.lakeIngest] : [])],
244246
})
245247

246248
new sst.cloudflare.x.SolidStart("Console", {
@@ -250,6 +252,8 @@ new sst.cloudflare.x.SolidStart("Console", {
250252
bucket,
251253
bucketNew,
252254
database,
255+
SECRET.UpstashRedisRestUrl,
256+
SECRET.UpstashRedisRestToken,
253257
AUTH_API_URL,
254258
STRIPE_WEBHOOK_SECRET,
255259
DISCORD_INCIDENT_WEBHOOK_URL,
@@ -281,7 +285,7 @@ new sst.cloudflare.x.SolidStart("Console", {
281285
},
282286
transform: {
283287
server: {
284-
placement: { region: "aws:us-east-1" },
288+
placement: { region: "aws:us-east-2" },
285289
transform: {
286290
worker: {
287291
tailConsumers: [{ service: logProcessor.nodes.worker.scriptName }],

0 commit comments

Comments
 (0)