-
Notifications
You must be signed in to change notification settings - Fork 370
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dev): enable the usage of the command property without port (#3662)
* feat(dev): enable the usage of the command property without port * chore: fix tests Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
- Loading branch information
1 parent
51bde9a
commit ba154f6
Showing
7 changed files
with
146 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import type { FrameworkNames } from '../../utils/types'; | ||
|
||
export type DevConfig = { | ||
framework: FrameworkNames | ||
/** Directory of the functions */ | ||
functions: string | ||
publish: string | ||
/** Port to serve the functions */ | ||
port: number | ||
live: boolean | ||
staticServerPort?: number | ||
targetPort?: number | ||
/** Command to run */ | ||
command?: string | ||
functionsPort?: number | ||
autoLaunch?: boolean | ||
https?: { | ||
keyFile: string | ||
certFile: string | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
export type FrameworkNames = '#static' | '#auto' | '#custom' | string | ||
|
||
export type FrameworkInfo = { | ||
build: { | ||
directory: string | ||
} | ||
dev: { | ||
commands: string[] | ||
port: number | ||
pollingStrategies: { name: string }[] | ||
} | ||
name: FrameworkNames | ||
staticAssetsDirectory: string | ||
env: NodeJS.ProcessEnv | ||
} | ||
|
||
export type BaseServerSettings = { | ||
dist: string | ||
|
||
// static serving | ||
useStaticServer?: true | ||
|
||
// Framework specific part | ||
/** A port where a proxy can listen to it */ | ||
frameworkPort?: number | ||
functions?: string | ||
/** The command that was provided for the dev config */ | ||
command?: string | ||
/** The framework name ('Create React App') */ | ||
framework?: string | ||
env?: NodeJS.ProcessEnv | ||
pollingStrategies?: string[] | ||
} | ||
|
||
export type ServerSettings = BaseServerSettings & { | ||
/** default 'secret' */ | ||
jwtSecret: string | ||
/** default 'app_metadata.authorization.roles' */ | ||
jwtRolePath: string | ||
/** The port where the functions are running on */ | ||
port: number | ||
/** The directory of the functions */ | ||
functions: number | ||
} |
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
Binary file not shown.
ba154f6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📊 Benchmark results
Package size: 365 MB