Skip to content

chore(api): refactor container name to AppContainer#1995

Merged
mikib0 merged 5 commits intodevelopmentfrom
chore/change-container-name
Mar 22, 2026
Merged

chore(api): refactor container name to AppContainer#1995
mikib0 merged 5 commits intodevelopmentfrom
chore/change-container-name

Conversation

@mikib0
Copy link
Collaborator

@mikib0 mikib0 commented Mar 22, 2026

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the API’s Cloudflare Container/Durable Object class and binding naming from TikTokContainer/TIKTOK_CONTAINER to AppContainer/APP_CONTAINER, updating the Worker export surface and runtime env validation accordingly.

Changes:

  • Renamed the container class export to AppContainer and updated imports/exports accordingly.
  • Renamed the Durable Object binding key to APP_CONTAINER and updated runtime env validation + TikTok generation route usage.
  • Updated wrangler.jsonc container/DO configuration to use AppContainer (but also modified the migrations list).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
packages/api/wrangler.jsonc Renames container + DO binding and adjusts migrations configuration.
packages/api/test/generate-from-tiktok.test.ts Updates test comment referencing the container class name.
packages/api/src/utils/env-validation.ts Renames validated binding from TIKTOK_CONTAINER to APP_CONTAINER and updates types/merging.
packages/api/src/routes/packTemplates/generateFromTikTok.ts Uses APP_CONTAINER binding when calling getContainer.
packages/api/src/index.ts Re-exports the renamed container class for Wrangler binding.
packages/api/src/containers/index.ts Updates barrel export to AppContainer.
packages/api/src/containers/AppContainer.ts Renames the container class to AppContainer.


// Get the container instance using the binding
const container = getContainer(TIKTOK_CONTAINER as any);
const container = getContainer(APP_CONTAINER as any);
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid casting APP_CONTAINER to any when calling getContainer. APP_CONTAINER is already typed in ValidatedEnv, so prefer passing it directly or casting to the specific expected container binding type (via unknown if needed) to preserve type safety.

Suggested change
const container = getContainer(APP_CONTAINER as any);
const container = getContainer(APP_CONTAINER);

Copilot uses AI. Check for mistakes.
@coderabbitai
Copy link

coderabbitai bot commented Mar 22, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6be2becd-ea5c-444d-8781-20a581f9bb04

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/change-container-name

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mikib0 mikib0 merged commit ae1e401 into development Mar 22, 2026
2 of 4 checks passed
@mikib0 mikib0 deleted the chore/change-container-name branch March 22, 2026 16:44
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.

2 participants