declapract-typescript-ehmpathy 0.49.14 → 0.50.0
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/.test/assets/cicd-common/declarations/declapract.declare.yml +8 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/.declapract.integration.test.ts +597 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/.test/assets/repo-with-unpinned-workflow/.github/workflows/.test.yml +19 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/.test/assets/repo-with-unpinned-workflow/.github/workflows/consumer-owned.yml +21 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/.test/assets/repo-with-unpinned-workflow/.github/workflows/review.yml +26 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/.test/assets/repo-with-unpinned-workflow/declapract.use.yml +6 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/.test/assets/repo-with-unpinned-workflow/package.json +4 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/__snapshots__/.declapract.integration.test.ts.snap +604 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/__snapshots__/declastruct-insync-grep.declapract.integration.test.ts.snap +3 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/__snapshots__/report-slow-tests.play.declapract.integration.test.ts.snap +28 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/bad-practices/has-changelog-file/changelog.md.declapract.ts +11 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/bad-practices/old-names/.github/workflows/ci-on-commit.yml.declapract.ts +3 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/bad-practices/old-names/.github/workflows/ci_on_commit.yml.declapract.ts +3 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/bad-practices/old-names/.github/workflows/pr-release-on-main.yml.declapract.ts +3 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/bad-practices/old-names/.github/workflows/test-on-commit.yml.declapract.ts +3 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/bad-practices/old-names/.github/workflows/test_on_commit.yml.declapract.ts +3 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/bad-practices/old-use-apikeys/.agent/repo=.this/role=any/skills/use.apikeys.json.declapract.ts +7 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/bad-practices/old-use-apikeys/.agent/repo=.this/role=any/skills/use.apikeys.sh.declapract.ts +7 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/best-practice/.declapract.readme.md +8 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/best-practice/.github/actions/please-release/action.yml +469 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/best-practice/.github/actions/test-shards-setup/action.yml +68 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/best-practice/.github/workflows/.declastruct.yml +218 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/best-practice/.github/workflows/.install.yml +56 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/best-practice/.github/workflows/.test.yml +434 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/best-practice/.github/workflows/.test.yml.declapract.ts +26 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/best-practice/.github/workflows/release.yml +32 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/best-practice/.github/workflows/report-slow-tests.sh +65 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/best-practice/.github/workflows/review.yml +26 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/best-practice/.github/workflows/test.yml +25 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/best-practice/.github/workflows/test.yml.declapract.ts +15 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/declastruct-insync-grep.declapract.integration.test.ts +49 -0
- package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/report-slow-tests.play.declapract.integration.test.ts +161 -0
- package/dist/.test/assets/cicd-common/declarations/useCases.yml +11 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/.test/assets/repo-with-hand-patch/declapract.use.yml +4 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/.test/assets/repo-with-hand-patch/package.json +17 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/.test/assets/repo-with-hand-patch/patches/left-pad@1.3.0.patch +6 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/.test/assets/repo-with-hand-patch/patches/pg-pool@3.14.0.patch +12 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/__snapshots__/pg-pool-patch.declapract.integration.test.ts.snap +147 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/.declapract.readme.md +29 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/.gitattributes.declapract.ts +64 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/package.json +5 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/patches/pg-pool.patch +21 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/pg-pool-patch.declapract.integration.test.ts +884 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/.declapract.integration.test.ts +15 -21
- package/dist/.test/assets/expo-fullusecase/declarations/practices/git/.declapract.integration.test.ts +2 -2
- package/dist/.test/assets/expo-fullusecase/declarations/practices/git/.gitattributes.declapract.integration.test.ts +34 -19
- package/dist/.test/assets/expo-fullusecase/declarations/practices/git/.test/assets/repo-with-legacy-gitattributes/declapract.use.yml +3 -3
- package/dist/.test/assets/expo-fullusecase/declarations/practices/git/__snapshots__/.gitattributes.declapract.integration.test.ts.snap +4 -4
- package/dist/.test/assets/expo-fullusecase/declarations/practices/git/best-practice/.declapract.readme.md +37 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/git/best-practice/.gitattributes.declapract.ts +42 -63
- package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/.test/assets/repo-stale-patch-beside-bare/declapract.use.yml +4 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/.test/assets/repo-stale-patch-beside-bare/package.json +15 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/.test/assets/repo-stale-patch-beside-bare/patches/rhachet-roles-ehmpathy.patch +6 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/.test/assets/repo-stale-patch-beside-bare/patches/rhachet-roles-ehmpathy@1.39.1.patch +6 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/.test/assets/repo-stale-patch-beside-bare/patches/type-fns@1.21.3.patch +6 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/.test/assets/repo-stale-patch-beside-bare/pnpm-lock.yaml +19 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/__snapshots__/stale-patched-dependency.declapract.integration.test.ts.snap +39 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/stale-patched-dependency.declapract.integration.test.ts +53 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/best-practice/.declapract.readme.md +8 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/best-practice/.gitattributes.declapract.ts +65 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-any/best-practice/.declapract.readme.md +7 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-any/best-practice/.gitattributes.declapract.ts +60 -0
- package/dist/.test/assets/expo-migration/declarations/practices/git/.declapract.integration.test.ts +2 -2
- package/dist/.test/assets/expo-migration/declarations/practices/git/.gitattributes.declapract.integration.test.ts +34 -19
- package/dist/.test/assets/expo-migration/declarations/practices/git/.test/assets/repo-with-legacy-gitattributes/declapract.use.yml +3 -3
- package/dist/.test/assets/expo-migration/declarations/practices/git/__snapshots__/.gitattributes.declapract.integration.test.ts.snap +4 -4
- package/dist/.test/assets/expo-migration/declarations/practices/git/best-practice/.declapract.readme.md +37 -0
- package/dist/.test/assets/expo-migration/declarations/practices/git/best-practice/.gitattributes.declapract.ts +42 -63
- package/dist/.test/assets/expo-migration/declarations/practices/pnpm/.test/assets/repo-stale-patch-beside-bare/declapract.use.yml +4 -0
- package/dist/.test/assets/expo-migration/declarations/practices/pnpm/.test/assets/repo-stale-patch-beside-bare/package.json +15 -0
- package/dist/.test/assets/expo-migration/declarations/practices/pnpm/.test/assets/repo-stale-patch-beside-bare/patches/rhachet-roles-ehmpathy.patch +6 -0
- package/dist/.test/assets/expo-migration/declarations/practices/pnpm/.test/assets/repo-stale-patch-beside-bare/patches/rhachet-roles-ehmpathy@1.39.1.patch +6 -0
- package/dist/.test/assets/expo-migration/declarations/practices/pnpm/.test/assets/repo-stale-patch-beside-bare/patches/type-fns@1.21.3.patch +6 -0
- package/dist/.test/assets/expo-migration/declarations/practices/pnpm/.test/assets/repo-stale-patch-beside-bare/pnpm-lock.yaml +19 -0
- package/dist/.test/assets/expo-migration/declarations/practices/pnpm/__snapshots__/stale-patched-dependency.declapract.integration.test.ts.snap +39 -0
- package/dist/.test/assets/expo-migration/declarations/practices/pnpm/stale-patched-dependency.declapract.integration.test.ts +53 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/best-practice/.declapract.readme.md +8 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/best-practice/.gitattributes.declapract.ts +65 -0
- package/dist/.test/assets/expo-migration/declarations/practices/tests-any/best-practice/.declapract.readme.md +7 -0
- package/dist/.test/assets/expo-migration/declarations/practices/tests-any/best-practice/.gitattributes.declapract.ts +60 -0
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-any/best-practice/.declapract.readme.md +7 -0
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-any/best-practice/.gitattributes.declapract.ts +60 -0
- package/dist/.test/assets/git/declarations/declapract.declare.yml +8 -0
- package/dist/.test/assets/git/declarations/practices/git/.declapract.integration.test.ts +1001 -0
- package/dist/.test/assets/git/declarations/practices/git/.gitattributes.declapract.integration.test.ts +120 -0
- package/dist/.test/assets/git/declarations/practices/git/.test/assets/repo-with-legacy-gitattributes/.gitattributes +6 -0
- package/dist/.test/assets/git/declarations/practices/git/.test/assets/repo-with-legacy-gitattributes/declapract.use.yml +7 -0
- package/dist/.test/assets/git/declarations/practices/git/.test/assets/repo-with-legacy-gitattributes/package.json +4 -0
- package/dist/.test/assets/git/declarations/practices/git/.test/assets/repo-with-rhachet-only/declapract.use.yml +6 -0
- package/dist/.test/assets/git/declarations/practices/git/.test/assets/repo-with-rhachet-only/package.json +4 -0
- package/dist/.test/assets/git/declarations/practices/git/.test/assets/repo-without-cache-ignores/declapract.use.yml +9 -0
- package/dist/.test/assets/git/declarations/practices/git/.test/assets/repo-without-cache-ignores/package.json +4 -0
- package/dist/.test/assets/git/declarations/practices/git/__snapshots__/.declapract.integration.test.ts.snap +55 -0
- package/dist/.test/assets/git/declarations/practices/git/__snapshots__/.gitattributes.declapract.integration.test.ts.snap +24 -0
- package/dist/.test/assets/git/declarations/practices/git/best-practice/.declapract.readme.md +60 -0
- package/dist/.test/assets/git/declarations/practices/git/best-practice/.gitattributes.declapract.ts +77 -0
- package/dist/.test/assets/git/declarations/practices/git/best-practice/.gitignore.declapract.ts +100 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-dynamodb/.declapract.integration.test.ts +181 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-dynamodb/.test/assets/demo-repo-with-dynamodb/declapract.declare.yml +4 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-dynamodb/.test/assets/demo-repo-with-dynamodb/declapract.use.yml +11 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-dynamodb/.test/assets/demo-repo-with-dynamodb/package.json +1 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-dynamodb/.test/assets/demo-repo-with-dynamodb/useCases.yml +8 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-dynamodb/__snapshots__/.declapract.integration.test.ts.snap +234 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-dynamodb/best-practice/.gitattributes.declapract.ts +56 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-dynamodb/best-practice/codegen.dynamodb.dao.ts +16 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-dynamodb/best-practice/package.json +16 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-dynamodb/best-practice/package.json.declapract.ts +3 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-dynamodb/best-practice/provision/docker/integration-test-db/docker-compose.yml +9 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/.declapract.integration.test.ts +237 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/.extensions.sql.declapract.integration.test.ts +159 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-config-schema/declapract.use.yml +20 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-config-schema/declarations/declapract.declare.yml +6 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-config-schema/package.json +4 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-on-a-prior-major/codegen.sql.dao.yml +20 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-on-a-prior-major/declapract.declare.yml +4 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-on-a-prior-major/declapract.use.yml +19 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-on-a-prior-major/package.json +4 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-on-a-prior-major/provision/docker/testdb/build-image.dockerfile +6 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-with-custom-extensions/declapract.declare.yml +4 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-with-custom-extensions/declapract.use.yml +21 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-with-custom-extensions/package.json +4 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-with-custom-extensions/provision/schema/sql/init/.extensions.sql +9 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/config/dev.json +18 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/declapract.declare.yml +4 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/declapract.use.yml +18 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/package.json +4 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/repo-with-hand-patch/declapract.use.yml +4 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/repo-with-hand-patch/package.json +17 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/repo-with-hand-patch/patches/left-pad@1.3.0.patch +6 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/repo-with-hand-patch/patches/pg-pool@3.14.0.patch +12 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/__snapshots__/.declapract.integration.test.ts.snap +45 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/__snapshots__/.extensions.sql.declapract.integration.test.ts.snap +77 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/__snapshots__/config-validates-schema.declapract.integration.test.ts.snap +500 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/__snapshots__/database-wrappers-typecheck.declapract.integration.test.ts.snap +10 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/__snapshots__/deploy-database-gerunds.declapract.integration.test.ts.snap +102 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/__snapshots__/engine-upgrade.declapract.integration.test.ts.snap +151 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/__snapshots__/pg-pool-patch.declapract.integration.test.ts.snap +147 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/__snapshots__/provision-testdb-access.declapract.integration.test.ts.snap +3 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/__snapshots__/ssm-param-names.declapract.integration.test.ts.snap +9 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/__snapshots__/testdb-preflight-failloud.declapract.integration.test.ts.snap +30 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/__snapshots__/with-connection-in-input.declapract.integration.test.ts.snap +57 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/legacy-change-id/.declapract.integration.test.ts +71 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/legacy-change-id/.declapract.readme.md +6 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/legacy-change-id/.test/assets/demo-repo-with-legacy-change-id/declapract.declare.yml +4 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/legacy-change-id/.test/assets/demo-repo-with-legacy-change-id/declapract.use.yml +19 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/legacy-change-id/.test/assets/demo-repo-with-legacy-change-id/package.json +4 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/legacy-change-id/.test/assets/demo-repo-with-legacy-change-id/provision/schema/sql/init.yml +15 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/legacy-change-id/__snapshots__/.declapract.integration.test.ts.snap +39 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/legacy-change-id/provision/schema/<star><star>/<star>.yml.declapract.ts +68 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/non-prefixed-manual-init-sqls/.declapract.readme.md +5 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/non-prefixed-manual-init-sqls/provision/schema/sql/init/database.sql.declapract.ts +3 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/non-prefixed-manual-init-sqls/provision/schema/sql/init/extensions.sql.declapract.ts +13 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/non-prefixed-manual-init-sqls/provision/schema/sql/init/schema.sql.declapract.ts +3 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/non-prefixed-manual-init-sqls/provision/schema/sql/init/user.cicd.sql.declapract.ts +3 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/non-prefixed-manual-init-sqls/provision/schema/sql/init/user.datalakedb.sql.declapract.ts +3 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-config-file-names/codegen.sql.yml.declapract.ts +3 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-dev-config-location/config/dev.json.declapract.ts +23 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.declapract.integration.test.ts +221 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.declapract.readme.md +11 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/demo-repo-with-old-get-database-connection/declapract.declare.yml +4 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/demo-repo-with-old-get-database-connection/declapract.use.yml +19 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/demo-repo-with-old-get-database-connection/package.json +4 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/demo-repo-with-old-get-database-connection/src/access/daos/daoSurfer.ts +15 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/demo-repo-with-old-get-database-connection/src/domain.operations/getSurfLesson.ts +14 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/demo-repo-with-old-get-database-connection/src/utils/database/getDatabaseConnection.integration.test.ts +10 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/demo-repo-with-old-get-database-connection/src/utils/database/getDatabaseConnection.ts +68 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/old-templates/getDatabaseConnection.3a193e5.ts +65 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/old-templates/getDatabaseConnection.66284e3.ts +30 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/old-templates/getDatabaseConnection.68cf8ba.ts +90 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/old-templates/getDatabaseConnection.9e1bdc4.ts +65 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/old-templates/getDatabaseConnection.c6cef7e.ts +68 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/old-templates/getDatabaseConnection.c8eb35b.ts +90 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/old-templates/getDatabaseConnection.d1e8cd7.ts +31 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/old-templates/getDatabaseConnection.e0c53d8.ts +90 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/old-templates/getDatabaseConnection.eab15c0.ts +89 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/old-templates/getDatabaseConnection.ef25ae0.ts +32 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/old-templates/getDatabaseConnection.integration.test.66284e3.ts +10 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/__snapshots__/.declapract.integration.test.ts.snap +75 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/src/<star><star>/<star>.ts.declapract.ts +33 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/src/utils/database/getDatabaseConnection.integration.test.ts.declapract.ts +43 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/src/utils/database/getDatabaseConnection.ts.declapract.ts +51 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-dir/.declapract.readme.md +1 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-dir/provision/docker/integration_test_db/<star><star>/<star>.declapract.ts +15 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-hyphen-dir/.declapract.readme.md +1 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-hyphen-dir/provision/docker/integration-test-db/<star><star>/<star>.declapract.ts +15 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-paths/.declapract.readme.md +1 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-paths/package.json +8 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-paths/package.json.declapract.ts +10 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-packagejson-script-names/package.json +9 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-packagejson-script-names/package.json.declapract.ts +22 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-param-placeholder/config/<star>.json.declapract.ts +14 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/pg-client-without-ssl/.declapract.integration.test.ts +86 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/pg-client-without-ssl/.declapract.readme.md +9 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/pg-client-without-ssl/.test/assets/demo-repo-with-plaintext-pg-client/declapract.declare.yml +4 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/pg-client-without-ssl/.test/assets/demo-repo-with-plaintext-pg-client/declapract.use.yml +19 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/pg-client-without-ssl/.test/assets/demo-repo-with-plaintext-pg-client/package.json +4 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/pg-client-without-ssl/.test/assets/demo-repo-with-plaintext-pg-client/src/access/sdks/sdkWaveArchive.ts +7 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/pg-client-without-ssl/.test/assets/demo-repo-with-plaintext-pg-client/src/utils/database/getSurfReportConnection.ts +19 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/pg-client-without-ssl/__snapshots__/.declapract.integration.test.ts.snap +72 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/pg-client-without-ssl/src/<star><star>/<star>.ts.declapract.ts +32 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/schema-entities-dir/.declapract.readme.md +1 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/schema-entities-dir/provision/schema/entities/<star>.ts.declapract.ts +12 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/schema-entities-dir/provision/schema/sql/entities.yml.declapract.ts +13 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/terraform-parameters/.declapract.integration.test.ts +95 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/terraform-parameters/.test/assets/demo-repo-with-terraform-ssm/declapract.declare.yml +4 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/terraform-parameters/.test/assets/demo-repo-with-terraform-ssm/declapract.use.yml +18 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/terraform-parameters/.test/assets/demo-repo-with-terraform-ssm/package.json +4 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/terraform-parameters/.test/assets/demo-repo-with-terraform-ssm/provision/aws/product/parameter-store.tf +32 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/terraform-parameters/__snapshots__/.declapract.integration.test.ts.snap +60 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/terraform-parameters/provision/aws/product/parameter-store.tf.declapract.ts +94 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/with-connection-in-input/.declapract.readme.md +10 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/with-connection-in-input/.test/assets/demo-repo-with-connection-in-input/declapract.use.yml +2 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/with-connection-in-input/.test/assets/demo-repo-with-connection-in-input/package.json +4 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/with-connection-in-input/.test/assets/demo-repo-with-connection-in-input/src/domain.operations/findSurferById.ts +9 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/with-connection-in-input/.test/assets/demo-repo-with-connection-in-input/src/utils/database/withDatabaseConnection.ts +10 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/with-connection-in-input/src/<star><star>/<star>.ts.declapract.ts +55 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/.declapract.readme.md +114 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/.gitattributes.declapract.ts +64 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/codegen.sql.dao.yml +18 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/codegen.sql.dao.yml.declapract.ts +35 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/codegen.sql.schema.yml +6 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/codegen.sql.types.yml +16 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/config/prep.json +40 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/config/prep.json.declapract.ts +11 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/config/prod.json +40 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/config/prod.json.declapract.ts +11 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/config/test.json +37 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/config/test.json.declapract.ts +11 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/package.json +36 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/package.json.declapract.ts +3 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/patches/pg-pool.patch +21 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/aws/readme.md +113 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/aws/resources.parameters.ts +60 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/aws/resources.ts +30 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/build-image.dockerfile +7 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/build-image.dockerfile.declapract.ts +37 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/check-engine-skew.integration.test.ts +115 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/check-engine-skew.sh +165 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/compose.sh +43 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/docker-compose.yml +19 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/init/.gitignore +3 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/init/readme.md +3 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/wait-for-postgres.sh +25 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/schema/connection.config.js +36 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/schema/control.yml +7 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/schema/deploy.database.sh +97 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.database.sql +10 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.extensions.sql +16 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.extensions.sql.declapract.ts +46 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.schema.sql +11 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.user.cicd.sql +14 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.user.datalakedb.sql +12 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/default_transaction_isolation.sql +6 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/user.service.sql +16 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init.yml +9 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init.yml.declapract.ts +3 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/src/.test/assets/database/getTestdbIdentity.ts +52 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/src/.test/assets/database/getTestdbPort.ts +17 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/src/utils/config/config.schema.ts +77 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/src/utils/database/asDatabaseClientSsl.test.ts +82 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/src/utils/database/asDatabaseClientSsl.ts +52 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/src/utils/database/databaseClientTimeouts.ts +14 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/src/utils/database/getOneDatabaseConnection.integration.test.ts +10 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/src/utils/database/getOneDatabaseConnection.ts +119 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/src/utils/database/getOneDatabasePort.ts +30 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/src/utils/database/rdsCaBundleUsEast1.test.ts +51 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/src/utils/database/rdsCaBundleUsEast1.ts +86 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/src/utils/database/withDatabaseContext.ts +54 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/src/utils/database/withDatabaseTransaction.ts +35 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/config-validates-schema.declapract.integration.test.ts +332 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/database-client.declapract.integration.test.ts +291 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/database-wrappers-typecheck.declapract.integration.test.ts +225 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/deploy-database-gerunds.declapract.integration.test.ts +57 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/empty-template-declares-zero-clusters.declapract.integration.test.ts +71 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/engine-upgrade.declapract.integration.test.ts +243 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/pg-pool-patch.declapract.integration.test.ts +884 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/provision-testdb-access.declapract.integration.test.ts +50 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/ssm-param-names.declapract.integration.test.ts +154 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/testdb-per-worktree.declapract.integration.test.ts +332 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/testdb-preflight-failloud.declapract.integration.test.ts +83 -0
- package/dist/.test/assets/git/declarations/practices/persist-with-rds/with-connection-in-input.declapract.integration.test.ts +97 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/.declapract.integration.test.ts +98 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/.agent/repo=.this/role=any/boot.yml +9 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/declapract.declare.yml +4 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/declapract.use.yml +2 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/package.json +4 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/.test/assets/repo-keyrack-extant/.agent/keyrack.yml +9 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/.test/assets/repo-keyrack-extant/declapract.use.node.yml +4 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/.test/assets/repo-keyrack-extant/declapract.use.yml +4 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/.test/assets/repo-keyrack-extant/package.json +4 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/.test/assets/repo-self-linked/declapract.use.yml +4 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/.test/assets/repo-self-linked/package.json +22 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/__snapshots__/.declapract.integration.test.ts.snap +46 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/__snapshots__/boot-refs-glossary.declapract.integration.test.ts.snap +6 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/__snapshots__/boot-yml-findsert.declapract.integration.test.ts.snap +33 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/__snapshots__/keyrack-yml-findsert.declapract.integration.test.ts.snap +28 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/__snapshots__/self-link-build-order.declapract.integration.test.ts.snap +81 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/bad-practices/deprecated-use-file/.declapract.readme.md +11 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/bad-practices/deprecated-use-file/rhachet.use.ts.declapract.ts +12 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/bad-practices/prod-deps/.declapract.readme.md +59 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/bad-practices/prod-deps/.test/assets/demo-repo-with-rhachet-prod-deps/declapract.declare.yml +4 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/bad-practices/prod-deps/.test/assets/demo-repo-with-rhachet-prod-deps/declapract.use.yml +2 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/bad-practices/prod-deps/.test/assets/demo-repo-with-rhachet-prod-deps/package.json +12 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/bad-practices/prod-deps/package.json +5 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/bad-practices/prod-deps/package.json.declapract.ts +88 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/bad-practices/review-peer-artifacts/.behavior/<star><star>/.reviews/<star><star>/<star>peer-review<star>.md.declapract.ts +16 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/bad-practices/review-peer-artifacts/.behavior/<star><star>/.reviews/peer/<star><star>/<star>.md.declapract.ts +16 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/bad-practices/review-peer-artifacts/.declapract.readme.md +12 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/best-practice/.agent/keyrack.yml.declapract.ts +143 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/best-practice/.agent/repo=.this/role=any/boot.yml +22 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/best-practice/.agent/repo=.this/role=any/boot.yml.declapract.ts +189 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/best-practice/.declapract.readme.md +40 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/best-practice/.gitattributes.declapract.ts +65 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/best-practice/.gitignore.declapract.ts +94 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/best-practice/package.json +19 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/best-practice/package.json.declapract.ts +51 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/boot-refs-glossary.declapract.integration.test.ts +91 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/boot-yml-findsert.declapract.integration.test.ts +149 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/keyrack-yml-findsert.declapract.integration.test.ts +105 -0
- package/dist/.test/assets/git/declarations/practices/rhachet/self-link-build-order.declapract.integration.test.ts +88 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/.test/assets/repo-old-acceptance-utils/blackbox/lambdas/consumeSESEmailEventFromSNS.acceptance.test.ts +23 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/.test/assets/repo-old-acceptance-utils/declapract.use.yml +9 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/.test/assets/repo-old-acceptance-utils/package.json +4 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/.test/assets/repo-old-acceptance-utils-2/blackbox/lambdas/addDecoratedImage.acceptance.test.ts +19 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/.test/assets/repo-old-acceptance-utils-2/declapract.use.yml +9 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/.test/assets/repo-old-acceptance-utils-2/package.json +4 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/.test/assets/repo-old-acceptance-utils-3/blackbox/lambdas/addDecoratedImage.acceptance.test.ts +19 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/.test/assets/repo-old-acceptance-utils-3/declapract.use.yml +9 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/.test/assets/repo-old-acceptance-utils-3/package.json +4 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/__snapshots__/changedsince-origin-main.declapract.integration.test.ts.snap +8 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/__snapshots__/livedb-wake-branches.declapract.integration.test.ts.snap +6 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/__snapshots__/old-acceptance-test-utils.declapract.integration.test.ts.snap +162 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/__snapshots__/test-kind-seam.declapract.integration.test.ts.snap +9 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/autoprune-hooks.declapract.integration.test.ts +111 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/dev-tool-in-dependencies/.declapract.integration.test.ts +69 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/dev-tool-in-dependencies/.declapract.readme.md +19 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/dev-tool-in-dependencies/.test/assets/demo-repo-with-stale-test-fns-dep/declapract.use.yml +3 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/dev-tool-in-dependencies/.test/assets/demo-repo-with-stale-test-fns-dep/package.json +11 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/dev-tool-in-dependencies/__snapshots__/.declapract.integration.test.ts.snap +43 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/dev-tool-in-dependencies/package.json.declapract.ts +81 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/javascript-config-files/.declapract.readme.md +1 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/javascript-config-files/jest.<star>.js.declapract.ts +17 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/mocks/.declapract.readme.md +8 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/mocks/<star><star>/__mock__/<star>.js +3 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/mocks/<star><star>/__mock__/<star>.ts +3 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-dir-location/.declapract.integration.test.ts +83 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-dir-location/.declapract.readme.md +22 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-dir-location/.test/assets/demo-repo-with-accept-blackbox-dir/accept.blackbox/.test/assets/.agent/config.yml +1 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-dir-location/.test/assets/demo-repo-with-accept-blackbox-dir/accept.blackbox/.test/assets/.rhachet/manifest.json +1 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-dir-location/.test/assets/demo-repo-with-accept-blackbox-dir/accept.blackbox/somefile.ts +1 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-dir-location/.test/assets/demo-repo-with-accept-blackbox-dir/declapract.use.yml +6 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-dir-location/.test/assets/demo-repo-with-accept-blackbox-dir/package.json +4 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-dir-location/accept.blackbox/<star><star>/<star>.declapract.ts +19 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-dir-location/acceptance/<star><star>/<star>.declapract.ts +19 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-import-paths/.declapract.readme.md +31 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-import-paths/<star><star>/<star>.ts.declapract.ts +25 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-test-utils/blackbox/_utils/getDataFromLastOpenBracketAtStartOfLine.ts.declapract.ts +3 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-test-utils/blackbox/_utils/invokeLambda.ts.declapract.ts +3 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-test-utils/blackbox/lambdas/<star>.ts.declapract.ts +49 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-test-utils-2/blackbox/lambdas/<star>.ts.declapract.ts +27 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-test-utils-3/blackbox/_utils/environment.ts.declapract.ts +3 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-test-utils-3/blackbox/lambdas/<star>.ts.declapract.ts +23 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-extension-pattern/.declapract.readme.md +3 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-extension-pattern/<star><star>/<star>.test.acceptance.ts.declapract.ts +11 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-extension-pattern/<star><star>/<star>.test.integration.ts.declapract.ts +11 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-test-utils-and-assets-location/.declapract.readme.md +8 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-test-utils-and-assets-location/<star><star>/<star>.ts.declapract.ts +27 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-test-utils-and-assets-location/<star><star>/__test_assets__/<star><star>/<star>.declapract.ts +17 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-test-utils-and-assets-location/<star><star>/__test_utils__/<star><star>/<star>.declapract.ts +17 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/best-practice/.declapract.readme.md +52 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/best-practice/.declapract.todo.md +3 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/best-practice/.gitattributes.declapract.ts +60 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/best-practice/package.json +18 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/best-practice/package.json.declapract.ts +3 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/best-practice/src/.test/useWakeOfLivedb.ts +209 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/best-practice/src/<star><star>/<star>.integration.test.ts.declapract.ts +8 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/best-practice/src/<star><star>/<star>.test.ts.declapract.ts +7 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/build-ifstale.declapract.integration.test.ts +124 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/changedsince-origin-main.declapract.integration.test.ts +58 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/livedb-wake-branches.declapract.integration.test.ts +315 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/old-acceptance-test-utils.declapract.integration.test.ts +122 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/package.json.shell-flags.declapract.integration.test.ts +139 -0
- package/dist/.test/assets/git/declarations/practices/tests-any/test-kind-seam.declapract.integration.test.ts +87 -0
- package/dist/.test/assets/git/declarations/useCases.yml +29 -0
- package/dist/.test/assets/{expo-fullusecase/declarations/practices/git/best-practice → git/repo-with-all-gitattributes-declarers}/.gitattributes +3 -0
- package/dist/.test/assets/git/repo-with-all-gitattributes-declarers/declapract.use.yml +26 -0
- package/dist/.test/assets/git/repo-with-all-gitattributes-declarers/package.json +4 -0
- package/dist/.test/assets/pnpm/declarations/practices/pnpm/.test/assets/repo-stale-patch-beside-bare/declapract.use.yml +4 -0
- package/dist/.test/assets/pnpm/declarations/practices/pnpm/.test/assets/repo-stale-patch-beside-bare/package.json +15 -0
- package/dist/.test/assets/pnpm/declarations/practices/pnpm/.test/assets/repo-stale-patch-beside-bare/patches/rhachet-roles-ehmpathy.patch +6 -0
- package/dist/.test/assets/pnpm/declarations/practices/pnpm/.test/assets/repo-stale-patch-beside-bare/patches/rhachet-roles-ehmpathy@1.39.1.patch +6 -0
- package/dist/.test/assets/pnpm/declarations/practices/pnpm/.test/assets/repo-stale-patch-beside-bare/patches/type-fns@1.21.3.patch +6 -0
- package/dist/.test/assets/pnpm/declarations/practices/pnpm/.test/assets/repo-stale-patch-beside-bare/pnpm-lock.yaml +19 -0
- package/dist/.test/assets/pnpm/declarations/practices/pnpm/__snapshots__/stale-patched-dependency.declapract.integration.test.ts.snap +39 -0
- package/dist/.test/assets/pnpm/declarations/practices/pnpm/stale-patched-dependency.declapract.integration.test.ts +53 -0
- package/dist/.test/assets/rhachet/declarations/practices/rhachet/best-practice/.declapract.readme.md +8 -0
- package/dist/.test/assets/rhachet/declarations/practices/rhachet/best-practice/.gitattributes.declapract.ts +65 -0
- package/dist/.test/assets/tests-any-only/declarations/practices/tests-any/best-practice/.declapract.readme.md +7 -0
- package/dist/.test/assets/tests-any-only/declarations/practices/tests-any/best-practice/.gitattributes.declapract.ts +60 -0
- package/dist/__snapshots__/gitattributesDeclarers.declapract.integration.test.ts.snap +79 -0
- package/dist/__snapshots__/repoSkills.declapract.acceptance.test.ts.snap +512 -0
- package/dist/__snapshots__/typecheckBestPracticeTemplates.declapract.integration.test.ts.snap +80 -0
- package/dist/gitattributesDeclarers.declapract.integration.test.ts +438 -0
- package/dist/practiceOwnerPerFile.declapract.integration.test.ts +53 -0
- package/dist/practices/cicd-common/.declapract.integration.test.ts +15 -21
- package/dist/practices/git/.declapract.integration.test.ts +2 -2
- package/dist/practices/git/.gitattributes.declapract.integration.test.ts +34 -19
- package/dist/practices/git/.test/assets/repo-with-legacy-gitattributes/declapract.use.yml +3 -3
- package/dist/practices/git/__snapshots__/.gitattributes.declapract.integration.test.ts.snap +4 -4
- package/dist/practices/git/best-practice/.declapract.readme.md +37 -0
- package/dist/practices/git/best-practice/.gitattributes.declapract.ts +42 -63
- package/dist/practices/persist-with-dynamodb/best-practice/.gitattributes.declapract.ts +56 -0
- package/dist/practices/persist-with-rds/.test/assets/repo-with-hand-patch/declapract.use.yml +4 -0
- package/dist/practices/persist-with-rds/.test/assets/repo-with-hand-patch/package.json +17 -0
- package/dist/practices/persist-with-rds/.test/assets/repo-with-hand-patch/patches/left-pad@1.3.0.patch +6 -0
- package/dist/practices/persist-with-rds/.test/assets/repo-with-hand-patch/patches/pg-pool@3.14.0.patch +12 -0
- package/dist/practices/persist-with-rds/__snapshots__/pg-pool-patch.declapract.integration.test.ts.snap +147 -0
- package/dist/practices/persist-with-rds/best-practice/.declapract.readme.md +29 -0
- package/dist/practices/persist-with-rds/best-practice/.gitattributes.declapract.ts +64 -0
- package/dist/practices/persist-with-rds/best-practice/package.json +5 -0
- package/dist/practices/persist-with-rds/best-practice/patches/pg-pool.patch +21 -0
- package/dist/practices/persist-with-rds/pg-pool-patch.declapract.integration.test.ts +884 -0
- package/dist/practices/pnpm/.test/assets/repo-stale-patch-beside-bare/declapract.use.yml +4 -0
- package/dist/practices/pnpm/.test/assets/repo-stale-patch-beside-bare/package.json +15 -0
- package/dist/practices/pnpm/.test/assets/repo-stale-patch-beside-bare/patches/rhachet-roles-ehmpathy.patch +6 -0
- package/dist/practices/pnpm/.test/assets/repo-stale-patch-beside-bare/patches/rhachet-roles-ehmpathy@1.39.1.patch +6 -0
- package/dist/practices/pnpm/.test/assets/repo-stale-patch-beside-bare/patches/type-fns@1.21.3.patch +6 -0
- package/dist/practices/pnpm/.test/assets/repo-stale-patch-beside-bare/pnpm-lock.yaml +19 -0
- package/dist/practices/pnpm/__snapshots__/stale-patched-dependency.declapract.integration.test.ts.snap +39 -0
- package/dist/practices/pnpm/stale-patched-dependency.declapract.integration.test.ts +53 -0
- package/dist/practices/rhachet/best-practice/.declapract.readme.md +8 -0
- package/dist/practices/rhachet/best-practice/.gitattributes.declapract.ts +65 -0
- package/dist/practices/tests-any/best-practice/.declapract.readme.md +7 -0
- package/dist/practices/tests-any/best-practice/.gitattributes.declapract.ts +60 -0
- package/dist/repoSkills.declapract.acceptance.test.ts +1150 -0
- package/dist/typecheckBestPracticeTemplates.declapract.integration.test.ts +181 -19
- package/dist/utils/defineExpectedGitattributesContents.ts +247 -0
- package/package.json +6 -6
- package/dist/.test/assets/expo-migration/declarations/practices/git/best-practice/.gitattributes +0 -7
- package/dist/practices/git/best-practice/.gitattributes +0 -7
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import fs from 'fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
|
|
4
|
+
import { executeApply } from 'declapract';
|
|
5
|
+
import { genTempDir, given, then, useThen, when } from 'test-fns';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* .what = end-to-end proof of the persist-with-rds `old-dev-config-location` relocate +
|
|
9
|
+
* access-migrate, run through the REAL declapract apply pipeline against a genTempDir
|
|
10
|
+
* clone of a consumer repo (the row-4 clamp, rds declarer).
|
|
11
|
+
* .why = the config declarer has its own pipeline test; per
|
|
12
|
+
* `rule.require.declapract-integration-tests` EACH declarer that relocates a file AND
|
|
13
|
+
* transforms blocks owes its own end-to-end test — a unit test of the exported `fix`
|
|
14
|
+
* never exercises the glob→file match or the `relativeFilePath` rewrite. the rds
|
|
15
|
+
* declarer must also keep the `__CHANG3_ME__` passwords prep users are created with
|
|
16
|
+
* (#683), so it needs its own clamp rather than a claim that the config test covers it.
|
|
17
|
+
* .teeth = the input holds `"access": "dev"` (unambiguous → migrated to `prep`) plus four `.dev`
|
|
18
|
+
* hosts the util runs on in a CONSUMER's real config — a `://` URL `https://auth.myapp.dev`,
|
|
19
|
+
* a mid-dotted `bastion.dev.example.com`, a terminal `aws.ssmproxy.mydb.dev`, and a FOREIGN
|
|
20
|
+
* public host `api.dev.paypal.com` (paypal's own label). a `.dev` label is axis-ambiguous
|
|
21
|
+
* WHEREVER it sits, so per guard #3 EVERY host is preserved byte-for-byte — the after-state
|
|
22
|
+
* proves all four survive, that none flips to `.prep`, and that NO `@declapract:review`
|
|
23
|
+
* bytes ever enter the config. it also proves the `__CHANG3_ME__` passwords survive as-is
|
|
24
|
+
* (#683) plus the relocation.
|
|
25
|
+
*/
|
|
26
|
+
// the declarations mount at `declarations/`, never `src/`, so the practice's `src/**` wildcards scan
|
|
27
|
+
// only the demo repo's own files; the whole-practice evaluation still runs long under load
|
|
28
|
+
jest.setTimeout(600_000);
|
|
29
|
+
|
|
30
|
+
describe('persist-with-rds — old-dev-config-location relocate + access-migrate (row-4 clamp)', () => {
|
|
31
|
+
given('[case1] an rds repo with a config/dev.json to migrate', () => {
|
|
32
|
+
const tempDir = genTempDir({
|
|
33
|
+
slug: 'declapract-persist-with-rds-old-dev-config-location',
|
|
34
|
+
clone: './src/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config',
|
|
35
|
+
symlink: [{ at: 'declarations', to: 'src' }],
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const devPath = 'config/dev.json';
|
|
39
|
+
const prepPath = 'config/prep.json';
|
|
40
|
+
const read = (relativePath: string) =>
|
|
41
|
+
fs.readFile(path.join(tempDir, relativePath), 'utf-8');
|
|
42
|
+
const exists = async (relativePath: string): Promise<boolean> =>
|
|
43
|
+
fs
|
|
44
|
+
.access(path.join(tempDir, relativePath))
|
|
45
|
+
.then(() => true)
|
|
46
|
+
.catch((error: NodeJS.ErrnoException) => {
|
|
47
|
+
if (error.code === 'ENOENT') return false; // absent is the probe's answer
|
|
48
|
+
throw error; // any other read failure is a malfunction, never "absent"
|
|
49
|
+
});
|
|
50
|
+
const applyMigrate = () =>
|
|
51
|
+
executeApply({
|
|
52
|
+
config: path.join(tempDir, 'declapract.use.yml'),
|
|
53
|
+
practice: 'persist-with-rds',
|
|
54
|
+
file: devPath,
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
when('[t0] the migration input (before any fix)', () => {
|
|
58
|
+
then('config/dev.json holds the dev access + the placeholder + matches snapshot', async () => {
|
|
59
|
+
const before = await read(devPath);
|
|
60
|
+
expect(before).toContain('"access": "dev"');
|
|
61
|
+
expect(before).toContain('"__CHANG3_ME__"');
|
|
62
|
+
expect(before).toMatchSnapshot('config/dev.json — before');
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
when('[t1] the relocate + migrate fix is applied', () => {
|
|
67
|
+
useThen('migrate the dev config', async () => applyMigrate());
|
|
68
|
+
|
|
69
|
+
then(
|
|
70
|
+
'config/prep.json now holds the migrated content + config/dev.json is gone + matches snapshot',
|
|
71
|
+
async () => {
|
|
72
|
+
// the relocation landed: the new path exists, the old path is unlinked
|
|
73
|
+
expect(await exists(prepPath)).toBe(true);
|
|
74
|
+
expect(await exists(devPath)).toBe(false);
|
|
75
|
+
|
|
76
|
+
const after = await read(prepPath);
|
|
77
|
+
// the access itself is the one unambiguous token → migrated
|
|
78
|
+
expect(after).toContain('"access": "prep"');
|
|
79
|
+
expect(after).not.toContain('"access": "dev"');
|
|
80
|
+
// EVERY host survives byte-for-byte — a `.dev` label is axis-ambiguous WHEREVER it sits,
|
|
81
|
+
// so per guard #3 the util rewrites NO host at all.
|
|
82
|
+
expect(after).toContain('bastion.dev.example.com');
|
|
83
|
+
expect(after).toContain('aws.ssmproxy.mydb.dev');
|
|
84
|
+
expect(after).toContain('https://auth.myapp.dev');
|
|
85
|
+
// the FOREIGN public host is the decisive corruption case: teeth — the prior mid-dotted
|
|
86
|
+
// rewrite turned this into `api.prep.paypal.com`, a silent public-endpoint corruption.
|
|
87
|
+
expect(after).toContain('api.dev.paypal.com');
|
|
88
|
+
expect(after).not.toContain('api.prep.paypal.com');
|
|
89
|
+
// no host was flipped to `.prep`, so no wrong-access value ever enters the config
|
|
90
|
+
expect(after).not.toContain('bastion.prep.example.com');
|
|
91
|
+
expect(after).not.toContain('aws.ssmproxy.mydb.prep');
|
|
92
|
+
// the migration never emits a value it cannot verify — no marker bytes in config
|
|
93
|
+
expect(after).not.toContain('@declapract:review');
|
|
94
|
+
// the prep password placeholder survives — prep users are created with it (#683)
|
|
95
|
+
expect(after).toContain('"__CHANG3_ME__"');
|
|
96
|
+
expect(after).not.toContain('"$.at(aws::param)"');
|
|
97
|
+
// full content, for the reviewer's eye
|
|
98
|
+
expect(after).toMatchSnapshot('config/prep.json — after');
|
|
99
|
+
},
|
|
100
|
+
);
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
when('[t2] the fix is applied a second time (idempotency)', () => {
|
|
104
|
+
// config/dev.json is gone after the first relocate, so the EXISTS check no longer
|
|
105
|
+
// fires and no fix runs — config/prep.json must be untouched (per
|
|
106
|
+
// rule.require.idempotent-fixes).
|
|
107
|
+
const passes = useThen(
|
|
108
|
+
'a second apply over the already-migrated repo',
|
|
109
|
+
async () => {
|
|
110
|
+
const before = await read(prepPath);
|
|
111
|
+
await applyMigrate();
|
|
112
|
+
const after = await read(prepPath);
|
|
113
|
+
return { before, after };
|
|
114
|
+
},
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
then('the second apply is a no-op', () => {
|
|
118
|
+
expect(passes.after).toEqual(passes.before);
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* .what = D55 clamp: `src/utils/config/getConfig.ts` has exactly ONE declarer — the `config`
|
|
126
|
+
* practice (the real sdk-config impl). `persist-with-rds` ships NO second copy of that
|
|
127
|
+
* path (the old `'placeholder' as any` typed lie).
|
|
128
|
+
* .why = `lambda-service-with-rds` extends `lambda-service`, which always supplies `config`, so the
|
|
129
|
+
* placeholder was dead weight whose correctness rested on alphabetical apply order
|
|
130
|
+
* (`config` < `persist-with-rds`). two declarers of one path, one a typed lie, is a silent
|
|
131
|
+
* hazard: a consumer converged to the real file only by accident of that order. one
|
|
132
|
+
* declarer removes both the order dependency and the lie — the consumer receives config's
|
|
133
|
+
* real getConfig at this exact path, so persist-with-rds's own import resolves.
|
|
134
|
+
* .teeth = re-add a getConfig.ts under persist-with-rds/best-practice → the sole-declarer assertion
|
|
135
|
+
* reddens.
|
|
136
|
+
* .note = INTEGRATION by `rule.forbid.unit.remote-boundaries`: it reads the filesystem (the
|
|
137
|
+
* practice trees). no credential, no network.
|
|
138
|
+
*/
|
|
139
|
+
describe('persist-with-rds — getConfig has a single declarer (D55 clamp)', () => {
|
|
140
|
+
const configGetConfig =
|
|
141
|
+
'src/practices/config/best-practice/src/utils/config/getConfig.ts';
|
|
142
|
+
const rdsGetConfig =
|
|
143
|
+
'src/practices/persist-with-rds/best-practice/src/utils/config/getConfig.ts';
|
|
144
|
+
const rdsDbConnection =
|
|
145
|
+
'src/practices/persist-with-rds/best-practice/src/utils/database/getOneDatabaseConnection.ts';
|
|
146
|
+
const exists = async (relativePath: string): Promise<boolean> =>
|
|
147
|
+
fs
|
|
148
|
+
.access(relativePath)
|
|
149
|
+
.then(() => true)
|
|
150
|
+
.catch((error: NodeJS.ErrnoException) => {
|
|
151
|
+
if (error.code === 'ENOENT') return false; // absent is the probe's answer
|
|
152
|
+
throw error; // any other read failure is a malfunction, never "absent"
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
given('[case1] the two practices that touch src/utils/config/getConfig.ts', () => {
|
|
156
|
+
when('[t0] the declarers of that path are read', () => {
|
|
157
|
+
then('the config practice is the sole declarer (real sdk-config impl)', async () => {
|
|
158
|
+
expect(await exists(configGetConfig)).toBe(true);
|
|
159
|
+
const real = await fs.readFile(configGetConfig, 'utf-8');
|
|
160
|
+
expect(real).toContain("from 'sdk-config'");
|
|
161
|
+
expect(real).not.toContain("'placeholder' as any");
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
then('persist-with-rds ships NO second copy (no typed-lie placeholder)', async () => {
|
|
165
|
+
// teeth: re-add a getConfig.ts under persist-with-rds/best-practice and this reddens
|
|
166
|
+
expect(await exists(rdsGetConfig)).toBe(false);
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
then('persist-with-rds imports getConfig from the config-supplied path', async () => {
|
|
170
|
+
// the consumer receives config's real getConfig at this exact path, so the import resolves
|
|
171
|
+
const dbConn = await fs.readFile(rdsDbConnection, 'utf-8');
|
|
172
|
+
expect(dbConn).toContain("from '@src/utils/config/getConfig'");
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* .what = config.schema.ts clamp: this path has TWO declarers BY DESIGN — `config` (the base
|
|
180
|
+
* shape, for a non-rds `lambda-service`) and `persist-with-rds` (the full shape with the
|
|
181
|
+
* database block, for `lambda-service-with-rds`). persist-with-rds declares its full schema
|
|
182
|
+
* as a PLAIN overwrite template (EQUALS), NOT a CONTAINS + regex-splice fix.
|
|
183
|
+
* .why = a CONTAINS+splice `fix` for this path was dead code: its regex anchored on `});` before
|
|
184
|
+
* `export type Config`, but config's base emits `} as const;` there, so on a fresh
|
|
185
|
+
* `lambda-service-with-rds` consumer the fix no-oped and the check stayed permanently red —
|
|
186
|
+
* no path to green via `declapract fix`. worse, its inline splice string was stale (flat
|
|
187
|
+
* `role.cicd.{username,password}` vs the real `for-plan`/`for-apply` split). the later
|
|
188
|
+
* declarer (persist-with-rds) shadows config's base for rds consumers, so removal of the
|
|
189
|
+
* `.declapract.ts` makes its full `config.schema.ts` a plain EQUALS overwrite (declapract's
|
|
190
|
+
* default with no companion) that always converges — rule.prefer.overwrite-over-mutate: do
|
|
191
|
+
* not pair an overwrite template with a separate splice fix for the same path.
|
|
192
|
+
* .teeth = re-add a config.schema.ts.declapract.ts under persist-with-rds/best-practice → the
|
|
193
|
+
* "no splice-fix declarer" assertion reddens; strip the `for-plan` split from
|
|
194
|
+
* persist-with-rds's full schema → the "full schema declared" assertion reddens.
|
|
195
|
+
* .note = INTEGRATION by rule.forbid.unit.remote-boundaries: reads the filesystem (practice trees).
|
|
196
|
+
*/
|
|
197
|
+
describe('persist-with-rds — config.schema.ts is a plain overwrite, not a splice-fix (config.schema clamp)', () => {
|
|
198
|
+
const configSchema =
|
|
199
|
+
'src/practices/config/best-practice/src/utils/config/config.schema.ts';
|
|
200
|
+
const rdsSchema =
|
|
201
|
+
'src/practices/persist-with-rds/best-practice/src/utils/config/config.schema.ts';
|
|
202
|
+
const rdsSchemaFix =
|
|
203
|
+
'src/practices/persist-with-rds/best-practice/src/utils/config/config.schema.ts.declapract.ts';
|
|
204
|
+
const exists = async (relativePath: string): Promise<boolean> =>
|
|
205
|
+
fs
|
|
206
|
+
.access(relativePath)
|
|
207
|
+
.then(() => true)
|
|
208
|
+
.catch((error: NodeJS.ErrnoException) => {
|
|
209
|
+
if (error.code === 'ENOENT') return false; // absent is the probe's answer
|
|
210
|
+
throw error; // any other read failure is a malfunction, never "absent"
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
given('[case1] the two by-design declarers of src/utils/config/config.schema.ts', () => {
|
|
214
|
+
when('[t0] the declared files are read', () => {
|
|
215
|
+
then('config declares the BASE shape (no database block) for a non-rds service', async () => {
|
|
216
|
+
const base = await fs.readFile(configSchema, 'utf-8');
|
|
217
|
+
expect(base).toContain('const base = z.object(');
|
|
218
|
+
expect(base).not.toContain('database: z.object(');
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
then('persist-with-rds declares the FULL schema (database + for-plan/for-apply split)', async () => {
|
|
222
|
+
// teeth: strip the for-plan split from the full schema and this reddens
|
|
223
|
+
const full = await fs.readFile(rdsSchema, 'utf-8');
|
|
224
|
+
expect(full).toContain('database: z.object(');
|
|
225
|
+
expect(full).toContain("'for-plan': z.object(");
|
|
226
|
+
expect(full).toContain("'for-apply': z.object(");
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
then('persist-with-rds ships NO CONTAINS+splice fix for that path (dead regex gone)', async () => {
|
|
230
|
+
// teeth: re-add config.schema.ts.declapract.ts and this reddens. the paired full template
|
|
231
|
+
// is a plain EQUALS overwrite, so a fresh rds consumer converges via overwrite, never a
|
|
232
|
+
// splice that no-ops on config's `} as const;` base.
|
|
233
|
+
expect(await exists(rdsSchemaFix)).toBe(false);
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
});
|
|
237
|
+
});
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import fs from 'fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
|
|
4
|
+
import { executeApply } from 'declapract';
|
|
5
|
+
import { genTempDir, given, then, useBeforeAll, useThen, when } from 'test-fns';
|
|
6
|
+
|
|
7
|
+
import { readFile } from '../../utils/readFile';
|
|
8
|
+
import { fix } from './best-practice/provision/schema/sql/init/.extensions.sql.declapract';
|
|
9
|
+
|
|
10
|
+
// executeApply evaluates the whole persist-with-rds practice before the `file` filter narrows it
|
|
11
|
+
jest.setTimeout(10 * 60 * 1000);
|
|
12
|
+
|
|
13
|
+
const EXTENSIONS_SQL = 'provision/schema/sql/init/.extensions.sql';
|
|
14
|
+
|
|
15
|
+
describe('.extensions.sql fix', () => {
|
|
16
|
+
it('should be able to fix a file with custom extensions correctly', async () => {
|
|
17
|
+
const declaredFileContents = await readFile({
|
|
18
|
+
filePath: `${__dirname}/best-practice/provision/schema/sql/init/.extensions.sql`,
|
|
19
|
+
}); // grab the declared contents
|
|
20
|
+
const exampleFoundContents = `
|
|
21
|
+
/**
|
|
22
|
+
NOTE: because db owner is not allowed to create extensions, these changes are applied manually
|
|
23
|
+
|
|
24
|
+
NOTE: for the integration test db, these are applied automatically upon spinning up the docker instance
|
|
25
|
+
*/
|
|
26
|
+
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
|
|
27
|
+
CREATE EXTENSION IF NOT EXISTS "pgcrypto";
|
|
28
|
+
CREATE EXTENSION IF NOT EXISTS "cube";
|
|
29
|
+
CREATE EXTENSION IF NOT EXISTS "earthdistance";
|
|
30
|
+
`;
|
|
31
|
+
const { contents: fixedContents } = await fix(exampleFoundContents, {
|
|
32
|
+
declaredFileContents,
|
|
33
|
+
} as any);
|
|
34
|
+
expect(fixedContents).toContain('CREATE EXTENSION IF NOT EXISTS "cube";');
|
|
35
|
+
expect(fixedContents).toContain(
|
|
36
|
+
'CREATE EXTENSION IF NOT EXISTS "earthdistance";',
|
|
37
|
+
);
|
|
38
|
+
expect(fixedContents).toMatchSnapshot();
|
|
39
|
+
});
|
|
40
|
+
it('should be able to create a new file to fix case where file does not exist yet', async () => {
|
|
41
|
+
const declaredFileContents = await readFile({
|
|
42
|
+
filePath: `${__dirname}/best-practice/provision/schema/sql/init/.extensions.sql`,
|
|
43
|
+
}); // grab the declared contents
|
|
44
|
+
const { contents: fixedContents } = await fix(null, {
|
|
45
|
+
declaredFileContents,
|
|
46
|
+
} as any);
|
|
47
|
+
expect(fixedContents).toMatchSnapshot();
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* .what = the twice-applied clamp (rule.require.idempotent-fixes)
|
|
52
|
+
* .why = the fix rebuilds the file from the template plus the custom lines it finds. a second
|
|
53
|
+
* pass must find the same custom lines once, keep them once, and emit the same bytes —
|
|
54
|
+
* else each `declapract fix` grows or reorders the custom block. the output must also
|
|
55
|
+
* CONTAIN the template, so the CONTAINS check passes and the plan stops to flag it.
|
|
56
|
+
*/
|
|
57
|
+
it('should be a fixed point — fix(fix(x)) equals fix(x), and the output contains the template', async () => {
|
|
58
|
+
const declaredFileContents = await readFile({
|
|
59
|
+
filePath: `${__dirname}/best-practice/provision/schema/sql/init/.extensions.sql`,
|
|
60
|
+
});
|
|
61
|
+
const context = { declaredFileContents } as any;
|
|
62
|
+
const input = `
|
|
63
|
+
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
|
|
64
|
+
CREATE EXTENSION IF NOT EXISTS "cube";
|
|
65
|
+
CREATE EXTENSION IF NOT EXISTS "earthdistance";
|
|
66
|
+
-- CREATE EXTENSION IF NOT EXISTS ...
|
|
67
|
+
`;
|
|
68
|
+
|
|
69
|
+
const { contents: once } = await fix(input, context);
|
|
70
|
+
const { contents: twice } = await fix(once, context);
|
|
71
|
+
|
|
72
|
+
expect(twice).toEqual(once);
|
|
73
|
+
expect(once).toContain(declaredFileContents.trim());
|
|
74
|
+
expect(once?.match(/"cube"/g)).toHaveLength(1);
|
|
75
|
+
expect(once?.match(/"uuid-ossp"/g)).toHaveLength(1);
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* .what = the fix through the real declapract pipeline, on a repo with custom extensions
|
|
80
|
+
* .why = the unit cases above prove the fix in isolation; only executeApply proves the
|
|
81
|
+
* declared path reaches the target file, the CONTAINS check gates the fix, the
|
|
82
|
+
* `declaredFileContents` the fix reads is the template, and a rerun settles
|
|
83
|
+
* (rule.require.declapract-integration-tests)
|
|
84
|
+
*/
|
|
85
|
+
given('[case1] a repo whose .extensions.sql predates the template and holds custom lines', () => {
|
|
86
|
+
const tempDir = genTempDir({
|
|
87
|
+
slug: 'declapract-persist-with-rds-extensions-sql',
|
|
88
|
+
clone:
|
|
89
|
+
'./src/practices/persist-with-rds/.test/assets/demo-repo-with-custom-extensions',
|
|
90
|
+
symlink: [{ at: 'declarations', to: 'src' }],
|
|
91
|
+
});
|
|
92
|
+
const read = () =>
|
|
93
|
+
fs.readFile(path.join(tempDir, EXTENSIONS_SQL), 'utf-8');
|
|
94
|
+
const apply = () =>
|
|
95
|
+
executeApply({
|
|
96
|
+
config: path.join(tempDir, 'declapract.use.yml'),
|
|
97
|
+
practice: 'persist-with-rds',
|
|
98
|
+
file: EXTENSIONS_SQL,
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
when('[t0] before any apply', () => {
|
|
102
|
+
then('the input file matches snapshot', async () => {
|
|
103
|
+
expect(await read()).toMatchSnapshot('.extensions.sql — before');
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
when('[t1] apply runs', () => {
|
|
108
|
+
const scene = useThen('apply settles', async () => {
|
|
109
|
+
await apply();
|
|
110
|
+
const declared = await readFile({
|
|
111
|
+
filePath: `${__dirname}/best-practice/${EXTENSIONS_SQL}`,
|
|
112
|
+
});
|
|
113
|
+
return { after: await read(), declared };
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
then('the file now contains the whole template', () => {
|
|
117
|
+
expect(scene.after).toContain(scene.declared.trim());
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
then('each custom extension survives, once', () => {
|
|
121
|
+
expect(scene.after).toContain('CREATE EXTENSION IF NOT EXISTS "cube";');
|
|
122
|
+
expect(scene.after).toContain(
|
|
123
|
+
'CREATE EXTENSION IF NOT EXISTS "earthdistance";',
|
|
124
|
+
);
|
|
125
|
+
expect(scene.after.match(/"cube"/g)).toHaveLength(1);
|
|
126
|
+
expect(scene.after.match(/"earthdistance"/g)).toHaveLength(1);
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
then('each required extension appears once, never duplicated', () => {
|
|
130
|
+
expect(scene.after.match(/"uuid-ossp"/g)).toHaveLength(1);
|
|
131
|
+
expect(scene.after.match(/"pgcrypto"/g)).toHaveLength(1);
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
then('the legacy note block is gone', () => {
|
|
135
|
+
expect(scene.after).not.toContain('NOTE: because db owner');
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
then('no declapract template syntax leaked', () => {
|
|
139
|
+
expect(scene.after).not.toContain('@declapract{');
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
then('the output matches snapshot', () => {
|
|
143
|
+
expect(scene.after).toMatchSnapshot('.extensions.sql — after');
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
when('[t2] apply runs a second time', () => {
|
|
148
|
+
const before = useBeforeAll(async () => ({ contents: await read() }));
|
|
149
|
+
const scene = useThen('apply again', async () => {
|
|
150
|
+
await apply();
|
|
151
|
+
return { after: await read() };
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
then('the file is byte-identical — the apply is a fixed point', () => {
|
|
155
|
+
expect(scene.after).toEqual(before.contents);
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declarations: 'declarations/declapract.declare.yml'
|
|
2
|
+
useCase: lambda-service-with-rds
|
|
3
|
+
variables:
|
|
4
|
+
organizationName: 'test-org'
|
|
5
|
+
projectName: 'test-project'
|
|
6
|
+
infrastructureNamespaceId: 'testns'
|
|
7
|
+
databaseName: 'testdb'
|
|
8
|
+
databaseUserName:
|
|
9
|
+
cicdUser: 'cicd_user'
|
|
10
|
+
serviceUser: 'service_user'
|
|
11
|
+
databaseTunnelHost:
|
|
12
|
+
prep: 'localhost'
|
|
13
|
+
prod: 'localhost'
|
|
14
|
+
databaseClusterHost:
|
|
15
|
+
prep: 'awesomesdb.cluster-abc123.us-east-1.rds.amazonaws.com'
|
|
16
|
+
prod: 'awesomesdb.cluster-def456.us-east-1.rds.amazonaws.com'
|
|
17
|
+
slackWebhookUrl: 'https://hooks.slack.test/webhook'
|
|
18
|
+
awsAccountId:
|
|
19
|
+
prep: '111111111111'
|
|
20
|
+
prod: '222222222222'
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# the test symlinks `declarations/practices` -> src/practices and `declarations/useCases.yml` ->
|
|
2
|
+
# src/useCases.yml at genTempDir time, so the temp repo's own `src/` stays its own: the apply writes
|
|
3
|
+
# src/utils/config/config.schema.ts there, never into this repo's src.
|
|
4
|
+
declare:
|
|
5
|
+
practices: practices
|
|
6
|
+
use-cases: useCases.yml
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
language: postgres
|
|
2
|
+
dialect: 10.7
|
|
3
|
+
generates:
|
|
4
|
+
daos:
|
|
5
|
+
to: src/access/daos
|
|
6
|
+
using:
|
|
7
|
+
log: src/utils/logger#log
|
|
8
|
+
DatabaseConnection: src/utils/database/getOneDatabaseConnection#DatabaseConnection
|
|
9
|
+
schema:
|
|
10
|
+
config: codegen.sql.schema.yml
|
|
11
|
+
control:
|
|
12
|
+
config: provision/schema/control.yml
|
|
13
|
+
code:
|
|
14
|
+
config: codegen.sql.types.yml
|
|
15
|
+
for:
|
|
16
|
+
objects:
|
|
17
|
+
search:
|
|
18
|
+
- 'src/domain.objects/*.ts'
|
|
19
|
+
exclude:
|
|
20
|
+
- 'SurfReportDraft'
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declarations: './'
|
|
2
|
+
useCase: lambda-service-with-rds
|
|
3
|
+
variables:
|
|
4
|
+
organizationName: 'test-org'
|
|
5
|
+
projectName: 'test-project'
|
|
6
|
+
databaseName: 'testdb'
|
|
7
|
+
databaseClusterName: 'testdb'
|
|
8
|
+
databaseUserName:
|
|
9
|
+
cicdUser: 'testdb_cicd'
|
|
10
|
+
serviceUser: 'testdb_service'
|
|
11
|
+
databaseTunnelHost:
|
|
12
|
+
prep: 'localhost'
|
|
13
|
+
prod: 'localhost'
|
|
14
|
+
databaseClusterHost:
|
|
15
|
+
prep: 'localhost'
|
|
16
|
+
prod: 'localhost'
|
|
17
|
+
awsAccountId:
|
|
18
|
+
prep: '123456789012'
|
|
19
|
+
prod: '123456789012'
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# .note = apply evaluates the whole persist-with-rds practice, so every
|
|
2
|
+
# `@declapract{variable.*}` its best-practice dir references is defined here
|
|
3
|
+
declarations: './'
|
|
4
|
+
useCase: lambda-service-with-rds
|
|
5
|
+
variables:
|
|
6
|
+
organizationName: 'test-org'
|
|
7
|
+
projectName: 'test-project'
|
|
8
|
+
databaseName: 'testdb'
|
|
9
|
+
databaseClusterName: 'testdb'
|
|
10
|
+
databaseUserName:
|
|
11
|
+
cicdUser: 'testdb_cicd'
|
|
12
|
+
serviceUser: 'testdb_service'
|
|
13
|
+
databaseTunnelHost:
|
|
14
|
+
prep: 'localhost'
|
|
15
|
+
prod: 'localhost'
|
|
16
|
+
databaseClusterHost:
|
|
17
|
+
prep: 'localhost'
|
|
18
|
+
prod: 'localhost'
|
|
19
|
+
awsAccountId:
|
|
20
|
+
prep: '123456789012'
|
|
21
|
+
prod: '123456789012'
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
NOTE: because db owner is not allowed to create extensions, these changes are applied manually
|
|
3
|
+
|
|
4
|
+
NOTE: for the integration test db, these are applied automatically when the docker instance starts
|
|
5
|
+
*/
|
|
6
|
+
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
|
|
7
|
+
CREATE EXTENSION IF NOT EXISTS "pgcrypto";
|
|
8
|
+
CREATE EXTENSION IF NOT EXISTS "cube";
|
|
9
|
+
CREATE EXTENSION IF NOT EXISTS "earthdistance";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"organization": "test-org",
|
|
3
|
+
"project": "test-project",
|
|
4
|
+
"environment": {
|
|
5
|
+
"access": "dev"
|
|
6
|
+
},
|
|
7
|
+
"database": {
|
|
8
|
+
"host": "bastion.dev.example.com",
|
|
9
|
+
"tunnel": "aws.ssmproxy.mydb.dev",
|
|
10
|
+
"password": "__CHANG3_ME__"
|
|
11
|
+
},
|
|
12
|
+
"upstream": {
|
|
13
|
+
"paypal": "api.dev.paypal.com"
|
|
14
|
+
},
|
|
15
|
+
"auth": {
|
|
16
|
+
"callbackUrl": "https://auth.myapp.dev"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declarations: './'
|
|
2
|
+
useCase: lambda-service-with-rds
|
|
3
|
+
variables:
|
|
4
|
+
organizationName: 'test-org'
|
|
5
|
+
projectName: 'test-project'
|
|
6
|
+
databaseName: 'testdb'
|
|
7
|
+
databaseUserName:
|
|
8
|
+
cicdUser: 'cicd_user'
|
|
9
|
+
serviceUser: 'service_user'
|
|
10
|
+
databaseTunnelHost:
|
|
11
|
+
prep: 'tunnel.prep.example.com'
|
|
12
|
+
prod: 'tunnel.prod.example.com'
|
|
13
|
+
databaseClusterHost:
|
|
14
|
+
prep: 'cluster.prep.example.com'
|
|
15
|
+
prod: 'cluster.prod.example.com'
|
|
16
|
+
awsAccountId:
|
|
17
|
+
prep: '123456789012'
|
|
18
|
+
prod: '123456789012'
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "repo-with-hand-patch",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"dependencies": {
|
|
5
|
+
"pg": "8.3.0",
|
|
6
|
+
"pg-pool": "3.14.0"
|
|
7
|
+
},
|
|
8
|
+
"pnpm": {
|
|
9
|
+
"overrides": {
|
|
10
|
+
"react-refresh": "0.14.2"
|
|
11
|
+
},
|
|
12
|
+
"patchedDependencies": {
|
|
13
|
+
"pg-pool@3.14.0": "patches/pg-pool@3.14.0.patch",
|
|
14
|
+
"left-pad@1.3.0": "patches/left-pad@1.3.0.patch"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
diff --git a/index.js b/index.js
|
|
2
|
+
--- a/index.js
|
|
3
|
+
+++ b/index.js
|
|
4
|
+
@@ -92,7 +92,7 @@ class Pool extends EventEmitter {
|
|
5
|
+
this.options.allowExitOnIdle = this.options.allowExitOnIdle || false
|
|
6
|
+
this.options.maxLifetimeSeconds = this.options.maxLifetimeSeconds || 0
|
|
7
|
+
this.log = this.options.log || function () {}
|
|
8
|
+
- this.Client = this.options.Client || Client || require('pg').Client
|
|
9
|
+
+ this.Client = this.options.Client || Client // hand patch
|
|
10
|
+
this.Promise = this.options.Promise || global.Promise
|
|
11
|
+
|
|
12
|
+
if (typeof this.options.idleTimeoutMillis === 'undefined') {
|