.cursor/skills/enterprise-submodule/SKILL.md
Use this skill when making changes to the enterprise submodule (.source/) or enterprise packages (enterprise/packages/*), or when the enterprise submodule needs to be initialized/updated.
Novu uses a git submodule at .source pointing to [email protected]:novuhq/packages-enterprise.git. The enterprise packages in enterprise/packages/ have their src directories symlinked to .source/<package>/src.
Configure git for submodule recursion:
git config --global submodule.recurse true
Initialize the submodule:
git submodule update --init --recursive
If SSH is unavailable (e.g., in cloud environments), configure HTTPS fallback:
git config --global url."https://github.com/".insteadOf "[email protected]:"
gh auth setup-git
Add enterprise env vars to apps/api/src/.env and apps/worker/src/.env:
NOVU_ENTERPRISE=true
Install and build with enterprise:
pnpm install:with-ee
pnpm build
install:with-ee runs pnpm install then pnpm symlink:submodules which symlinks src dirs from .source/ into enterprise/packages/.
git pull in the main repository (with submodule.recurse=true, submodule changes are fetched but NOT merged).cd .source && git checkout <branch> && git pullfeat/scope-description-fixes-NOV-123). Start from a branch in the submodule, not a detached HEAD..source/: git pushcd into the submodule):
gh pr create --repo novuhq/packages-enterprise --head <branch-name> --base next --title "..." --body "..."
https://github.com/novuhq/packages-enterprise/compare/next...<branch-name>
gh pr create. Mention the enterprise PR link in the body.fatal: could not get a repository handle for submodule '.source':
.git/modules/ contentsgit submodule update --init --recursiveUntracked working tree files error on checkout:
git submodule deinit -f enterprisegit submodule update --init --recursiveNuclear option:
pnpm run clean
rm -rf node_modules
pnpm i
pnpm run symlink:submodules
pnpm nx run-many --target=build --all --skip-nx-cache
.source directory contains the actual enterprise source code (private repo).enterprise/packages/*/src are symlinks to .source/*/src.@novu/ee-auth, @novu/ee-api, @novu/ee-dal, @novu/ee-billing, @novu/ee-translation, @novu/ee-shared-services.check-ee.mjs script in each enterprise package only builds if the src folder exists (graceful degradation for OSS contributors).