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,131 @@
|
|
|
1
|
+
import fs from 'fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
|
|
4
|
+
import { executeApply } from 'declapract';
|
|
5
|
+
import { genTempDir, given, then, useBeforeAll, when } from 'test-fns';
|
|
6
|
+
|
|
7
|
+
// executeApply is slow (full usecase evaluation), so widen the jest budget
|
|
8
|
+
jest.setTimeout(180_000); // 3 minutes
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* .what = pipeline test for the usecase-aware format package.json `contents` fn (r001.b3)
|
|
12
|
+
* .why = a unit test proves the `contents` fn in isolation against a mocked context; only the
|
|
13
|
+
* real executeApply pipeline proves that declapract:
|
|
14
|
+
* - matches the package.json declaration to the consumer's package.json
|
|
15
|
+
* - feeds context.projectPractices with the terraform signal derived through a REAL usecase
|
|
16
|
+
* (terraform-common present vs absent), NOT a hand-built context object
|
|
17
|
+
* - emits the chained fix:format / test:format the branch builds, into the file on disk
|
|
18
|
+
* per rule.require.declapract-integration-tests, a usecase-aware `contents` fn that silently
|
|
19
|
+
* changes what a consumer receives owes an executeApply pipeline test, not a unit test alone.
|
|
20
|
+
* .note = INTEGRATION by rule.forbid.unit.remote-boundaries: it reads the filesystem + runs
|
|
21
|
+
* executeApply against a temp clone. no credential, no network. the fixtures live under a
|
|
22
|
+
* `.test` dot-dir (excluded from tsconfig/jest globs); a lean declarations mirror symlinks
|
|
23
|
+
* only format + terraform-common so the whole-usecase compile does not blow the hook timeout.
|
|
24
|
+
* .note = the confound: terraform-common's OWN package.json also declares a standalone
|
|
25
|
+
* `fix:format:terraform` command, so a bare "contains fix:format:terraform" assertion could
|
|
26
|
+
* not isolate the format branch. the DISTINGUISHING signal for format's branch is the
|
|
27
|
+
* CHAINED `fix:format` value (`... && npm run fix:format:terraform`), which only format emits.
|
|
28
|
+
* so every assertion reads the `fix:format` chain value, never the standalone key.
|
|
29
|
+
* .teeth = with-terraform: the emitted `fix:format` chain MUST include the terraform sub-command —
|
|
30
|
+
* a revert of the branch to biome-only reddens it. without-terraform: the chain MUST be
|
|
31
|
+
* biome-only — a branch that fired on the wrong (absent) signal reddens it.
|
|
32
|
+
*/
|
|
33
|
+
describe('format practice — the usecase-aware package.json contents fn (r001.b3)', () => {
|
|
34
|
+
const readCommands = async (
|
|
35
|
+
tempDir: string,
|
|
36
|
+
): Promise<Record<string, string>> => {
|
|
37
|
+
const raw = await fs.readFile(path.join(tempDir, 'package.json'), 'utf-8');
|
|
38
|
+
return JSON.parse(raw).scripts as Record<string, string>;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
given('[case1] a consumer on a terraform usecase', () => {
|
|
42
|
+
const tempDir = genTempDir({
|
|
43
|
+
slug: 'format-pkgjson-with-terraform',
|
|
44
|
+
clone: './src/.test/assets/format/repo-with-terraform',
|
|
45
|
+
symlink: [
|
|
46
|
+
{
|
|
47
|
+
at: 'declarations',
|
|
48
|
+
to: './src/.test/assets/format/declarations',
|
|
49
|
+
},
|
|
50
|
+
{ at: 'node_modules', to: 'node_modules' },
|
|
51
|
+
],
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
// useBeforeAll RETURNS the captured reads (no in-place mutation of a shared const).
|
|
55
|
+
// .note = filter by file ONLY, never by practice. the practice filter narrows
|
|
56
|
+
// projectPractices too (getDesiredPractices), which would strip terraform-common
|
|
57
|
+
// and silence the branch. file-only keeps every usecase practice in projectPractices
|
|
58
|
+
// while it applies just the package.json plan.
|
|
59
|
+
const commands = useBeforeAll(async () => {
|
|
60
|
+
await executeApply({
|
|
61
|
+
config: path.join(tempDir, 'declapract.use.yml'),
|
|
62
|
+
file: 'package.json',
|
|
63
|
+
});
|
|
64
|
+
return readCommands(tempDir);
|
|
65
|
+
}, 170_000);
|
|
66
|
+
|
|
67
|
+
when('[t0] the format package.json is applied', () => {
|
|
68
|
+
then('the fix:format chain includes the terraform sub-command', () => {
|
|
69
|
+
expect(commands['fix:format']).toContain('npm run fix:format:terraform');
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
then('the fix:format chain still leads with biome', () => {
|
|
73
|
+
expect(commands['fix:format']).toContain('npm run fix:format:biome');
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
then('the test:format chain includes the terraform sub-command', () => {
|
|
77
|
+
expect(commands['test:format']).toContain(
|
|
78
|
+
'npm run test:format:terraform',
|
|
79
|
+
);
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
then('the emitted commands block matches snapshot', () => {
|
|
83
|
+
expect(commands).toMatchSnapshot('with-terraform — commands');
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
given('[case2] a consumer on a non-terraform usecase', () => {
|
|
89
|
+
const tempDir = genTempDir({
|
|
90
|
+
slug: 'format-pkgjson-without-terraform',
|
|
91
|
+
clone: './src/.test/assets/format/repo-without-terraform',
|
|
92
|
+
symlink: [
|
|
93
|
+
{
|
|
94
|
+
at: 'declarations',
|
|
95
|
+
to: './src/.test/assets/format/declarations',
|
|
96
|
+
},
|
|
97
|
+
{ at: 'node_modules', to: 'node_modules' },
|
|
98
|
+
],
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
const commands = useBeforeAll(async () => {
|
|
102
|
+
await executeApply({
|
|
103
|
+
config: path.join(tempDir, 'declapract.use.yml'),
|
|
104
|
+
file: 'package.json',
|
|
105
|
+
});
|
|
106
|
+
return readCommands(tempDir);
|
|
107
|
+
}, 170_000);
|
|
108
|
+
|
|
109
|
+
when('[t0] the format package.json is applied', () => {
|
|
110
|
+
then('the fix:format chain is biome-only', () => {
|
|
111
|
+
expect(commands['fix:format']).toEqual('npm run fix:format:biome');
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
then('the fix:format chain omits the terraform sub-command (the teeth)', () => {
|
|
115
|
+
expect(commands['fix:format']).not.toContain(
|
|
116
|
+
'npm run fix:format:terraform',
|
|
117
|
+
);
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
then('the test:format chain omits the terraform sub-command', () => {
|
|
121
|
+
expect(commands['test:format']).not.toContain(
|
|
122
|
+
'npm run test:format:terraform',
|
|
123
|
+
);
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
then('the emitted commands block matches snapshot', () => {
|
|
127
|
+
expect(commands).toMatchSnapshot('without-terraform — commands');
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
+
|
|
3
|
+
exports[`format practice — the usecase-aware package.json contents fn (r001.b3) given: [case1] a consumer on a terraform usecase when: [t0] the format package.json is applied then: the emitted commands block matches snapshot: with-terraform — commands 1`] = `
|
|
4
|
+
{
|
|
5
|
+
"fix:format": "npm run fix:format:biome && npm run fix:format:terraform",
|
|
6
|
+
"fix:format:terraform": "terraform fmt -recursive provision",
|
|
7
|
+
"test:format": "npm run test:format:biome && npm run test:format:terraform",
|
|
8
|
+
"test:format:terraform": "terraform fmt -recursive -check provision",
|
|
9
|
+
}
|
|
10
|
+
`;
|
|
11
|
+
|
|
12
|
+
exports[`format practice — the usecase-aware package.json contents fn (r001.b3) given: [case2] a consumer on a non-terraform usecase when: [t0] the format package.json is applied then: the emitted commands block matches snapshot: without-terraform — commands 1`] = `
|
|
13
|
+
{
|
|
14
|
+
"fix:format": "npm run fix:format:biome",
|
|
15
|
+
"test:format": "npm run test:format:biome",
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
@@ -3,6 +3,6 @@ import { FileCheckType, type FileFixFunction } from 'declapract';
|
|
|
3
3
|
export const check = FileCheckType.EXISTS;
|
|
4
4
|
|
|
5
5
|
export const fix: FileFixFunction = () => {
|
|
6
|
-
//
|
|
6
|
+
// remove the file: a null contents result deletes it
|
|
7
7
|
return { contents: null };
|
|
8
8
|
};
|
|
@@ -1,29 +1,47 @@
|
|
|
1
1
|
import { FileCheckType, type FileContentsFunction } from 'declapract';
|
|
2
2
|
import { isPresent } from 'type-fns';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* .what = the active formatter set for a repo — `biome` always, `terraform` only when a terraform
|
|
6
|
+
* practice is in use.
|
|
7
|
+
* .why = names the set derivation as one intent, so `contents` reads what-not-how rather than an
|
|
8
|
+
* inline conditional-null-in-array + filter pipeline a reader must mentally simulate
|
|
9
|
+
* (`rule.forbid.inline-decode-friction`).
|
|
10
|
+
*/
|
|
11
|
+
const asActiveFormatters = (input: { usesTerraform: boolean }): string[] =>
|
|
12
|
+
['biome', input.usesTerraform ? 'terraform' : null].filter(isPresent);
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* .what = build the `fix:format` / `test:format` npm commands from the active formatter list — each
|
|
16
|
+
* a ` && `-joined chain of per-formatter sub-commands.
|
|
17
|
+
* .why = names the derivation as one intent, so `contents` reads what-not-how rather than an
|
|
18
|
+
* inline filter/map/join pipeline a reader must mentally simulate (`rule.require.named-transformers`).
|
|
19
|
+
*/
|
|
20
|
+
const asFormatScripts = (input: {
|
|
21
|
+
formatters: string[];
|
|
22
|
+
}): Record<string, string> => ({
|
|
23
|
+
'fix:format': input.formatters
|
|
24
|
+
.map((formatter) => `npm run fix:format:${formatter}`)
|
|
25
|
+
.join(' && '),
|
|
26
|
+
'test:format': input.formatters
|
|
27
|
+
.map((formatter) => `npm run test:format:${formatter}`)
|
|
28
|
+
.join(' && '),
|
|
29
|
+
});
|
|
30
|
+
|
|
4
31
|
/**
|
|
5
32
|
* declare the expected contents
|
|
6
33
|
*/
|
|
7
34
|
export const contents: FileContentsFunction = (context) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
35
|
+
// only include the terraform formatter if a terraform practice is in use.
|
|
36
|
+
// the practices are named `terraform-common` / `terraform-aws` (see useCases.yml) —
|
|
37
|
+
// a check for the bare `terraform` matches NO practice, so the formatter would never run.
|
|
38
|
+
const usesTerraform =
|
|
39
|
+
context.projectPractices.includes('terraform-common') ||
|
|
40
|
+
context.projectPractices.includes('terraform-aws');
|
|
41
|
+
|
|
42
|
+
const formatters = asActiveFormatters({ usesTerraform });
|
|
12
43
|
|
|
13
|
-
return JSON.stringify(
|
|
14
|
-
{
|
|
15
|
-
scripts: {
|
|
16
|
-
'fix:format': formatters
|
|
17
|
-
.map((formatter) => `npm run fix:format:${formatter}`)
|
|
18
|
-
.join(' && '),
|
|
19
|
-
'test:format': formatters
|
|
20
|
-
.map((formatter) => `npm run test:format:${formatter}`)
|
|
21
|
-
.join(' && '),
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
null,
|
|
25
|
-
2,
|
|
26
|
-
);
|
|
44
|
+
return JSON.stringify({ scripts: asFormatScripts({ formatters }) }, null, 2);
|
|
27
45
|
};
|
|
28
46
|
|
|
29
47
|
/**
|
|
@@ -5,7 +5,10 @@ import path from 'node:path';
|
|
|
5
5
|
import { executeApply } from 'declapract';
|
|
6
6
|
import { genTempDir, given, then, useBeforeAll, useThen, when } from 'test-fns';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
check as checkOfRhachet,
|
|
10
|
+
fix as fixOfRhachet,
|
|
11
|
+
} from '../rhachet/best-practice/.gitignore.declapract';
|
|
9
12
|
import { check as checkOfGit } from './best-practice/.gitignore.declapract';
|
|
10
13
|
|
|
11
14
|
// executeApply is slow (90+ seconds per invocation due to full practice evaluation)
|
|
@@ -305,14 +308,61 @@ describe('gitignore practices', () => {
|
|
|
305
308
|
* if that ever drifts, `declapract fix` rewrites the file on every run,
|
|
306
309
|
* forever -- and a hoisted negation turns inert, which silently
|
|
307
310
|
* un-ignores the test-fixture node_modules the tail exists to protect.
|
|
311
|
+
* .note = rhachet is DISJOINT from git, not a subset, so a rhachet apply on top of
|
|
312
|
+
* git's output ADDS its own line(s) rather than a no-op. this test asserts
|
|
313
|
+
* only that git's lines SURVIVE the second declarer -- the settle/no-loss
|
|
314
|
+
* property. it does NOT name rhachet's specific line: that line is rhachet's
|
|
315
|
+
* to own and assert (its own unit suite + snapshot do), and a git test that
|
|
316
|
+
* pinned it would reach across the practice boundary
|
|
317
|
+
* (rule.require.entool-requests-as-practices -- the practice that creates an
|
|
318
|
+
* artifact declares and asserts it). the full settled artifact, both
|
|
319
|
+
* practices' lines included, is the `[t3]` snapshot.
|
|
308
320
|
*/
|
|
309
|
-
then('the
|
|
321
|
+
then('the second declarer preserves every git line', async () => {
|
|
310
322
|
const contentsAfterRhachet = await fs.readFile(
|
|
311
323
|
path.join(tempDir, '.gitignore'),
|
|
312
324
|
'utf-8',
|
|
313
325
|
);
|
|
314
326
|
|
|
315
|
-
|
|
327
|
+
// every line git emitted survives the second declarer -- no loss
|
|
328
|
+
fileBefore.contents
|
|
329
|
+
.split('\n')
|
|
330
|
+
.filter((line) => line)
|
|
331
|
+
.forEach((line) => expect(contentsAfterRhachet).toContain(line));
|
|
332
|
+
});
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* .what = the settled file is EXACTLY rhachet's fix of git's output -- so the
|
|
336
|
+
* second declarer adds no line but what it declares, and reorders none
|
|
337
|
+
* .why = the survival loop above proves no git line is LOST, but a per-line
|
|
338
|
+
* `toContain` is blind to two things: a reorder of the lines, and an
|
|
339
|
+
* extraneous line appended beyond the union. this strict form closes both
|
|
340
|
+
* -- the bytes on disk must equal what rhachet's own `fix` emits from
|
|
341
|
+
* git's output, whole and in order.
|
|
342
|
+
* .note = the expectation is DERIVED from rhachet's own declaration (`fixOfRhachet`),
|
|
343
|
+
* never a literal copied here -- so rhachet still owns and declares its line
|
|
344
|
+
* (`rule.require.entool-requests-as-practices` holds), while the git test
|
|
345
|
+
* still proves the second declarer emits no line but what it declares. a
|
|
346
|
+
* `toEqual(fileBefore.contents)` would be WRONG: rhachet legitimately unions
|
|
347
|
+
* its own `.agent/.cache/` line in, so the file GAINS a line -- deriving the
|
|
348
|
+
* expectation THROUGH rhachet's fix accounts for exactly that gain.
|
|
349
|
+
* .note = the pipeline writes through `writeFileAsync`, which rewrites the final
|
|
350
|
+
* newline (`content.replace(/\n$/, '') + '\n'` -- the seam `[t3]` names), so
|
|
351
|
+
* both sides are compared with that one final newline stripped.
|
|
352
|
+
*/
|
|
353
|
+
then("the settled file is exactly rhachet's fix of git's output", async () => {
|
|
354
|
+
const contentsAfterRhachet = await fs.readFile(
|
|
355
|
+
path.join(tempDir, '.gitignore'),
|
|
356
|
+
'utf-8',
|
|
357
|
+
);
|
|
358
|
+
|
|
359
|
+
const expected =
|
|
360
|
+
(await fixOfRhachet(fileBefore.contents, {} as any)).contents ?? '';
|
|
361
|
+
|
|
362
|
+
// strip the one final newline the pipeline's writeFileAsync rewrites
|
|
363
|
+
const asStripped = (value: string): string => value.replace(/\n$/, '');
|
|
364
|
+
|
|
365
|
+
expect(asStripped(contentsAfterRhachet)).toEqual(asStripped(expected));
|
|
316
366
|
});
|
|
317
367
|
|
|
318
368
|
then('both cache paths are still ignored', () => {
|
|
@@ -334,9 +384,10 @@ describe('gitignore practices', () => {
|
|
|
334
384
|
* different input -- one already full of git's 17 lines, rather than the
|
|
335
385
|
* 3-line file `[case2]` hands it. a union or tail defect can behave
|
|
336
386
|
* differently on that input, and this is the only place it is reachable.
|
|
337
|
-
* .note = `the
|
|
338
|
-
*
|
|
339
|
-
*
|
|
387
|
+
* .note = `the second declarer preserves every git line` covers the gross no-loss,
|
|
388
|
+
* but these name the SPECIFIC union/tail guarantees -- a repo's own custom
|
|
389
|
+
* line, no duplicate, a live negation -- each of which a defect could break
|
|
390
|
+
* while the gross no-loss still held.
|
|
340
391
|
*/
|
|
341
392
|
then("the repo's own custom ignores survive the second apply", () => {
|
|
342
393
|
expect(fileAfterRhachet.lines).toContain('.idea');
|
|
@@ -16,6 +16,7 @@ exports[`gitignore practices given: [case1] a repo whose .gitignore lacks both c
|
|
|
16
16
|
.agent/.cache/
|
|
17
17
|
.artifact
|
|
18
18
|
.cache/
|
|
19
|
+
.claude/scheduled_tasks*
|
|
19
20
|
.env
|
|
20
21
|
.idea
|
|
21
22
|
.log/slowtest/
|
|
@@ -42,6 +43,7 @@ node_modules
|
|
|
42
43
|
|
|
43
44
|
exports[`gitignore practices given: [case2] a repo whose use case has rhachet but NOT git when: [t1] the rhachet practice is applied then: the settled file matches snapshot: .gitignore -- rhachet only 1`] = `
|
|
44
45
|
".agent/.cache/
|
|
46
|
+
.claude/scheduled_tasks*
|
|
45
47
|
.idea
|
|
46
48
|
dist
|
|
47
49
|
node_modules
|
|
@@ -53,41 +53,56 @@ const ALL_PRIOR_ENTRIES = SECTIONS.flatMap((s) => s.entries.priors);
|
|
|
53
53
|
*/
|
|
54
54
|
const ALL_PRIOR_HEADERS = SECTIONS.flatMap((s) => s.header.priors);
|
|
55
55
|
|
|
56
|
+
/**
|
|
57
|
+
* .what = drops prior headers + prior entries, and dedupes latest entries (keep first)
|
|
58
|
+
* .why = the fix must not re-emit a legacy line, nor a second copy of a managed entry;
|
|
59
|
+
* a named transform keeps cleanContent a narrative of what happens, not how
|
|
60
|
+
*/
|
|
61
|
+
const asLinesWithLegacyDroppedAndDeduped = (input: {
|
|
62
|
+
lines: string[];
|
|
63
|
+
}): string[] => {
|
|
64
|
+
const { lines } = input.lines.reduce<{
|
|
65
|
+
lines: string[];
|
|
66
|
+
seen: Set<string>;
|
|
67
|
+
}>(
|
|
68
|
+
(acc, line) => {
|
|
69
|
+
const trimmed = line.trim();
|
|
70
|
+
|
|
71
|
+
// skip prior headers + prior entries
|
|
72
|
+
if (ALL_PRIOR_HEADERS.includes(trimmed)) return acc;
|
|
73
|
+
if (ALL_PRIOR_ENTRIES.includes(trimmed)) return acc;
|
|
74
|
+
|
|
75
|
+
// skip duplicate latest entries (keep first occurrence)
|
|
76
|
+
if (ALL_LATEST_ENTRIES.includes(trimmed)) {
|
|
77
|
+
if (acc.seen.has(trimmed)) return acc;
|
|
78
|
+
return {
|
|
79
|
+
lines: [...acc.lines, line],
|
|
80
|
+
seen: new Set([...acc.seen, trimmed]),
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return { lines: [...acc.lines, line], seen: acc.seen };
|
|
85
|
+
},
|
|
86
|
+
{ lines: [], seen: new Set<string>() },
|
|
87
|
+
);
|
|
88
|
+
return lines;
|
|
89
|
+
};
|
|
90
|
+
|
|
56
91
|
/**
|
|
57
92
|
* removes legacy headers, duplicate entries, and cleans up empty lines
|
|
58
93
|
*/
|
|
59
94
|
const cleanContent = (content: string): string => {
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
for (const line of lines) {
|
|
65
|
-
const trimmed = line.trim();
|
|
66
|
-
|
|
67
|
-
// skip prior headers
|
|
68
|
-
if (ALL_PRIOR_HEADERS.includes(trimmed)) continue;
|
|
95
|
+
// drop legacy headers, legacy entries, and duplicate latest entries (keep first)
|
|
96
|
+
const cleanedLines = asLinesWithLegacyDroppedAndDeduped({
|
|
97
|
+
lines: content.split('\n'),
|
|
98
|
+
});
|
|
69
99
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
// skip duplicate latest entries (keep first occurrence)
|
|
74
|
-
if (ALL_LATEST_ENTRIES.includes(trimmed)) {
|
|
75
|
-
if (seenEntries.has(trimmed)) continue;
|
|
76
|
-
seenEntries.add(trimmed);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
cleanedLines.push(line);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// collapse multiple consecutive empty lines into one
|
|
83
|
-
const collapsedLines: string[] = [];
|
|
84
|
-
let prevWasEmpty = false;
|
|
85
|
-
for (const line of cleanedLines) {
|
|
100
|
+
// collapse multiple consecutive empty lines into one (drop an empty that follows an empty)
|
|
101
|
+
const collapsedLines = cleanedLines.filter((line, index) => {
|
|
86
102
|
const isEmpty = line.trim() === '';
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
103
|
+
const prevWasEmpty = index > 0 && cleanedLines[index - 1]!.trim() === '';
|
|
104
|
+
return !(isEmpty && prevWasEmpty);
|
|
105
|
+
});
|
|
91
106
|
|
|
92
107
|
return collapsedLines.join('\n').trim();
|
|
93
108
|
};
|
|
@@ -146,14 +161,12 @@ export const fix: FileFixFunction = (contents) => {
|
|
|
146
161
|
return { contents: allSections + '\n' };
|
|
147
162
|
}
|
|
148
163
|
|
|
149
|
-
// clean up legacy headers and duplicates
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
result = ensureSection(result, section);
|
|
155
|
-
}
|
|
164
|
+
// clean up legacy headers and duplicates, then ensure each section exists
|
|
165
|
+
const result = SECTIONS.reduce(
|
|
166
|
+
(acc, section) => ensureSection(acc, section),
|
|
167
|
+
cleanContent(contents),
|
|
168
|
+
);
|
|
156
169
|
|
|
157
|
-
//
|
|
170
|
+
// trim to exactly one final newline
|
|
158
171
|
return { contents: result.trimEnd() + '\n' };
|
|
159
172
|
};
|
|
@@ -30,6 +30,14 @@ import { defineExpectedGitignoreContents } from '../../../utils/defineExpectedGi
|
|
|
30
30
|
* place. `readonly` forbids that mutation outright rather than merely discourages it
|
|
31
31
|
* (`rule.prefer.prevent-over-correct`), so the source may group lines by what they are
|
|
32
32
|
* for, with their comments beside them, and the one sort that matters stays in one place.
|
|
33
|
+
*
|
|
34
|
+
* .note = every line here governs an UNTRACKED path only. git consults `.gitignore` for a path
|
|
35
|
+
* not yet in the index; a path a consumer ALREADY tracks stays tracked, and this
|
|
36
|
+
* declaration cannot reach the index to reconcile it (the `fix` is a pure contents
|
|
37
|
+
* transform, so it has no seam to the index). so a consumer that committed a match
|
|
38
|
+
* BEFORE this practice declared the pattern keeps it committed, silently, behind a line
|
|
39
|
+
* that reads as enforcement. to reconcile an extant match, run `git rm --cached <path>`
|
|
40
|
+
* by hand. a loud in-consumer report of that case is a proposed follow-on (#582).
|
|
33
41
|
*/
|
|
34
42
|
const ignoresSortable: readonly string[] = [
|
|
35
43
|
'*.log',
|
package/dist/practices/husky/__snapshots__/check.timestamps.play.declapract.integration.test.ts.snap
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
+
|
|
3
|
+
exports[`check.timestamps guard given: [case1] a non-code file with an iso timestamp when: [t0] the guard runs then: the verbatim halt output matches snapshot: check.timestamps halt output 1`] = `
|
|
4
|
+
"✋ timestamps are forbidden in snapshots. mask them to prevent permadrift
|
|
5
|
+
└─ snapshot.json:1:{ "createdAt": "[timestamp]" }
|
|
6
|
+
"
|
|
7
|
+
`;
|
|
@@ -13,6 +13,13 @@ set -eu
|
|
|
13
13
|
# the timestamp pattern: optional lead T, HH:MM:SS, optional timezone (Z, ±HH:MM, ±HHMM)
|
|
14
14
|
TIMESTAMP_PATTERN='T?[0-9][0-9]:[0-9][0-9]:[0-9][0-9](Z|[+-][0-9][0-9]:?[0-9][0-9])?'
|
|
15
15
|
|
|
16
|
+
# an iso-8601 DURATION is a fixed span, not an instant, so it cannot permadrift — it is a
|
|
17
|
+
# valid, stable value to assert on. a duration carries a lead `P` designator and a `T` with
|
|
18
|
+
# NO date part (PT12:30:00, P1DT02:15:30, P3Y6M4DT12:30:05), unlike a stamp
|
|
19
|
+
# (2026-08-08T14:30:00Z). strip durations before the timestamp scan, so a duration-only line
|
|
20
|
+
# falls through and a line with a real stamp still halts (the stamp survives the strip).
|
|
21
|
+
DURATION_PATTERN='P([0-9]+[YMWD])*T([0-9]+[HMS])*[0-9][0-9]:[0-9][0-9]:[0-9][0-9]'
|
|
22
|
+
|
|
16
23
|
# collect staged files (added/copied/modified); skip deletions
|
|
17
24
|
staged=$(git diff --cached --name-only --diff-filter=ACM)
|
|
18
25
|
|
|
@@ -36,8 +43,10 @@ while IFS= read -r file; do
|
|
|
36
43
|
exit 1
|
|
37
44
|
fi
|
|
38
45
|
|
|
39
|
-
# halt if the staged content embeds a raw timestamp
|
|
40
|
-
|
|
46
|
+
# halt if the staged content embeds a raw timestamp. strip iso durations first (sed is
|
|
47
|
+
# line-by-line, so line numbers are preserved): a duration-only line loses its HH:MM:SS run
|
|
48
|
+
# and falls through; a line that also holds a real stamp still matches (the stamp wins)
|
|
49
|
+
match=$(printf '%s\n' "$content" | sed -E "s/$DURATION_PATTERN//g" | grep -nIE "$TIMESTAMP_PATTERN" | head -n 1)
|
|
41
50
|
if [ -n "$match" ]; then
|
|
42
51
|
printf '✋ timestamps are forbidden in snapshots. mask them to prevent permadrift\n'
|
|
43
52
|
printf ' └─ %s:%s\n' "$file" "$match"
|
|
@@ -62,6 +62,20 @@ describe('check.timestamps guard', () => {
|
|
|
62
62
|
' └─ snapshot.json:1:{ "createdAt": "2026-06-25T14:30:00Z" }',
|
|
63
63
|
);
|
|
64
64
|
});
|
|
65
|
+
then('the verbatim halt output matches snapshot', () => {
|
|
66
|
+
// user-faced halt message — a reword must redden a vibecheck, not slip past the
|
|
67
|
+
// toContain asserts above (rule.require.snapshots). the fixture timestamp is a fixed
|
|
68
|
+
// input (not a live clock), so the output is deterministic.
|
|
69
|
+
// mask the instant to [timestamp] before the snapshot: the .snap is itself scanned by
|
|
70
|
+
// this very guard (only .ts/.sh are exempt), so a raw instant here would forbid its own
|
|
71
|
+
// commit. the raw detail-line toContain above already locks the exact instant in the
|
|
72
|
+
// output; the snapshot vibechecks the message shape, per the guard's own mask remedy (case8).
|
|
73
|
+
const masked = result.stdout.replace(
|
|
74
|
+
/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z/g,
|
|
75
|
+
'[timestamp]',
|
|
76
|
+
);
|
|
77
|
+
expect(masked).toMatchSnapshot('check.timestamps halt output');
|
|
78
|
+
});
|
|
65
79
|
});
|
|
66
80
|
});
|
|
67
81
|
|
|
@@ -145,4 +159,55 @@ describe('check.timestamps guard', () => {
|
|
|
145
159
|
});
|
|
146
160
|
});
|
|
147
161
|
});
|
|
162
|
+
|
|
163
|
+
// #566: an iso-8601 duration is a fixed span, not an instant, so it cannot permadrift —
|
|
164
|
+
// the matcher must not halt on it (a false positive that trains folks to bypass the hook)
|
|
165
|
+
given('[case9] a non-code file with a simple iso duration (PT12:30:00)', () => {
|
|
166
|
+
when('[t0] the guard runs', () => {
|
|
167
|
+
const dir = genStagedRepo({ 'fixture.json': '{ "window": "PT12:30:00" }\n' });
|
|
168
|
+
const result = runGuard(dir);
|
|
169
|
+
|
|
170
|
+
then('it allows the commit with exit 0 (a duration is not a timestamp)', () => {
|
|
171
|
+
expect(result.code).toEqual(0);
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
given('[case10] a non-code file with a day+time duration (P1DT02:15:30)', () => {
|
|
177
|
+
when('[t0] the guard runs', () => {
|
|
178
|
+
const dir = genStagedRepo({ 'fixture.json': '{ "elapsed": "P1DT02:15:30" }\n' });
|
|
179
|
+
const result = runGuard(dir);
|
|
180
|
+
|
|
181
|
+
then('it allows the commit with exit 0 (a duration is not a timestamp)', () => {
|
|
182
|
+
expect(result.code).toEqual(0);
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
given('[case11] a non-code file with a full-designator duration (P3Y6M4DT12:30:05)', () => {
|
|
188
|
+
when('[t0] the guard runs', () => {
|
|
189
|
+
const dir = genStagedRepo({
|
|
190
|
+
'fixture.json': '{ "span": "P3Y6M4DT12:30:05" }\n',
|
|
191
|
+
});
|
|
192
|
+
const result = runGuard(dir);
|
|
193
|
+
|
|
194
|
+
then('it allows the commit with exit 0 (a duration is not a timestamp)', () => {
|
|
195
|
+
expect(result.code).toEqual(0);
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
given('[case12] a non-code file with BOTH a duration and a real timestamp', () => {
|
|
201
|
+
when('[t0] the guard runs', () => {
|
|
202
|
+
const dir = genStagedRepo({
|
|
203
|
+
'fixture.json':
|
|
204
|
+
'{ "window": "PT12:30:00", "createdAt": "2026-06-25T14:30:00Z" }\n',
|
|
205
|
+
});
|
|
206
|
+
const result = runGuard(dir);
|
|
207
|
+
|
|
208
|
+
then('it halts with exit 2 (the real stamp wins, despite the duration)', () => {
|
|
209
|
+
expect(result.code).toEqual(2);
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
});
|
|
148
213
|
});
|
package/dist/practices/lint/bad-practices/depcheck-denylisted-ignores/.depcheckrc.yml.declapract.ts
CHANGED
|
@@ -46,6 +46,10 @@ export const fix: FileFixFunction = (contents) => {
|
|
|
46
46
|
if (denylistedPresent.length === 0) return { contents };
|
|
47
47
|
|
|
48
48
|
// Remove denylisted ignores from the document
|
|
49
|
+
// note = `as any` at an external boundary (the `yaml` library ships no node type for
|
|
50
|
+
// `doc.get`, which returns `unknown`). correct type = the library's `YAMLSeq`
|
|
51
|
+
// with an `items` array. removal path = when `yaml` exports a typed `get`, or a
|
|
52
|
+
// local `isYamlSeq` type-guard narrows the node before the `.items` access.
|
|
49
53
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
50
54
|
const ignoresNode = doc.get('ignores') as any;
|
|
51
55
|
if (ignoresNode?.items) {
|
|
@@ -25,17 +25,18 @@ export const fix: FileFixFunction = (contents, context) => {
|
|
|
25
25
|
|
|
26
26
|
if (missingIgnores.length === 0) return { contents };
|
|
27
27
|
|
|
28
|
-
//
|
|
28
|
+
// get the ignores seq node, seeding an empty seq onto the doc if absent
|
|
29
29
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
const ignoresNode = ((): any => {
|
|
31
|
+
const node = currentDoc.get('ignores');
|
|
32
|
+
if (node) return node;
|
|
32
33
|
currentDoc.set('ignores', []);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
return currentDoc.get('ignores');
|
|
35
|
+
})();
|
|
36
|
+
|
|
37
|
+
// .note = deliberate mutation — the yaml document api mutates the seq node in
|
|
38
|
+
// place to preserve the surrounding comments; there is no immutable seq-add
|
|
39
|
+
missingIgnores.forEach((ignore) => ignoresNode.add(ignore));
|
|
39
40
|
|
|
40
41
|
return { contents: currentDoc.toString() };
|
|
41
42
|
};
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
# dpdm exclude patterns
|
|
2
|
-
# each entry is joined with | to form a single regex for --exclude
|
|
1
|
+
# dpdm exclude patterns — each entry is joined with | into a single --exclude regex.
|
|
3
2
|
#
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
#
|
|
3
|
+
# an empty `exclude: []` means dpdm checks every file for cycles, node_modules included. this is
|
|
4
|
+
# the org policy `rule.forbid.dpdm-exclude-change`: we check dependencies too, because a prod-dep
|
|
5
|
+
# cycle ships to consumers.
|
|
7
6
|
#
|
|
8
|
-
#
|
|
7
|
+
# with --transform, type imports are erased before analysis and test files drop via the
|
|
8
|
+
# '!(*.test).ts' glob, so an exclude is rarely needed even for a devDep. a devDep may be added as
|
|
9
|
+
# an escape hatch; a prod dep must not, since that ships cycles.
|
|
10
|
+
#
|
|
11
|
+
# the empty list is the policy — an entry of `node_modules` (or dpdm's own `/node_modules/`
|
|
12
|
+
# default) disables the check across every consumer repo.
|
|
9
13
|
exclude: []
|