declapract-typescript-ehmpathy 0.49.15 → 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/best-practice/.declapract.readme.md +7 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/.gitattributes.declapract.ts +64 -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/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/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/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/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/best-practice/.declapract.readme.md +7 -0
- package/dist/practices/persist-with-rds/best-practice/.gitattributes.declapract.ts +64 -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/utils/defineExpectedGitattributesContents.ts +247 -0
- package/package.json +4 -4
- 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,438 @@
|
|
|
1
|
+
import { execFileSync } from 'node:child_process';
|
|
2
|
+
import fs from 'node:fs/promises';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
|
|
5
|
+
import { executeApply } from 'declapract';
|
|
6
|
+
import { genTempDir, given, then, useBeforeAll, useThen, when } from 'test-fns';
|
|
7
|
+
|
|
8
|
+
import { check as checkGit } from './practices/git/best-practice/.gitattributes.declapract';
|
|
9
|
+
import { check as checkDynamodb } from './practices/persist-with-dynamodb/best-practice/.gitattributes.declapract';
|
|
10
|
+
import { check as checkRds } from './practices/persist-with-rds/best-practice/.gitattributes.declapract';
|
|
11
|
+
import { check as checkRhachet } from './practices/rhachet/best-practice/.gitattributes.declapract';
|
|
12
|
+
import { check as checkTestsAny } from './practices/tests-any/best-practice/.gitattributes.declapract';
|
|
13
|
+
|
|
14
|
+
// executeApply evaluates the whole practice before the `file` filter narrows it
|
|
15
|
+
jest.setTimeout(5 * 60 * 1000);
|
|
16
|
+
|
|
17
|
+
const context = {} as Parameters<typeof checkGit>[1]; // .note = the checks read no context
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* .what = the `linguist-generated` value git derives for each path, from the repo's attributes
|
|
21
|
+
* .why = order carries load in `.gitattributes`, so only git itself can say whether a path
|
|
22
|
+
* folds; a text assertion on the file cannot. hermetic: no global or system config
|
|
23
|
+
*/
|
|
24
|
+
const getLinguistGeneratedByPath = (input: {
|
|
25
|
+
cwd: string;
|
|
26
|
+
paths: string[];
|
|
27
|
+
}): Record<string, string> =>
|
|
28
|
+
Object.fromEntries(
|
|
29
|
+
execFileSync(
|
|
30
|
+
'git',
|
|
31
|
+
['check-attr', 'linguist-generated', '--', ...input.paths],
|
|
32
|
+
{
|
|
33
|
+
cwd: input.cwd,
|
|
34
|
+
encoding: 'utf8',
|
|
35
|
+
env: {
|
|
36
|
+
...process.env,
|
|
37
|
+
GIT_CONFIG_GLOBAL: '/dev/null',
|
|
38
|
+
GIT_CONFIG_SYSTEM: '/dev/null',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
)
|
|
42
|
+
.trim()
|
|
43
|
+
.split('\n')
|
|
44
|
+
.map((line) => {
|
|
45
|
+
const [pathFound, , value] = line.split(': ');
|
|
46
|
+
return [pathFound!, value!];
|
|
47
|
+
}),
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* .what = proves every `.gitattributes` declarer together, through the real declapract pipeline
|
|
52
|
+
* .why = each practice's own suite proves its fix alone. the file is shared, so only a run of
|
|
53
|
+
* all five on one repo proves they converge (no declarer rewrites another) and that the
|
|
54
|
+
* order of sections gives git the intended last match per path. the suite sits at the
|
|
55
|
+
* `src/` root, since it spans practices and no one practice owns it
|
|
56
|
+
* .teeth = emit repo-own lines ahead of the managed sections, and [case1] `the repo-own
|
|
57
|
+
* override wins` reddens; drop the `/**` from a route exception, and the yield and
|
|
58
|
+
* radio paths read `set`; reorder the layout per declarer, and [t2] is no fixed point
|
|
59
|
+
*/
|
|
60
|
+
describe('gitattributes declarers', () => {
|
|
61
|
+
given('[case1] a repo that adopts all five .gitattributes declarers, with a repo-own override', () => {
|
|
62
|
+
const tempDir = genTempDir({
|
|
63
|
+
slug: 'gitattributes-all-declarers',
|
|
64
|
+
clone: './src/.test/assets/git/repo-with-all-gitattributes-declarers',
|
|
65
|
+
git: true,
|
|
66
|
+
symlink: [
|
|
67
|
+
{ at: 'declarations', to: './src/.test/assets/git/declarations' },
|
|
68
|
+
{ at: 'node_modules', to: 'node_modules' },
|
|
69
|
+
],
|
|
70
|
+
});
|
|
71
|
+
const read = () =>
|
|
72
|
+
fs.readFile(path.join(tempDir, '.gitattributes'), 'utf-8');
|
|
73
|
+
const applyEach = async (input: { practices: string[] }) => {
|
|
74
|
+
for (const practice of input.practices)
|
|
75
|
+
await executeApply({
|
|
76
|
+
config: path.join(tempDir, 'declapract.use.yml'),
|
|
77
|
+
practice,
|
|
78
|
+
file: '.gitattributes',
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
const practices = [
|
|
82
|
+
'rhachet',
|
|
83
|
+
'persist-with-rds',
|
|
84
|
+
'git',
|
|
85
|
+
'persist-with-dynamodb',
|
|
86
|
+
'tests-any',
|
|
87
|
+
];
|
|
88
|
+
|
|
89
|
+
when('[t0] before any apply', () => {
|
|
90
|
+
then('the input holds the repo-own override and no declarer tag; it matches snapshot', async () => {
|
|
91
|
+
const before = await read();
|
|
92
|
+
expect(before).toContain('src/access/daos/custom/** -linguist-generated');
|
|
93
|
+
expect(before).not.toMatch(/^# \[[a-z0-9-]+\] /m);
|
|
94
|
+
expect(before).toMatchSnapshot('.gitattributes — before');
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
when('[t1] each practice applies, in turn', () => {
|
|
99
|
+
const scene = useThen('apply settles', async () => {
|
|
100
|
+
await applyEach({ practices });
|
|
101
|
+
return { after: await read() };
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
then('every declarer check passes on the one file', () => {
|
|
105
|
+
[checkGit, checkTestsAny, checkRhachet, checkRds, checkDynamodb].forEach(
|
|
106
|
+
(check) => expect(() => check(scene.after, context)).not.toThrow(),
|
|
107
|
+
);
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
then('git folds the robocode and keeps the human surface open', () => {
|
|
111
|
+
expect(
|
|
112
|
+
getLinguistGeneratedByPath({
|
|
113
|
+
cwd: tempDir,
|
|
114
|
+
paths: [
|
|
115
|
+
'src/access/daos/.generated/queryFunctions.ts',
|
|
116
|
+
'src/access/daos/daoInvoice/.generated/casts.ts',
|
|
117
|
+
'provision/schema/sql/.generated/types.sql',
|
|
118
|
+
'src/domain.operations/setInvoice.test.ts',
|
|
119
|
+
'src/app/Invoice.test.tsx',
|
|
120
|
+
'.route/v2026_11_01.demo/1.vision.stone',
|
|
121
|
+
'.route/v2026_11_01.demo/0.wish.md',
|
|
122
|
+
'.route/v2026_11_01.demo/1.vision.yield.md',
|
|
123
|
+
'.route/v2026_11_01.demo/.radio/record.1.json',
|
|
124
|
+
'.behavior/v2026_11_01.demo/.reviews/peer.md',
|
|
125
|
+
'.behavior/v2026_11_01.demo/0.wish.md',
|
|
126
|
+
'.behavior/v2026_11_01.demo/1.vision.yield.md',
|
|
127
|
+
'.behavior/v2026_11_01.demo/.radio/record.1.json',
|
|
128
|
+
'.behavior/v2026_11_01.demo/.route/passage.jsonl',
|
|
129
|
+
'.route/v2026_11_01.demo/notes.yield.test.ts',
|
|
130
|
+
'.behavior/v2026_11_01.demo/.radio/probe.test.ts',
|
|
131
|
+
],
|
|
132
|
+
}),
|
|
133
|
+
).toEqual({
|
|
134
|
+
// only the `.generated/` dirs fold, at any depth under the daos and the schemas
|
|
135
|
+
'src/access/daos/.generated/queryFunctions.ts': 'set',
|
|
136
|
+
'src/access/daos/daoInvoice/.generated/casts.ts': 'set',
|
|
137
|
+
'provision/schema/sql/.generated/types.sql': 'set',
|
|
138
|
+
'src/domain.operations/setInvoice.test.ts': 'set',
|
|
139
|
+
'src/app/Invoice.test.tsx': 'set',
|
|
140
|
+
// each route root: the trail folds, `0.wish.md` included (Q3); yields and radio stay open
|
|
141
|
+
'.route/v2026_11_01.demo/1.vision.stone': 'set',
|
|
142
|
+
'.route/v2026_11_01.demo/0.wish.md': 'set',
|
|
143
|
+
'.route/v2026_11_01.demo/1.vision.yield.md': 'unset',
|
|
144
|
+
'.route/v2026_11_01.demo/.radio/record.1.json': 'unset',
|
|
145
|
+
'.behavior/v2026_11_01.demo/.reviews/peer.md': 'set',
|
|
146
|
+
'.behavior/v2026_11_01.demo/0.wish.md': 'set',
|
|
147
|
+
'.behavior/v2026_11_01.demo/1.vision.yield.md': 'unset',
|
|
148
|
+
'.behavior/v2026_11_01.demo/.radio/record.1.json': 'unset',
|
|
149
|
+
// the route machinery a behavior dir holds (its passage log) folds with it
|
|
150
|
+
'.behavior/v2026_11_01.demo/.route/passage.jsonl': 'set',
|
|
151
|
+
// a yield or radio file named like a test stays open: rhachet's exceptions sit last
|
|
152
|
+
'.route/v2026_11_01.demo/notes.yield.test.ts': 'unset',
|
|
153
|
+
'.behavior/v2026_11_01.demo/.radio/probe.test.ts': 'unset',
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
then('snapshots, the daos, the schemas, and domain source stay unspecified', () => {
|
|
158
|
+
expect(
|
|
159
|
+
getLinguistGeneratedByPath({
|
|
160
|
+
cwd: tempDir,
|
|
161
|
+
paths: [
|
|
162
|
+
'src/domain.operations/__snapshots__/setInvoice.test.ts.snap',
|
|
163
|
+
'src/access/daos/daoInvoice/findByUnique.ts',
|
|
164
|
+
'provision/schema/sql/tables/invoice.sql',
|
|
165
|
+
'provision/schema/sql/init/.schema.sql',
|
|
166
|
+
'src/domain.objects/Invoice.ts',
|
|
167
|
+
],
|
|
168
|
+
}),
|
|
169
|
+
).toEqual({
|
|
170
|
+
'src/domain.operations/__snapshots__/setInvoice.test.ts.snap':
|
|
171
|
+
'unspecified',
|
|
172
|
+
// the daos and the schemas are internal contracts: a reviewer reads them open
|
|
173
|
+
'src/access/daos/daoInvoice/findByUnique.ts': 'unspecified',
|
|
174
|
+
'provision/schema/sql/tables/invoice.sql': 'unspecified',
|
|
175
|
+
'provision/schema/sql/init/.schema.sql': 'unspecified',
|
|
176
|
+
'src/domain.objects/Invoice.ts': 'unspecified',
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
then('the repo-own override wins over the dao collapse', () => {
|
|
181
|
+
expect(
|
|
182
|
+
getLinguistGeneratedByPath({
|
|
183
|
+
cwd: tempDir,
|
|
184
|
+
paths: ['src/access/daos/custom/.generated/report.ts'],
|
|
185
|
+
}),
|
|
186
|
+
).toEqual({ 'src/access/daos/custom/.generated/report.ts': 'unset' });
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
then('the output holds every declarer section in order, then the repo-own lines; it matches snapshot', () => {
|
|
190
|
+
const tags = [...scene.after.matchAll(/^# \[([a-z0-9-]+)\] /gm)].map(
|
|
191
|
+
(match) => match[1],
|
|
192
|
+
);
|
|
193
|
+
expect([...new Set(tags)]).toEqual([
|
|
194
|
+
'git',
|
|
195
|
+
'tests-any',
|
|
196
|
+
'persist-with-rds',
|
|
197
|
+
'persist-with-dynamodb',
|
|
198
|
+
'rhachet',
|
|
199
|
+
]); // .note = rds and dynamodb both carry `src/access/daos/**/.generated/**`; no fix edits the other's section
|
|
200
|
+
expect(scene.after.trim().split('\n').slice(-1)[0]).toEqual(
|
|
201
|
+
'src/access/daos/custom/** -linguist-generated',
|
|
202
|
+
);
|
|
203
|
+
expect(scene.after).toMatchSnapshot('.gitattributes — all declarers');
|
|
204
|
+
});
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
when('[t2] each practice applies again, in reverse', () => {
|
|
208
|
+
const before = useBeforeAll(async () => ({ contents: await read() }));
|
|
209
|
+
const scene = useThen('apply again', async () => {
|
|
210
|
+
await applyEach({ practices: [...practices].reverse() });
|
|
211
|
+
return { after: await read() };
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
then('the file is byte-identical — no declarer rewrites another', () => {
|
|
215
|
+
expect(scene.after).toEqual(before.contents);
|
|
216
|
+
});
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* .what = a fold hides no line from `git diff` (case=6)
|
|
221
|
+
* .why = github folds a file but its +/- counts stay true, and a local diff shows every line;
|
|
222
|
+
* `linguist-generated` is no diff attribute, so the counts are the honest tell. a swap
|
|
223
|
+
* to `-diff` would hide the lines, and this clamp reddens
|
|
224
|
+
*/
|
|
225
|
+
when('[t3] a line is cut from a folded test file', () => {
|
|
226
|
+
const fileTest = 'src/domain.operations/setInvoiceTotal.test.ts';
|
|
227
|
+
const scene = useThen('git diffs the cut', async () => {
|
|
228
|
+
const env = {
|
|
229
|
+
...process.env,
|
|
230
|
+
GIT_CONFIG_GLOBAL: '/dev/null',
|
|
231
|
+
GIT_CONFIG_SYSTEM: '/dev/null',
|
|
232
|
+
};
|
|
233
|
+
await fs.mkdir(path.join(tempDir, path.dirname(fileTest)), {
|
|
234
|
+
recursive: true,
|
|
235
|
+
});
|
|
236
|
+
await fs.writeFile(
|
|
237
|
+
path.join(tempDir, fileTest),
|
|
238
|
+
"expect(total).toEqual(7);\nexpect(total).toBeGreaterThan(0);\n",
|
|
239
|
+
);
|
|
240
|
+
execFileSync('git', ['add', '--', fileTest], { cwd: tempDir, env });
|
|
241
|
+
await fs.writeFile(
|
|
242
|
+
path.join(tempDir, fileTest),
|
|
243
|
+
'expect(total).toEqual(7);\n',
|
|
244
|
+
);
|
|
245
|
+
const numstat = execFileSync(
|
|
246
|
+
'git',
|
|
247
|
+
['diff', '--numstat', '--', fileTest],
|
|
248
|
+
{ cwd: tempDir, encoding: 'utf8', env },
|
|
249
|
+
).trim();
|
|
250
|
+
return { numstat };
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
then('the file reads folded to git', () => {
|
|
254
|
+
expect(
|
|
255
|
+
getLinguistGeneratedByPath({ cwd: tempDir, paths: [fileTest] }),
|
|
256
|
+
).toEqual({ [fileTest]: 'set' });
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
then('git diff still counts the cut line: 0 added, 1 removed', () => {
|
|
260
|
+
expect(scene.numstat).toEqual(`0\t1\t${fileTest}`);
|
|
261
|
+
});
|
|
262
|
+
});
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* .what = a repo with no `.gitattributes` that adopts git and dynamodb, but not rds
|
|
267
|
+
* .why = two cells [case1] cannot reach: first adoption, where the file is born (ad1); and a
|
|
268
|
+
* dynamodb-only repo (dd3), where rds is absent, so only dynamodb's own section folds the
|
|
269
|
+
* dao tree
|
|
270
|
+
*/
|
|
271
|
+
given('[case3] a repo with no .gitattributes, that adopts git and persist-with-dynamodb', () => {
|
|
272
|
+
const tempDir = genTempDir({
|
|
273
|
+
slug: 'gitattributes-born-dynamodb',
|
|
274
|
+
clone: './src/.test/assets/git/repo-with-all-gitattributes-declarers',
|
|
275
|
+
git: true,
|
|
276
|
+
symlink: [
|
|
277
|
+
{ at: 'declarations', to: './src/.test/assets/git/declarations' },
|
|
278
|
+
{ at: 'node_modules', to: 'node_modules' },
|
|
279
|
+
],
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
when('[t0] the file is removed, then each practice applies', () => {
|
|
283
|
+
const scene = useThen('apply settles', async () => {
|
|
284
|
+
await fs.rm(path.join(tempDir, '.gitattributes'));
|
|
285
|
+
for (const practice of ['persist-with-dynamodb', 'git'])
|
|
286
|
+
await executeApply({
|
|
287
|
+
config: path.join(tempDir, 'declapract.use.yml'),
|
|
288
|
+
practice,
|
|
289
|
+
file: '.gitattributes',
|
|
290
|
+
});
|
|
291
|
+
return {
|
|
292
|
+
after: await fs.readFile(path.join(tempDir, '.gitattributes'), 'utf-8'),
|
|
293
|
+
};
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
then('the file is born, and both checks pass on it', () => {
|
|
297
|
+
expect(() => checkGit(scene.after, context)).not.toThrow();
|
|
298
|
+
expect(() => checkDynamodb(scene.after, context)).not.toThrow();
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
then('it holds the git sections, then the dynamodb section, and no other', () => {
|
|
302
|
+
const tags = [...scene.after.matchAll(/^# \[([a-z0-9-]+)\] /gm)].map(
|
|
303
|
+
(match) => match[1],
|
|
304
|
+
);
|
|
305
|
+
expect([...new Set(tags)]).toEqual(['git', 'persist-with-dynamodb']);
|
|
306
|
+
expect(scene.after).toMatchSnapshot('.gitattributes — born, git + dynamodb');
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
then('git folds the dao .generated dir; the daos, terraform output, and test files stay open', () => {
|
|
310
|
+
expect(
|
|
311
|
+
getLinguistGeneratedByPath({
|
|
312
|
+
cwd: tempDir,
|
|
313
|
+
paths: [
|
|
314
|
+
'src/access/daos/.generated/casts.ts',
|
|
315
|
+
'src/access/daos/daoInvoice/index.ts',
|
|
316
|
+
'provision/aws/product/main.tf',
|
|
317
|
+
'src/domain.operations/setInvoice.test.ts',
|
|
318
|
+
],
|
|
319
|
+
}),
|
|
320
|
+
).toEqual({
|
|
321
|
+
'src/access/daos/.generated/casts.ts': 'set',
|
|
322
|
+
'src/access/daos/daoInvoice/index.ts': 'unspecified',
|
|
323
|
+
'provision/aws/product/main.tf': 'unspecified',
|
|
324
|
+
// tests-any is not adopted here, so its fold is absent
|
|
325
|
+
'src/domain.operations/setInvoice.test.ts': 'unspecified',
|
|
326
|
+
});
|
|
327
|
+
});
|
|
328
|
+
});
|
|
329
|
+
});
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* .what = a repo that dropped tests-any, with a repo-own override under its old fold (ad8, case=4)
|
|
333
|
+
* .why = the dropped section persists as a foreign block, and the override must still win after
|
|
334
|
+
* an apply of the declarers the repo keeps; only git itself can say which line wins
|
|
335
|
+
*/
|
|
336
|
+
given('[case4] a repo that dropped tests-any, and un-folds one test file', () => {
|
|
337
|
+
const tempDir = genTempDir({
|
|
338
|
+
slug: 'gitattributes-dropped-declarer',
|
|
339
|
+
clone: './src/.test/assets/git/repo-with-all-gitattributes-declarers',
|
|
340
|
+
git: true,
|
|
341
|
+
symlink: [
|
|
342
|
+
{ at: 'declarations', to: './src/.test/assets/git/declarations' },
|
|
343
|
+
{ at: 'node_modules', to: 'node_modules' },
|
|
344
|
+
],
|
|
345
|
+
});
|
|
346
|
+
|
|
347
|
+
when('[t0] git applies over the stale section', () => {
|
|
348
|
+
const scene = useThen('apply settles', async () => {
|
|
349
|
+
await fs.writeFile(
|
|
350
|
+
path.join(tempDir, '.gitattributes'),
|
|
351
|
+
[
|
|
352
|
+
'# [tests-any] collapse test source in pr diffs; snapshots stay open',
|
|
353
|
+
'*.test.ts linguist-generated',
|
|
354
|
+
'*.test.tsx linguist-generated',
|
|
355
|
+
'',
|
|
356
|
+
'src/domain.operations/keep.test.ts -linguist-generated',
|
|
357
|
+
'',
|
|
358
|
+
].join('\n'),
|
|
359
|
+
);
|
|
360
|
+
await executeApply({
|
|
361
|
+
config: path.join(tempDir, 'declapract.use.yml'),
|
|
362
|
+
practice: 'git',
|
|
363
|
+
file: '.gitattributes',
|
|
364
|
+
});
|
|
365
|
+
return {
|
|
366
|
+
after: await fs.readFile(path.join(tempDir, '.gitattributes'), 'utf-8'),
|
|
367
|
+
};
|
|
368
|
+
});
|
|
369
|
+
|
|
370
|
+
then('the dropped section stays, byte for byte, and the override stays last', () => {
|
|
371
|
+
expect(scene.after).toContain(
|
|
372
|
+
'# [tests-any] collapse test source in pr diffs; snapshots stay open\n*.test.ts linguist-generated\n*.test.tsx linguist-generated\n',
|
|
373
|
+
);
|
|
374
|
+
expect(scene.after.trim().split('\n').slice(-1)[0]).toEqual(
|
|
375
|
+
'src/domain.operations/keep.test.ts -linguist-generated',
|
|
376
|
+
);
|
|
377
|
+
});
|
|
378
|
+
|
|
379
|
+
then('the settled file matches snapshot', () => {
|
|
380
|
+
// the foreign block's place, between the git section and the override, reads as a diff
|
|
381
|
+
expect(scene.after).toMatchSnapshot('.gitattributes — a dropped declarer, after git');
|
|
382
|
+
});
|
|
383
|
+
|
|
384
|
+
then('git still folds other test files, and the override still wins', () => {
|
|
385
|
+
expect(
|
|
386
|
+
getLinguistGeneratedByPath({
|
|
387
|
+
cwd: tempDir,
|
|
388
|
+
paths: [
|
|
389
|
+
'src/domain.operations/setInvoice.test.ts',
|
|
390
|
+
'src/domain.operations/keep.test.ts',
|
|
391
|
+
],
|
|
392
|
+
}),
|
|
393
|
+
).toEqual({
|
|
394
|
+
'src/domain.operations/setInvoice.test.ts': 'set',
|
|
395
|
+
'src/domain.operations/keep.test.ts': 'unset',
|
|
396
|
+
});
|
|
397
|
+
});
|
|
398
|
+
});
|
|
399
|
+
});
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* .what = this repo's `.gitattributes` satisfies the declarers it consumes
|
|
403
|
+
* .why = `useCase: npm-package` carries git, tests-any, and rhachet, yet no gate runs their
|
|
404
|
+
* checks against this repo; without this case, self-application drift is silent
|
|
405
|
+
* .note = the test names carry the fix, since jest prints them and little else of use
|
|
406
|
+
*/
|
|
407
|
+
given('[case2] this repo, which consumes the practices it declares', () => {
|
|
408
|
+
const fileOwn = useBeforeAll(async () => ({
|
|
409
|
+
contents: await fs.readFile(
|
|
410
|
+
path.join(__dirname, '..', '.gitattributes'),
|
|
411
|
+
'utf-8',
|
|
412
|
+
),
|
|
413
|
+
}));
|
|
414
|
+
|
|
415
|
+
when('[t0] the shipped declarations are asked about it', () => {
|
|
416
|
+
then(
|
|
417
|
+
'the git practice is satisfied -- if red, run `rhx declapract.self.apply --practice git --file .gitattributes`',
|
|
418
|
+
() => {
|
|
419
|
+
expect(() => checkGit(fileOwn.contents, context)).not.toThrow();
|
|
420
|
+
},
|
|
421
|
+
);
|
|
422
|
+
|
|
423
|
+
then(
|
|
424
|
+
'the tests-any practice is satisfied -- if red, run `rhx declapract.self.apply --practice tests-any --file .gitattributes`',
|
|
425
|
+
() => {
|
|
426
|
+
expect(() => checkTestsAny(fileOwn.contents, context)).not.toThrow();
|
|
427
|
+
},
|
|
428
|
+
);
|
|
429
|
+
|
|
430
|
+
then(
|
|
431
|
+
'the rhachet practice is satisfied -- if red, run `rhx declapract.self.apply --practice rhachet --file .gitattributes`',
|
|
432
|
+
() => {
|
|
433
|
+
expect(() => checkRhachet(fileOwn.contents, context)).not.toThrow();
|
|
434
|
+
},
|
|
435
|
+
);
|
|
436
|
+
});
|
|
437
|
+
});
|
|
438
|
+
});
|
|
@@ -4,6 +4,7 @@ import { join, relative } from 'node:path';
|
|
|
4
4
|
import { given, then, when } from 'test-fns';
|
|
5
5
|
import yaml from 'yaml';
|
|
6
6
|
|
|
7
|
+
import { declarersOrderedForGitattributes } from './utils/defineExpectedGitattributesContents';
|
|
7
8
|
import { getAllPathsUnderDir } from './utils/getAllPathsUnderDir';
|
|
8
9
|
import { getAllPracticesForUsecase } from './utils/getAllPracticesForUsecase';
|
|
9
10
|
|
|
@@ -35,6 +36,8 @@ const SHARED_BY_DESIGN: Record<string, string> = {
|
|
|
35
36
|
'each practice declares a CONTAINS json subset; the json fix merges keys, so declarers compose',
|
|
36
37
|
'.gitignore':
|
|
37
38
|
'each declarer unions its own lines through defineExpectedGitignoreContents (#541)',
|
|
39
|
+
'.gitattributes':
|
|
40
|
+
'each declarer emits its tagged sections through defineExpectedGitattributesContents, in one fixed declarer order (#754)',
|
|
38
41
|
'tsconfig.json':
|
|
39
42
|
'node-package and typescript-node each declare a CONTAINS json subset; the json fix merges keys',
|
|
40
43
|
'config/prep.json':
|
|
@@ -160,4 +163,54 @@ describe('every file in a usecase has one owner practice (#630)', () => {
|
|
|
160
163
|
expect(offenders).toEqual([]);
|
|
161
164
|
});
|
|
162
165
|
});
|
|
166
|
+
|
|
167
|
+
given('[case3] every practice that declares .gitattributes (#754)', () => {
|
|
168
|
+
when('[t0] each practice dir is read for the paths it declares', () => {
|
|
169
|
+
const declarers = readdirSync(practicesDir)
|
|
170
|
+
.filter((practice) =>
|
|
171
|
+
getAllDeclaredPaths({ practice }).includes('.gitattributes'),
|
|
172
|
+
)
|
|
173
|
+
.sort();
|
|
174
|
+
|
|
175
|
+
then('two or more practices declare it, so the clamp is not vacuous', () => {
|
|
176
|
+
expect(declarers.length).toBeGreaterThan(1);
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
then('each declares it through defineExpectedGitattributesContents', () => {
|
|
180
|
+
const offenders = declarers.filter((practice) => {
|
|
181
|
+
const declaration = join(
|
|
182
|
+
practicesDir,
|
|
183
|
+
practice,
|
|
184
|
+
'best-practice/.gitattributes.declapract.ts',
|
|
185
|
+
);
|
|
186
|
+
if (!existsSync(declaration)) return true;
|
|
187
|
+
const source = readFileSync(declaration, 'utf8');
|
|
188
|
+
return !/from '[./]+\/utils\/defineExpectedGitattributesContents'/.test(
|
|
189
|
+
source,
|
|
190
|
+
);
|
|
191
|
+
});
|
|
192
|
+
expect(offenders).toEqual([]);
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
then('each names its own practice dir, both as its declarer literal and in every header tag', () => {
|
|
196
|
+
// a declaration copied from a peer with the literal left unchanged would pass the util's own
|
|
197
|
+
// throw (the tag and the literal still agree); the dir is the third anchor that catches it
|
|
198
|
+
const offenders = declarers.filter((practice) => {
|
|
199
|
+
const source = readFileSync(
|
|
200
|
+
join(practicesDir, practice, 'best-practice/.gitattributes.declapract.ts'),
|
|
201
|
+
'utf8',
|
|
202
|
+
);
|
|
203
|
+
const tags = [...source.matchAll(/'# \[([^\]]+)\]/g)].map((m) => m[1]);
|
|
204
|
+
const literalFits = source.includes(`declarer: '${practice}'`);
|
|
205
|
+
const tagsFit = tags.length > 0 && tags.every((tag) => tag === practice);
|
|
206
|
+
return !(literalFits && tagsFit);
|
|
207
|
+
});
|
|
208
|
+
expect(offenders).toEqual([]);
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
then('the declarers are exactly the ones placed in declarersOrderedForGitattributes', () => {
|
|
212
|
+
expect(declarers).toEqual([...declarersOrderedForGitattributes].sort());
|
|
213
|
+
});
|
|
214
|
+
});
|
|
215
|
+
});
|
|
163
216
|
});
|
|
@@ -2,7 +2,9 @@ import fs from 'node:fs/promises';
|
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
|
|
4
4
|
import { executeApply } from 'declapract';
|
|
5
|
-
import {
|
|
5
|
+
import { given, then, useBeforeAll, useThen, when } from 'test-fns';
|
|
6
|
+
|
|
7
|
+
import { genTempRepoWithDeclarationsOutside } from '../../utils/genTempRepoWithDeclarationsOutside';
|
|
6
8
|
|
|
7
9
|
// executeApply is slow (full practice evaluation before the file filter narrows it)
|
|
8
10
|
// .note = this suite scopes each apply with `file: '.github/workflows/review.yml'`, which
|
|
@@ -76,14 +78,12 @@ const getAllActionRefLines = (input: { contents: string }): string[] =>
|
|
|
76
78
|
*/
|
|
77
79
|
describe('cicd-common workflow templates', () => {
|
|
78
80
|
given('[case1] a consumer repo whose workflow still carries a tag ref', () => {
|
|
79
|
-
const tempDir =
|
|
81
|
+
const tempDir = genTempRepoWithDeclarationsOutside({
|
|
80
82
|
slug: 'cicd-common-action-pins',
|
|
81
83
|
clone:
|
|
82
84
|
'./src/practices/cicd-common/.test/assets/repo-with-unpinned-workflow',
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
{ at: 'node_modules', to: 'node_modules' },
|
|
86
|
-
],
|
|
85
|
+
declarations: './src/.test/assets/cicd-common/declarations',
|
|
86
|
+
symlink: [{ at: 'node_modules', to: 'node_modules' }],
|
|
87
87
|
});
|
|
88
88
|
|
|
89
89
|
when('[t0] before any apply', () => {
|
|
@@ -237,14 +237,12 @@ describe('cicd-common workflow templates', () => {
|
|
|
237
237
|
* case runs the real pipeline, so an empty delivery goes red on byte-equality
|
|
238
238
|
*/
|
|
239
239
|
given('[case2] a consumer whose .test.yml is stale, on the custom-fix path', () => {
|
|
240
|
-
const tempDir =
|
|
240
|
+
const tempDir = genTempRepoWithDeclarationsOutside({
|
|
241
241
|
slug: 'cicd-common-action-pins-test-yml',
|
|
242
242
|
clone:
|
|
243
243
|
'./src/practices/cicd-common/.test/assets/repo-with-unpinned-workflow',
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
{ at: 'node_modules', to: 'node_modules' },
|
|
247
|
-
],
|
|
244
|
+
declarations: './src/.test/assets/cicd-common/declarations',
|
|
245
|
+
symlink: [{ at: 'node_modules', to: 'node_modules' }],
|
|
248
246
|
});
|
|
249
247
|
|
|
250
248
|
when('[t0] before any apply', () => {
|
|
@@ -419,14 +417,12 @@ describe('cicd-common workflow templates', () => {
|
|
|
419
417
|
* claim to mean what it says
|
|
420
418
|
*/
|
|
421
419
|
given('[case3] a consumer repo that also has a workflow of its OWN', () => {
|
|
422
|
-
const tempDir =
|
|
420
|
+
const tempDir = genTempRepoWithDeclarationsOutside({
|
|
423
421
|
slug: 'cicd-common-consumer-owned',
|
|
424
422
|
clone:
|
|
425
423
|
'./src/practices/cicd-common/.test/assets/repo-with-unpinned-workflow',
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
{ at: 'node_modules', to: 'node_modules' },
|
|
429
|
-
],
|
|
424
|
+
declarations: './src/.test/assets/cicd-common/declarations',
|
|
425
|
+
symlink: [{ at: 'node_modules', to: 'node_modules' }],
|
|
430
426
|
});
|
|
431
427
|
|
|
432
428
|
when('[t0] the whole practice is applied, unscoped', () => {
|
|
@@ -532,14 +528,12 @@ describe('cicd-common workflow templates', () => {
|
|
|
532
528
|
* could drift from the first and quietly cease to be the same repo
|
|
533
529
|
*/
|
|
534
530
|
given('[case4] a consumer repo where the declared workflow is ABSENT', () => {
|
|
535
|
-
const tempDir =
|
|
531
|
+
const tempDir = genTempRepoWithDeclarationsOutside({
|
|
536
532
|
slug: 'cicd-common-absent-workflow',
|
|
537
533
|
clone:
|
|
538
534
|
'./src/practices/cicd-common/.test/assets/repo-with-unpinned-workflow',
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
{ at: 'node_modules', to: 'node_modules' },
|
|
542
|
-
],
|
|
535
|
+
declarations: './src/.test/assets/cicd-common/declarations',
|
|
536
|
+
symlink: [{ at: 'node_modules', to: 'node_modules' }],
|
|
543
537
|
});
|
|
544
538
|
|
|
545
539
|
when('[t0] before any apply, with the workflow removed', () => {
|
|
@@ -152,7 +152,7 @@ describe('gitignore practices', () => {
|
|
|
152
152
|
slug: 'git-cache-dirs',
|
|
153
153
|
clone: './src/practices/git/.test/assets/repo-without-cache-ignores',
|
|
154
154
|
symlink: [
|
|
155
|
-
{ at: 'declarations', to: '
|
|
155
|
+
{ at: 'declarations', to: './src/.test/assets/git/declarations' },
|
|
156
156
|
{ at: 'node_modules', to: 'node_modules' },
|
|
157
157
|
],
|
|
158
158
|
});
|
|
@@ -602,7 +602,7 @@ describe('gitignore practices', () => {
|
|
|
602
602
|
slug: 'git-rhachet-only',
|
|
603
603
|
clone: './src/practices/git/.test/assets/repo-with-rhachet-only',
|
|
604
604
|
symlink: [
|
|
605
|
-
{ at: 'declarations', to: '
|
|
605
|
+
{ at: 'declarations', to: './src/.test/assets/git/declarations' },
|
|
606
606
|
{ at: 'node_modules', to: 'node_modules' },
|
|
607
607
|
],
|
|
608
608
|
});
|