refactor(env): move Constructive runtime config ownership out of PGPM#1371
Draft
Zetazzz wants to merge 1 commit into
Draft
refactor(env): move Constructive runtime config ownership out of PGPM#1371Zetazzz wants to merge 1 commit into
Zetazzz wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR corrects the ownership boundary between the lower-level PGPM configuration packages and the upper-level Constructive GraphQL configuration packages.
@pgpmjs/typesto@constructive-io/graphql-types.getNodeEnv()from@pgpmjs/envto@constructive-io/graphql-env.ConstructiveOptionsas the aggregate configuration model on top ofPgpmOptions.Why
@pgpmjs/envand@pgpmjs/typesshould describe PostgreSQL and the PGPM toolchain rather than application-runtime concerns. Server, storage, jobs, and SMTP settings belong to the upper Constructive configuration layer.This reduces PGPM coupling while preserving one complete configuration entry point for Constructive applications.
Behavior and API impact
getPgpmEnvOptions()returns only PGPM-owned configuration.getEnvOptionsremains the exact alias ofgetPgpmEnvOptionsin@pgpmjs/env.getConstructiveEnvOptions()continues to return both PGPM and Constructive runtime configuration.getEnvOptionsremains the exact alias ofgetConstructiveEnvOptionsin@constructive-io/graphql-env.@constructive-io/graphql-types.Validation
Updated tests cover:
Affected PGPM, GraphQL, jobs, SMTP, storage, explorer, and GraphQL server packages build successfully. PGPM env, GraphQL env, SMTP, and GraphQL server test suites pass, along with frozen-lockfile and diff checks.
Out of scope
This PR does not include the generic parser follow-up. It does not extract or centralize the permissive boolean, number, or string-array helpers into
12factor-env/parsers.It also does not consolidate environment variables owned by Mailgun providers, individual functions, Knative runtimes, LLM integrations, observability, CAPTCHA, Graphile runtime helpers, or test harnesses.