SetupConfig class
Configuration for project setup
Constructors
-
SetupConfig({required String appName, required String orgDomain, required String baseClassName, required TemplateType template, required String outputDir, bool createModels = false, bool createServer = false, bool useFirebase = false, String? firebaseProjectId, bool setupCloudRun = false, String? serviceAccountKeyPath, List<
String> platforms = const ['android', 'ios', 'web', 'linux', 'macos', 'windows'], bool? deployHostingRelease, bool? deployHostingBeta, String firestoreRegion = 'nam5', bool initializeFirestore = true, bool initializeStorage = true, bool enableEmailAuth = true, bool enableGoogleAuth = true, bool? requireBlaze, bool? setupArtifactCleanup, int artifactKeepRecent = 5, int artifactDeleteOlderDays = 30, int cloudRunKeepRevisions = 3, JasprRenderMode? jasprRenderMode, String? jasprServerServiceName, String embeddedFlutterMount = '/app', List<String> ? hybridDynamicPrefixes}) - SetupConfig.defaults()
-
Create config with defaults
factory
Properties
- appName → String
-
App name in snake_case (e.g., my_app)
final
- artifactDeleteOlderDays → int
-
Age (days) after which non-keep-listed Artifact Registry image versions
are deleted. Defaults to 30.
final
- artifactKeepRecent → int
-
Number of most-recent Artifact Registry image versions the cleanup
policy should keep. Defaults to 5.
final
- baseClassName → String
-
Base class name in PascalCase (e.g., MyApp)
final
- cloudRunKeepRevisions → int
-
Number of most-recent Cloud Run revisions to keep. Older revisions that
are not currently serving traffic are pruned. Defaults to 3.
final
- createModels → bool
-
Whether to create models package
final
- createServer → bool
-
Whether to create server app
final
- deployHostingBeta → bool
-
Whether the orchestrator should create and deploy the
<project>-betahosting site. Only meaningful when web hosting is supported.final - deployHostingRelease → bool
-
Whether the orchestrator should deploy the release hosting site.
Only meaningful when TemplateTypeExtension.isFlutterApp with web
platform OR TemplateTypeExtension.isJasprApp is true.
final
- effectiveJasprServerServiceName → String
-
Effective Cloud Run service name for the Jaspr server binary.
Falls back to
<appName>-webwhen jasprServerServiceName is null. Dashes-not-underscores because Cloud Run rejects underscores in service names.no setter - embeddedFlutterClassName → String
-
Class name for the embedded Flutter web app.
no setter
- embeddedFlutterMount → String
-
Mount path for the embedded Flutter web app inside the Jaspr host
site. Only meaningful when template is
TemplateType.arcaneJasprFlutterEmbed. Defaults to
/app.final - embeddedFlutterPackageName → String
-
Package name for the embedded Flutter web app (only meaningful
when template is TemplateType.arcaneJasprFlutterEmbed).
no setter
- enableEmailAuth → bool
-
Whether the orchestrator should enable / hand off Email + Password auth.
final
- enableGoogleAuth → bool
-
Whether the orchestrator should enable / hand off Google sign-in.
Always falls back to a console hand-off because the OAuth client cannot
be fully scripted.
final
- firebaseProjectId → String?
-
Firebase project ID (required if useFirebase is true)
final
- firestoreRegion → String
-
Region used to bootstrap the default Firestore database when missing.
Common values:
nam5(multi-region US),eur3(multi-region EU),us-central1,europe-west1. Defaults tonam5.final - hasEmbeddedFlutter → bool
-
True when this configuration produces a Flutter web app that ships
inside the Jaspr build output (the
embedmode of the arcaneJasprFlutterEmbed template).no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- hasJasprServer → bool
-
True when this configuration produces a Cloud Run service for the
Jaspr binary (SSR / hybrid). Independent of the arcane_server
template; both can be true at once.
no setter
-
hybridDynamicPrefixes
→ List<
String> -
URL prefixes that route to the Jaspr Cloud Run service instead of
to static hosting. Only meaningful in hybrid mode. Defaults to
['/api', '/auth']so the user has a sensible non-empty starting point; the firebase.json generator emits arun:<service>rewrite for every prefix listed here.final - initializeFirestore → bool
-
Whether the orchestrator should ensure the default Firestore database
exists (create on
NOT_FOUND).final - initializeStorage → bool
-
Whether the orchestrator should ensure the default Storage bucket
exists.
final
- jasprRenderMode → JasprRenderMode
-
How the Jaspr site renders. Only meaningful when
TemplateTypeExtension.isJasprApp is true.
final
- jasprServerServiceName → String?
-
Cloud Run service name for the Jaspr server binary (SSR / hybrid).
Defaults to
<appName>-webso it never collides with the arcane_server service (<appName>-server).final - modelsPackageName → String
-
Get the app name for the models package
no setter
- orgDomain → String
-
Organization domain in reverse notation (e.g., com.example)
final
- outputDir → String
-
Output directory for created projects
final
-
platforms
→ List<
String> -
Selected platforms for Flutter app
final
- requireBlaze → bool
-
Whether the orchestrator should hard-require a Blaze (pay-as-you-go)
plan before attempting Cloud Run / cleanup setup. Defaults to true when
createServer or setupCloudRun is true.
final
- runnerClassName → String
-
Get the runner class name (PascalCase + Runner)
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serverClassName → String
-
Get the server class name (PascalCase + Server)
no setter
- serverPackageName → String
-
Get the app name for the server
no setter
- serviceAccountKeyPath → String?
-
Path to service account key file
final
- setupArtifactCleanup → bool
-
Whether the orchestrator should install Artifact Registry cleanup
policies for the server image. Defaults to true when setupCloudRun is
true.
final
- setupCloudRun → bool
-
Whether to setup Cloud Run for server
final
- supportsWebHosting → bool
-
Whether this configuration produces a deployable web build for either
Flutter web or any Jaspr template (static or client). Used by the
orchestrator to gate hosting / build / deploy steps.
no setter
- template → TemplateType
-
Selected template
final
- useFirebase → bool
-
Whether to enable Firebase
final
- webClassName → String
-
Get the web class name (PascalCase + Web)
no setter
- webPackageName → String
-
Get the app name for the web package (Jaspr)
no setter
Methods
-
copyWith(
{String? appName, String? orgDomain, String? baseClassName, TemplateType? template, String? outputDir, bool? createModels, bool? createServer, bool? useFirebase, String? firebaseProjectId, bool? setupCloudRun, String? serviceAccountKeyPath, List< String> ? platforms, bool? deployHostingRelease, bool? deployHostingBeta, String? firestoreRegion, bool? initializeFirestore, bool? initializeStorage, bool? enableEmailAuth, bool? enableGoogleAuth, bool? requireBlaze, bool? setupArtifactCleanup, int? artifactKeepRecent, int? artifactDeleteOlderDays, int? cloudRunKeepRevisions, JasprRenderMode? jasprRenderMode, String? jasprServerServiceName, String? embeddedFlutterMount, List<String> ? hybridDynamicPrefixes}) → SetupConfig - Create a copy with updated values
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
saveToFile(
String path) → Future< void> - Save configuration to file
-
toDisplayMap(
) → Map< String, String> - Convert to map for display
-
toString(
) → String -
A string representation of this object.
override
-
toYamlString(
) → String - Convert to YAML string for display
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
loadFromFile(
String path) → Future< SetupConfig?> - Load configuration from file