TenantProjectPubspec class

Represents a parsed pubspec.yaml file of a tenant project. Provides methods to validate its contents.

Constructors

TenantProjectPubspec(Pubspec pubspec, [String? rawYamlContent])
TenantProjectPubspec.fromFile(File pubspecFile)
Reads and parses the given pubspec.yaml file.
factory
TenantProjectPubspec.fromProjectDir(Directory projectDirectory)
Reads and parses the pubspec.yaml file in the given project directory.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
pubspec → Pubspec
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
serverpodVersion → String?
Returns the Serverpod framework version constraint string, or null if no Serverpod hosted dependency is found.
no setter

Methods

environmentSdkConstraint() → String?
The Dart SDK constraint the package declares in environment.sdk, or null if it declares none.
hasFlutterBuildScript() → bool
Returns true if the pubspec.yaml defines a serverpod.scripts.flutter_build entry.
isServerpodServer() → bool
Returns true if the pubspec.yaml appears to represent a Serverpod server.
isWorkspaceResolved() → bool
Returns true if the pubspec.yaml has a workspace resolution directive.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
projectDependencyIssues({bool requireServerpod = true}) → List<String>
Validates the pubspec.yaml dependencies of a customer project in order to be deployed to Serverpod Cloud.
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

readLockfileDartSdk(File lockfile) → ({String? constraint, List<String> issues})
Reads the Dart SDK constraint recorded as sdks.dart in lockfile.