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
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import fs from 'fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
|
|
4
|
+
import { executeApply } from 'declapract';
|
|
5
|
+
import { genTempDir, given, then, useThen, when } from 'test-fns';
|
|
6
|
+
|
|
7
|
+
// executeApply is slow (full practice evaluation), so grant a generous limit
|
|
8
|
+
jest.setTimeout(180_000);
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* .what = end-to-end proof of the simple-lambda-handlers migration, run through the REAL declapract
|
|
12
|
+
* apply pipeline against a genTempDir clone of a consumer repo. per
|
|
13
|
+
* rule.require.declapract-integration-tests, a fix that TRANSFORMS a file (regex rewrite + a
|
|
14
|
+
* value-rewrite @declapract:review marker) owes a pipeline test — a unit test of the exported
|
|
15
|
+
* `fix` never exercises the source-file glob -> file match, nor that the marker lands on disk.
|
|
16
|
+
* .why = the fix rewrites the `simple-lambda-handlers` import to `sdk-aws-lambda` and prepends a
|
|
17
|
+
* loud @declapract:review marker, because the schema+invoke CONTRACT differs between the two
|
|
18
|
+
* frameworks and a rename-only migration answers 400 to every request yet typechecks (#594). the
|
|
19
|
+
* marker names the two manual edits rather than let a regex guess the contract.
|
|
20
|
+
* .note = the target file is snapshotted in full (before AND after), so a reviewer can eyeball the
|
|
21
|
+
* exact end-state, per rule.require.declapract-integration-tests.
|
|
22
|
+
* .teeth = the input imports + CALLS `createApiGatewayHandler`. the after-state proves the import is
|
|
23
|
+
* rewritten to `sdk-aws-lambda`, the call is rewritten to `genLambdaEndpoint.for.apiGateway`, and
|
|
24
|
+
* the @declapract:review marker lands on disk — the glue a mocked-context unit test cannot show.
|
|
25
|
+
*/
|
|
26
|
+
describe('simple-lambda-handlers migration', () => {
|
|
27
|
+
given('[case1] a repo with a simple-lambda-handlers api-gateway handler', () => {
|
|
28
|
+
const tempDir = genTempDir({
|
|
29
|
+
slug: 'declapract-simple-lambda-handlers',
|
|
30
|
+
clone: './src/practices/node-service/bad-practices/simple-lambda-handlers/.test/assets/demo-repo-with-simple-lambda-handlers',
|
|
31
|
+
symlink: [
|
|
32
|
+
{
|
|
33
|
+
at: 'declarations',
|
|
34
|
+
to: './src/.test/assets/node-service/declarations',
|
|
35
|
+
},
|
|
36
|
+
{ at: 'node_modules', to: 'node_modules' },
|
|
37
|
+
],
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
const targetPath = 'src/contract/handlers/getWidget.ts';
|
|
41
|
+
const read = (relativePath: string) =>
|
|
42
|
+
fs.readFile(path.join(tempDir, relativePath), 'utf-8');
|
|
43
|
+
const applyMigrate = () =>
|
|
44
|
+
executeApply({
|
|
45
|
+
config: path.join(tempDir, 'declapract.use.yml'),
|
|
46
|
+
practice: 'node-service',
|
|
47
|
+
file: targetPath,
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
when('[t0] the migration input (before any fix)', () => {
|
|
51
|
+
then('the src file imports + calls the simple-lambda-handlers factory + matches snapshot', async () => {
|
|
52
|
+
const before = await read(targetPath);
|
|
53
|
+
expect(before).toContain("from 'simple-lambda-handlers'");
|
|
54
|
+
expect(before).toContain('createApiGatewayHandler(');
|
|
55
|
+
expect(before).not.toContain('@declapract:review');
|
|
56
|
+
expect(before).toMatchSnapshot('getWidget.ts — before');
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
when('[t1] the simple-lambda-handlers fix is applied', () => {
|
|
61
|
+
useThen('migrate the handler import + call', async () => applyMigrate());
|
|
62
|
+
|
|
63
|
+
then(
|
|
64
|
+
'the import + call are rewritten to sdk-aws-lambda, the review marker lands, and it matches snapshot',
|
|
65
|
+
async () => {
|
|
66
|
+
const after = await read(targetPath);
|
|
67
|
+
|
|
68
|
+
// the import is rewritten to the sdk
|
|
69
|
+
expect(after).toContain("from 'sdk-aws-lambda'");
|
|
70
|
+
expect(after).not.toContain("from 'simple-lambda-handlers'");
|
|
71
|
+
|
|
72
|
+
// the api-gateway factory call is rewritten to its sdk equivalent
|
|
73
|
+
expect(after).toContain('genLambdaEndpoint.for.apiGateway(');
|
|
74
|
+
expect(after).not.toContain('createApiGatewayHandler(');
|
|
75
|
+
|
|
76
|
+
// the value-rewrite marker lands on disk — the un-rewritable schema+invoke contract
|
|
77
|
+
// is loud, so a consumer cannot ship a handler that answers 400 to every request
|
|
78
|
+
expect(after).toContain('@declapract:review');
|
|
79
|
+
expect(after).toContain('rawEvent');
|
|
80
|
+
|
|
81
|
+
// full content, for the reviewer's eye
|
|
82
|
+
expect(after).toMatchSnapshot('getWidget.ts — after');
|
|
83
|
+
},
|
|
84
|
+
);
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
when('[t2] the fix is applied a second time (idempotency)', () => {
|
|
88
|
+
// post-rewrite the file imports from sdk-aws-lambda, so the check no longer detects the bad
|
|
89
|
+
// practice and the fix does not run — the second apply changes zero bytes, and the marker is
|
|
90
|
+
// never double-prepended (per rule.require.idempotent-fixes).
|
|
91
|
+
const passes = useThen('a second apply over its own output', async () => {
|
|
92
|
+
const before = await read(targetPath); // post-first-migrate
|
|
93
|
+
await applyMigrate(); // second apply
|
|
94
|
+
const after = await read(targetPath);
|
|
95
|
+
return { before, after };
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
then('the second apply is a no-op', () => {
|
|
99
|
+
expect(passes.after).toEqual(passes.before);
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
});
|
package/dist/practices/node-service/bad-practices/simple-lambda-handlers/.declapract.readme.md
CHANGED
|
@@ -28,6 +28,14 @@ these patterns require manual migration:
|
|
|
28
28
|
- `logic: (event) => O` → `invoke: ({ event }, { log }) => O`
|
|
29
29
|
- `log` passed at creation → `log` also received in invoke context
|
|
30
30
|
|
|
31
|
+
the contract differs in a way a regex cannot get right: the prior framework's schema described the
|
|
32
|
+
WHOLE event, while sdk-aws-lambda's input schema describes the request BODY (the handler then reads
|
|
33
|
+
headers off a separate `rawEvent`). a rename-only rewrite answers 400 to every request yet
|
|
34
|
+
typechecks. so a handler CALL now carries a `@declapract:review` marker that names the two manual
|
|
35
|
+
edits (unwrap the `body` key into the input schema; thread headers via `rawEvent.headers`). the
|
|
36
|
+
codemod does NOT guess the contract — it flags it loud, and the consumer deletes the marker once the
|
|
37
|
+
call is restructured (#594).
|
|
38
|
+
|
|
31
39
|
## example
|
|
32
40
|
|
|
33
41
|
before:
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# .note = the declarations dir is symlinked by the test (holds declapract.declare.yml + a
|
|
2
|
+
# practices/node-service symlink to the real practice), so the consumer's own src/ tree
|
|
3
|
+
# stays free to hold the target .ts file the src/**/*.ts glob matches.
|
|
4
|
+
declarations: 'declarations/declapract.declare.yml'
|
|
5
|
+
useCase: lambda-service
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createApiGatewayHandler } from 'simple-lambda-handlers';
|
|
2
|
+
|
|
3
|
+
import { log } from '../../utils/logger';
|
|
4
|
+
import { getWidgetSchema } from './getWidget.schema';
|
|
5
|
+
|
|
6
|
+
// an api-gateway handler CALL — the schema+invoke contract differs between the two
|
|
7
|
+
// frameworks, so the fix cannot rename-only; it must emit a loud review marker.
|
|
8
|
+
export const handler = createApiGatewayHandler({
|
|
9
|
+
log,
|
|
10
|
+
schema: getWidgetSchema,
|
|
11
|
+
logic: async (event) => ({ widget: event.widgetId }),
|
|
12
|
+
cors: true,
|
|
13
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
+
|
|
3
|
+
exports[`simple-lambda-handlers migration given: [case1] a repo with a simple-lambda-handlers api-gateway handler when: [t0] the migration input (before any fix) then: the src file imports + calls the simple-lambda-handlers factory + matches snapshot: getWidget.ts — before 1`] = `
|
|
4
|
+
"import { createApiGatewayHandler } from 'simple-lambda-handlers';
|
|
5
|
+
|
|
6
|
+
import { log } from '../../utils/logger';
|
|
7
|
+
import { getWidgetSchema } from './getWidget.schema';
|
|
8
|
+
|
|
9
|
+
// an api-gateway handler CALL — the schema+invoke contract differs between the two
|
|
10
|
+
// frameworks, so the fix cannot rename-only; it must emit a loud review marker.
|
|
11
|
+
export const handler = createApiGatewayHandler({
|
|
12
|
+
log,
|
|
13
|
+
schema: getWidgetSchema,
|
|
14
|
+
logic: async (event) => ({ widget: event.widgetId }),
|
|
15
|
+
cors: true,
|
|
16
|
+
});
|
|
17
|
+
"
|
|
18
|
+
`;
|
|
19
|
+
|
|
20
|
+
exports[`simple-lambda-handlers migration given: [case1] a repo with a simple-lambda-handlers api-gateway handler when: [t1] the simple-lambda-handlers fix is applied then: the import + call are rewritten to sdk-aws-lambda, the review marker lands, and it matches snapshot: getWidget.ts — after 1`] = `
|
|
21
|
+
"/**
|
|
22
|
+
* @declapract:review — auto-migrated to sdk-aws-lambda; the api-gateway handler CONTRACT differs
|
|
23
|
+
* and MUST be restructured by hand (a rename-only migration answers 400 to every request):
|
|
24
|
+
* - schema: the prior single schema described the WHOLE event; the sdk input schema describes the
|
|
25
|
+
* request BODY only. split into \`schema: { input, output }\` and unwrap the \`body\` key.
|
|
26
|
+
* - invoke: \`logic: (event) => O\` becomes \`invoke: async ({ event, rawEvent }) => O\`. \`event\` is
|
|
27
|
+
* the parsed body; thread headers through \`rawEvent.headers\`.
|
|
28
|
+
* delete this marker once restructured.
|
|
29
|
+
*/
|
|
30
|
+
import { genLambdaEndpoint } from 'sdk-aws-lambda';
|
|
31
|
+
|
|
32
|
+
import { log } from '../../utils/logger';
|
|
33
|
+
import { getWidgetSchema } from './getWidget.schema';
|
|
34
|
+
|
|
35
|
+
// an api-gateway handler CALL — the schema+invoke contract differs between the two
|
|
36
|
+
// frameworks, so the fix cannot rename-only; it must emit a loud review marker.
|
|
37
|
+
export const handler = genLambdaEndpoint.for.apiGateway({
|
|
38
|
+
log,
|
|
39
|
+
schema: getWidgetSchema,
|
|
40
|
+
logic: async (event) => ({ widget: event.widgetId }),
|
|
41
|
+
cors: true,
|
|
42
|
+
});
|
|
43
|
+
"
|
|
44
|
+
`;
|
|
@@ -14,8 +14,73 @@ export const check: FileCheckFunction = (contents) => {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* .what =
|
|
18
|
-
*
|
|
17
|
+
* .what = a loud marker for an api-gateway handler call, whose schema+invoke CONTRACT differs
|
|
18
|
+
* between the two frameworks and cannot be mechanically rewritten.
|
|
19
|
+
* .why = the prior framework's schema described the WHOLE event and the handler received the whole
|
|
20
|
+
* event; the sdk's input schema describes the request BODY and the handler receives the
|
|
21
|
+
* parsed body plus a separate rawEvent. a rename-only rewrite leaves a handler that answers
|
|
22
|
+
* 400 to every request, yet typechecks (#594). the marker flags the two manual edits rather
|
|
23
|
+
* than let a regex guess the contract.
|
|
24
|
+
*/
|
|
25
|
+
const apiGatewayReviewMarker = `/**
|
|
26
|
+
* @declapract:review — auto-migrated to sdk-aws-lambda; the api-gateway handler CONTRACT differs
|
|
27
|
+
* and MUST be restructured by hand (a rename-only migration answers 400 to every request):
|
|
28
|
+
* - schema: the prior single schema described the WHOLE event; the sdk input schema describes the
|
|
29
|
+
* request BODY only. split into \`schema: { input, output }\` and unwrap the \`body\` key.
|
|
30
|
+
* - invoke: \`logic: (event) => O\` becomes \`invoke: async ({ event, rawEvent }) => O\`. \`event\` is
|
|
31
|
+
* the parsed body; thread headers through \`rawEvent.headers\`.
|
|
32
|
+
* delete this marker once restructured.
|
|
33
|
+
*/
|
|
34
|
+
`;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* .what = a loud marker for a standard handler call, whose schema+invoke shape also differs.
|
|
38
|
+
* .why = the rename does not restructure the args; the sdk splits the schema and passes log in the
|
|
39
|
+
* invoke context. the marker flags the manual edits (#594).
|
|
40
|
+
*/
|
|
41
|
+
const standardReviewMarker = `/**
|
|
42
|
+
* @declapract:review — auto-migrated to sdk-aws-lambda; the handler CONTRACT differs and MUST be
|
|
43
|
+
* restructured by hand:
|
|
44
|
+
* - schema: the prior single schema splits into \`schema: { input, output }\`.
|
|
45
|
+
* - invoke: \`logic: (event) => O\` becomes \`invoke: async ({ event }, { log }) => O\`; \`log\` is now
|
|
46
|
+
* received in the invoke context, not only at creation.
|
|
47
|
+
* delete this marker once restructured.
|
|
48
|
+
*/
|
|
49
|
+
`;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* .what = parse a comma-separated import clause into its trimmed import names
|
|
53
|
+
* .why = names the split/trim parse, so the fix orchestrator reads as narrative rather than
|
|
54
|
+
* an inline array-manipulation chain (rule.forbid.inline-decode-friction)
|
|
55
|
+
*/
|
|
56
|
+
const asImportNames = (input: { clause: string }): string[] =>
|
|
57
|
+
input.clause.split(',').map((name) => name.trim());
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* .what = map one simple-lambda-handlers import name to its sdk-aws-lambda equivalent
|
|
61
|
+
* .why = both handler-factory names collapse onto `genLambdaEndpoint`; the named map keeps the
|
|
62
|
+
* fix orchestrator narrative rather than an inline conditional (rule.forbid.inline-decode-friction)
|
|
63
|
+
*/
|
|
64
|
+
const asTransformedImportName = (input: { name: string }): string => {
|
|
65
|
+
if (input.name === 'createStandardHandler') return 'genLambdaEndpoint';
|
|
66
|
+
if (input.name === 'createApiGatewayHandler') return 'genLambdaEndpoint';
|
|
67
|
+
return input.name;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* .what = dedupe import names, first-seen order retained
|
|
72
|
+
* .why = the two handler factories both map to `genLambdaEndpoint`, so a clause that imports both
|
|
73
|
+
* would emit a duplicate; the named dedupe hides the Set semantics from the orchestrator
|
|
74
|
+
*/
|
|
75
|
+
const asDedupedImportNames = (input: { names: string[] }): string[] => [
|
|
76
|
+
...new Set(input.names),
|
|
77
|
+
];
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* .what = transforms simple-lambda-handlers imports to sdk-aws-lambda, with a review marker
|
|
81
|
+
* .why = automated migration reduces manual toil, but the schema+invoke contract cannot be
|
|
82
|
+
* mechanically rewritten — so a handler CALL gets a @declapract:review marker that names the
|
|
83
|
+
* manual edits, rather than a silent rename that answers 400 to every request (#594).
|
|
19
84
|
*
|
|
20
85
|
* .note = basic transforms only; complex patterns require manual fix
|
|
21
86
|
*
|
|
@@ -26,19 +91,21 @@ export const check: FileCheckFunction = (contents) => {
|
|
|
26
91
|
export const fix: FileFixFunction = (contents) => {
|
|
27
92
|
if (!contents) return {};
|
|
28
93
|
|
|
29
|
-
|
|
94
|
+
// detect a handler CALL (name + paren) on the ORIGINAL contents, before the rename
|
|
95
|
+
const hasApiGatewayCall = /createApiGatewayHandler\s*\(/.test(contents);
|
|
96
|
+
const hasStandardCall = /createStandardHandler\s*\(/.test(contents);
|
|
97
|
+
|
|
98
|
+
const transformed = contents
|
|
30
99
|
// transform imports (dedupe to avoid duplicate genLambdaEndpoint)
|
|
31
100
|
.replace(
|
|
32
101
|
/import\s+\{([^}]*)\}\s+from\s+['"]simple-lambda-handlers['"]/g,
|
|
33
102
|
(match, imports) => {
|
|
34
103
|
// split, replace, dedupe, join
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
});
|
|
41
|
-
const deduped = [...new Set(transformed)];
|
|
104
|
+
const importNames = asImportNames({ clause: imports });
|
|
105
|
+
const mapped = importNames.map((name) =>
|
|
106
|
+
asTransformedImportName({ name }),
|
|
107
|
+
);
|
|
108
|
+
const deduped = asDedupedImportNames({ names: mapped });
|
|
42
109
|
return `import { ${deduped.join(', ')} } from 'sdk-aws-lambda'`;
|
|
43
110
|
},
|
|
44
111
|
)
|
|
@@ -46,5 +113,18 @@ export const fix: FileFixFunction = (contents) => {
|
|
|
46
113
|
.replace(/createStandardHandler/g, 'genLambdaEndpoint')
|
|
47
114
|
.replace(/createApiGatewayHandler/g, 'genLambdaEndpoint.for.apiGateway');
|
|
48
115
|
|
|
116
|
+
// prepend the review marker for a handler CALL (api-gateway takes precedence), so the
|
|
117
|
+
// un-rewritable schema+invoke contract is loud. idempotent: the check no longer fires
|
|
118
|
+
// post-rewrite, and a second pass would find the marker already present.
|
|
119
|
+
const marker = hasApiGatewayCall
|
|
120
|
+
? apiGatewayReviewMarker
|
|
121
|
+
: hasStandardCall
|
|
122
|
+
? standardReviewMarker
|
|
123
|
+
: '';
|
|
124
|
+
const updated =
|
|
125
|
+
marker && !transformed.includes('@declapract:review')
|
|
126
|
+
? marker + transformed
|
|
127
|
+
: transformed;
|
|
128
|
+
|
|
49
129
|
return { contents: updated };
|
|
50
130
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { FileCheckFunction, FileFixFunction } from 'declapract';
|
|
2
2
|
import expect from 'expect';
|
|
3
|
+
import { ConstraintError } from 'helpful-errors';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* define the relative key order of keys we care about
|
|
@@ -80,6 +81,8 @@ export const desiredRelativeKeyOrder = {
|
|
|
80
81
|
'prepare:rhachet',
|
|
81
82
|
'prepare',
|
|
82
83
|
'deploy:prune',
|
|
84
|
+
'deploy:release:ancient',
|
|
85
|
+
'deploy:release:contemp',
|
|
83
86
|
'deploy:release',
|
|
84
87
|
'deploy:send-notification',
|
|
85
88
|
'deploy:prep',
|
|
@@ -212,7 +215,10 @@ const sortPackageJSONObjectKeys = (packageJSONObject: Record<string, any>) => {
|
|
|
212
215
|
|
|
213
216
|
// define fix and check
|
|
214
217
|
export const check: FileCheckFunction = (contents) => {
|
|
215
|
-
if (!contents)
|
|
218
|
+
if (!contents)
|
|
219
|
+
throw new ConstraintError(
|
|
220
|
+
'package.json not defined; the repo must carry a package.json for key-order to apply',
|
|
221
|
+
);
|
|
216
222
|
const packageJSONObject = JSON.parse(contents);
|
|
217
223
|
const sortedPackageJSONObject = sortPackageJSONObjectKeys(packageJSONObject);
|
|
218
224
|
expect(JSON.stringify(packageJSONObject, null, 2)).toEqual(
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import fs from 'fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
|
|
4
|
+
import { executeApply } from 'declapract';
|
|
5
|
+
import { genTempDir, given, then, useThen, when } from 'test-fns';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* .what = end-to-end proof that the `jest.integration.env.ts` declaration REPAIRS a divergent
|
|
9
|
+
* consumer file back to the canonical template, run through the REAL declapract apply
|
|
10
|
+
* pipeline against a genTempDir clone of a consumer repo (D39 clamp).
|
|
11
|
+
* .why = the declaration was a bare `CONTAINS` with no `fix`, so a whole-env-file divergence was
|
|
12
|
+
* invisible to the check AND unclosable by any mechanism — a consumer's drift stood
|
|
13
|
+
* forever. the fix REMOVED the `.declapract.ts` companion, so the file defaults to
|
|
14
|
+
* `EQUALS`: a byte-exact check whose implicit fix OVERWRITES the consumer's file with the
|
|
15
|
+
* template. this test is the clamp that a divergence is now both DETECTED and CLOSED.
|
|
16
|
+
* .note = the env file is snapshotted in full (before AND after) so a reviewer can eyeball the
|
|
17
|
+
* exact end-state, per rule.require.declapract-integration-tests.
|
|
18
|
+
* .teeth = the divergent input carries port `9999` and drops the template's doc comment. a revert
|
|
19
|
+
* to the deleted `CONTAINS` companion re-opens the divergence — the check would pass on
|
|
20
|
+
* the drifted file (it still `CONTAINS` the assignment line) and no fix would fire, so
|
|
21
|
+
* the after-state would keep `9999` and this assertion reddens.
|
|
22
|
+
*/
|
|
23
|
+
const BEST_PRACTICE_ENV = `${__dirname}/best-practice/jest.integration.env.ts`;
|
|
24
|
+
|
|
25
|
+
describe('persist-with-dynamodb — jest.integration.env divergence repair (D39 clamp)', () => {
|
|
26
|
+
given('[case1] a repo with a divergent jest.integration.env.ts', () => {
|
|
27
|
+
const tempDir = genTempDir({
|
|
28
|
+
slug: 'declapract-dynamodb-jest-env',
|
|
29
|
+
clone: './src/practices/persist-with-dynamodb/.test/assets/demo-repo-with-divergent-jest-env',
|
|
30
|
+
symlink: [{ at: 'src', to: 'src' }],
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const envPath = 'jest.integration.env.ts';
|
|
34
|
+
const read = (relativePath: string) =>
|
|
35
|
+
fs.readFile(path.join(tempDir, relativePath), 'utf-8');
|
|
36
|
+
const applyRepair = () =>
|
|
37
|
+
executeApply({
|
|
38
|
+
config: path.join(tempDir, 'declapract.use.yml'),
|
|
39
|
+
practice: 'persist-with-dynamodb',
|
|
40
|
+
file: envPath,
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
when('[t0] the divergent input (before any fix)', () => {
|
|
44
|
+
then('the env input carries the drifted port and matches snapshot', async () => {
|
|
45
|
+
const before = await read(envPath);
|
|
46
|
+
expect(before).toContain('9999');
|
|
47
|
+
expect(before).toMatchSnapshot('jest.integration.env.ts — before');
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
when('[t1] the EQUALS repair is applied', () => {
|
|
52
|
+
useThen('repair the divergent env file', async () => applyRepair());
|
|
53
|
+
|
|
54
|
+
then(
|
|
55
|
+
'the consumer file now byte-equals the canonical template and matches snapshot',
|
|
56
|
+
async () => {
|
|
57
|
+
const after = await read(envPath);
|
|
58
|
+
const canonical = await fs.readFile(BEST_PRACTICE_ENV, 'utf-8');
|
|
59
|
+
// teeth: the drifted port is gone, the canonical endpoint + doc comment are restored
|
|
60
|
+
expect(after).not.toContain('9999');
|
|
61
|
+
expect(after).toContain('http://localhost:7337');
|
|
62
|
+
expect(after).toContain(
|
|
63
|
+
'specify that dynamodb should use the local dynamodb database',
|
|
64
|
+
);
|
|
65
|
+
// byte-for-byte: EQUALS repairs the WHOLE file, not just the assignment line
|
|
66
|
+
expect(after).toEqual(canonical);
|
|
67
|
+
// full content, for the reviewer's eye
|
|
68
|
+
expect(after).toMatchSnapshot('jest.integration.env.ts — after');
|
|
69
|
+
},
|
|
70
|
+
);
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
when('[t2] the repair is applied a second time (idempotency)', () => {
|
|
74
|
+
// capture the post-first-repair state, apply again, capture again — assert zero
|
|
75
|
+
// change. a byte-equal file must satisfy the EQUALS check, so a second apply fires
|
|
76
|
+
// no fix (per rule.require.idempotent-fixes).
|
|
77
|
+
const passes = useThen(
|
|
78
|
+
'a second repair over its own output',
|
|
79
|
+
async () => {
|
|
80
|
+
const before = await read(envPath); // post-first-repair (canonical)
|
|
81
|
+
await applyRepair(); // second apply
|
|
82
|
+
const after = await read(envPath);
|
|
83
|
+
return { before, after };
|
|
84
|
+
},
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
then('the second repair is a no-op', () => {
|
|
88
|
+
expect(passes.after).toEqual(passes.before);
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
});
|
package/dist/practices/persist-with-dynamodb/__snapshots__/.declapract.integration.test.ts.snap
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
+
|
|
3
|
+
exports[`persist-with-dynamodb — jest.integration.env divergence repair (D39 clamp) given: [case1] a repo with a divergent jest.integration.env.ts when: [t0] the divergent input (before any fix) then: the env input carries the drifted port and matches snapshot: jest.integration.env.ts — before 1`] = `
|
|
4
|
+
"import { access } from './src/utils/environment';
|
|
5
|
+
|
|
6
|
+
if (access === 'test')
|
|
7
|
+
process.env.USE_CUSTOM_DYNAMODB_ENDPOINT = 'http://localhost:9999';
|
|
8
|
+
"
|
|
9
|
+
`;
|
|
10
|
+
|
|
11
|
+
exports[`persist-with-dynamodb — jest.integration.env divergence repair (D39 clamp) given: [case1] a repo with a divergent jest.integration.env.ts when: [t1] the EQUALS repair is applied then: the consumer file now byte-equals the canonical template and matches snapshot: jest.integration.env.ts — after 1`] = `
|
|
12
|
+
"import { access } from './src/utils/environment';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* specify that dynamodb should use the local dynamodb database, under the test access
|
|
16
|
+
*/
|
|
17
|
+
if (access === 'test')
|
|
18
|
+
process.env.USE_CUSTOM_DYNAMODB_ENDPOINT = 'http://localhost:7337';
|
|
19
|
+
"
|
|
20
|
+
`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { access } from './src/utils/environment';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* specify that dynamodb should use the local dynamodb database,
|
|
4
|
+
* specify that dynamodb should use the local dynamodb database, under the test access
|
|
5
5
|
*/
|
|
6
|
-
if (
|
|
6
|
+
if (access === 'test')
|
|
7
7
|
process.env.USE_CUSTOM_DYNAMODB_ENDPOINT = 'http://localhost:7337';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"simple-dynamodb-client": "@declapract{check.minVersion('0.10.
|
|
3
|
+
"simple-dynamodb-client": "@declapract{check.minVersion('0.10.4')}"
|
|
4
4
|
},
|
|
5
5
|
"devDependencies": {
|
|
6
|
-
"dynamodb-dao-generator": "@declapract{check.minVersion('1.0
|
|
6
|
+
"dynamodb-dao-generator": "@declapract{check.minVersion('1.1.0')}"
|
|
7
7
|
},
|
|
8
8
|
"scripts": {
|
|
9
9
|
"generate:dao:dynamodb": "npx dynamodb-dao-generator generate && npm run fix:format",
|