feat(create-app): add --starter flag to set CUSTOM_STARTER_URL for local Docker instance#35025
feat(create-app): add --starter flag to set CUSTOM_STARTER_URL for local Docker instance#35025
Conversation
…cal Docker instance Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
❌ Issue Linking RequiredThis PR could not be linked to an issue. All PRs must be linked to an issue for tracking purposes. How to fix this:Option 1: Add keyword to PR body (Recommended - auto-removes this comment)
Why is this required?Issue linking ensures proper tracking, documentation, and helps maintain project history. It connects your code changes to the problem they solve.--- This comment was automatically generated by the issue linking workflow |
|
Claude finished @fmontes's task in 1m 19s —— View job PR Review:
|
The Angular 20→21 upgrade changed the workspace moduleResolution to "bundler", breaking the tsc-based build for the CLI. Switched to @nx/rollup:rollup with cjs format so ESM-only deps (chalk, execa, ora, inquirer) are bundled correctly into a single CJS-compatible output. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
--starter <url>CLI option todotcms-create-appfor local Docker deploymentsCUSTOM_STARTER_URLenvironment variable when runningdocker compose upvalidateUrlhelper (must be a valid http/https URL)sdk-create-appESM build/runtime packaging: bundlests-resultsvia a localResulthelper and publishes a CLI-only npm artifactlibs/sdk/create-app/project.jsonnow uses@nx/esbuildwithformat: [\"esm\"],bundle: true, andthirdParty: trueso the CLI ships as a single ESM entrypointexternallist keeps true runtime deps external (chalk/ora/inquirer/execa/etc.) while avoiding fragile package-internal imports in the emitted bundleBuild/Pack Key Properties
project.json:executorswitched to@nx/esbuild;platform: "node"+format: ["esm"]targets Node ESM CLI outputproject.json:bundle: trueandthirdParty: truegenerate a single bundled runtime entrypointproject.json:externalkeeps runtime deps external while internal utility/result code is bundledproject.json: productionbanneradds the Node shebang andassetscopiesREADME.md+package.jsoninto distpackage.json: set as CLI-only (type: "module",main: "./index.js",bin.create-dotcms-app: "./index.js")package.json: removedtypesand declaration/source publish entries (*.d.ts,src) to keep npm payload minimalpackage.json: removedts-results/tslibruntime dependency entries after replacing with localresulthelperTest plan
dotcms-create-app my-app --local --starter https://repo.example.com/my-starter.zipand verifyCUSTOM_STARTER_URLis passed to Docker--starterand verify existing behavior is unchanged--starter not-a-url) and verify validation error is shownyarn nx build sdk-create-app --skip-nx-cache && node dist/libs/sdk/create-app/index.js --helpand verify noERR_MODULE_NOT_FOUNDordynamic requireruntime errors