Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZEA-3556: Disable serverless for Monorepo #310

Merged
merged 3 commits into from
Jul 17, 2024

Conversation

pan93412
Copy link
Collaborator

@pan93412 pan93412 commented Jul 9, 2024

Description (required)

  • refactor(planner/nodejs): Turn userAppDir "/" to ""
  • fix(planner/nodejs): Save config entry to ctx.Serverless
  • feat(planner/nodejs): Disable serverless if app root is empty

Tests

No serverless enabled in Next.js monorepo

(devenv) bash-5.2$ zbpack -i .
2024/07/09 11:50:11 using submoduleName: turborepo-basic
2024/07/09 11:50:11 
╔══════════════════════════════ Build Plan ═════════════════════════════╗
║ provider         │ nodejs                                             ║
║───────────────────────────────────────────────────────────────────────║
║ packageManager   │ pnpm                                               ║
║───────────────────────────────────────────────────────────────────────║
║ framework        │ next.js                                            ║
║───────────────────────────────────────────────────────────────────────║
║ nodeVersion      │ 18                                                 ║
║───────────────────────────────────────────────────────────────────────║
║ installCmd       │ COPY . .                                           ║
║                  │ WORKDIR /src/apps/docs                             ║
║                  │ RUN pnpm install                                   ║
║───────────────────────────────────────────────────────────────────────║
║ buildCmd         │ pnpm run build                                     ║
║───────────────────────────────────────────────────────────────────────║
║ startCmd         │ pnpm start                                         ║
║───────────────────────────────────────────────────────────────────────║
║ appDir           │ apps/docs                                          ║
╚═══════════════════════════════════════════════════════════════════════╝

ZBPACK_APP_DIR=/ transforms to empty string

(devenv) bash-5.2$ ZBPACK_APP_DIR="/" zbpack -i .
2024/07/09 11:50:10 using submoduleName: turborepo-basic
2024/07/09 11:50:10 Detected Monorepo. Disabling dependency caching.
2024/07/09 11:50:10 
╔══════════════════════════════ Build Plan ═════════════════════════════╗
║ provider         │ nodejs                                             ║
║───────────────────────────────────────────────────────────────────────║
║ startCmd         │ node index.js                                      ║
║───────────────────────────────────────────────────────────────────────║
║ packageManager   │ pnpm                                               ║
║───────────────────────────────────────────────────────────────────────║
║ framework        │ none                                               ║
║───────────────────────────────────────────────────────────────────────║
║ nodeVersion      │ 18                                                 ║
║───────────────────────────────────────────────────────────────────────║
║ installCmd       │ COPY . .                                           ║
║                  │ RUN pnpm install                                   ║
║───────────────────────────────────────────────────────────────────────║
║ buildCmd         │ pnpm run build                                     ║
╚═══════════════════════════════════════════════════════════════════════╝

Related issues & labels (optional)

  • Closes ZEA-3556
  • Suggested label: enhancement

@pan93412 pan93412 self-assigned this Jul 9, 2024
@pan93412 pan93412 marked this pull request as draft July 9, 2024 03:47
@pan93412 pan93412 marked this pull request as ready for review July 9, 2024 03:53
@pan93412 pan93412 requested a review from yuaanlin July 9, 2024 03:53
@yuaanlin yuaanlin merged commit 3a69921 into main Jul 17, 2024
5 checks passed
@yuaanlin yuaanlin deleted the pan93412/zea-3556-disable-serverless-for-monorepo branch July 17, 2024 07:54
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