GeneratorConfig class

The configuration of the generation and analyzing process.

Constructors

GeneratorConfig({required String name, required PackageType type, required String serverPackage, required String dartClientPackage, required bool dartClientDependsOnServiceClient, required List<String> serverPackageDirectoryPathParts, required Map<String, List<String>> sharedModelsSourcePathsParts, List<String>? relativeServerTestToolsPathParts, required List<String> relativeDartClientPackagePathParts, required List<ModuleConfig> modules, required List<TypeDefinition> extraClasses, required List<ServerpodFeature> enabledFeatures, required DatabaseDialect databaseDialect, List<ExperimentalFeature> experimentalFeatures = const []})
const

Properties

clientPackagePathParts List<String>
Path parts to the client package.
no setter
dartClientDependsOnServiceClient bool
True, if dart client depends on the package:serverpod_service_client.
final
dartClientPackage String
The name of the client package.
final
databaseDialect → DatabaseDialect
The dialect of the database, if enabled. Default is DatabaseDialect.postgres.
final
enabledFeatures List<ServerpodFeature>
All the features that are enabled in the serverpod project.
final
experimentalFeatures List<ExperimentalFeature>
final
extraClasses List<TypeDefinition>
User defined class names for complex types. Useful for types used in caching and streams.
final
generatedDartClientModelPathParts List<String>
The path parts to the protocol directory in the dart client package.
no setter
generatedServeModelPackagePathParts List<String>
The internal package path parts of the directory, where the generated code is stored in the server package.
no setter
generatedServeModelPathParts List<String>
The path parts of the directory, where the generated code is stored in the server package.
no setter
generatedServerEndpointDescriptionFilePathParts List<String>
The path parts of the generated protocol file.
no setter
generatedServerEndpointFilePathParts List<String>
The path parts of the generated endpoint file.
no setter
generatedServerFutureCallFilePathParts List<String>
The path parts of the generated future calls class file.
no setter
generatedServerProtocolFilePathParts List<String>
The path parts of the generated protocol file.
no setter
generatedServerTestToolsPathParts List<String>?
no setter
hashCode int
The hash code for this object.
no setterinherited
libSourcePathParts List<String>
Path parts to the lib folder of the server package.
no setter
modelSourcePathParts List<String>
Path parts to the lib/src/models directory of the server package.
no setter
modules List<ModuleConfig>
All the modules defined in the config (of type module).
no setter
modulesAll List<ModuleConfig>
All the modules including my self and internal modules.
no setter
modulesDependent List<ModuleConfig>
All the modules excluding my self
no setter
name String
The name of the serverpod project.
final
protocolSourcePathParts List<String>
Path parts to the lib/src/protocol directory of the server package.
no setter
relativeModelSourcePathParts List<String>
Relative path parts to the model directory
no setter
relativeProtocolSourcePathParts List<String>
Relative path parts to the protocol directory
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serverPackage String
The name of the server package.
final
serverPackageDirectoryPathParts List<String>
The parts of the path where the server package is located at. Might be relative.
final
sharedModelsSourcePathsParts Map<String, List<String>>
The path parts to packages of shared models. The key is the package name, the value is the path parts to the package relative to the server package.
final
srcSourcePathParts List<String>
Path parts to the lib/src folder of the server package.
no setter
type PackageType
The PackageType of the package this GeneratorConfig describes.
final

Methods

isExperimentalFeatureEnabled(ExperimentalFeature feature) bool
isFeatureEnabled(ServerpodFeature feature) bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

getPackageType(Map generatorConfig) PackageType
load({String serverRootDir = '', required bool? interactive}) Future<GeneratorConfig>
Create a new GeneratorConfig by loading the configuration in the serverRootDir.