declapract-typescript-ehmpathy 0.49.11 → 0.49.13
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/cache/declarations/practices/cache/.declapract.integration.test.ts +4 -4
- package/dist/.test/assets/cache/declarations/practices/cache/.test/assets/repo-with-valid-cache-package/package.json +1 -1
- package/dist/.test/assets/cache/declarations/practices/cache/best-practice/package.json +3 -3
- package/dist/.test/assets/cicd-service/declarations/declapract.declare.yml +9 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/.declapract.integration.test.ts +175 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/.test/assets/demo-repo-pre-stamped-nords/.github/workflows/provision.yml +110 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/.test/assets/demo-repo-pre-stamped-nords/declapract.use.nords.yml +20 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/.test/assets/demo-repo-pre-stamped-nords/declapract.use.rds.yml +20 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/.test/assets/demo-repo-pre-stamped-nords/package.json +4 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/.test/assets/demo-repo-service/declapract.use.nords.yml +20 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/.test/assets/demo-repo-service/declapract.use.rds.yml +20 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/.test/assets/demo-repo-service/package.json +4 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/__snapshots__/.declapract.integration.test.ts.snap +24 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/__snapshots__/acceptanceContempFleetGuard.declapract.integration.test.ts.snap +13 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/__snapshots__/insync-grep.declapract.integration.test.ts.snap +5 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/__snapshots__/provision.yml.declapract.integration.test.ts.snap +297 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/acceptanceContempFleetGuard.declapract.integration.test.ts +89 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/old-names/.github/workflows/deploy_dev_on_master.yml.declapract.ts +3 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/old-names/.github/workflows/deploy_on_tag.yml.declapract.ts +3 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/old-names/.github/workflows/deploy_prod_on_tag.yml.declapract.ts +3 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.declapract.integration.test.ts +153 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.declapract.readme.md +38 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.github/workflows/provision.yml.declapract.integration.test.ts +167 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.github/workflows/provision.yml.declapract.ts +88 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.test/assets/repo-non-rds/readme.md +9 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.test/assets/repo-with-aws-resources-callee/provision/aws/resources.ts +5 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.test/assets/repo-with-schema-callee/provision/schema/init.sql +5 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/__snapshots__/.declapract.integration.test.ts.snap +183 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/best-practice/.declapract.readme.md +22 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/best-practice/.github/workflows/.deploy-sls.yml +163 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/best-practice/.github/workflows/.sql-schema-control.yml +154 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/best-practice/.github/workflows/.terraform.yml +118 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/best-practice/.github/workflows/deploy.yml +77 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/best-practice/.github/workflows/deploy.yml.declapract.ts +15 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/best-practice/.github/workflows/provision.yml +110 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/best-practice/.github/workflows/provision.yml.declapract.ts +74 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/best-practice/package.json +7 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/insync-grep.declapract.integration.test.ts +76 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/provision.yml.declapract.integration.test.ts +182 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/.declapract.integration.test.ts +224 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/.extensions.sql.declapract.integration.test.ts +38 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/config/dev.json +18 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/declapract.declare.yml +4 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/declapract.use.yml +18 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/package.json +4 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/__snapshots__/.declapract.integration.test.ts.snap +45 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/__snapshots__/.extensions.sql.declapract.integration.test.ts.snap +42 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/__snapshots__/deploy-database-gerunds.declapract.integration.test.ts.snap +102 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/__snapshots__/provision-testdb-access.declapract.integration.test.ts.snap +3 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/__snapshots__/ssm-cicd-param-names.declapract.integration.test.ts.snap +10 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/__snapshots__/testdb-preflight-failloud.declapract.integration.test.ts.snap +30 -0
- package/dist/.test/assets/cicd-service/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/cicd-service/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/cicd-service/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/cicd-service/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/cicd-service/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/cicd-service/declarations/practices/persist-with-rds/bad-practices/non-prefixed-manual-init-sqls/readme.md +5 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-config-file-names/codegen.sql.yml.declapract.ts +3 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-dev-config-location/config/dev.json.declapract.ts +33 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-dir/.declapract.readme.md +1 -0
- package/dist/.test/assets/cicd-service/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/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-hyphen-dir/.declapract.readme.md +1 -0
- package/dist/.test/assets/cicd-service/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/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-paths/.declapract.readme.md +1 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-paths/package.json +8 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-paths/package.json.declapract.ts +10 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-packagejson-script-names/package.json +9 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-packagejson-script-names/package.json.declapract.ts +22 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-param-placeholder/config/<star>.json.declapract.ts +14 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/schema-entities-dir/.declapract.readme.md +1 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/schema-entities-dir/provision/schema/entities/<star>.ts.declapract.ts +12 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/schema-entities-dir/provision/schema/sql/entities.yml.declapract.ts +13 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/terraform-parameters/.declapract.integration.test.ts +88 -0
- package/dist/.test/assets/cicd-service/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/cicd-service/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/cicd-service/declarations/practices/persist-with-rds/bad-practices/terraform-parameters/.test/assets/demo-repo-with-terraform-ssm/package.json +4 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/terraform-parameters/.test/assets/demo-repo-with-terraform-ssm/provision/aws/product/parameter-store.tf +23 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/terraform-parameters/__snapshots__/.declapract.integration.test.ts.snap +44 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/terraform-parameters/provision/aws/product/parameter-store.tf.declapract.ts +55 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/with-connection-in-input/.declapract.readme.md +1 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/with-connection-in-input/src/utils/database/withDatabaseConnection.ts +3 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/.declapract.readme.md +58 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/codegen.sql.dao.yml +18 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/codegen.sql.dao.yml.declapract.ts +3 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/codegen.sql.schema.yml +6 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/codegen.sql.types.yml +16 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/config/prep.json +36 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/config/prep.json.declapract.ts +15 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/config/prod.json +36 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/config/prod.json.declapract.ts +15 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/config/test.json +33 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/config/test.json.declapract.ts +15 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/package.json +30 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/package.json.declapract.ts +3 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/aws/readme.md +79 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/aws/resources.parameters.ts +106 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/aws/resources.ts +30 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/build-image.dockerfile +7 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/docker-compose.yml +18 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/init/.gitignore +3 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/init/readme.md +3 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/wait-for-postgres.sh +25 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/connection.config.js +29 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/control.yml +7 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/deploy.database.sh +97 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.database.sql +10 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.extensions.sql +16 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.extensions.sql.declapract.ts +37 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.schema.sql +11 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.user.cicd.sql +14 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.user.datalakedb.sql +12 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/default_transaction_isolation.sql +6 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/user.service.sql +16 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init.yml +9 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init.yml.declapract.ts +3 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/src/utils/config/config.schema.ts +110 -0
- package/dist/{practices/persist-with-rds/best-practice/src/utils/database/getDatabaseConnection.integration.test.ts → .test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/src/utils/database/getOneDatabaseConnection.integration.test.ts} +3 -3
- package/dist/{practices/persist-with-rds/best-practice/src/utils/database/getDatabaseConnection.ts → .test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/src/utils/database/getOneDatabaseConnection.ts} +1 -1
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/src/utils/database/withDatabaseContext.ts +53 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/src/utils/database/withDatabaseTransaction.ts +33 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/deploy-database-gerunds.declapract.integration.test.ts +57 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/empty-template-declares-zero-clusters.declapract.integration.test.ts +71 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/provision-testdb-access.declapract.integration.test.ts +50 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/ssm-cicd-param-names.declapract.integration.test.ts +73 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/testdb-preflight-failloud.declapract.integration.test.ts +83 -0
- package/dist/.test/assets/cicd-service/declarations/useCases.yml +13 -0
- package/dist/.test/assets/environments/declarations/declapract.declare.yml +4 -0
- package/dist/.test/assets/environments/declarations/practices/environments/.declapract.integration.test.ts +136 -0
- package/dist/.test/assets/environments/declarations/practices/environments/__snapshots__/.declapract.integration.test.ts.snap +55 -0
- package/dist/.test/assets/environments/declarations/practices/environments/bad-practices/old-dev-scripts/package.json.declapract.ts +59 -0
- package/dist/.test/assets/environments/declarations/practices/environments/bad-practices/old-stage-enum/.declapract.integration.test.ts +133 -0
- package/dist/.test/assets/environments/declarations/practices/environments/bad-practices/old-stage-enum/.test/assets/demo-repo-with-stage-enum/declapract.use.yml +8 -0
- package/dist/.test/assets/environments/declarations/practices/environments/bad-practices/old-stage-enum/.test/assets/demo-repo-with-stage-enum/package.json +4 -0
- package/dist/.test/assets/environments/declarations/practices/environments/bad-practices/old-stage-enum/.test/assets/demo-repo-with-stage-enum/src/logic/getDeployTarget.ts +15 -0
- package/dist/.test/assets/environments/declarations/practices/environments/bad-practices/old-stage-enum/__snapshots__/.declapract.integration.test.ts.snap +40 -0
- package/dist/.test/assets/environments/declarations/practices/environments/bad-practices/old-stage-enum/src/<star><star>/<star>.ts.declapract.ts +304 -0
- package/dist/.test/assets/environments/declarations/practices/environments/best-practice/.declapract.readme.md +61 -0
- package/dist/.test/assets/environments/declarations/practices/environments/best-practice/package.json +7 -0
- package/dist/.test/assets/environments/declarations/practices/environments/best-practice/package.json.declapract.ts +3 -0
- package/dist/.test/assets/environments/declarations/practices/environments/best-practice/src/access/sdks/sdkAwsLambdaEnvAccessAncient.ts +32 -0
- package/dist/.test/assets/environments/declarations/practices/environments/best-practice/src/access/sdks/sdkAwsLambdaEnvAccessContemp.ts +14 -0
- package/dist/.test/assets/environments/declarations/practices/environments/best-practice/src/utils/environment.ts +9 -0
- package/dist/.test/assets/environments/declarations/useCases.yml +5 -0
- package/dist/.test/assets/expo/declarations/practices/cicd-app-react-native-expo/.declapract.integration.test.ts +122 -22
- package/dist/.test/assets/expo/declarations/practices/cicd-app-react-native-expo/__snapshots__/.declapract.integration.test.ts.snap +40 -29
- package/dist/.test/assets/expo/declarations/practices/cicd-app-react-native-expo/best-practice/.github/workflows/.deploy-expo.yml +16 -6
- package/dist/.test/assets/expo/declarations/practices/cicd-app-react-native-expo/best-practice/.github/workflows/deploy.yml +11 -11
- package/dist/.test/assets/expo/declarations/practices/cicd-app-react-native-expo/best-practice/.github/workflows/test.yml +3 -5
- package/dist/.test/assets/expo/declarations/practices/cicd-app-react-native-expo/best-practice/package.json +2 -2
- package/dist/.test/assets/expo/declarations/practices/node/bad-practices/self-deps-not-link/.declapract.integration.test.ts +102 -0
- package/dist/.test/assets/expo/declarations/practices/node/bad-practices/self-deps-not-link/.test/assets/demo-repo-with-self-deps/declapract.declare.yml +4 -0
- package/dist/.test/assets/expo/declarations/practices/node/bad-practices/self-deps-not-link/.test/assets/demo-repo-with-self-deps/declapract.use.yml +8 -0
- package/dist/.test/assets/expo/declarations/practices/node/bad-practices/self-deps-not-link/.test/assets/demo-repo-with-self-deps/package.json +15 -0
- package/dist/.test/assets/expo/declarations/practices/node/bad-practices/self-deps-not-link/__snapshots__/.declapract.integration.test.ts.snap +46 -0
- package/dist/.test/assets/expo/declarations/practices/node/bad-practices/self-deps-not-link/package.json.declapract.ts +22 -29
- package/dist/.test/assets/expo/declarations/practices/node/best-practice/.npmrc.declapract.ts +5 -1
- package/dist/.test/assets/expo/declarations/practices/node/best-practice/package.json +1 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cache/.declapract.integration.test.ts +4 -4
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cache/.test/assets/repo-with-valid-cache-package/package.json +1 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cache/best-practice/package.json +3 -3
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-app-react-native-expo/.declapract.integration.test.ts +122 -22
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-app-react-native-expo/__snapshots__/.declapract.integration.test.ts.snap +40 -29
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-app-react-native-expo/best-practice/.github/workflows/.deploy-expo.yml +16 -6
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-app-react-native-expo/best-practice/.github/workflows/deploy.yml +11 -11
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-app-react-native-expo/best-practice/.github/workflows/test.yml +3 -5
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-app-react-native-expo/best-practice/package.json +2 -2
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/.declapract.integration.test.ts +25 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/__snapshots__/.declapract.integration.test.ts.snap +11 -23
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/__snapshots__/declastruct-insync-grep.declapract.integration.test.ts.snap +3 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/best-practice/.github/workflows/.declastruct.yml +22 -8
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/best-practice/.github/workflows/.test.yml +11 -23
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/best-practice/.github/workflows/.test.yml.declapract.ts +12 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/best-practice/.github/workflows/report-slow-tests.sh +65 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/declastruct-insync-grep.declapract.integration.test.ts +49 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/report-slow-tests.play.declapract.integration.test.ts +144 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/conventional-commits/__snapshots__/commitlint-body-max-line.declapract.integration.test.ts.snap +3 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/conventional-commits/best-practice/commitlint.config.js +5 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/conventional-commits/best-practice/package.json +1 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/conventional-commits/commitlint-body-max-line.declapract.integration.test.ts +49 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/domain/.declapract.integration.test.ts +115 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/domain/bad-practices/schematic-joi-model/src/{domain → domain.objects}/<star><star>/<star>.ts.declapract.ts +4 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/domain/best-practice/package.json +2 -2
- package/dist/.test/assets/expo-fullusecase/declarations/practices/domain/best-practice/src/domain.objects/index.ts.declapract.ts +12 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/errors/.declapract.integration.test.ts +121 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/errors/bad-practices/own-implementation/src/<star><star>/UnexpectedCodePathError.ts.declapract.ts +8 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/errors/best-practice/package.json +1 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/format/.declapract.integration.test.ts +131 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/format/__snapshots__/.declapract.integration.test.ts.snap +17 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/format/bad-practices/prettier/prettier.config.js.declapract.ts +1 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/format/best-practice/package.json.declapract.ts +36 -18
- package/dist/.test/assets/expo-fullusecase/declarations/practices/git/.declapract.integration.test.ts +57 -6
- package/dist/.test/assets/expo-fullusecase/declarations/practices/git/__snapshots__/.declapract.integration.test.ts.snap +2 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/git/best-practice/.gitattributes.declapract.ts +50 -37
- package/dist/.test/assets/expo-fullusecase/declarations/practices/git/best-practice/.gitignore.declapract.ts +8 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/husky/__snapshots__/check.timestamps.play.declapract.integration.test.ts.snap +7 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/husky/best-practice/.husky/check.timestamps.sh +11 -2
- package/dist/.test/assets/expo-fullusecase/declarations/practices/husky/check.timestamps.play.declapract.integration.test.ts +65 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/lint/__snapshots__/dpdmrc-exclude-policy.declapract.integration.test.ts.snap +3 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/lint/bad-practices/depcheck-denylisted-ignores/.depcheckrc.yml.declapract.ts +4 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/lint/best-practice/.depcheckrc.yml.declapract.ts +10 -9
- package/dist/.test/assets/expo-fullusecase/declarations/practices/lint/best-practice/.dpdmrc.yaml +10 -6
- package/dist/.test/assets/expo-fullusecase/declarations/practices/lint/dpdmrc-exclude-policy.declapract.integration.test.ts +50 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/node/bad-practices/self-deps-not-link/.declapract.integration.test.ts +102 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/node/bad-practices/self-deps-not-link/.test/assets/demo-repo-with-self-deps/declapract.declare.yml +4 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/node/bad-practices/self-deps-not-link/.test/assets/demo-repo-with-self-deps/declapract.use.yml +8 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/node/bad-practices/self-deps-not-link/.test/assets/demo-repo-with-self-deps/package.json +15 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/node/bad-practices/self-deps-not-link/__snapshots__/.declapract.integration.test.ts.snap +46 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/node/bad-practices/self-deps-not-link/package.json.declapract.ts +22 -29
- package/dist/.test/assets/expo-fullusecase/declarations/practices/node/best-practice/.npmrc.declapract.ts +5 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/node/best-practice/package.json +1 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/package-json-order/best-practice/package.json.declapract.ts +7 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/.declapract.integration.test.ts +163 -13
- package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/.test/assets/repo-npm-to-pnpm/package.json +1 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/.test/assets/repo-npm-to-pnpm/pnpm-workspace.yaml +3 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/__snapshots__/.declapract.integration.test.ts.snap +9 -2
- package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/bad-practices/inert-build-allowlist/pnpm-workspace.yaml.declapract.ts +59 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/best-practice/.declapract.readme.md +1 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/best-practice/package.json +1 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/best-practice/package.json.declapract.ts +4 -2
- package/dist/.test/assets/expo-fullusecase/declarations/practices/provision-github/best-practice/package.json +2 -2
- package/dist/.test/assets/expo-fullusecase/declarations/practices/provision-github/best-practice/provision/github.repo/resources.ts +16 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/.declapract.integration.test.ts +98 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/.agent/repo=.this/role=any/boot.yml +7 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/declapract.declare.yml +4 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/declapract.use.yml +2 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/package.json +4 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/__snapshots__/.declapract.integration.test.ts.snap +45 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/__snapshots__/boot-refs-glossary.declapract.integration.test.ts.snap +6 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/__snapshots__/boot-yml-findsert.declapract.integration.test.ts.snap +27 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/bad-practices/prod-deps/.declapract.readme.md +6 -2
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/bad-practices/prod-deps/.test/assets/demo-repo-with-rhachet-prod-deps/declapract.declare.yml +4 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/bad-practices/prod-deps/.test/assets/demo-repo-with-rhachet-prod-deps/declapract.use.yml +2 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/bad-practices/prod-deps/.test/assets/demo-repo-with-rhachet-prod-deps/package.json +12 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/bad-practices/prod-deps/package.json.declapract.ts +58 -17
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/best-practice/.agent/repo=.this/role=any/boot.yml +46 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/best-practice/.agent/repo=.this/role=any/boot.yml.declapract.ts +165 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/best-practice/.gitignore.declapract.ts +18 -5
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/best-practice/package.json +8 -8
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/boot-refs-glossary.declapract.integration.test.ts +89 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/boot-yml-findsert.declapract.integration.test.ts +145 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-any/__snapshots__/changedsince-origin-main.declapract.integration.test.ts.snap +8 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-any/autoprune-hooks.declapract.integration.test.ts +104 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-any/bad-practices/old-acceptance-import-paths/.declapract.readme.md +2 -2
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-any/bad-practices/old-acceptance-test-utils/blackbox/lambdas/<star>.ts.declapract.ts +9 -9
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-any/best-practice/package.json +3 -3
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-any/changedsince-origin-main.declapract.integration.test.ts +58 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-any/{best-practice/package.json.shell-flags.declapract.integration.test.ts → package.json.shell-flags.declapract.integration.test.ts} +26 -16
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/.declapract.integration.test.ts +7 -3
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/.test/assets/repo-expo-greenfield/package.json +5 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/__snapshots__/.declapract.integration.test.ts.snap +17 -8
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/__snapshots__/package.json.declapract.integration.test.ts.snap +60 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/best-practice/jest.acceptance.config.ts +5 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/best-practice/jest.integration.config.ts +5 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/best-practice/jest.integration.env.ts +5 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/best-practice/jest.unit.config.ts +5 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/best-practice/jest.unit.env.ts +6 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/best-practice/package.json.declapract.ts +190 -13
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/package.json.declapract.integration.test.ts +94 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/typescript-expo/__snapshots__/package.json.declapract.integration.test.ts.snap +8 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/typescript-expo/__snapshots__/tsconfig.json.declapract.integration.test.ts.snap +19 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/typescript-expo/{best-practice/package.json.declapract.integration.test.ts → package.json.declapract.integration.test.ts} +15 -2
- package/dist/.test/assets/{expo-toolchain/declarations/practices/typescript-expo/best-practice → expo-fullusecase/declarations/practices/typescript-expo}/tsconfig.json.declapract.integration.test.ts +13 -2
- package/dist/.test/assets/expo-migration/declarations/practices/cicd-app-react-native-expo/.declapract.integration.test.ts +122 -22
- package/dist/.test/assets/expo-migration/declarations/practices/cicd-app-react-native-expo/__snapshots__/.declapract.integration.test.ts.snap +40 -29
- package/dist/.test/assets/expo-migration/declarations/practices/cicd-app-react-native-expo/best-practice/.github/workflows/.deploy-expo.yml +16 -6
- package/dist/.test/assets/expo-migration/declarations/practices/cicd-app-react-native-expo/best-practice/.github/workflows/deploy.yml +11 -11
- package/dist/.test/assets/expo-migration/declarations/practices/cicd-app-react-native-expo/best-practice/.github/workflows/test.yml +3 -5
- package/dist/.test/assets/expo-migration/declarations/practices/cicd-app-react-native-expo/best-practice/package.json +2 -2
- package/dist/.test/assets/expo-migration/declarations/practices/domain/.declapract.integration.test.ts +115 -0
- package/dist/{practices/domain/bad-practices/schematic-joi-model/src/domain → .test/assets/expo-migration/declarations/practices/domain/bad-practices/schematic-joi-model/src/domain.objects}/<star><star>/<star>.ts.declapract.ts +4 -1
- package/dist/.test/assets/expo-migration/declarations/practices/domain/best-practice/package.json +2 -2
- package/dist/.test/assets/expo-migration/declarations/practices/domain/best-practice/src/domain.objects/index.ts.declapract.ts +12 -0
- package/dist/.test/assets/expo-migration/declarations/practices/git/.declapract.integration.test.ts +57 -6
- package/dist/.test/assets/expo-migration/declarations/practices/git/__snapshots__/.declapract.integration.test.ts.snap +2 -0
- package/dist/.test/assets/expo-migration/declarations/practices/git/best-practice/.gitattributes.declapract.ts +50 -37
- package/dist/.test/assets/expo-migration/declarations/practices/git/best-practice/.gitignore.declapract.ts +8 -0
- package/dist/.test/assets/expo-migration/declarations/practices/node/bad-practices/self-deps-not-link/.declapract.integration.test.ts +102 -0
- package/dist/.test/assets/expo-migration/declarations/practices/node/bad-practices/self-deps-not-link/.test/assets/demo-repo-with-self-deps/declapract.declare.yml +4 -0
- package/dist/.test/assets/expo-migration/declarations/practices/node/bad-practices/self-deps-not-link/.test/assets/demo-repo-with-self-deps/declapract.use.yml +8 -0
- package/dist/.test/assets/expo-migration/declarations/practices/node/bad-practices/self-deps-not-link/.test/assets/demo-repo-with-self-deps/package.json +15 -0
- package/dist/.test/assets/expo-migration/declarations/practices/node/bad-practices/self-deps-not-link/__snapshots__/.declapract.integration.test.ts.snap +46 -0
- package/dist/.test/assets/expo-migration/declarations/practices/node/bad-practices/self-deps-not-link/package.json.declapract.ts +22 -29
- package/dist/.test/assets/expo-migration/declarations/practices/node/best-practice/.npmrc.declapract.ts +5 -1
- package/dist/.test/assets/expo-migration/declarations/practices/node/best-practice/package.json +1 -1
- package/dist/.test/assets/expo-migration/declarations/practices/pnpm/.declapract.integration.test.ts +163 -13
- package/dist/.test/assets/expo-migration/declarations/practices/pnpm/.test/assets/repo-npm-to-pnpm/package.json +1 -1
- package/dist/.test/assets/expo-migration/declarations/practices/pnpm/.test/assets/repo-npm-to-pnpm/pnpm-workspace.yaml +3 -0
- package/dist/.test/assets/expo-migration/declarations/practices/pnpm/__snapshots__/.declapract.integration.test.ts.snap +9 -2
- package/dist/.test/assets/expo-migration/declarations/practices/pnpm/bad-practices/inert-build-allowlist/pnpm-workspace.yaml.declapract.ts +59 -0
- package/dist/.test/assets/expo-migration/declarations/practices/pnpm/best-practice/.declapract.readme.md +1 -1
- package/dist/.test/assets/expo-migration/declarations/practices/pnpm/best-practice/package.json +1 -1
- package/dist/.test/assets/expo-migration/declarations/practices/pnpm/best-practice/package.json.declapract.ts +4 -2
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/.declapract.integration.test.ts +98 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/.agent/repo=.this/role=any/boot.yml +7 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/declapract.declare.yml +4 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/declapract.use.yml +2 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/package.json +4 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/__snapshots__/.declapract.integration.test.ts.snap +45 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/__snapshots__/boot-refs-glossary.declapract.integration.test.ts.snap +6 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/__snapshots__/boot-yml-findsert.declapract.integration.test.ts.snap +27 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/bad-practices/prod-deps/.declapract.readme.md +6 -2
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/bad-practices/prod-deps/.test/assets/demo-repo-with-rhachet-prod-deps/declapract.declare.yml +4 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/bad-practices/prod-deps/.test/assets/demo-repo-with-rhachet-prod-deps/declapract.use.yml +2 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/bad-practices/prod-deps/.test/assets/demo-repo-with-rhachet-prod-deps/package.json +12 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/bad-practices/prod-deps/package.json.declapract.ts +58 -17
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/best-practice/.agent/repo=.this/role=any/boot.yml +46 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/best-practice/.agent/repo=.this/role=any/boot.yml.declapract.ts +165 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/best-practice/.gitignore.declapract.ts +18 -5
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/best-practice/package.json +8 -8
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/boot-refs-glossary.declapract.integration.test.ts +89 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/boot-yml-findsert.declapract.integration.test.ts +145 -0
- package/dist/.test/assets/expo-migration/declarations/practices/tests-any/__snapshots__/changedsince-origin-main.declapract.integration.test.ts.snap +8 -0
- package/dist/.test/assets/expo-migration/declarations/practices/tests-any/autoprune-hooks.declapract.integration.test.ts +104 -0
- package/dist/.test/assets/expo-migration/declarations/practices/tests-any/bad-practices/old-acceptance-import-paths/.declapract.readme.md +2 -2
- package/dist/.test/assets/expo-migration/declarations/practices/tests-any/bad-practices/old-acceptance-test-utils/blackbox/lambdas/<star>.ts.declapract.ts +9 -9
- package/dist/.test/assets/expo-migration/declarations/practices/tests-any/best-practice/package.json +3 -3
- package/dist/.test/assets/expo-migration/declarations/practices/tests-any/changedsince-origin-main.declapract.integration.test.ts +58 -0
- package/dist/.test/assets/{expo-toolchain/declarations/practices/tests-any/best-practice → expo-migration/declarations/practices/tests-any}/package.json.shell-flags.declapract.integration.test.ts +26 -16
- package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/.declapract.integration.test.ts +7 -3
- package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/.test/assets/repo-expo-greenfield/package.json +5 -1
- package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/__snapshots__/.declapract.integration.test.ts.snap +17 -8
- package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/__snapshots__/package.json.declapract.integration.test.ts.snap +60 -0
- package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/best-practice/jest.acceptance.config.ts +5 -0
- package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/best-practice/jest.integration.config.ts +5 -0
- package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/best-practice/jest.integration.env.ts +5 -1
- package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/best-practice/jest.unit.config.ts +5 -0
- package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/best-practice/jest.unit.env.ts +6 -1
- package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/best-practice/package.json.declapract.ts +190 -13
- package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/package.json.declapract.integration.test.ts +94 -0
- package/dist/.test/assets/expo-migration/declarations/practices/typescript-expo/__snapshots__/package.json.declapract.integration.test.ts.snap +8 -0
- package/dist/.test/assets/expo-migration/declarations/practices/typescript-expo/__snapshots__/tsconfig.json.declapract.integration.test.ts.snap +19 -0
- package/dist/.test/assets/{expo-toolchain/declarations/practices/typescript-expo/best-practice → expo-migration/declarations/practices/typescript-expo}/package.json.declapract.integration.test.ts +15 -2
- package/dist/.test/assets/{expo-fullusecase/declarations/practices/typescript-expo/best-practice → expo-migration/declarations/practices/typescript-expo}/tsconfig.json.declapract.integration.test.ts +13 -2
- package/dist/.test/assets/expo-migration/repo-app-protools-shaped/.github/workflows/.deploy-expo.yml +1 -1
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-any/__snapshots__/changedsince-origin-main.declapract.integration.test.ts.snap +8 -0
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-any/autoprune-hooks.declapract.integration.test.ts +104 -0
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-any/bad-practices/old-acceptance-import-paths/.declapract.readme.md +2 -2
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-any/bad-practices/old-acceptance-test-utils/blackbox/lambdas/<star>.ts.declapract.ts +9 -9
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-any/best-practice/package.json +3 -3
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-any/changedsince-origin-main.declapract.integration.test.ts +58 -0
- package/dist/.test/assets/{expo-migration/declarations/practices/tests-any/best-practice → expo-toolchain/declarations/practices/tests-any}/package.json.shell-flags.declapract.integration.test.ts +26 -16
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/.declapract.integration.test.ts +7 -3
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/.test/assets/repo-expo-greenfield/package.json +5 -1
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/__snapshots__/.declapract.integration.test.ts.snap +17 -8
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/__snapshots__/package.json.declapract.integration.test.ts.snap +60 -0
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/best-practice/jest.acceptance.config.ts +5 -0
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/best-practice/jest.integration.config.ts +5 -0
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/best-practice/jest.integration.env.ts +5 -1
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/best-practice/jest.unit.config.ts +5 -0
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/best-practice/jest.unit.env.ts +6 -1
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/best-practice/package.json.declapract.ts +190 -13
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/package.json.declapract.integration.test.ts +94 -0
- package/dist/.test/assets/expo-toolchain/declarations/practices/typescript-expo/__snapshots__/package.json.declapract.integration.test.ts.snap +8 -0
- package/dist/.test/assets/expo-toolchain/declarations/practices/typescript-expo/__snapshots__/tsconfig.json.declapract.integration.test.ts.snap +19 -0
- package/dist/.test/assets/{expo-migration/declarations/practices/typescript-expo/best-practice → expo-toolchain/declarations/practices/typescript-expo}/package.json.declapract.integration.test.ts +15 -2
- package/dist/{practices/typescript-expo/best-practice → .test/assets/expo-toolchain/declarations/practices/typescript-expo}/tsconfig.json.declapract.integration.test.ts +13 -2
- package/dist/.test/assets/format/declarations/declapract.declare.yml +9 -0
- package/dist/.test/assets/format/declarations/practices/format/.declapract.integration.test.ts +131 -0
- package/dist/.test/assets/format/declarations/practices/format/__snapshots__/.declapract.integration.test.ts.snap +17 -0
- package/dist/.test/assets/format/declarations/practices/format/bad-practices/format-script/package.json.declapract.ts +26 -0
- package/dist/.test/assets/format/declarations/practices/format/bad-practices/prettier/.declapract.readme.md +6 -0
- package/dist/.test/assets/format/declarations/practices/format/bad-practices/prettier/.prettierignore +3 -0
- package/dist/.test/assets/format/declarations/practices/format/bad-practices/prettier/.prettierignore.declapract.ts +8 -0
- package/dist/.test/assets/format/declarations/practices/format/bad-practices/prettier/package.json +10 -0
- package/dist/.test/assets/format/declarations/practices/format/bad-practices/prettier/package.json.declapract.ts +35 -0
- package/dist/.test/assets/format/declarations/practices/format/bad-practices/prettier/prettier.config.js +10 -0
- package/dist/.test/assets/format/declarations/practices/format/bad-practices/prettier/prettier.config.js.declapract.ts +8 -0
- package/dist/.test/assets/format/declarations/practices/format/best-practice/package.json.declapract.ts +50 -0
- package/dist/.test/assets/format/declarations/practices/terraform-common/bad-practices/terraform-dir/.declapract.readme.md +8 -0
- package/dist/.test/assets/format/declarations/practices/terraform-common/bad-practices/terraform-dir/provision/terraform/<star><star>/<star>.declapract.ts +17 -0
- package/dist/.test/assets/format/declarations/practices/terraform-common/best-practice/.terraform-version +1 -0
- package/dist/.test/assets/format/declarations/practices/terraform-common/best-practice/package.json +6 -0
- package/dist/.test/assets/format/declarations/practices/terraform-common/best-practice/package.json.declapract.ts +3 -0
- package/dist/.test/assets/format/declarations/useCases.yml +13 -0
- package/dist/.test/assets/format/repo-with-terraform/declapract.use.yml +8 -0
- package/dist/.test/assets/format/repo-with-terraform/package.json +5 -0
- package/dist/.test/assets/format/repo-without-terraform/declapract.use.yml +6 -0
- package/dist/.test/assets/format/repo-without-terraform/package.json +5 -0
- package/dist/.test/assets/node-service/declarations/declapract.declare.yml +4 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/license/package.json.declapract.ts +22 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-client/.declapract.readme.md +55 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-client/package.json +5 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-client/package.json.declapract.ts +27 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-client/src/<star><star>/<star>.ts.declapract.ts +44 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-handlers/.declapract.integration.test.ts +103 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-handlers/.declapract.readme.md +60 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-handlers/.test/assets/demo-repo-with-simple-lambda-handlers/declapract.use.yml +5 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-handlers/.test/assets/demo-repo-with-simple-lambda-handlers/package.json +4 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-handlers/.test/assets/demo-repo-with-simple-lambda-handlers/src/contract/handlers/getWidget.ts +13 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-handlers/__snapshots__/.declapract.integration.test.ts.snap +44 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-handlers/package.json +5 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-handlers/package.json.declapract.ts +27 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-handlers/src/<star><star>/<star>.ts.declapract.ts +130 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/best-practice/package.json +6 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/best-practice/package.json.declapract.ts +3 -0
- package/dist/.test/assets/node-service/declarations/useCases.yml +5 -0
- package/dist/.test/assets/pnpm/declarations/practices/pnpm/.declapract.integration.test.ts +163 -13
- package/dist/.test/assets/pnpm/declarations/practices/pnpm/.test/assets/repo-npm-to-pnpm/package.json +1 -1
- package/dist/.test/assets/pnpm/declarations/practices/pnpm/.test/assets/repo-npm-to-pnpm/pnpm-workspace.yaml +3 -0
- package/dist/.test/assets/pnpm/declarations/practices/pnpm/__snapshots__/.declapract.integration.test.ts.snap +9 -2
- package/dist/.test/assets/pnpm/declarations/practices/pnpm/bad-practices/inert-build-allowlist/pnpm-workspace.yaml.declapract.ts +59 -0
- package/dist/.test/assets/pnpm/declarations/practices/pnpm/best-practice/.declapract.readme.md +1 -1
- package/dist/.test/assets/pnpm/declarations/practices/pnpm/best-practice/package.json +1 -1
- package/dist/.test/assets/pnpm/declarations/practices/pnpm/best-practice/package.json.declapract.ts +4 -2
- package/dist/.test/assets/runtime-schemas/declarations/declapract.declare.yml +4 -0
- package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/bad-practices/joi/.declapract.integration.test.ts +102 -0
- package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/bad-practices/joi/.declapract.readme.md +3 -0
- package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/bad-practices/joi/.test/assets/demo-repo-with-joi/declapract.use.yml +5 -0
- package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/bad-practices/joi/.test/assets/demo-repo-with-joi/package.json +4 -0
- package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/bad-practices/joi/.test/assets/demo-repo-with-joi/src/contract/schemas/widget.schema.ts +9 -0
- package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/bad-practices/joi/__snapshots__/.declapract.integration.test.ts.snap +37 -0
- package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/bad-practices/joi/package.json +5 -0
- package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/bad-practices/joi/package.json.declapract.ts +23 -0
- package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/bad-practices/joi/src/<star><star>/<star>.ts.declapract.ts +79 -0
- package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/best-practice/package.json +5 -0
- package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/best-practice/package.json.declapract.ts +3 -0
- package/dist/.test/assets/runtime-schemas/declarations/useCases.yml +5 -0
- package/dist/.test/assets/tests-service/declarations/declapract.declare.yml +10 -0
- package/dist/.test/assets/tests-service/declarations/practices/tests-service/.test/assets/demo-repo-service/declapract.use.yml +5 -0
- package/dist/.test/assets/tests-service/declarations/practices/tests-service/.test/assets/demo-repo-service/package.json +4 -0
- package/dist/.test/assets/tests-service/declarations/practices/tests-service/__snapshots__/package.json.declapract.integration.test.ts.snap +26 -0
- package/dist/.test/assets/tests-service/declarations/practices/tests-service/asFunctionNameFromTestFileName.ts +7 -0
- package/dist/.test/assets/tests-service/declarations/practices/tests-service/best-practice/.declapract.readme.md +68 -0
- package/dist/.test/assets/tests-service/declarations/practices/tests-service/best-practice/blackbox/<star><star>/<star>.acceptance.test.ts.declapract.ts +3 -0
- package/dist/.test/assets/tests-service/declarations/practices/tests-service/best-practice/blackbox/lambdas/<star>.acceptance.test.ts.declapract.ts +56 -0
- package/dist/.test/assets/tests-service/declarations/practices/tests-service/best-practice/package.json +8 -0
- package/dist/.test/assets/tests-service/declarations/practices/tests-service/best-practice/package.json.declapract.ts +101 -0
- package/dist/.test/assets/tests-service/declarations/practices/tests-service/best-practice/src/<star><star>/<star>.integration.test.ts.declapract.ts +3 -0
- package/dist/.test/assets/tests-service/declarations/practices/tests-service/best-practice/src/<star><star>/<star>.test.ts.declapract.ts +3 -0
- package/dist/.test/assets/tests-service/declarations/practices/tests-service/package.json.declapract.integration.test.ts +204 -0
- package/dist/.test/assets/tests-service/declarations/useCases.yml +9 -0
- package/dist/__snapshots__/ancientTargetPublished.declapract.integration.test.ts.snap +42 -0
- package/dist/__snapshots__/workflowCallerCalleeReconciliation.declapract.integration.test.ts.snap +450 -0
- package/dist/__snapshots__/workflowEnvDeploymentFalse.declapract.integration.test.ts.snap +36 -0
- package/dist/actionPins.declapract.integration.test.ts +3 -18
- package/dist/ancientTargetPublished.declapract.integration.test.ts +174 -0
- package/dist/bestPracticeTemplateParse.declapract.integration.test.ts +169 -0
- package/dist/parsePackageJSONAdoption.declapract.integration.test.ts +136 -0
- package/dist/practiceTestFileLocation.declapract.integration.test.ts +75 -0
- package/dist/practices/cache/.declapract.integration.test.ts +4 -4
- package/dist/practices/cache/.test/assets/repo-with-valid-cache-package/package.json +1 -1
- package/dist/practices/cache/best-practice/package.json +3 -3
- package/dist/practices/cicd-app-react-native-expo/.declapract.integration.test.ts +122 -22
- package/dist/practices/cicd-app-react-native-expo/__snapshots__/.declapract.integration.test.ts.snap +40 -29
- package/dist/practices/cicd-app-react-native-expo/best-practice/.github/workflows/.deploy-expo.yml +16 -6
- package/dist/practices/cicd-app-react-native-expo/best-practice/.github/workflows/deploy.yml +11 -11
- package/dist/practices/cicd-app-react-native-expo/best-practice/.github/workflows/test.yml +3 -5
- package/dist/practices/cicd-app-react-native-expo/best-practice/package.json +2 -2
- package/dist/practices/cicd-common/.declapract.integration.test.ts +25 -0
- package/dist/practices/cicd-common/__snapshots__/.declapract.integration.test.ts.snap +11 -23
- package/dist/practices/cicd-common/__snapshots__/declastruct-insync-grep.declapract.integration.test.ts.snap +3 -0
- package/dist/practices/cicd-common/best-practice/.github/workflows/.declastruct.yml +22 -8
- package/dist/practices/cicd-common/best-practice/.github/workflows/.test.yml +11 -23
- package/dist/practices/cicd-common/best-practice/.github/workflows/.test.yml.declapract.ts +12 -1
- package/dist/practices/cicd-common/best-practice/.github/workflows/report-slow-tests.sh +65 -0
- package/dist/practices/cicd-common/declastruct-insync-grep.declapract.integration.test.ts +49 -0
- package/dist/practices/cicd-common/report-slow-tests.play.declapract.integration.test.ts +144 -0
- package/dist/practices/cicd-package/best-practice/.github/workflows/provision.yml +2 -1
- package/dist/practices/cicd-service/.declapract.integration.test.ts +175 -0
- package/dist/practices/cicd-service/.test/assets/demo-repo-pre-stamped-nords/.github/workflows/provision.yml +110 -0
- package/dist/practices/cicd-service/.test/assets/demo-repo-pre-stamped-nords/declapract.use.nords.yml +20 -0
- package/dist/practices/cicd-service/.test/assets/demo-repo-pre-stamped-nords/declapract.use.rds.yml +20 -0
- package/dist/practices/cicd-service/.test/assets/demo-repo-pre-stamped-nords/package.json +4 -0
- package/dist/practices/cicd-service/.test/assets/demo-repo-service/declapract.use.nords.yml +20 -0
- package/dist/practices/cicd-service/.test/assets/demo-repo-service/declapract.use.rds.yml +20 -0
- package/dist/practices/cicd-service/.test/assets/demo-repo-service/package.json +4 -0
- package/dist/practices/cicd-service/__snapshots__/.declapract.integration.test.ts.snap +24 -0
- package/dist/practices/cicd-service/__snapshots__/acceptanceContempFleetGuard.declapract.integration.test.ts.snap +13 -0
- package/dist/practices/cicd-service/__snapshots__/insync-grep.declapract.integration.test.ts.snap +5 -0
- package/dist/practices/cicd-service/__snapshots__/provision.yml.declapract.integration.test.ts.snap +297 -0
- package/dist/practices/cicd-service/acceptanceContempFleetGuard.declapract.integration.test.ts +89 -0
- package/dist/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.declapract.integration.test.ts +153 -0
- package/dist/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.declapract.readme.md +38 -0
- package/dist/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.github/workflows/provision.yml.declapract.integration.test.ts +167 -0
- package/dist/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.github/workflows/provision.yml.declapract.ts +88 -0
- package/dist/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.test/assets/repo-non-rds/readme.md +9 -0
- package/dist/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.test/assets/repo-with-aws-resources-callee/provision/aws/resources.ts +5 -0
- package/dist/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.test/assets/repo-with-schema-callee/provision/schema/init.sql +5 -0
- package/dist/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/__snapshots__/.declapract.integration.test.ts.snap +183 -0
- package/dist/practices/cicd-service/best-practice/.declapract.readme.md +18 -0
- package/dist/practices/cicd-service/best-practice/.github/workflows/.deploy-sls.yml +32 -11
- package/dist/practices/cicd-service/best-practice/.github/workflows/.sql-schema-control.yml +20 -10
- package/dist/practices/cicd-service/best-practice/.github/workflows/.terraform.yml +14 -4
- package/dist/practices/cicd-service/best-practice/.github/workflows/deploy.yml +17 -9
- package/dist/practices/cicd-service/best-practice/.github/workflows/provision.yml +15 -10
- package/dist/practices/cicd-service/best-practice/.github/workflows/provision.yml.declapract.ts +74 -0
- package/dist/practices/cicd-service/best-practice/package.json +3 -3
- package/dist/practices/cicd-service/insync-grep.declapract.integration.test.ts +76 -0
- package/dist/practices/cicd-service/provision.yml.declapract.integration.test.ts +182 -0
- package/dist/practices/commands/best-practice/package.json +2 -2
- package/dist/practices/commands/best-practice/src/contract/commands/sayHello.ts +3 -2
- package/dist/practices/config/.declapract.integration.test.ts +116 -0
- package/dist/practices/config/.test/assets/demo-repo-with-dev-config/config/dev.json +17 -0
- package/dist/practices/config/.test/assets/demo-repo-with-dev-config/declapract.declare.yml +4 -0
- package/dist/practices/config/.test/assets/demo-repo-with-dev-config/declapract.use.yml +9 -0
- package/dist/practices/config/.test/assets/demo-repo-with-dev-config/package.json +4 -0
- package/dist/practices/config/__snapshots__/.declapract.integration.test.ts.snap +43 -0
- package/dist/practices/config/bad-practices/divergent-config-shapes/config/prep.json.declapract.ts +3 -3
- package/dist/practices/config/bad-practices/divergent-config-shapes/config/prod.json.declapract.ts +3 -3
- package/dist/practices/config/bad-practices/old-dev-config-location/config/dev.json.declapract.ts +10 -12
- package/dist/practices/config/best-practice/package.json +2 -2
- package/dist/practices/config/best-practice/src/utils/config/getConfig.ts +24 -5
- package/dist/practices/config/best-practice/src/utils/config/getOneCacheDirectory.ts +33 -0
- package/dist/practices/config/best-practice/src/utils/config/getOneProjectBucket.ts +22 -0
- package/dist/practices/config/best-practice/src/utils/environment.ts +9 -3
- package/dist/practices/config/best-practice/src/utils/environment.ts.declapract.ts +8 -0
- package/dist/practices/config/no-hand-written-config-type.declapract.integration.test.ts +64 -0
- package/dist/practices/conventional-commits/__snapshots__/commitlint-body-max-line.declapract.integration.test.ts.snap +3 -0
- package/dist/practices/conventional-commits/best-practice/commitlint.config.js +5 -0
- package/dist/practices/conventional-commits/best-practice/package.json +1 -1
- package/dist/practices/conventional-commits/commitlint-body-max-line.declapract.integration.test.ts +49 -0
- package/dist/practices/domain/.declapract.integration.test.ts +115 -0
- package/dist/{.test/assets/expo-migration/declarations/practices/domain/bad-practices/schematic-joi-model/src/domain → practices/domain/bad-practices/schematic-joi-model/src/domain.objects}/<star><star>/<star>.ts.declapract.ts +4 -1
- package/dist/practices/domain/best-practice/package.json +2 -2
- package/dist/practices/domain/best-practice/src/domain.objects/index.ts.declapract.ts +12 -0
- package/dist/practices/environments/.declapract.integration.test.ts +136 -0
- package/dist/practices/environments/__snapshots__/.declapract.integration.test.ts.snap +55 -0
- package/dist/practices/environments/bad-practices/old-dev-scripts/package.json.declapract.ts +6 -4
- package/dist/practices/environments/bad-practices/old-stage-enum/.declapract.integration.test.ts +133 -0
- package/dist/practices/environments/bad-practices/old-stage-enum/.test/assets/demo-repo-with-stage-enum/declapract.use.yml +8 -0
- package/dist/practices/environments/bad-practices/old-stage-enum/.test/assets/demo-repo-with-stage-enum/package.json +4 -0
- package/dist/practices/environments/bad-practices/old-stage-enum/.test/assets/demo-repo-with-stage-enum/src/logic/getDeployTarget.ts +15 -0
- package/dist/practices/environments/bad-practices/old-stage-enum/__snapshots__/.declapract.integration.test.ts.snap +40 -0
- package/dist/practices/environments/bad-practices/old-stage-enum/src/<star><star>/<star>.ts.declapract.ts +291 -24
- package/dist/practices/environments/best-practice/.declapract.readme.md +44 -11
- package/dist/practices/environments/best-practice/src/access/sdks/sdkAwsLambdaEnvAccessAncient.ts +32 -0
- package/dist/practices/environments/best-practice/src/access/sdks/sdkAwsLambdaEnvAccessContemp.ts +14 -0
- package/dist/practices/environments/best-practice/src/utils/environment.ts +3 -2
- package/dist/practices/errors/.declapract.integration.test.ts +121 -0
- package/dist/practices/errors/bad-practices/own-implementation/src/<star><star>/UnexpectedCodePathError.ts.declapract.ts +8 -0
- package/dist/practices/errors/best-practice/package.json +1 -1
- package/dist/practices/format/.declapract.integration.test.ts +131 -0
- package/dist/practices/format/__snapshots__/.declapract.integration.test.ts.snap +17 -0
- package/dist/practices/format/bad-practices/prettier/prettier.config.js.declapract.ts +1 -1
- package/dist/practices/format/best-practice/package.json.declapract.ts +36 -18
- package/dist/practices/git/.declapract.integration.test.ts +57 -6
- package/dist/practices/git/__snapshots__/.declapract.integration.test.ts.snap +2 -0
- package/dist/practices/git/best-practice/.gitattributes.declapract.ts +50 -37
- package/dist/practices/git/best-practice/.gitignore.declapract.ts +8 -0
- package/dist/practices/husky/__snapshots__/check.timestamps.play.declapract.integration.test.ts.snap +7 -0
- package/dist/practices/husky/best-practice/.husky/check.timestamps.sh +11 -2
- package/dist/practices/husky/check.timestamps.play.declapract.integration.test.ts +65 -0
- package/dist/practices/lint/__snapshots__/dpdmrc-exclude-policy.declapract.integration.test.ts.snap +3 -0
- package/dist/practices/lint/bad-practices/depcheck-denylisted-ignores/.depcheckrc.yml.declapract.ts +4 -0
- package/dist/practices/lint/best-practice/.depcheckrc.yml.declapract.ts +10 -9
- package/dist/practices/lint/best-practice/.dpdmrc.yaml +10 -6
- package/dist/practices/lint/dpdmrc-exclude-policy.declapract.integration.test.ts +50 -0
- package/dist/practices/logs/.declapract.integration.test.ts +100 -0
- package/dist/practices/logs/__snapshots__/.declapract.integration.test.ts.snap +33 -0
- package/dist/practices/logs/bad-practices/leveled-term/.test/assets/demo-repo-with-leveled-term/declapract.declare.yml +4 -0
- package/dist/practices/logs/bad-practices/leveled-term/.test/assets/demo-repo-with-leveled-term/declapract.use.yml +2 -0
- package/dist/practices/logs/bad-practices/leveled-term/.test/assets/demo-repo-with-leveled-term/package.json +12 -0
- package/dist/practices/logs/bad-practices/leveled-term/package.json.declapract.ts +56 -12
- package/dist/practices/node/bad-practices/self-deps-not-link/.declapract.integration.test.ts +102 -0
- package/dist/practices/node/bad-practices/self-deps-not-link/.test/assets/demo-repo-with-self-deps/declapract.declare.yml +4 -0
- package/dist/practices/node/bad-practices/self-deps-not-link/.test/assets/demo-repo-with-self-deps/declapract.use.yml +8 -0
- package/dist/practices/node/bad-practices/self-deps-not-link/.test/assets/demo-repo-with-self-deps/package.json +15 -0
- package/dist/practices/node/bad-practices/self-deps-not-link/__snapshots__/.declapract.integration.test.ts.snap +46 -0
- package/dist/practices/node/bad-practices/self-deps-not-link/package.json.declapract.ts +22 -29
- package/dist/practices/node/best-practice/.npmrc.declapract.ts +5 -1
- package/dist/practices/node/best-practice/package.json +1 -1
- package/dist/practices/node-service/bad-practices/simple-lambda-handlers/.declapract.integration.test.ts +103 -0
- package/dist/practices/node-service/bad-practices/simple-lambda-handlers/.declapract.readme.md +8 -0
- package/dist/practices/node-service/bad-practices/simple-lambda-handlers/.test/assets/demo-repo-with-simple-lambda-handlers/declapract.use.yml +5 -0
- package/dist/practices/node-service/bad-practices/simple-lambda-handlers/.test/assets/demo-repo-with-simple-lambda-handlers/package.json +4 -0
- package/dist/practices/node-service/bad-practices/simple-lambda-handlers/.test/assets/demo-repo-with-simple-lambda-handlers/src/contract/handlers/getWidget.ts +13 -0
- package/dist/practices/node-service/bad-practices/simple-lambda-handlers/__snapshots__/.declapract.integration.test.ts.snap +44 -0
- package/dist/practices/node-service/bad-practices/simple-lambda-handlers/src/<star><star>/<star>.ts.declapract.ts +90 -10
- package/dist/practices/node-service/best-practice/package.json +1 -1
- package/dist/practices/package-json-order/best-practice/package.json.declapract.ts +7 -1
- package/dist/practices/persist-with-dynamodb/.declapract.integration.test.ts +92 -0
- package/dist/practices/persist-with-dynamodb/.test/assets/demo-repo-with-divergent-jest-env/declapract.declare.yml +4 -0
- package/dist/practices/persist-with-dynamodb/.test/assets/demo-repo-with-divergent-jest-env/declapract.use.yml +2 -0
- package/dist/practices/persist-with-dynamodb/.test/assets/demo-repo-with-divergent-jest-env/jest.integration.env.ts +4 -0
- package/dist/practices/persist-with-dynamodb/.test/assets/demo-repo-with-divergent-jest-env/package.json +4 -0
- package/dist/practices/persist-with-dynamodb/__snapshots__/.declapract.integration.test.ts.snap +20 -0
- package/dist/practices/persist-with-dynamodb/best-practice/jest.integration.env.ts +3 -3
- package/dist/practices/persist-with-dynamodb/best-practice/package.json +2 -2
- package/dist/practices/persist-with-rds/.declapract.integration.test.ts +224 -0
- package/dist/practices/persist-with-rds/.extensions.sql.declapract.integration.test.ts +38 -0
- package/dist/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/config/dev.json +18 -0
- package/dist/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/declapract.declare.yml +4 -0
- package/dist/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/declapract.use.yml +18 -0
- package/dist/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/package.json +4 -0
- package/dist/practices/persist-with-rds/__snapshots__/.declapract.integration.test.ts.snap +45 -0
- package/dist/practices/persist-with-rds/__snapshots__/.extensions.sql.declapract.integration.test.ts.snap +42 -0
- package/dist/practices/persist-with-rds/__snapshots__/deploy-database-gerunds.declapract.integration.test.ts.snap +102 -0
- package/dist/practices/persist-with-rds/__snapshots__/provision-testdb-access.declapract.integration.test.ts.snap +3 -0
- package/dist/practices/persist-with-rds/__snapshots__/ssm-cicd-param-names.declapract.integration.test.ts.snap +10 -0
- package/dist/practices/persist-with-rds/__snapshots__/testdb-preflight-failloud.declapract.integration.test.ts.snap +30 -0
- package/dist/practices/persist-with-rds/bad-practices/old-dev-config-location/config/dev.json.declapract.ts +22 -8
- package/dist/practices/persist-with-rds/best-practice/.declapract.readme.md +32 -0
- package/dist/practices/persist-with-rds/best-practice/codegen.sql.dao.yml +1 -1
- package/dist/practices/persist-with-rds/best-practice/package.json +5 -5
- package/dist/practices/persist-with-rds/best-practice/provision/aws/readme.md +9 -6
- package/dist/practices/persist-with-rds/best-practice/provision/aws/resources.parameters.ts +38 -14
- package/dist/practices/persist-with-rds/best-practice/provision/aws/resources.ts +6 -3
- package/dist/practices/persist-with-rds/best-practice/provision/docker/testdb/wait-for-postgres.sh +13 -3
- package/dist/practices/persist-with-rds/best-practice/provision/schema/deploy.database.sh +27 -22
- package/dist/practices/persist-with-rds/best-practice/src/utils/config/config.schema.ts +13 -6
- package/dist/practices/persist-with-rds/best-practice/src/utils/database/getOneDatabaseConnection.integration.test.ts +10 -0
- package/dist/practices/persist-with-rds/best-practice/src/utils/database/getOneDatabaseConnection.ts +90 -0
- package/dist/practices/persist-with-rds/best-practice/src/utils/database/withDatabaseContext.ts +12 -4
- package/dist/practices/persist-with-rds/best-practice/src/utils/database/withDatabaseTransaction.ts +16 -4
- package/dist/practices/persist-with-rds/deploy-database-gerunds.declapract.integration.test.ts +57 -0
- package/dist/practices/persist-with-rds/empty-template-declares-zero-clusters.declapract.integration.test.ts +71 -0
- package/dist/practices/persist-with-rds/provision-testdb-access.declapract.integration.test.ts +50 -0
- package/dist/practices/persist-with-rds/ssm-cicd-param-names.declapract.integration.test.ts +73 -0
- package/dist/practices/persist-with-rds/testdb-preflight-failloud.declapract.integration.test.ts +83 -0
- package/dist/practices/pnpm/.declapract.integration.test.ts +163 -13
- package/dist/practices/pnpm/.test/assets/repo-npm-to-pnpm/package.json +1 -1
- package/dist/practices/pnpm/.test/assets/repo-npm-to-pnpm/pnpm-workspace.yaml +3 -0
- package/dist/practices/pnpm/__snapshots__/.declapract.integration.test.ts.snap +9 -2
- package/dist/practices/pnpm/bad-practices/inert-build-allowlist/pnpm-workspace.yaml.declapract.ts +59 -0
- package/dist/practices/pnpm/best-practice/.declapract.readme.md +1 -1
- package/dist/practices/pnpm/best-practice/package.json +1 -1
- package/dist/practices/pnpm/best-practice/package.json.declapract.ts +4 -2
- package/dist/practices/provision-github/best-practice/package.json +2 -2
- package/dist/practices/provision-github/best-practice/provision/github.repo/resources.ts +16 -0
- package/dist/practices/rhachet/.declapract.integration.test.ts +98 -0
- package/dist/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/.agent/repo=.this/role=any/boot.yml +7 -0
- package/dist/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/declapract.declare.yml +4 -0
- package/dist/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/declapract.use.yml +2 -0
- package/dist/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/package.json +4 -0
- package/dist/practices/rhachet/__snapshots__/.declapract.integration.test.ts.snap +45 -0
- package/dist/practices/rhachet/__snapshots__/boot-refs-glossary.declapract.integration.test.ts.snap +6 -0
- package/dist/practices/rhachet/__snapshots__/boot-yml-findsert.declapract.integration.test.ts.snap +27 -0
- package/dist/practices/rhachet/bad-practices/prod-deps/.declapract.readme.md +6 -2
- package/dist/practices/rhachet/bad-practices/prod-deps/.test/assets/demo-repo-with-rhachet-prod-deps/declapract.declare.yml +4 -0
- package/dist/practices/rhachet/bad-practices/prod-deps/.test/assets/demo-repo-with-rhachet-prod-deps/declapract.use.yml +2 -0
- package/dist/practices/rhachet/bad-practices/prod-deps/.test/assets/demo-repo-with-rhachet-prod-deps/package.json +12 -0
- package/dist/practices/rhachet/bad-practices/prod-deps/package.json.declapract.ts +58 -17
- package/dist/practices/rhachet/best-practice/.agent/repo=.this/role=any/boot.yml +46 -0
- package/dist/practices/rhachet/best-practice/.agent/repo=.this/role=any/boot.yml.declapract.ts +165 -0
- package/dist/practices/rhachet/best-practice/.gitignore.declapract.ts +18 -5
- package/dist/practices/rhachet/best-practice/package.json +8 -8
- package/dist/practices/rhachet/boot-refs-glossary.declapract.integration.test.ts +89 -0
- package/dist/practices/rhachet/boot-yml-findsert.declapract.integration.test.ts +145 -0
- package/dist/practices/runtime-schemas/bad-practices/joi/.declapract.integration.test.ts +102 -0
- package/dist/practices/runtime-schemas/bad-practices/joi/.test/assets/demo-repo-with-joi/declapract.use.yml +5 -0
- package/dist/practices/runtime-schemas/bad-practices/joi/.test/assets/demo-repo-with-joi/package.json +4 -0
- package/dist/practices/runtime-schemas/bad-practices/joi/.test/assets/demo-repo-with-joi/src/contract/schemas/widget.schema.ts +9 -0
- package/dist/practices/runtime-schemas/bad-practices/joi/__snapshots__/.declapract.integration.test.ts.snap +37 -0
- package/dist/practices/runtime-schemas/bad-practices/joi/src/<star><star>/<star>.ts.declapract.ts +32 -3
- package/dist/practices/serverless/.declapract.integration.test.ts +230 -0
- package/dist/practices/serverless/.test/assets/demo-repo-with-serverless/declapract.declare.yml +4 -0
- package/dist/practices/serverless/.test/assets/demo-repo-with-serverless/declapract.use.yml +8 -0
- package/dist/practices/serverless/.test/assets/demo-repo-with-serverless/package.json +4 -0
- package/dist/practices/serverless/.test/assets/demo-repo-with-serverless/serverless.yml +8 -0
- package/dist/practices/serverless/__snapshots__/.declapract.integration.test.ts.snap +43 -0
- package/dist/practices/serverless/__snapshots__/cache-grant-stage-globbed.declapract.integration.test.ts.snap +3 -0
- package/dist/practices/serverless/__snapshots__/deployment-bucket-account-scoped.declapract.integration.test.ts.snap +9 -0
- package/dist/practices/serverless/__snapshots__/divergentStageGuard.declapract.integration.test.ts.snap +15 -0
- package/dist/practices/serverless/__snapshots__/serverless.yml.declapract.integration.test.ts.snap +165 -0
- package/dist/practices/serverless/best-practice/.declapract.readme.md +111 -0
- package/dist/practices/serverless/best-practice/package.json +7 -5
- package/dist/practices/serverless/best-practice/serverless.yml +14 -6
- package/dist/practices/serverless/best-practice/serverless.yml.declapract.ts +609 -64
- package/dist/practices/serverless/cache-grant-stage-globbed.declapract.integration.test.ts +69 -0
- package/dist/practices/serverless/deployment-bucket-account-scoped.declapract.integration.test.ts +78 -0
- package/dist/practices/serverless/divergentStageGuard.declapract.integration.test.ts +280 -0
- package/dist/practices/serverless/serverless.yml.declapract.integration.test.ts +1285 -0
- package/dist/practices/terraform-aws/best-practice/provision/aws/environments/prep/main.tf +1 -1
- package/dist/practices/tests-any/__snapshots__/changedsince-origin-main.declapract.integration.test.ts.snap +8 -0
- package/dist/practices/tests-any/autoprune-hooks.declapract.integration.test.ts +104 -0
- package/dist/practices/tests-any/bad-practices/old-acceptance-import-paths/.declapract.readme.md +2 -2
- package/dist/practices/tests-any/bad-practices/old-acceptance-test-utils/blackbox/lambdas/<star>.ts.declapract.ts +9 -9
- package/dist/practices/tests-any/best-practice/package.json +3 -3
- package/dist/practices/tests-any/changedsince-origin-main.declapract.integration.test.ts +58 -0
- package/dist/practices/tests-any/{best-practice/package.json.shell-flags.declapract.integration.test.ts → package.json.shell-flags.declapract.integration.test.ts} +26 -16
- package/dist/practices/tests-expo/.declapract.integration.test.ts +7 -3
- package/dist/practices/tests-expo/.test/assets/repo-expo-greenfield/package.json +5 -1
- package/dist/practices/tests-expo/__snapshots__/.declapract.integration.test.ts.snap +17 -8
- package/dist/practices/tests-expo/__snapshots__/package.json.declapract.integration.test.ts.snap +60 -0
- package/dist/practices/tests-expo/best-practice/jest.acceptance.config.ts +5 -0
- package/dist/practices/tests-expo/best-practice/jest.integration.config.ts +5 -0
- package/dist/practices/tests-expo/best-practice/jest.integration.env.ts +5 -1
- package/dist/practices/tests-expo/best-practice/jest.unit.config.ts +5 -0
- package/dist/practices/tests-expo/best-practice/jest.unit.env.ts +6 -1
- package/dist/practices/tests-expo/best-practice/package.json.declapract.ts +190 -13
- package/dist/practices/tests-expo/package.json.declapract.integration.test.ts +94 -0
- package/dist/practices/tests-node/__snapshots__/livedb-wake-branches.declapract.integration.test.ts.snap +6 -0
- package/dist/practices/tests-node/best-practice/jest.acceptance.config.ts +8 -0
- package/dist/practices/tests-node/best-practice/jest.acceptance.env.ts +16 -26
- package/dist/practices/tests-node/best-practice/jest.acceptance.prepare.ts +36 -0
- package/dist/practices/tests-node/best-practice/jest.integration.config.ts +8 -0
- package/dist/practices/tests-node/best-practice/jest.integration.env.db.ts +90 -0
- package/dist/practices/tests-node/best-practice/jest.integration.env.ts +26 -74
- package/dist/practices/tests-node/best-practice/jest.integration.prepare.ts +33 -0
- package/dist/practices/tests-node/best-practice/jest.unit.config.ts +7 -0
- package/dist/practices/tests-node/best-practice/jest.unit.env.ts +11 -4
- package/dist/practices/tests-node/best-practice/jest.unit.env.ts.declapract.ts +3 -1
- package/dist/practices/tests-node/best-practice/src/.test/useKeyrack.ts +211 -0
- package/dist/practices/tests-node/best-practice/src/.test/useWakeOfLivedb.ts +181 -0
- package/dist/practices/tests-node/best-practice/src/.test/useWakeOfTestdb.ts +71 -0
- package/dist/practices/tests-node/livedb-wake-branches.declapract.integration.test.ts +227 -0
- package/dist/practices/tests-node/livedb-wake-prepare.declapract.integration.test.ts +112 -0
- package/dist/practices/tests-node/testdb-preflight-branches.declapract.integration.test.ts +203 -0
- package/dist/practices/tests-node/testdb-preflight-env.declapract.integration.test.ts +65 -0
- package/dist/practices/tests-service/.test/assets/demo-repo-service/declapract.use.yml +5 -0
- package/dist/practices/tests-service/.test/assets/demo-repo-service/package.json +4 -0
- package/dist/practices/tests-service/__snapshots__/package.json.declapract.integration.test.ts.snap +26 -0
- package/dist/practices/tests-service/asFunctionNameFromTestFileName.ts +7 -0
- package/dist/practices/tests-service/best-practice/.declapract.readme.md +68 -0
- package/dist/practices/tests-service/best-practice/blackbox/lambdas/<star>.acceptance.test.ts.declapract.ts +33 -8
- package/dist/practices/tests-service/best-practice/package.json +4 -1
- package/dist/practices/tests-service/best-practice/package.json.declapract.ts +99 -1
- package/dist/practices/tests-service/package.json.declapract.integration.test.ts +204 -0
- package/dist/practices/typescript-expo/__snapshots__/package.json.declapract.integration.test.ts.snap +8 -0
- package/dist/practices/typescript-expo/__snapshots__/tsconfig.json.declapract.integration.test.ts.snap +19 -0
- package/dist/practices/typescript-expo/{best-practice/package.json.declapract.integration.test.ts → package.json.declapract.integration.test.ts} +15 -2
- package/dist/{.test/assets/expo-migration/declarations/practices/typescript-expo/best-practice → practices/typescript-expo}/tsconfig.json.declapract.integration.test.ts +13 -2
- package/dist/practices/typescript-node/best-practice/package.json.declapract.ts +3 -1
- package/dist/practices/uuid/best-practice/package.json +1 -1
- package/dist/stageAccessBridge.declapract.integration.test.ts +163 -0
- package/dist/utils/asPackageJSON.ts +57 -0
- package/dist/utils/asPrepConfigPath.ts +12 -0
- package/dist/utils/getAllPathsUnderDir.ts +45 -0
- package/dist/utils/getAllPracticesForUsecase.ts +35 -9
- package/dist/utils/migrateDevConfigToPrep.ts +47 -0
- package/dist/utils/readFile.ts +2 -2
- package/dist/workflowCallerCalleeReconciliation.declapract.integration.test.ts +319 -0
- package/dist/workflowEnvDeploymentFalse.declapract.integration.test.ts +173 -0
- package/package.json +10 -9
- package/dist/.test/assets/expo-fullusecase/declarations/practices/domain/best-practice/src/domain/objects/index.ts.declapract.ts +0 -4
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/best-practice/package.json +0 -9
- package/dist/.test/assets/expo-migration/declarations/practices/domain/best-practice/src/domain/objects/index.ts.declapract.ts +0 -4
- package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/best-practice/package.json +0 -9
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/best-practice/package.json +0 -9
- package/dist/practices/config/best-practice/src/utils/config/Config.ts +0 -10
- package/dist/practices/config/best-practice/src/utils/config/Config.ts.declapract.ts +0 -16
- package/dist/practices/config/best-practice/src/utils/config/getCacheDirectory.ts +0 -42
- package/dist/practices/domain/best-practice/src/domain/objects/index.ts.declapract.ts +0 -4
- package/dist/practices/logs/bad-practices/leveled-term/package.json +0 -5
- package/dist/practices/persist-with-rds/best-practice/src/utils/config/Config.ts +0 -26
- package/dist/practices/persist-with-rds/best-practice/src/utils/config/Config.ts.declapract.ts +0 -39
- package/dist/practices/persist-with-rds/best-practice/src/utils/config/config.schema.ts.declapract.ts +0 -49
- package/dist/practices/persist-with-rds/best-practice/src/utils/config/getConfig.ts +0 -2
- package/dist/practices/tests-expo/best-practice/package.json +0 -9
- package/dist/practices/tests-service/defineFunctionNameFromTestFileName.ts +0 -11
- /package/dist/.test/assets/{expo-fullusecase/declarations/practices/errors/bad-practices/own-implementation/src/utils/errors/UnexpectedCodePathError.ts.declapract.ts → cicd-service/declarations/practices/cicd-service/bad-practices/old-names/.github/workflows/deploy-dev-on-main.yml.declapract.ts} +0 -0
- /package/dist/{practices/errors/bad-practices/own-implementation/src/utils/errors/UnexpectedCodePathError.ts.declapract.ts → .test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/old-names/.github/workflows/deploy-prod-on-tag.yml.declapract.ts} +0 -0
- /package/dist/{practices/persist-with-rds/best-practice/src/utils/config/getConfig.ts.declapract.ts → .test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/old-names/.github/workflows/deploy_dev_on_main.yml.declapract.ts} +0 -0
- /package/dist/{practices/persist-with-dynamodb/best-practice/jest.integration.env.ts.declapract.ts → .test/assets/cicd-service/declarations/practices/cicd-service/best-practice/package.json.declapract.ts} +0 -0
- /package/dist/.test/assets/expo/declarations/practices/node/{best-practice/.npmrc.declapract.integration.test.ts → .npmrc.declapract.integration.test.ts} +0 -0
- /package/dist/.test/assets/expo/declarations/practices/node/{best-practice/__snapshots__ → __snapshots__}/.npmrc.declapract.integration.test.ts.snap +0 -0
- /package/dist/.test/assets/expo-fullusecase/declarations/practices/node/{best-practice/.npmrc.declapract.integration.test.ts → .npmrc.declapract.integration.test.ts} +0 -0
- /package/dist/.test/assets/expo-fullusecase/declarations/practices/node/{best-practice/__snapshots__ → __snapshots__}/.npmrc.declapract.integration.test.ts.snap +0 -0
- /package/dist/.test/assets/expo-migration/declarations/practices/node/{best-practice/.npmrc.declapract.integration.test.ts → .npmrc.declapract.integration.test.ts} +0 -0
- /package/dist/.test/assets/expo-migration/declarations/practices/node/{best-practice/__snapshots__ → __snapshots__}/.npmrc.declapract.integration.test.ts.snap +0 -0
- /package/dist/practices/node/{best-practice/.npmrc.declapract.integration.test.ts → .npmrc.declapract.integration.test.ts} +0 -0
- /package/dist/practices/node/{best-practice/__snapshots__ → __snapshots__}/.npmrc.declapract.integration.test.ts.snap +0 -0
|
@@ -1,16 +1,193 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { FileCheckFunction, FileFixFunction } from 'declapract';
|
|
2
|
+
import { ConstraintError } from 'helpful-errors';
|
|
3
|
+
|
|
4
|
+
import { asPackageJSON } from '../../../utils/asPackageJSON';
|
|
2
5
|
|
|
3
6
|
/**
|
|
4
|
-
* .what = the expo half of the tests triad: the jest-expo transform stack that
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
7
|
+
* .what = the expo half of the tests triad: the jest-expo transform stack that replaces
|
|
8
|
+
* node's `@swc/jest`. this check GATES the SDK-coupled majors on the repo's OWN
|
|
9
|
+
* expo + react majors, rather than floor them at a fixed baseline.
|
|
10
|
+
* .why = jest-expo's preset pokes react internals of the SDK it targets. a fixed
|
|
11
|
+
* `minVersion('54.0.0')` floor forces jest-expo 54 (a react-19-era preset) onto an
|
|
12
|
+
* expo-51 / react-18 repo, and every unit suite throws
|
|
13
|
+
* `TypeError: Object.defineProperty called on non-object` at jest-expo's preset setup
|
|
14
|
+
* (#584 / defect D1). the two crashing deps each track a major 1:1:
|
|
15
|
+
* - jest-expo major == expo major (jest-expo 54 pairs with expo 54)
|
|
16
|
+
* - react-test-renderer major == react major (rtr ships lockstep with react)
|
|
17
|
+
* so the gate reads the repo's OWN expo + react majors and requires a match — which
|
|
18
|
+
* holds jest-expo at 51 on an expo-51 repo and at 54 on an expo-54 repo, with no
|
|
19
|
+
* version table to rot as new SDKs ship.
|
|
20
|
+
* .note = @babel/core + babel-preset-expo + isomorphic-fetch stay MINIMA (not the crash; each a
|
|
21
|
+
* plain floor the pre-gate template already declared). babel-preset-expo also tracks the
|
|
22
|
+
* SDK, but backward-compatibly; its floor is left as a residual — see .deliver/584.md.
|
|
23
|
+
* .note = a repo with no `expo` dep is not an expo repo in a gate-able state; the check passes
|
|
24
|
+
* (returns) rather than flags, so a non-expo package.json is never falsely reddened.
|
|
15
25
|
*/
|
|
16
|
-
|
|
26
|
+
|
|
27
|
+
const BABEL_CORE_MIN = { major: 7, minor: 24, patch: 0 };
|
|
28
|
+
const BABEL_PRESET_EXPO_MIN = { major: 12, minor: 0, patch: 0 };
|
|
29
|
+
const ISOMORPHIC_FETCH_MIN = { major: 3, minor: 0, patch: 0 };
|
|
30
|
+
|
|
31
|
+
interface SemverTriple {
|
|
32
|
+
major: number;
|
|
33
|
+
minor: number;
|
|
34
|
+
patch: number;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** parse the leading `major.minor.patch` out of a semver range (`^54.0.0`, `~19.1.2`, `>=3.0.0`). */
|
|
38
|
+
const parseVersionTriple = (range: string | undefined): SemverTriple | null => {
|
|
39
|
+
if (!range) return null;
|
|
40
|
+
const match = range.match(/(\d+)\.(\d+)\.(\d+)/);
|
|
41
|
+
if (!match) return null;
|
|
42
|
+
return {
|
|
43
|
+
major: Number(match[1]),
|
|
44
|
+
minor: Number(match[2]),
|
|
45
|
+
patch: Number(match[3]),
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const majorOf = (range: string | undefined): number | null =>
|
|
50
|
+
parseVersionTriple(range)?.major ?? null;
|
|
51
|
+
|
|
52
|
+
const meetsMinimum = (
|
|
53
|
+
range: string | undefined,
|
|
54
|
+
min: SemverTriple,
|
|
55
|
+
): boolean => {
|
|
56
|
+
const found = parseVersionTriple(range);
|
|
57
|
+
if (!found) return false;
|
|
58
|
+
if (found.major !== min.major) return found.major > min.major;
|
|
59
|
+
if (found.minor !== min.minor) return found.minor > min.minor;
|
|
60
|
+
return found.patch >= min.patch;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/** the subset of a package.json this declaration reads + rewrites (dep maps), typed rather than `any`. */
|
|
64
|
+
interface PackageJSON {
|
|
65
|
+
dependencies?: Record<string, string>;
|
|
66
|
+
devDependencies?: Record<string, string>;
|
|
67
|
+
[key: string]: unknown;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const getAllDeps = (packageJSON: PackageJSON): Record<string, string> => ({
|
|
71
|
+
...(packageJSON.dependencies ?? {}),
|
|
72
|
+
...(packageJSON.devDependencies ?? {}),
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
export const check: FileCheckFunction = (contents) => {
|
|
76
|
+
// no file → no gate to enforce; a best-practice check passes (returns) when clean
|
|
77
|
+
if (!contents) return;
|
|
78
|
+
|
|
79
|
+
const packageJSON: PackageJSON = asPackageJSON(
|
|
80
|
+
{ contents },
|
|
81
|
+
{
|
|
82
|
+
practice: 'tests-expo',
|
|
83
|
+
},
|
|
84
|
+
);
|
|
85
|
+
const deps = getAllDeps(packageJSON);
|
|
86
|
+
|
|
87
|
+
// a repo with no `expo` dep is not an expo repo in a gate-able state — do not flag it
|
|
88
|
+
const expoMajor = majorOf(deps.expo);
|
|
89
|
+
if (expoMajor === null) return;
|
|
90
|
+
|
|
91
|
+
// jest-expo major must MATCH the repo's expo major (jest-expo tracks the SDK 1:1)
|
|
92
|
+
const jestExpoMajor = majorOf(deps['jest-expo']);
|
|
93
|
+
if (jestExpoMajor !== expoMajor)
|
|
94
|
+
throw new ConstraintError(
|
|
95
|
+
`jest-expo major (${jestExpoMajor}) must match the repo's expo major (${expoMajor}) — run \`declapract apply\` to pin jest-expo to ^${expoMajor}.0.0`,
|
|
96
|
+
{ found: jestExpoMajor, required: expoMajor, dep: 'jest-expo' },
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
// react-test-renderer major must MATCH the repo's react major (rtr ships lockstep with react)
|
|
100
|
+
const reactMajor = majorOf(deps.react);
|
|
101
|
+
if (reactMajor !== null) {
|
|
102
|
+
const rtrMajor = majorOf(deps['react-test-renderer']);
|
|
103
|
+
if (rtrMajor !== reactMajor)
|
|
104
|
+
throw new ConstraintError(
|
|
105
|
+
`react-test-renderer major (${rtrMajor}) must match the repo's react major (${reactMajor}) — run \`declapract apply\` to pin react-test-renderer to ^${reactMajor}.0.0`,
|
|
106
|
+
{ found: rtrMajor, required: reactMajor, dep: 'react-test-renderer' },
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// @babel/core + babel-preset-expo + isomorphic-fetch stay MINIMA (not the crash; a plain
|
|
111
|
+
// floor, exactly as the pre-gate template declared each of the three)
|
|
112
|
+
if (!meetsMinimum(deps['@babel/core'], BABEL_CORE_MIN))
|
|
113
|
+
throw new ConstraintError(
|
|
114
|
+
'@babel/core must be >= 7.24.0 — run `declapract apply` to raise it',
|
|
115
|
+
{
|
|
116
|
+
found: deps['@babel/core'] ?? null,
|
|
117
|
+
required: '7.24.0',
|
|
118
|
+
dep: '@babel/core',
|
|
119
|
+
},
|
|
120
|
+
);
|
|
121
|
+
if (!meetsMinimum(deps['babel-preset-expo'], BABEL_PRESET_EXPO_MIN))
|
|
122
|
+
throw new ConstraintError(
|
|
123
|
+
'babel-preset-expo must be >= 12.0.0 — run `declapract apply` to raise it',
|
|
124
|
+
{
|
|
125
|
+
found: deps['babel-preset-expo'] ?? null,
|
|
126
|
+
required: '12.0.0',
|
|
127
|
+
dep: 'babel-preset-expo',
|
|
128
|
+
},
|
|
129
|
+
);
|
|
130
|
+
if (!meetsMinimum(deps['isomorphic-fetch'], ISOMORPHIC_FETCH_MIN))
|
|
131
|
+
throw new ConstraintError(
|
|
132
|
+
'isomorphic-fetch must be >= 3.0.0 — run `declapract apply` to raise it',
|
|
133
|
+
{
|
|
134
|
+
found: deps['isomorphic-fetch'] ?? null,
|
|
135
|
+
required: '3.0.0',
|
|
136
|
+
dep: 'isomorphic-fetch',
|
|
137
|
+
},
|
|
138
|
+
);
|
|
139
|
+
|
|
140
|
+
// all gates satisfied
|
|
141
|
+
return;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
export const fix: FileFixFunction = (contents) => {
|
|
145
|
+
if (!contents) return { contents };
|
|
146
|
+
|
|
147
|
+
const packageJSON: PackageJSON = asPackageJSON(
|
|
148
|
+
{ contents },
|
|
149
|
+
{
|
|
150
|
+
practice: 'tests-expo',
|
|
151
|
+
},
|
|
152
|
+
);
|
|
153
|
+
const deps = getAllDeps(packageJSON);
|
|
154
|
+
const expoMajor = majorOf(deps.expo);
|
|
155
|
+
|
|
156
|
+
// no expo dep → not a gate-able expo repo; leave untouched
|
|
157
|
+
if (expoMajor === null) return { contents };
|
|
158
|
+
|
|
159
|
+
const devDependencies = { ...(packageJSON.devDependencies ?? {}) };
|
|
160
|
+
const dependencies = { ...(packageJSON.dependencies ?? {}) };
|
|
161
|
+
|
|
162
|
+
// jest-expo + react-test-renderer are test-time deps that belong in devDependencies ALONE. pin
|
|
163
|
+
// them there AND delete any copy under `dependencies` — else the merged getAllDeps check (dev
|
|
164
|
+
// wins) reads green while npm installs ONE version and a stale `dependencies` copy at a conflicting
|
|
165
|
+
// major can win at install time (the two-section version conflict r006.b1 forbids). the sibling
|
|
166
|
+
// dep declarations (logs/leveled-term, rhachet/prod-deps) strip from both sections for the same reason.
|
|
167
|
+
devDependencies['jest-expo'] = `^${expoMajor}.0.0`;
|
|
168
|
+
delete dependencies['jest-expo'];
|
|
169
|
+
|
|
170
|
+
// pin react-test-renderer to the repo's react major, when a react dep is present
|
|
171
|
+
const reactMajor = majorOf(deps.react);
|
|
172
|
+
if (reactMajor !== null) {
|
|
173
|
+
devDependencies['react-test-renderer'] = `^${reactMajor}.0.0`;
|
|
174
|
+
delete dependencies['react-test-renderer'];
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// raise @babel/core + babel-preset-expo + isomorphic-fetch to their minima when below
|
|
178
|
+
if (!meetsMinimum(deps['@babel/core'], BABEL_CORE_MIN))
|
|
179
|
+
devDependencies['@babel/core'] = '^7.24.0';
|
|
180
|
+
if (!meetsMinimum(deps['babel-preset-expo'], BABEL_PRESET_EXPO_MIN))
|
|
181
|
+
devDependencies['babel-preset-expo'] = '^12.0.0';
|
|
182
|
+
if (!meetsMinimum(deps['isomorphic-fetch'], ISOMORPHIC_FETCH_MIN))
|
|
183
|
+
devDependencies['isomorphic-fetch'] = '^3.0.0';
|
|
184
|
+
|
|
185
|
+
// preserve each section's presence: rewrite `dependencies` ONLY when the manifest already declared
|
|
186
|
+
// one (so a repo with no prod deps never gains an empty `dependencies: {}` it did not have).
|
|
187
|
+
const result: PackageJSON = { ...packageJSON, devDependencies };
|
|
188
|
+
if (packageJSON.dependencies) result.dependencies = dependencies;
|
|
189
|
+
|
|
190
|
+
return {
|
|
191
|
+
contents: JSON.stringify(result, null, 2),
|
|
192
|
+
};
|
|
193
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import fs from 'fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
|
|
4
|
+
import { executeApply } from 'declapract';
|
|
5
|
+
import { genTempDir, given, then, useBeforeAll, when } from 'test-fns';
|
|
6
|
+
|
|
7
|
+
// executeApply is slow (full practice evaluation)
|
|
8
|
+
jest.setTimeout(180_000);
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* .what = pipeline test for the tests-expo jest-expo/rtr SDK-major gate (#584 / defect D1).
|
|
12
|
+
* .why = the unit test proves the check/fix in isolation; only the real executeApply pipeline
|
|
13
|
+
* proves declapract WIRES the declaration to `package.json` and reaches a fixed point on
|
|
14
|
+
* a re-run. the crash this gate prevents is a react-19-era jest-expo (54) held onto an
|
|
15
|
+
* expo-51 / react-18 repo — every unit suite throws at jest-expo's preset setup — so the
|
|
16
|
+
* gate must hold jest-expo at the repo's OWN expo major (51), never bump it to 54.
|
|
17
|
+
* .note = scoped `practice: 'tests-expo'` — the declaration reads only `contents`, never
|
|
18
|
+
* `context.projectPractices`, so a practice scope is safe (no usecase-aware branch goes
|
|
19
|
+
* dark) and isolates the apply to tests-expo's package.json declaration alone.
|
|
20
|
+
*/
|
|
21
|
+
describe('tests-expo package.json — pipeline gate on the repo expo/react major', () => {
|
|
22
|
+
given('[case1] an expo-51 / react-18 repo seeded with a react-19-era jest-expo 54 the gate aligns down to the expo major (51)', () => {
|
|
23
|
+
const tempDir = genTempDir({
|
|
24
|
+
slug: 'tests-expo-major-gate',
|
|
25
|
+
clone: './src/.test/assets/expo-migration/repo-app-protools-shaped',
|
|
26
|
+
symlink: [
|
|
27
|
+
{ at: 'declarations', to: './src/.test/assets/expo-migration/declarations' },
|
|
28
|
+
{ at: 'node_modules', to: 'node_modules' },
|
|
29
|
+
],
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const pkgPath = () => path.join(tempDir, 'package.json');
|
|
33
|
+
const readPkg = () => fs.readFile(pkgPath(), 'utf-8');
|
|
34
|
+
|
|
35
|
+
const state = useBeforeAll(async () => {
|
|
36
|
+
// seed the crash shape: a react-19-era jest-expo/rtr on an expo-51 / react-18 repo
|
|
37
|
+
const seeded = {
|
|
38
|
+
...JSON.parse(await readPkg()),
|
|
39
|
+
devDependencies: {
|
|
40
|
+
...JSON.parse(await readPkg()).devDependencies,
|
|
41
|
+
expo: '~51.0.0',
|
|
42
|
+
react: '18.2.0',
|
|
43
|
+
'jest-expo': '^54.0.0',
|
|
44
|
+
'react-test-renderer': '^19.0.0',
|
|
45
|
+
'babel-preset-expo': '^12.0.0',
|
|
46
|
+
'isomorphic-fetch': '^3.0.0',
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
await fs.writeFile(pkgPath(), `${JSON.stringify(seeded, null, 2)}\n`);
|
|
50
|
+
const pkgBefore = await readPkg();
|
|
51
|
+
|
|
52
|
+
await executeApply({
|
|
53
|
+
config: path.join(tempDir, 'declapract.use.yml'),
|
|
54
|
+
practice: 'tests-expo',
|
|
55
|
+
file: 'package.json',
|
|
56
|
+
});
|
|
57
|
+
const pkgAfter1 = await readPkg();
|
|
58
|
+
await executeApply({
|
|
59
|
+
config: path.join(tempDir, 'declapract.use.yml'),
|
|
60
|
+
practice: 'tests-expo',
|
|
61
|
+
file: 'package.json',
|
|
62
|
+
});
|
|
63
|
+
const pkgAfter2 = await readPkg();
|
|
64
|
+
|
|
65
|
+
return { pkgBefore, pkgAfter1, pkgAfter2 };
|
|
66
|
+
}, 170_000);
|
|
67
|
+
|
|
68
|
+
when('[t0] the tests-expo gate is applied to the seeded package.json', () => {
|
|
69
|
+
then('jest-expo is held at the repo expo major (51), not bumped to 54', () => {
|
|
70
|
+
expect(JSON.parse(state.pkgBefore).devDependencies['jest-expo']).toEqual(
|
|
71
|
+
'^54.0.0',
|
|
72
|
+
);
|
|
73
|
+
expect(JSON.parse(state.pkgAfter1).devDependencies['jest-expo']).toEqual(
|
|
74
|
+
'^51.0.0',
|
|
75
|
+
);
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
then('react-test-renderer is held at the repo react major (18), not 19', () => {
|
|
79
|
+
expect(
|
|
80
|
+
JSON.parse(state.pkgAfter1).devDependencies['react-test-renderer'],
|
|
81
|
+
).toEqual('^18.0.0');
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
then('before + after match snapshot', () => {
|
|
85
|
+
expect(state.pkgBefore).toMatchSnapshot('package.json — before');
|
|
86
|
+
expect(state.pkgAfter1).toMatchSnapshot('package.json — after gate');
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
then('a second apply is a fixed point (the gate holds)', () => {
|
|
90
|
+
expect(state.pkgAfter2).toEqual(state.pkgAfter1);
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
+
|
|
3
|
+
exports[`the useWakeOfLivedb decide-gate runs its real branches (executed, no live infra) given: the wake command fails when: it fails with a child-process shape (a non-zero exit) then: the wake-failure warn matches snapshot: useWakeOfLivedb wake-failure warn 1`] = `
|
|
4
|
+
"useWakeOfLivedb: 'rhx use.rds.capacity --env prep' failed (non-fatal): {"status":1}
|
|
5
|
+
"
|
|
6
|
+
`;
|
|
@@ -32,6 +32,14 @@ const config: Config = {
|
|
|
32
32
|
testMatch: ['**/*.acceptance.test.ts', '!**/.agent/.cache/**', '!**/.yalc/**'],
|
|
33
33
|
setupFilesAfterEnv: ['./jest.acceptance.env.ts'],
|
|
34
34
|
|
|
35
|
+
// reclaim every temp dir genTempDir made this run (test-fns autoprune). jest needs BOTH keys;
|
|
36
|
+
// one without the other stamps and never reclaims. the globalSetup COMPOSES the livedb wake
|
|
37
|
+
// (resume the shared aurora-serverless cluster before the first query) with autoprune's setup,
|
|
38
|
+
// and forwards globalConfig to it — a bare 'test-fns/autoprune.setup.jest' would leave the db
|
|
39
|
+
// un-woken.
|
|
40
|
+
globalSetup: './jest.acceptance.prepare.ts',
|
|
41
|
+
globalTeardown: 'test-fns/autoprune.teardown.jest',
|
|
42
|
+
|
|
35
43
|
// use 50% of threads to leave headroom for other processes
|
|
36
44
|
maxWorkers: '50%', // https://stackoverflow.com/questions/71287710/why-does-jest-run-faster-with-maxworkers-50
|
|
37
45
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { existsSync
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import util from 'node:util';
|
|
4
4
|
|
|
5
5
|
import { jest } from '@jest/globals';
|
|
6
|
-
import {
|
|
6
|
+
import { ConstraintError } from 'helpful-errors';
|
|
7
|
+
|
|
8
|
+
import { useKeyrack } from './src/.test/useKeyrack';
|
|
7
9
|
|
|
8
10
|
jest.setTimeout(90000); // we're calling downstream apis
|
|
9
11
|
|
|
@@ -15,32 +17,20 @@ util.inspect.defaultOptions.depth = 5;
|
|
|
15
17
|
* .why = prevent confusion and hard-to-debug errors from running tests in the wrong directory
|
|
16
18
|
*/
|
|
17
19
|
if (!existsSync(join(process.cwd(), 'package.json')))
|
|
18
|
-
throw new
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
* .what = verify that the env has sufficient auth to run the tests if aws is used; otherwise, fail fast
|
|
22
|
-
* .why =
|
|
23
|
-
* - prevent time wasted waiting on tests to fail due to lack of credentials
|
|
24
|
-
* - prevent time wasted debugging tests which are failing due to hard-to-read missed credential errors
|
|
25
|
-
*/
|
|
26
|
-
const declapractUsePath = join(process.cwd(), 'declapract.use.yml');
|
|
27
|
-
const requiresAwsAuth =
|
|
28
|
-
existsSync(declapractUsePath) &&
|
|
29
|
-
readFileSync(declapractUsePath, 'utf8').includes('awsAccountId');
|
|
30
|
-
if (
|
|
31
|
-
requiresAwsAuth &&
|
|
32
|
-
!(process.env.AWS_PROFILE || process.env.AWS_ACCESS_KEY_ID)
|
|
33
|
-
)
|
|
34
|
-
throw new Error(
|
|
35
|
-
'no aws credentials present. please authenticate with aws to run acceptance tests',
|
|
20
|
+
throw new ConstraintError(
|
|
21
|
+
'no package.json found in cwd — run the acceptance suite from the git root',
|
|
22
|
+
{ cwd: process.cwd() },
|
|
36
23
|
);
|
|
37
24
|
|
|
38
25
|
/**
|
|
39
|
-
* .what = source credentials from keyrack for
|
|
26
|
+
* .what = source credentials from keyrack for the target tier and export them for the aws-sdk-v2
|
|
27
|
+
* lambda caller, in one call.
|
|
40
28
|
* .why =
|
|
41
|
-
* -
|
|
42
|
-
*
|
|
29
|
+
* - a cloud acceptance run targets a deployed tier (e.g. prep), derived from ACCESS; default to the
|
|
30
|
+
* lowest-privilege `test` when unset, so a PR / local in-process run stays on test creds.
|
|
31
|
+
* - useKeyrack is the org convention: it sources keyrack (sets AWS_PROFILE), sets ACCESS, and — for
|
|
32
|
+
* an aws consumer — exports the sso profile's static creds so aws-sdk-v2 auths against the target
|
|
33
|
+
* (keyrack.source alone sets only AWS_PROFILE, which v2 cannot use). #586.
|
|
34
|
+
* - `strict` fails fast with a helpful error if keyrack is locked or a key is absent.
|
|
43
35
|
*/
|
|
44
|
-
|
|
45
|
-
if (existsSync(keyrackYmlPath))
|
|
46
|
-
keyrack.source({ env: 'test', owner: 'ehmpath', mode: 'strict' });
|
|
36
|
+
useKeyrack({ env: (process.env.ACCESS ?? 'test') as 'test' | 'prep' | 'prod', mode: 'strict' });
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import autopruneSetup from 'test-fns/autoprune.setup.jest';
|
|
2
|
+
|
|
3
|
+
import { useWakeOfLivedb } from './src/.test/useWakeOfLivedb';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* .what = jest globalSetup for the acceptance suite — runs once, in the main process, before
|
|
7
|
+
* jest forks its workers.
|
|
8
|
+
* .why =
|
|
9
|
+
* - COMPOSES two setups that both need this one hook: the livedb wake (resume the shared
|
|
10
|
+
* aurora-serverless cluster so the first query does not cold-start past the timeout) and
|
|
11
|
+
* test-fns autoprune (mint this run's id BEFORE the first fork, so genTempDir dirs are
|
|
12
|
+
* reclaimed). jest allows ONE globalSetup, so a service that needs both must compose them
|
|
13
|
+
* here rather than pick one — a bare `globalSetup: 'test-fns/autoprune.setup.jest'` (the
|
|
14
|
+
* shipped default) leaves the db un-woken, and a bare wake setup drops autoprune (every dir
|
|
15
|
+
* stamped, none reclaimed — the #590 half-wired state).
|
|
16
|
+
* - the acceptance suites invoke deployed lambdas that proxy to peers which query the shared
|
|
17
|
+
* cluster; a paused cluster cold-starts past the timeout and flakes the quote suites. wake
|
|
18
|
+
* it once here (not per-file — env setup runs per worker), so the first real query lands warm.
|
|
19
|
+
* - the wake runs FIRST (best-effort, self-gated on a declared db tunnel — a no-op for a
|
|
20
|
+
* service that reaches no cluster), THEN autoprune mints the run id.
|
|
21
|
+
* - `globalConfig` is FORWARDED to autoprune unchanged: test-fns reads its `globalTeardown`
|
|
22
|
+
* slot to detect the half-wired state, and a dropped/defaulted arg would falsely accuse a
|
|
23
|
+
* correctly-wired consumer (see test-fns autoprune.setup.jest .note).
|
|
24
|
+
* .note = `useWakeOfLivedb` is imported by RELATIVE path, never the `@src` alias — a globalSetup is
|
|
25
|
+
* loaded by node's plain require BEFORE jest's moduleNameMapper exists, so `@src` here
|
|
26
|
+
* fails with `Cannot find module` and kills the run at startup (the same trap test-fns'
|
|
27
|
+
* own autoprune.setup.jest documents).
|
|
28
|
+
*/
|
|
29
|
+
// biome-ignore lint/style/noDefaultExport: jest globalSetup api requires default export
|
|
30
|
+
export default async (globalConfig: { globalTeardown?: string | null }): Promise<void> => {
|
|
31
|
+
// the wake TARGET is always the prep cluster: a test-access AND a prep-access suite both fan out
|
|
32
|
+
// to the shared prep peer fleet (define.invariant.test-and-prep-reach-prep-peers), so 'prep' is
|
|
33
|
+
// the one cluster either access reaches; only prod is self-contained and never woken.
|
|
34
|
+
await useWakeOfLivedb({ env: 'prep' });
|
|
35
|
+
await autopruneSetup(globalConfig);
|
|
36
|
+
};
|
|
@@ -32,6 +32,14 @@ const config: Config = {
|
|
|
32
32
|
testMatch: ['**/*.integration.test.ts', '!**/.agent/.cache/**', '!**/.yalc/**'],
|
|
33
33
|
setupFilesAfterEnv: ['./jest.integration.env.ts'],
|
|
34
34
|
|
|
35
|
+
// reclaim every temp dir genTempDir made this run (test-fns autoprune). jest needs BOTH keys;
|
|
36
|
+
// one without the other stamps and never reclaims. the globalSetup COMPOSES the livedb wake
|
|
37
|
+
// (resume the shared aurora-serverless cluster before the first query) with autoprune's setup,
|
|
38
|
+
// and forwards globalConfig to it — a bare 'test-fns/autoprune.setup.jest' would leave the db
|
|
39
|
+
// un-woken.
|
|
40
|
+
globalSetup: './jest.integration.prepare.ts',
|
|
41
|
+
globalTeardown: 'test-fns/autoprune.teardown.jest',
|
|
42
|
+
|
|
35
43
|
// use 50% of threads to leave headroom for other processes
|
|
36
44
|
maxWorkers: '50%', // https://stackoverflow.com/questions/71287710/why-does-jest-run-faster-with-maxworkers-50
|
|
37
45
|
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { execFileSync } from 'node:child_process';
|
|
2
|
+
|
|
3
|
+
import { ConstraintError } from 'helpful-errors';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* .what = verify the local testdb is reachable, via a `SELECT 1` preflight, before a suite runs.
|
|
7
|
+
* .why = this preflight runs at jest-setup load, so its error is the first output a surfer reads
|
|
8
|
+
* when the testdb is unreachable. the prior form redirected psql's stderr to `/dev/null` and
|
|
9
|
+
* threw one hardcoded cause ("did you forget to start:testdb?"), so EVERY cause -- an absent
|
|
10
|
+
* psql binary, a bad password, an unapplied schema, a 3s timeout -- collapsed into a message
|
|
11
|
+
* that named only the likeliest and pointed away from the rest (a swallowed error). this
|
|
12
|
+
* surfaces psql's own words instead. it is split out of `jest.integration.env.ts` (a
|
|
13
|
+
* jest-setup module whose logic cannot be unit-tested in place) so the failure path is a pure
|
|
14
|
+
* fn with the `exec` boundary injected, and both the real-stderr path and the empty-stderr
|
|
15
|
+
* path are clamped + snapped.
|
|
16
|
+
* .note = PGPASSWORD rides in `env`, never in the command args. node puts the failed command verbatim
|
|
17
|
+
* onto the thrown error's message, so a password passed as an arg would reach any log that
|
|
18
|
+
* prints that error. the args are an argv array (no shell), so a config value with shell
|
|
19
|
+
* metacharacters cannot be interpreted either (no injection).
|
|
20
|
+
* .note = a failed preflight is CALLER-must-fix (a local testdb the human starts), so it throws a
|
|
21
|
+
* ConstraintError (exit 2) that NAMES the fix and PRESERVES psql's stderr on the chain -- a
|
|
22
|
+
* consumer can tell "not started" from "bad password" from "psql absent"
|
|
23
|
+
* (a caller-must-fix ConstraintError, exit 2).
|
|
24
|
+
*/
|
|
25
|
+
export const probeTestDb = (
|
|
26
|
+
input: {
|
|
27
|
+
host: string;
|
|
28
|
+
port: number | string;
|
|
29
|
+
username: string;
|
|
30
|
+
password: string;
|
|
31
|
+
database: string;
|
|
32
|
+
},
|
|
33
|
+
context: { exec?: typeof execFileSync } = {},
|
|
34
|
+
): void => {
|
|
35
|
+
const exec = context.exec ?? execFileSync;
|
|
36
|
+
|
|
37
|
+
try {
|
|
38
|
+
exec(
|
|
39
|
+
'psql',
|
|
40
|
+
[
|
|
41
|
+
'-h',
|
|
42
|
+
String(input.host),
|
|
43
|
+
'-p',
|
|
44
|
+
String(input.port),
|
|
45
|
+
'-U',
|
|
46
|
+
input.username,
|
|
47
|
+
'-d',
|
|
48
|
+
input.database,
|
|
49
|
+
'-c',
|
|
50
|
+
'SELECT 1',
|
|
51
|
+
],
|
|
52
|
+
{
|
|
53
|
+
timeout: 3000,
|
|
54
|
+
// stdout ignored (the SELECT 1 result is noise); stderr piped so psql's words reach the human
|
|
55
|
+
stdio: ['ignore', 'ignore', 'pipe'],
|
|
56
|
+
env: { ...process.env, PGPASSWORD: input.password },
|
|
57
|
+
},
|
|
58
|
+
);
|
|
59
|
+
} catch (error) {
|
|
60
|
+
// surface what psql actually said; a bare catch collapses every cause into one guess
|
|
61
|
+
const said =
|
|
62
|
+
error && typeof error === 'object' && 'stderr' in error
|
|
63
|
+
? String((error as { stderr?: Buffer }).stderr ?? '').trim()
|
|
64
|
+
: '';
|
|
65
|
+
// psql SPOKE => it reached the server, so the container is UP and the fault is auth/schema, NOT
|
|
66
|
+
// a down container -- `start:testdb` is already what the surfer ran to get here, so it is the
|
|
67
|
+
// wrong first move for a bad password / unapplied schema. name the credential + schema check,
|
|
68
|
+
// and keep the start command only as the container-down fallback. the SILENT decline (no stderr:
|
|
69
|
+
// absent psql / timeout) is the one cause that actually points at a down container.
|
|
70
|
+
const fix = said
|
|
71
|
+
? [
|
|
72
|
+
'fix: psql reached the server, so the container is UP -- the fault is likely auth or schema:',
|
|
73
|
+
' - check the crud user + password in config/test.json match what the testdb was seeded with',
|
|
74
|
+
" - check this service's schema was applied to the testdb",
|
|
75
|
+
' - only if the container is in fact down, run `npm run start:testdb`',
|
|
76
|
+
].join('\n')
|
|
77
|
+
: 'fix: run `npm run start:testdb`';
|
|
78
|
+
throw new ConstraintError(
|
|
79
|
+
[
|
|
80
|
+
`cant connect to the testdb at ${input.host}:${input.port}`,
|
|
81
|
+
'',
|
|
82
|
+
'psql said:',
|
|
83
|
+
` ${said || '(no stderr -- psql may be absent from PATH, or the call timed out)'}`,
|
|
84
|
+
'',
|
|
85
|
+
fix,
|
|
86
|
+
].join('\n'),
|
|
87
|
+
{ cause: error },
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { existsSync, readFileSync } from 'node:fs';
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
3
2
|
import { join } from 'node:path';
|
|
4
3
|
import util from 'node:util';
|
|
5
4
|
|
|
6
5
|
import { jest } from '@jest/globals';
|
|
7
|
-
import {
|
|
6
|
+
import { ConstraintError } from 'helpful-errors';
|
|
7
|
+
|
|
8
|
+
import { useKeyrack } from './src/.test/useKeyrack';
|
|
9
|
+
import { useWakeOfTestdb } from './src/.test/useWakeOfTestdb';
|
|
8
10
|
|
|
9
11
|
jest.setTimeout(90000); // since we're calling downstream apis
|
|
10
12
|
|
|
@@ -16,7 +18,10 @@ util.inspect.defaultOptions.depth = 5;
|
|
|
16
18
|
* .why = prevent confusion and hard-to-debug errors from running tests in the wrong directory
|
|
17
19
|
*/
|
|
18
20
|
if (!existsSync(join(process.cwd(), 'package.json')))
|
|
19
|
-
throw new
|
|
21
|
+
throw new ConstraintError(
|
|
22
|
+
'no package.json found in cwd — run the integration suite from the git root',
|
|
23
|
+
{ cwd: process.cwd() },
|
|
24
|
+
);
|
|
20
25
|
|
|
21
26
|
/**
|
|
22
27
|
* sanity check that unit tests are only run the 'test' environment
|
|
@@ -30,79 +35,26 @@ if (
|
|
|
30
35
|
(process.env.CONFIG && process.env.CONFIG !== 'test')) &&
|
|
31
36
|
process.env.I_KNOW_THE_RISKS !== 'true'
|
|
32
37
|
)
|
|
33
|
-
throw new
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
* .why = keyrack manages which profile to use per environment
|
|
38
|
-
*/
|
|
39
|
-
const keyrackYmlPath = join(process.cwd(), '.agent/keyrack.yml');
|
|
40
|
-
if (existsSync(keyrackYmlPath) && !process.env.CI)
|
|
41
|
-
keyrack.source({ env: 'test', owner: 'ehmpath', mode: 'lenient' });
|
|
38
|
+
throw new ConstraintError(
|
|
39
|
+
`integration.test config must be 'test' — set NODE_ENV=test and CONFIG=test (or I_KNOW_THE_RISKS=true to override)`,
|
|
40
|
+
{ nodeEnv: process.env.NODE_ENV ?? null, config: process.env.CONFIG ?? null },
|
|
41
|
+
);
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
|
-
* .what =
|
|
45
|
-
*
|
|
44
|
+
* .what = source credentials from keyrack for the test tier and export them for the aws-sdk-v2
|
|
45
|
+
* lambda caller, in one call.
|
|
46
|
+
* .why = useKeyrack is the org convention: it sources keyrack (sets AWS_PROFILE) and — for an aws
|
|
47
|
+
* consumer — exports the sso profile's static creds so aws-sdk-v2 auths against the target
|
|
48
|
+
* (aws-sdk v2 cannot use an sso profile, and prefers AWS_PROFILE over static creds when both
|
|
49
|
+
* are set, so the shared guard removes AWS_PROFILE after the splice). #586.
|
|
46
50
|
*/
|
|
47
|
-
|
|
48
|
-
const declapractUseContent = existsSync(declapractUsePath)
|
|
49
|
-
? readFileSync(declapractUsePath, 'utf8')
|
|
50
|
-
: '';
|
|
51
|
-
const requiresAwsAuth = declapractUseContent.includes('awsAccountId');
|
|
52
|
-
if (requiresAwsAuth && !process.env.AWS_ACCESS_KEY_ID && !process.env.CI) {
|
|
53
|
-
const awsSsoProfile = process.env.AWS_PROFILE;
|
|
54
|
-
if (!awsSsoProfile)
|
|
55
|
-
throw new Error(
|
|
56
|
-
'AWS_PROFILE not set. keyrack.source() should have set it.',
|
|
57
|
-
);
|
|
58
|
-
try {
|
|
59
|
-
const credOutput = execSync(
|
|
60
|
-
`aws configure export-credentials --profile ${awsSsoProfile} --format env`,
|
|
61
|
-
{ encoding: 'utf8', timeout: 10000 },
|
|
62
|
-
);
|
|
63
|
-
// parse and set env vars from output like "export AWS_ACCESS_KEY_ID=..."
|
|
64
|
-
credOutput.split('\n').forEach((line) => {
|
|
65
|
-
const match = line.match(/^export\s+(\w+)=(.*)$/);
|
|
66
|
-
if (match) process.env[match[1]!] = match[2]!;
|
|
67
|
-
});
|
|
68
|
-
} catch {
|
|
69
|
-
throw new Error(
|
|
70
|
-
`failed to export aws credentials from sso profile '${awsSsoProfile}'. run: aws sso login --profile ${awsSsoProfile}`,
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
51
|
+
useKeyrack({ env: 'test' });
|
|
74
52
|
|
|
75
53
|
/**
|
|
76
|
-
* .what =
|
|
77
|
-
* .why =
|
|
78
|
-
*
|
|
79
|
-
*
|
|
54
|
+
* .what = preflight the LOCAL testdb when this service declares its own db (databaseUserName).
|
|
55
|
+
* .why = prevent time wasted on a suite that fails deep in a query because the local testdb was never
|
|
56
|
+
* provisioned, or was provisioned for a different repo; useWakeOfTestdb fails loud and names
|
|
57
|
+
* the fix. it is the LOCAL own-db half; the shared prep cluster its peers query is woken by
|
|
58
|
+
* useWakeOfLivedb in globalSetup (define.invariant.test-and-prep-reach-prep-peers).
|
|
80
59
|
*/
|
|
81
|
-
|
|
82
|
-
if (requiresTestDb) {
|
|
83
|
-
const testConfigPath = join(process.cwd(), 'config', 'test.json');
|
|
84
|
-
if (!existsSync(testConfigPath))
|
|
85
|
-
throw new Error(
|
|
86
|
-
'config/test.json not found but serviceUser is declared in declapract.use.yml',
|
|
87
|
-
);
|
|
88
|
-
const testConfig = JSON.parse(readFileSync(testConfigPath, 'utf8'));
|
|
89
|
-
if (
|
|
90
|
-
!testConfig.database?.tunnel?.local ||
|
|
91
|
-
!testConfig.database?.role?.crud ||
|
|
92
|
-
!testConfig.database?.target?.database
|
|
93
|
-
)
|
|
94
|
-
throw new Error(
|
|
95
|
-
'config/test.json database.tunnel.local, database?.role?.crud, or database?.target?.database not found but expected',
|
|
96
|
-
);
|
|
97
|
-
try {
|
|
98
|
-
execSync(
|
|
99
|
-
`PGPASSWORD="${testConfig.database.role.crud.password}" psql -h ${testConfig.database.tunnel.local.host} -p ${testConfig.database.tunnel.local.port} -U ${testConfig.database.role.crud.username} -d ${testConfig.database.target.database} -c "SELECT 1" > /dev/null 2>&1`,
|
|
100
|
-
{ timeout: 3000 },
|
|
101
|
-
);
|
|
102
|
-
} catch (error) {
|
|
103
|
-
throw new Error(
|
|
104
|
-
`did you forget to \`npm run start:testdb\`? cant connect to database`,
|
|
105
|
-
{ cause: error },
|
|
106
|
-
);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
60
|
+
useWakeOfTestdb();
|