Skip to content

Commit ff918ee

Browse files
committed
Build av-download with bun
1 parent 8a4db8b commit ff918ee

6 files changed

Lines changed: 322 additions & 5558 deletions

File tree

Makefile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ help:
3636

3737
./chat/dependencies/requirements.txt: ./chat/pyproject.toml
3838
cd chat && uv export --format requirements-txt --no-hashes > dependencies/requirements.txt
39-
api: ./api/template.yaml ./api/bun.lockb $(wildcard ./api/src/**/*.ts)
39+
api: ./api/template.yaml ./api/bun.lock $(wildcard ./api/src/**/*.ts)
4040
chat: ./chat/template.yaml ./chat/dependencies/requirements.txt $(wildcard ./chat/src/**/*.py)
41-
av-download: ./av-download/template.yaml ./av-download/lambdas/package-lock.json $(wildcard ./av-download/lambdas/**/*.js)
41+
av-download: ./av-download/template.yaml ./av-download/lambdas/bun.lock $(wildcard ./av-download/lambdas/**/*.js)
4242
.aws-sam/build.toml: ./template.yaml api chat av-download
4343
@sed -Ei.orig 's/^(\s+)#\*\s/\1/' chat/template.yaml; \
4444
sam build --cached --parallel
@@ -50,8 +50,7 @@ av-download/layers/ffmpeg/bin/ffmpeg:
5050
deps-api:
5151
bun install --cwd api
5252
deps-av-download:
53-
cd av-download/lambdas ;\
54-
npm list >/dev/null 2>&1 || npm ci
53+
bun install --cwd av-download/lambdas
5554
deps-mcp:
5655
cd mcp ;\
5756
npm list >/dev/null 2>&1 ;\
@@ -141,15 +140,15 @@ serve-docs:
141140
BUMP ?= ""
142141
version:
143142
@if [[ -n "$(BUMP)" ]]; then \
144-
for pkg in api api/dependencies api/src av-download/lambdas mcp mcp/apps/mcp; do \
143+
for pkg in api av-download/lambdas mcp mcp/apps/mcp; do \
145144
echo -n "Bumping version in $$pkg: " >&2 ; \
146145
(cd $$pkg && npm version $(BUMP)) >&2; \
147146
done; \
148147
for pkg in chat docs; do \
149148
echo "Bumping version in $$pkg: " >&2 ; \
150149
(cd $$pkg && uv version --bump $(BUMP)) >&2; \
151150
done; \
152-
VERSION=$$(node -p "require('./api/src/package.json').version") ;\
151+
VERSION=$$(node -p "require('./api/package.json').version") ;\
153152
(cd mcp && \
154153
jq --arg v "$$VERSION" '(.. | objects | select(has("version")) | .version) |= $$v' server.json > server.tmp.json && \
155154
mv server.tmp.json server.json && \

av-download/lambdas/Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
build:
2+
bun install && \
3+
bun build --target=node --outdir $(ARTIFACTS_DIR) --entry-naming [name].mjs --sourcemap=linked $(TARGET_FUNCTION).js
4+
5+
build-startAudioTranscodeFunction: TARGET_FUNCTION=start-audio-transcode
6+
build-startAudioTranscodeFunction: build
7+
8+
build-startTranscodeFunction: TARGET_FUNCTION=start-transcode
9+
build-startTranscodeFunction: build
10+
11+
build-transcodeStatusFunction: TARGET_FUNCTION=transcode-status
12+
build-transcodeStatusFunction: build
13+
14+
build-getDownloadLinkFunction: TARGET_FUNCTION=get-download-link
15+
build-getDownloadLinkFunction: build
16+
17+
build-sendTemplatedEmailFunction: TARGET_FUNCTION=send-templated-email
18+
build-sendTemplatedEmailFunction: build

0 commit comments

Comments
 (0)