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, bool serializeAsJsonbByDefault = false, required List<TypeDefinition> extraClasses, required bool isDatabaseEnabled, required DatabaseDialect databaseDialect, List<ExperimentalFeature> experimentalFeatures = const []})
const

Properties

auxiliaryInputPaths → List<String>
Paths outside the source tree that may influence generated output
no setter
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
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
generatedServerpodManifestFilePathParts → List<String>
The path of the generated Serverpod package manifest.
no setter
generatedServerProtocolFilePathParts → List<String>
The path parts of the generated protocol file.
no setter
generatedServerServerpodFilePathParts → List<String>
The path parts of the generated serverpod server file.
no setter
generatedServerSyncTablesFilePathParts → List<String>
The path parts of the generated sync tables file.
no setter
generatedServerTestToolsPathParts → List<String>?
no setter
generatedSharedModelsPaths → List<String>
The paths of the generated source code in shared model packages.
no setter
hashCode → int
The hash code for this object.
no setterinherited
isDatabaseEnabled → bool
Whether the database is enabled in the serverpod project.
final
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
serializeAsJsonbByDefault → bool
Whether serializable fields default to jsonb instead of json when stored in the database.
final
serverPackage → String
The name of the server package.
final
serverPackageDirectoryPathParts → List<String>
The parts of the absolute, normalized path where the server package is located. Anchored at GeneratorConfig.load time.
final
sharedModelsLibSourcePaths → List<String>
The paths of the lib directory in shared model packages.
no setter
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
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.