@coreframe/config 0.1.16 → 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.
Files changed (2) hide show
  1. package/dist/index.d.ts +31 -2
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -163,8 +163,37 @@ type DeploySmokeCheck = {
163
163
  url?: string; /** HTTP status code or codes that count as a successful check. */
164
164
  expectedStatus?: "2xx" | number | number[];
165
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
+ };
166
188
  type DeployEnvironmentConfig = {
167
- /** Public application URL for the deployment environment. */url?: string;
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;
168
197
  };
169
198
  type StagingHostnameConfig = {
170
199
  /** Prefix added to generated staging DNS labels. */managedLabelPrefix: string; /** Parent hostname under which staging hostnames are generated. */
@@ -220,4 +249,4 @@ declare function readProjectConfig({
220
249
  declare function importProjectModule<T>(path: string, cwd?: string): Promise<T>;
221
250
  declare function importProjectDependency<T>(specifier: string, cwd?: string): Promise<T>;
222
251
  //#endregion
223
- 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coreframe/config",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "description": "Environment and project configuration utilities for Coreframe apps",
5
5
  "repository": {
6
6
  "type": "git",