-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(framework): Move API servers into collective folder (#5995)
* refactor: Reorganize server-related files and imports * refactor(constants): rename NOVU_FRAMEWORK_API to SERVER * refactor(version): move version constants to separate file * refactor: Reorganize workflow resource imports * refactor(test): refactor action strings to enums * refactor(constants): rename and update cron types path * refactor: Replace strings with ChannelStepEnum keys * fix(api): correct subpath import in echo.server.ts
- Loading branch information
Showing
28 changed files
with
97 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
export * from './action.constants'; | ||
export * from './api.constants'; | ||
export * from './cron.constants'; | ||
export * from './error.constants'; | ||
export * from './http-headers.constants'; | ||
export * from './http-methods.constants'; | ||
export * from './http-query.constants'; | ||
export * from './http-status.constants'; | ||
export * from './resource.constants'; | ||
export * from './step.constants'; | ||
export * from './version.constants'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { version } from '../../package.json'; | ||
|
||
export const SDK_VERSION = version; | ||
export const FRAMEWORK_VERSION = '2024-06-26'; |
4 changes: 2 additions & 2 deletions
4
packages/framework/src/version.test.ts → ...s/framework/src/constants/version.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { expect, test, describe } from 'vitest'; | ||
import { SDK_VERSION } from './version'; | ||
import { SDK_VERSION } from './version.constants'; | ||
|
||
describe('version', () => { | ||
test('should export the current version', () => { | ||
const importVersion = SDK_VERSION; | ||
const packageJsonVersion = require('../package.json').version; | ||
const packageJsonVersion = require('../../package.json').version; | ||
expect(importVersion).toEqual(packageJsonVersion); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export { Client } from './client'; | ||
export * from './types'; | ||
export * from './constants'; | ||
export { NovuRequestHandler, type ServeHandlerOptions } from './handler'; | ||
export { workflow } from './workflow'; | ||
export * from './resources'; | ||
export * from './types'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './workflow'; |
2 changes: 1 addition & 1 deletion
2
packages/framework/src/workflow.test.ts → .../framework/src/resources/workflow.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
packages/framework/src/express.ts → packages/framework/src/servers/express.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/framework/src/h3.ts → packages/framework/src/servers/h3.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.