Skip to content

feat(core/api): add bunfig.toml detection and bun package manager fallback prelude - #314

Open
farrasrayhand wants to merge 19 commits into
oblien:mainfrom
farrasrayhand:feat/bun-package-manager-optimization
Open

feat(core/api): add bunfig.toml detection and bun package manager fallback prelude#314
farrasrayhand wants to merge 19 commits into
oblien:mainfrom
farrasrayhand:feat/bun-package-manager-optimization

Conversation

@farrasrayhand

Copy link
Copy Markdown
Contributor

Summary

Enhances Bun package manager support across Openship by adding bunfig.toml auto-detection in stack-detector.ts and a packageManagerEnsureCommand prelude to ensure Bun is available during bare-metal or Node.js image deployments.

Motivation

Bun projects using bunfig.toml (without checking in bun.lockb) or deployed on bare-metal Node.js build steps needed explicit detection and fallback installation so build steps execute reliably and fast.

Related issue

None

Changes

  • apps/api/src/lib/stack-detector.ts:
    • Added bunfig.toml to detectPackageManager file matching rules.
  • apps/api/test/lib/stack-detector.test.ts:
    • Added unit test verifying bunfig.toml detects as bun.
  • packages/core/src/stacks.ts:
    • Updated packageManagerEnsureCommand to output a (command -v bun || npm i -g bun) prelude for Bun package manager targets.
  • packages/core/test/package-manager-ensure.test.ts:
    • Added unit test suite for Bun package manager prelude.

Verification

Verified via unit tests in apps/api and packages/core:

bun test packages/core/test/package-manager-ensure.test.ts
bun test apps/api/test/lib/stack-detector.test.ts

Checklist

  • One change per PR — one bug, or one agreed feature, with nothing unrelated bundled in
  • The diff is scoped — no reformatting or lint fixes on lines I wasn't otherwise changing
  • A test fails without this change and passes with it (or I explained above why there isn't one)
  • bun run test, bun run --cwd <workspace> lint, and bun format all pass locally
  • I understand every line of this diff and can explain it in review

farrasrayhand and others added 19 commits July 25, 2026 08:11
…r compat)

GNU tar does not support --no-absolute-names; it strips absolute paths by
default. The pre-extraction assertTarEntriesSafe already validates all
entry paths for traversal attacks.
…blicWebhookUrl

- Replace assertPublicWebhookUrl call with assertPublicUrlLiteral from ssrf-guard
- Delete redundant webhook-url.ts and its test
- Add 22 ssrf-guard tests covering isPrivateIp, isBlockedHostname, assertPublicHostLiteral, assertPublicUrlLiteral
@farrasrayhand
farrasrayhand force-pushed the feat/bun-package-manager-optimization branch from d12c737 to 6631a70 Compare July 30, 2026 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant