Skip to content

Commit

Permalink
fix(api): @novu/api -> @novu/api-service (novuhq#7348)
Browse files Browse the repository at this point in the history
Co-authored-by: Dima Grossman <[email protected]>
  • Loading branch information
tatarco and scopsy authored Dec 23, 2024
1 parent 2cd99fa commit a207e52
Show file tree
Hide file tree
Showing 19 changed files with 34 additions and 34 deletions.
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"sdkerror",
"africas",
"africastalking",
"preferencechannels",
"Aland",
"alanturing",
"alexjoverm",
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [4200, 3000, 27017],

"onCreateCommand": "npm run setup:project -- --exclude=@novu/api,@novu/worker,@novu/web,@novu/widget",
"onCreateCommand": "npm run setup:project -- --exclude=@novu/api-service,@novu/worker,@novu/web,@novu/widget",

// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node",
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/run-api/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ runs:
- uses: mansagroup/nrwl-nx-action@v3
with:
targets: build
projects: '@novu/api'
projects: '@novu/api-service'

- name: Start API
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/validate-openapi/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ runs:
PORT: '1336'
with:
targets: lint:openapi
projects: '@novu/api'
projects: '@novu/api-service'

- name: Kill port for api 1336 for unit tests
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'@novu/api':
'@novu/api-service':
- apps/api/**/*
'@novu/worker':
- apps/worker/**/*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/jarvis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- labeled
jobs:
add-comment:
if: github.event.label.name == '@novu/api'
if: github.event.label.name == '@novu/api-service'
runs-on: ubuntu-latest
permissions:
issues: write
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ jobs:
- uses: ./.github/actions/setup-project
with:
# Don't run redis and etc... for other unit tests
slim: ${{ !contains(matrix.projectName, '@novu/api') && !contains(matrix.projectName, '@novu/worker') && !contains(matrix.projectName, '@novu/ws') && !contains(matrix.projectName, '@novu/inbound-mail')}}
slim: ${{ !contains(matrix.projectName, '@novu/api-service') && !contains(matrix.projectName, '@novu/worker') && !contains(matrix.projectName, '@novu/ws') && !contains(matrix.projectName, '@novu/inbound-mail')}}
- uses: ./.github/actions/setup-redis-cluster
- uses: mansagroup/nrwl-nx-action@v3
name: Lint and build and test
Expand Down Expand Up @@ -244,8 +244,8 @@ jobs:
uses: ./.github/workflows/reusable-api-e2e.yml
with:
ee: ${{ contains (matrix.name,'-ee') }}
test-e2e-affected: ${{ contains(fromJson(needs.get-affected.outputs.test-e2e), '@novu/api') || contains(fromJson(needs.get-affected.outputs.test-e2e), '@novu/worker') }}
test-e2e-ee-affected: ${{ contains(fromJson(needs.get-affected.outputs.test-e2e-ee), '@novu/api') || contains(fromJson(needs.get-affected.outputs.test-e2e-ee), '@novu/worker') }}
test-e2e-affected: ${{ contains(fromJson(needs.get-affected.outputs.test-e2e), '@novu/api-service') || contains(fromJson(needs.get-affected.outputs.test-e2e), '@novu/worker') }}
test-e2e-ee-affected: ${{ contains(fromJson(needs.get-affected.outputs.test-e2e-ee), '@novu/api-service') || contains(fromJson(needs.get-affected.outputs.test-e2e-ee), '@novu/worker') }}
job-name: ${{ matrix.name }}
test-unit: false
secrets: inherit
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-dashboard-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- uses: mansagroup/nrwl-nx-action@v3
with:
targets: build
projects: '@novu/dashboard,@novu/api,@novu/worker'
projects: '@novu/dashboard,@novu/api-service,@novu/worker'
args: --skip-nx-cache

- uses: ./.github/actions/start-localstack
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-web-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- uses: mansagroup/nrwl-nx-action@v3
with:
targets: build
projects: '@novu/web,@novu/api,@novu/worker'
projects: '@novu/web,@novu/api-service,@novu/worker'
args: --skip-nx-cache

- uses: ./.github/actions/start-localstack
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-widget-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
with:
targets: build
args: --skip-nx-cache
projects: '@novu/widget,@novu/embed,@novu/api,@novu/worker,@novu/ws'
projects: '@novu/widget,@novu/embed,@novu/api-service,@novu/worker,@novu/ws'

- uses: ./.github/actions/run-backend
with:
Expand Down
2 changes: 1 addition & 1 deletion apps/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</a>
</div>

# @novu/api
# @novu/api-service

A RESTful API for accessing the Novu platform, built using [NestJS](https://nestjs.com/).

Expand Down
4 changes: 2 additions & 2 deletions apps/api/jarvis-api-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Hi, I'm Jarvis 🤖
I'm a bot built to help you with your contribution to Novu.
I will add instructions and guides on how to run the subset of the Novu platform associated to this issue and make your first contribution.

This issue was tagged as related to `@novu/api` and the related code is located at the `apps/api` folder, here is how I can help you:
This issue was tagged as related to `@novu/api-service` and the related code is located at the `apps/api` folder, here is how I can help you:

<details>
<summary>First time contributing to Novu?</summary>
Expand All @@ -17,7 +17,7 @@ If that's the first time you want to contribute to Novu here are a few simple st
</details>

<details>
<summary>Run and test `@novu/api` locally</summary>
<summary>Run and test `@novu/api-service` locally</summary>

### Run API in watch mode

Expand Down
4 changes: 2 additions & 2 deletions apps/api/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@novu/api",
"name": "@novu/api-service",
"version": "2.1.1",
"description": "description",
"author": "",
Expand Down Expand Up @@ -42,7 +42,7 @@
"@nestjs/swagger": "7.4.0",
"@nestjs/terminus": "10.2.3",
"@nestjs/throttler": "6.2.1",
"@novu/api": "0.0.1-alpha.109",
"@novu/api": "0.0.1-alpha.149",
"@novu/application-generic": "workspace:*",
"@novu/dal": "workspace:*",
"@novu/framework": "workspace:*",
Expand Down
1 change: 0 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const noRestrictedImportsMultiLevelNovuPattern = {
group: [
'@novu/*/**/*',
'!@novu/api/**/*', // This allows all imports from @novu/api
// '!@novu/api/funcs/triggerBulk',
// These packages have legitimate exports 1 path part below the root level
// This flatMap logic ignores the path 1 below the root level and prevents deeper imports.
...['framework', 'js', 'novui'].flatMap((pkg) => [`!@novu/${pkg}/**/*`, `@novu/${pkg}/*/**/*`]),
Expand Down
2 changes: 1 addition & 1 deletion novu.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"path": ".",
},
{
"name": "🚀 @novu/api",
"name": "🚀 @novu/api-service",
"path": "apps/api",
},
{
Expand Down
2 changes: 1 addition & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"groups": {
"apps": {
"projects": [
"@novu/api",
"@novu/api-service",
"@novu/dashboard",
"@novu/inbound-mail",
"@novu/web",
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"bootstrap": "npm run setup:dev",
"build-ee": "nx run-many --target=build-ee --all",
"build:api": "nx build @novu/api",
"build:api": "nx build @novu/api-service",
"build:dashboard": "nx build @novu/dashboard",
"build:embed": "nx build @novu/embed",
"build:inbound-mail": "nx build @novu/inbound-mail",
Expand Down Expand Up @@ -44,9 +44,9 @@
"release": "node scripts/release.mjs",
"release:version:apps": "nx release version --projects=tag:type:app",
"setup:project": "npx --yes [email protected] i && node scripts/setup-env-files.js && pnpm build",
"start:api:dev": "cross-env nx run @novu/api:start:dev",
"start:api:test": "cross-env nx run-many --target=start:test --projects=@novu/api",
"start:api": "cross-env nx run @novu/api:start",
"start:api:dev": "cross-env nx run @novu/api-service:start:dev",
"start:api:test": "cross-env nx run-many --target=start:test --projects=@novu/api-service",
"start:api": "cross-env nx run @novu/api-service:start",
"start:dal": "cross-env nx run @novu/dal:start",
"start:dashboard": "cross-env nx run @novu/dashboard:start",
"start:dev": "cross-env lerna run start:dev --stream --parallel --concurrency=20 --scope=@novu/{api,worker,web,widget,ws,notification-center}",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions scripts/jarvis.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ async function setupRunner() {
if (answers.action === DEV_ENVIRONMENT_SETUP) {
shell.exec('npm run dev-environment-setup');
} else if (answers.runConfiguration === WEB_PROJECT_AND_WIDGET) {
shell.exec('nx run-many --target=build --projects=@novu/api,@novu/worker');
shell.exec('nx run-many --target=build --projects=@novu/api-service,@novu/worker');
shell.exec('npm run start:dev', { async: true });

await waitPort({
Expand Down Expand Up @@ -127,7 +127,7 @@ async function setupRunner() {
`);
} else if (answers.runConfiguration === WEB_PROJECT) {
try {
shell.exec('nx run-many --target=build --projects=@novu/api,@novu/worker,@novu/ws');
shell.exec('nx run-many --target=build --projects=@novu/api-service,@novu/worker,@novu/ws');

shell.exec('npm run start:api', { async: true });
shell.exec('npm run start:ws', { async: true });
Expand Down Expand Up @@ -162,7 +162,7 @@ async function setupRunner() {
console.error(`Failed to spin up the project ❌`, e);
}
} else if (answers.runConfiguration === API_AND_WORKER_ONLY) {
shell.exec('nx run-many --target=build --projects=@novu/api,@novu/worker');
shell.exec('nx run-many --target=build --projects=@novu/api-service,@novu/worker');
shell.exec('npm run start:api', { async: true });
shell.exec('npm run start:worker', { async: true });

Expand All @@ -182,7 +182,7 @@ async function setupRunner() {
Worker: http://127.0.0.1:3004
`);
} else if (answers.runApiConfiguration === API_INTEGRATION_TESTS) {
shell.exec('nx run-many --target=build --projects=@novu/api,@novu/worker');
shell.exec('nx run-many --target=build --projects=@novu/api-service,@novu/worker');
shell.exec('npm run start:worker:test', { async: true });

await waitPort({
Expand All @@ -192,7 +192,7 @@ async function setupRunner() {

shell.exec('npm run start:integration:api', { async: true });
} else if (answers.runApiConfiguration === API_E2E_TESTS) {
shell.exec('nx run-many --target=build --projects=@novu/api,@novu/worker');
shell.exec('nx run-many --target=build --projects=@novu/api-service,@novu/worker');
shell.exec('npm run start:worker:test', { async: true });

await waitPort({
Expand All @@ -202,7 +202,7 @@ async function setupRunner() {

shell.exec('npm run start:e2e:api', { async: true });
} else if ([RUN_PLAYWRIGHT_CLI, RUN_PLAYWRIGHT_UI].includes(answers.runWebConfiguration)) {
shell.exec('nx run-many --target=build --projects=@novu/api,@novu/worker,@novu/ws');
shell.exec('nx run-many --target=build --projects=@novu/api-service,@novu/worker,@novu/ws');
shell.exec('cd apps/web && npm run build:test');

shell.exec('npm run start:api:test', { async: true });
Expand Down

0 comments on commit a207e52

Please sign in to comment.