@coreframe/config 0.1.15 → 0.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +39 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -53,7 +53,14 @@ type DashboardConfig = {
|
|
|
53
53
|
};
|
|
54
54
|
type DatabaseDialect = "postgres" | "sqlite";
|
|
55
55
|
type DatabaseConfig = {
|
|
56
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* Cloudflare D1 binding that owns deployment migrations for a native D1-backed SQLite
|
|
58
|
+
* project. When omitted, Coreframe detects the binding from `wrangler.jsonc` migration
|
|
59
|
+
* metadata in the deploy environment. Set to `false` when the deployment database uses a
|
|
60
|
+
* connection URL even though the Worker declares unrelated D1 bindings.
|
|
61
|
+
*/
|
|
62
|
+
d1Binding?: string | false; /** Database engine used by project workflows. */
|
|
63
|
+
dialect: DatabaseDialect; /** Project-relative module that seeds the database. */
|
|
57
64
|
seed?: string;
|
|
58
65
|
};
|
|
59
66
|
type JobsConfig = {
|
|
@@ -156,8 +163,37 @@ type DeploySmokeCheck = {
|
|
|
156
163
|
url?: string; /** HTTP status code or codes that count as a successful check. */
|
|
157
164
|
expectedStatus?: "2xx" | number | number[];
|
|
158
165
|
};
|
|
166
|
+
/** Inputs passed only to the application-owned reviewer deployment entrypoint. Never log them. */
|
|
167
|
+
type ReviewerDeployContext = DeployContext & {
|
|
168
|
+
/** Deployment database dialect; no local database lifecycle is started. */dialect: DatabaseDialect; /** Environment-scoped database credentials, without ambient/local fallbacks. */
|
|
169
|
+
env: NodeJS.ProcessEnv; /** Dedicated reviewer email, normalized to lowercase. */
|
|
170
|
+
email: string; /** Better Auth password hash used for creation and consistency checks; never overwritten. */
|
|
171
|
+
passwordHash: string; /** Password used only for normal HTTPS sign-in verification. */
|
|
172
|
+
password: string;
|
|
173
|
+
};
|
|
174
|
+
/** Application-owned provisioning and verification, independent of local/demo seeds. */
|
|
175
|
+
type ReviewerDeployModule = {
|
|
176
|
+
/** Validate app-specific configuration before the deployment mutates external state. */validate(context: Omit<ReviewerDeployContext, "releaseName" | "version">): Promise<void> | void;
|
|
177
|
+
/**
|
|
178
|
+
* Create or check the dedicated identity and prepare isolated app data. Must preserve
|
|
179
|
+
* credentials.
|
|
180
|
+
*/
|
|
181
|
+
provision(context: ReviewerDeployContext): Promise<{
|
|
182
|
+
userId: string;
|
|
183
|
+
}>; /** Sign in through normal deployed authentication and assert application readiness. */
|
|
184
|
+
verify(context: ReviewerDeployContext, identity: {
|
|
185
|
+
userId: string;
|
|
186
|
+
}): Promise<void>;
|
|
187
|
+
};
|
|
159
188
|
type DeployEnvironmentConfig = {
|
|
160
|
-
/**
|
|
189
|
+
/**
|
|
190
|
+
* Explicitly enable required reviewer provisioning for this environment. Omit to leave it
|
|
191
|
+
* untouched.
|
|
192
|
+
*/
|
|
193
|
+
reviewer?: {
|
|
194
|
+
/** Project-relative module exporting validate, provision, and verify functions. */entrypoint: string;
|
|
195
|
+
}; /** Public application URL for the deployment environment. */
|
|
196
|
+
url?: string;
|
|
161
197
|
};
|
|
162
198
|
type StagingHostnameConfig = {
|
|
163
199
|
/** Prefix added to generated staging DNS labels. */managedLabelPrefix: string; /** Parent hostname under which staging hostnames are generated. */
|
|
@@ -213,4 +249,4 @@ declare function readProjectConfig({
|
|
|
213
249
|
declare function importProjectModule<T>(path: string, cwd?: string): Promise<T>;
|
|
214
250
|
declare function importProjectDependency<T>(specifier: string, cwd?: string): Promise<T>;
|
|
215
251
|
//#endregion
|
|
216
|
-
export { AssetsConfig, BreakpointsConfig, CoreframeConfig, DashboardConfig, DatabaseConfig, DatabaseDialect, DeployConfig, DeployContext, DeployEnvironment, DeployEnvironmentConfig, DeployMode, DeploySmokeCheck, DevConfig, DevPlatform, FlutterConfig, FlutterDeepLinkConfig, I18nConfig, JobsConfig, JsonObject, JsonValue, PreviewAccessBypassConfig, PreviewAccessConfig, PreviewAccessIpContext, PreviewAccessIpResolver, PreviewConfig, PreviewTunnelConfig, PreviewWorkerConfig, PrimaryWorkerContributions, PrimaryWorkerEnvironment, StagingHostnameConfig, WorkerConfig, WorkerDeployEnvironment, WorkerEnvironmentDeclaration, WorkerEnvironmentKind, WorkerEnvironmentVariableConfig, WranglerConfig, breakpointNames, coreframeGeneratedWorkerVariables, coreframeLocalWorkerVariables, coreframeManagedWorkerSecrets, defineConfig, derivePrimaryWorkerConfig, importProjectDependency, importProjectModule, normalizeWorkerEnvironment, primaryWorkerConfigPath, primaryWorkerEnvironments, readProjectBreakpoints, readProjectConfig, validateBreakpoints, validateWorkerInventoryOwnership, workerBindingNames, wranglerEnvironmentNames };
|
|
252
|
+
export { AssetsConfig, BreakpointsConfig, CoreframeConfig, DashboardConfig, DatabaseConfig, DatabaseDialect, DeployConfig, DeployContext, DeployEnvironment, DeployEnvironmentConfig, DeployMode, DeploySmokeCheck, DevConfig, DevPlatform, FlutterConfig, FlutterDeepLinkConfig, I18nConfig, JobsConfig, JsonObject, JsonValue, PreviewAccessBypassConfig, PreviewAccessConfig, PreviewAccessIpContext, PreviewAccessIpResolver, PreviewConfig, PreviewTunnelConfig, PreviewWorkerConfig, PrimaryWorkerContributions, PrimaryWorkerEnvironment, ReviewerDeployContext, ReviewerDeployModule, StagingHostnameConfig, WorkerConfig, WorkerDeployEnvironment, WorkerEnvironmentDeclaration, WorkerEnvironmentKind, WorkerEnvironmentVariableConfig, WranglerConfig, breakpointNames, coreframeGeneratedWorkerVariables, coreframeLocalWorkerVariables, coreframeManagedWorkerSecrets, defineConfig, derivePrimaryWorkerConfig, importProjectDependency, importProjectModule, normalizeWorkerEnvironment, primaryWorkerConfigPath, primaryWorkerEnvironments, readProjectBreakpoints, readProjectConfig, validateBreakpoints, validateWorkerInventoryOwnership, workerBindingNames, wranglerEnvironmentNames };
|