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.
Files changed (752) hide show
  1. package/dist/.test/assets/cache/declarations/practices/cache/.declapract.integration.test.ts +4 -4
  2. package/dist/.test/assets/cache/declarations/practices/cache/.test/assets/repo-with-valid-cache-package/package.json +1 -1
  3. package/dist/.test/assets/cache/declarations/practices/cache/best-practice/package.json +3 -3
  4. package/dist/.test/assets/cicd-service/declarations/declapract.declare.yml +9 -0
  5. package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/.declapract.integration.test.ts +175 -0
  6. package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/.test/assets/demo-repo-pre-stamped-nords/.github/workflows/provision.yml +110 -0
  7. package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/.test/assets/demo-repo-pre-stamped-nords/declapract.use.nords.yml +20 -0
  8. package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/.test/assets/demo-repo-pre-stamped-nords/declapract.use.rds.yml +20 -0
  9. package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/.test/assets/demo-repo-pre-stamped-nords/package.json +4 -0
  10. package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/.test/assets/demo-repo-service/declapract.use.nords.yml +20 -0
  11. package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/.test/assets/demo-repo-service/declapract.use.rds.yml +20 -0
  12. package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/.test/assets/demo-repo-service/package.json +4 -0
  13. package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/__snapshots__/.declapract.integration.test.ts.snap +24 -0
  14. package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/__snapshots__/acceptanceContempFleetGuard.declapract.integration.test.ts.snap +13 -0
  15. package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/__snapshots__/insync-grep.declapract.integration.test.ts.snap +5 -0
  16. package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/__snapshots__/provision.yml.declapract.integration.test.ts.snap +297 -0
  17. package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/acceptanceContempFleetGuard.declapract.integration.test.ts +89 -0
  18. 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
  19. package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/old-names/.github/workflows/deploy_on_tag.yml.declapract.ts +3 -0
  20. 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
  21. package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.declapract.integration.test.ts +153 -0
  22. package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.declapract.readme.md +38 -0
  23. 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
  24. 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
  25. 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
  26. 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
  27. 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
  28. 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
  29. package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/best-practice/.declapract.readme.md +22 -0
  30. package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/best-practice/.github/workflows/.deploy-sls.yml +163 -0
  31. package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/best-practice/.github/workflows/.sql-schema-control.yml +154 -0
  32. package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/best-practice/.github/workflows/.terraform.yml +118 -0
  33. package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/best-practice/.github/workflows/deploy.yml +77 -0
  34. package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/best-practice/.github/workflows/deploy.yml.declapract.ts +15 -0
  35. package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/best-practice/.github/workflows/provision.yml +110 -0
  36. package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/best-practice/.github/workflows/provision.yml.declapract.ts +74 -0
  37. package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/best-practice/package.json +7 -0
  38. package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/insync-grep.declapract.integration.test.ts +76 -0
  39. package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/provision.yml.declapract.integration.test.ts +182 -0
  40. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/.declapract.integration.test.ts +224 -0
  41. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/.extensions.sql.declapract.integration.test.ts +38 -0
  42. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/config/dev.json +18 -0
  43. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/declapract.declare.yml +4 -0
  44. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/declapract.use.yml +18 -0
  45. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/package.json +4 -0
  46. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/__snapshots__/.declapract.integration.test.ts.snap +45 -0
  47. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/__snapshots__/.extensions.sql.declapract.integration.test.ts.snap +42 -0
  48. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/__snapshots__/deploy-database-gerunds.declapract.integration.test.ts.snap +102 -0
  49. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/__snapshots__/provision-testdb-access.declapract.integration.test.ts.snap +3 -0
  50. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/__snapshots__/ssm-cicd-param-names.declapract.integration.test.ts.snap +10 -0
  51. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/__snapshots__/testdb-preflight-failloud.declapract.integration.test.ts.snap +30 -0
  52. 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
  53. 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
  54. 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
  55. 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
  56. 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
  57. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/non-prefixed-manual-init-sqls/readme.md +5 -0
  58. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-config-file-names/codegen.sql.yml.declapract.ts +3 -0
  59. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-dev-config-location/config/dev.json.declapract.ts +33 -0
  60. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-dir/.declapract.readme.md +1 -0
  61. 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
  62. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-hyphen-dir/.declapract.readme.md +1 -0
  63. 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
  64. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-paths/.declapract.readme.md +1 -0
  65. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-paths/package.json +8 -0
  66. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-paths/package.json.declapract.ts +10 -0
  67. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-packagejson-script-names/package.json +9 -0
  68. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-packagejson-script-names/package.json.declapract.ts +22 -0
  69. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-param-placeholder/config/<star>.json.declapract.ts +14 -0
  70. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/schema-entities-dir/.declapract.readme.md +1 -0
  71. 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
  72. 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
  73. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/terraform-parameters/.declapract.integration.test.ts +88 -0
  74. 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
  75. 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
  76. 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
  77. 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
  78. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/terraform-parameters/__snapshots__/.declapract.integration.test.ts.snap +44 -0
  79. 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
  80. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/with-connection-in-input/.declapract.readme.md +1 -0
  81. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/with-connection-in-input/src/utils/database/withDatabaseConnection.ts +3 -0
  82. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/.declapract.readme.md +58 -0
  83. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/codegen.sql.dao.yml +18 -0
  84. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/codegen.sql.dao.yml.declapract.ts +3 -0
  85. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/codegen.sql.schema.yml +6 -0
  86. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/codegen.sql.types.yml +16 -0
  87. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/config/prep.json +36 -0
  88. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/config/prep.json.declapract.ts +15 -0
  89. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/config/prod.json +36 -0
  90. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/config/prod.json.declapract.ts +15 -0
  91. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/config/test.json +33 -0
  92. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/config/test.json.declapract.ts +15 -0
  93. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/package.json +30 -0
  94. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/package.json.declapract.ts +3 -0
  95. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/aws/readme.md +79 -0
  96. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/aws/resources.parameters.ts +106 -0
  97. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/aws/resources.ts +30 -0
  98. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/build-image.dockerfile +7 -0
  99. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/docker-compose.yml +18 -0
  100. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/init/.gitignore +3 -0
  101. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/init/readme.md +3 -0
  102. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/wait-for-postgres.sh +25 -0
  103. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/connection.config.js +29 -0
  104. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/control.yml +7 -0
  105. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/deploy.database.sh +97 -0
  106. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.database.sql +10 -0
  107. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.extensions.sql +16 -0
  108. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.extensions.sql.declapract.ts +37 -0
  109. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.schema.sql +11 -0
  110. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.user.cicd.sql +14 -0
  111. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.user.datalakedb.sql +12 -0
  112. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/default_transaction_isolation.sql +6 -0
  113. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/user.service.sql +16 -0
  114. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init.yml +9 -0
  115. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init.yml.declapract.ts +3 -0
  116. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/src/utils/config/config.schema.ts +110 -0
  117. 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
  118. 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
  119. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/src/utils/database/withDatabaseContext.ts +53 -0
  120. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/src/utils/database/withDatabaseTransaction.ts +33 -0
  121. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/deploy-database-gerunds.declapract.integration.test.ts +57 -0
  122. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/empty-template-declares-zero-clusters.declapract.integration.test.ts +71 -0
  123. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/provision-testdb-access.declapract.integration.test.ts +50 -0
  124. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/ssm-cicd-param-names.declapract.integration.test.ts +73 -0
  125. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/testdb-preflight-failloud.declapract.integration.test.ts +83 -0
  126. package/dist/.test/assets/cicd-service/declarations/useCases.yml +13 -0
  127. package/dist/.test/assets/environments/declarations/declapract.declare.yml +4 -0
  128. package/dist/.test/assets/environments/declarations/practices/environments/.declapract.integration.test.ts +136 -0
  129. package/dist/.test/assets/environments/declarations/practices/environments/__snapshots__/.declapract.integration.test.ts.snap +55 -0
  130. package/dist/.test/assets/environments/declarations/practices/environments/bad-practices/old-dev-scripts/package.json.declapract.ts +59 -0
  131. package/dist/.test/assets/environments/declarations/practices/environments/bad-practices/old-stage-enum/.declapract.integration.test.ts +133 -0
  132. 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
  133. package/dist/.test/assets/environments/declarations/practices/environments/bad-practices/old-stage-enum/.test/assets/demo-repo-with-stage-enum/package.json +4 -0
  134. 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
  135. package/dist/.test/assets/environments/declarations/practices/environments/bad-practices/old-stage-enum/__snapshots__/.declapract.integration.test.ts.snap +40 -0
  136. package/dist/.test/assets/environments/declarations/practices/environments/bad-practices/old-stage-enum/src/<star><star>/<star>.ts.declapract.ts +304 -0
  137. package/dist/.test/assets/environments/declarations/practices/environments/best-practice/.declapract.readme.md +61 -0
  138. package/dist/.test/assets/environments/declarations/practices/environments/best-practice/package.json +7 -0
  139. package/dist/.test/assets/environments/declarations/practices/environments/best-practice/package.json.declapract.ts +3 -0
  140. package/dist/.test/assets/environments/declarations/practices/environments/best-practice/src/access/sdks/sdkAwsLambdaEnvAccessAncient.ts +32 -0
  141. package/dist/.test/assets/environments/declarations/practices/environments/best-practice/src/access/sdks/sdkAwsLambdaEnvAccessContemp.ts +14 -0
  142. package/dist/.test/assets/environments/declarations/practices/environments/best-practice/src/utils/environment.ts +9 -0
  143. package/dist/.test/assets/environments/declarations/useCases.yml +5 -0
  144. package/dist/.test/assets/expo/declarations/practices/cicd-app-react-native-expo/.declapract.integration.test.ts +122 -22
  145. package/dist/.test/assets/expo/declarations/practices/cicd-app-react-native-expo/__snapshots__/.declapract.integration.test.ts.snap +40 -29
  146. package/dist/.test/assets/expo/declarations/practices/cicd-app-react-native-expo/best-practice/.github/workflows/.deploy-expo.yml +16 -6
  147. package/dist/.test/assets/expo/declarations/practices/cicd-app-react-native-expo/best-practice/.github/workflows/deploy.yml +11 -11
  148. package/dist/.test/assets/expo/declarations/practices/cicd-app-react-native-expo/best-practice/.github/workflows/test.yml +3 -5
  149. package/dist/.test/assets/expo/declarations/practices/cicd-app-react-native-expo/best-practice/package.json +2 -2
  150. package/dist/.test/assets/expo/declarations/practices/node/bad-practices/self-deps-not-link/.declapract.integration.test.ts +102 -0
  151. 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
  152. 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
  153. 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
  154. package/dist/.test/assets/expo/declarations/practices/node/bad-practices/self-deps-not-link/__snapshots__/.declapract.integration.test.ts.snap +46 -0
  155. package/dist/.test/assets/expo/declarations/practices/node/bad-practices/self-deps-not-link/package.json.declapract.ts +22 -29
  156. package/dist/.test/assets/expo/declarations/practices/node/best-practice/.npmrc.declapract.ts +5 -1
  157. package/dist/.test/assets/expo/declarations/practices/node/best-practice/package.json +1 -1
  158. package/dist/.test/assets/expo-fullusecase/declarations/practices/cache/.declapract.integration.test.ts +4 -4
  159. package/dist/.test/assets/expo-fullusecase/declarations/practices/cache/.test/assets/repo-with-valid-cache-package/package.json +1 -1
  160. package/dist/.test/assets/expo-fullusecase/declarations/practices/cache/best-practice/package.json +3 -3
  161. package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-app-react-native-expo/.declapract.integration.test.ts +122 -22
  162. package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-app-react-native-expo/__snapshots__/.declapract.integration.test.ts.snap +40 -29
  163. package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-app-react-native-expo/best-practice/.github/workflows/.deploy-expo.yml +16 -6
  164. package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-app-react-native-expo/best-practice/.github/workflows/deploy.yml +11 -11
  165. package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-app-react-native-expo/best-practice/.github/workflows/test.yml +3 -5
  166. package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-app-react-native-expo/best-practice/package.json +2 -2
  167. package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/.declapract.integration.test.ts +25 -0
  168. package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/__snapshots__/.declapract.integration.test.ts.snap +11 -23
  169. package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/__snapshots__/declastruct-insync-grep.declapract.integration.test.ts.snap +3 -0
  170. package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/best-practice/.github/workflows/.declastruct.yml +22 -8
  171. package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/best-practice/.github/workflows/.test.yml +11 -23
  172. package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/best-practice/.github/workflows/.test.yml.declapract.ts +12 -1
  173. package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/best-practice/.github/workflows/report-slow-tests.sh +65 -0
  174. package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/declastruct-insync-grep.declapract.integration.test.ts +49 -0
  175. package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/report-slow-tests.play.declapract.integration.test.ts +144 -0
  176. package/dist/.test/assets/expo-fullusecase/declarations/practices/conventional-commits/__snapshots__/commitlint-body-max-line.declapract.integration.test.ts.snap +3 -0
  177. package/dist/.test/assets/expo-fullusecase/declarations/practices/conventional-commits/best-practice/commitlint.config.js +5 -0
  178. package/dist/.test/assets/expo-fullusecase/declarations/practices/conventional-commits/best-practice/package.json +1 -1
  179. package/dist/.test/assets/expo-fullusecase/declarations/practices/conventional-commits/commitlint-body-max-line.declapract.integration.test.ts +49 -0
  180. package/dist/.test/assets/expo-fullusecase/declarations/practices/domain/.declapract.integration.test.ts +115 -0
  181. 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
  182. package/dist/.test/assets/expo-fullusecase/declarations/practices/domain/best-practice/package.json +2 -2
  183. package/dist/.test/assets/expo-fullusecase/declarations/practices/domain/best-practice/src/domain.objects/index.ts.declapract.ts +12 -0
  184. package/dist/.test/assets/expo-fullusecase/declarations/practices/errors/.declapract.integration.test.ts +121 -0
  185. package/dist/.test/assets/expo-fullusecase/declarations/practices/errors/bad-practices/own-implementation/src/<star><star>/UnexpectedCodePathError.ts.declapract.ts +8 -0
  186. package/dist/.test/assets/expo-fullusecase/declarations/practices/errors/best-practice/package.json +1 -1
  187. package/dist/.test/assets/expo-fullusecase/declarations/practices/format/.declapract.integration.test.ts +131 -0
  188. package/dist/.test/assets/expo-fullusecase/declarations/practices/format/__snapshots__/.declapract.integration.test.ts.snap +17 -0
  189. package/dist/.test/assets/expo-fullusecase/declarations/practices/format/bad-practices/prettier/prettier.config.js.declapract.ts +1 -1
  190. package/dist/.test/assets/expo-fullusecase/declarations/practices/format/best-practice/package.json.declapract.ts +36 -18
  191. package/dist/.test/assets/expo-fullusecase/declarations/practices/git/.declapract.integration.test.ts +57 -6
  192. package/dist/.test/assets/expo-fullusecase/declarations/practices/git/__snapshots__/.declapract.integration.test.ts.snap +2 -0
  193. package/dist/.test/assets/expo-fullusecase/declarations/practices/git/best-practice/.gitattributes.declapract.ts +50 -37
  194. package/dist/.test/assets/expo-fullusecase/declarations/practices/git/best-practice/.gitignore.declapract.ts +8 -0
  195. package/dist/.test/assets/expo-fullusecase/declarations/practices/husky/__snapshots__/check.timestamps.play.declapract.integration.test.ts.snap +7 -0
  196. package/dist/.test/assets/expo-fullusecase/declarations/practices/husky/best-practice/.husky/check.timestamps.sh +11 -2
  197. package/dist/.test/assets/expo-fullusecase/declarations/practices/husky/check.timestamps.play.declapract.integration.test.ts +65 -0
  198. package/dist/.test/assets/expo-fullusecase/declarations/practices/lint/__snapshots__/dpdmrc-exclude-policy.declapract.integration.test.ts.snap +3 -0
  199. package/dist/.test/assets/expo-fullusecase/declarations/practices/lint/bad-practices/depcheck-denylisted-ignores/.depcheckrc.yml.declapract.ts +4 -0
  200. package/dist/.test/assets/expo-fullusecase/declarations/practices/lint/best-practice/.depcheckrc.yml.declapract.ts +10 -9
  201. package/dist/.test/assets/expo-fullusecase/declarations/practices/lint/best-practice/.dpdmrc.yaml +10 -6
  202. package/dist/.test/assets/expo-fullusecase/declarations/practices/lint/dpdmrc-exclude-policy.declapract.integration.test.ts +50 -0
  203. package/dist/.test/assets/expo-fullusecase/declarations/practices/node/bad-practices/self-deps-not-link/.declapract.integration.test.ts +102 -0
  204. 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
  205. 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
  206. 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
  207. package/dist/.test/assets/expo-fullusecase/declarations/practices/node/bad-practices/self-deps-not-link/__snapshots__/.declapract.integration.test.ts.snap +46 -0
  208. package/dist/.test/assets/expo-fullusecase/declarations/practices/node/bad-practices/self-deps-not-link/package.json.declapract.ts +22 -29
  209. package/dist/.test/assets/expo-fullusecase/declarations/practices/node/best-practice/.npmrc.declapract.ts +5 -1
  210. package/dist/.test/assets/expo-fullusecase/declarations/practices/node/best-practice/package.json +1 -1
  211. package/dist/.test/assets/expo-fullusecase/declarations/practices/package-json-order/best-practice/package.json.declapract.ts +7 -1
  212. package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/.declapract.integration.test.ts +163 -13
  213. package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/.test/assets/repo-npm-to-pnpm/package.json +1 -1
  214. package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/.test/assets/repo-npm-to-pnpm/pnpm-workspace.yaml +3 -0
  215. package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/__snapshots__/.declapract.integration.test.ts.snap +9 -2
  216. package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/bad-practices/inert-build-allowlist/pnpm-workspace.yaml.declapract.ts +59 -0
  217. package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/best-practice/.declapract.readme.md +1 -1
  218. package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/best-practice/package.json +1 -1
  219. package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/best-practice/package.json.declapract.ts +4 -2
  220. package/dist/.test/assets/expo-fullusecase/declarations/practices/provision-github/best-practice/package.json +2 -2
  221. package/dist/.test/assets/expo-fullusecase/declarations/practices/provision-github/best-practice/provision/github.repo/resources.ts +16 -0
  222. package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/.declapract.integration.test.ts +98 -0
  223. 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
  224. package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/declapract.declare.yml +4 -0
  225. package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/declapract.use.yml +2 -0
  226. package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/package.json +4 -0
  227. package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/__snapshots__/.declapract.integration.test.ts.snap +45 -0
  228. package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/__snapshots__/boot-refs-glossary.declapract.integration.test.ts.snap +6 -0
  229. package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/__snapshots__/boot-yml-findsert.declapract.integration.test.ts.snap +27 -0
  230. package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/bad-practices/prod-deps/.declapract.readme.md +6 -2
  231. 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
  232. 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
  233. 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
  234. package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/bad-practices/prod-deps/package.json.declapract.ts +58 -17
  235. package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/best-practice/.agent/repo=.this/role=any/boot.yml +46 -0
  236. package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/best-practice/.agent/repo=.this/role=any/boot.yml.declapract.ts +165 -0
  237. package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/best-practice/.gitignore.declapract.ts +18 -5
  238. package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/best-practice/package.json +8 -8
  239. package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/boot-refs-glossary.declapract.integration.test.ts +89 -0
  240. package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/boot-yml-findsert.declapract.integration.test.ts +145 -0
  241. package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-any/__snapshots__/changedsince-origin-main.declapract.integration.test.ts.snap +8 -0
  242. package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-any/autoprune-hooks.declapract.integration.test.ts +104 -0
  243. package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-any/bad-practices/old-acceptance-import-paths/.declapract.readme.md +2 -2
  244. package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-any/bad-practices/old-acceptance-test-utils/blackbox/lambdas/<star>.ts.declapract.ts +9 -9
  245. package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-any/best-practice/package.json +3 -3
  246. package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-any/changedsince-origin-main.declapract.integration.test.ts +58 -0
  247. 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
  248. package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/.declapract.integration.test.ts +7 -3
  249. package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/.test/assets/repo-expo-greenfield/package.json +5 -1
  250. package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/__snapshots__/.declapract.integration.test.ts.snap +17 -8
  251. package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/__snapshots__/package.json.declapract.integration.test.ts.snap +60 -0
  252. package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/best-practice/jest.acceptance.config.ts +5 -0
  253. package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/best-practice/jest.integration.config.ts +5 -0
  254. package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/best-practice/jest.integration.env.ts +5 -1
  255. package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/best-practice/jest.unit.config.ts +5 -0
  256. package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/best-practice/jest.unit.env.ts +6 -1
  257. package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/best-practice/package.json.declapract.ts +190 -13
  258. package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/package.json.declapract.integration.test.ts +94 -0
  259. package/dist/.test/assets/expo-fullusecase/declarations/practices/typescript-expo/__snapshots__/package.json.declapract.integration.test.ts.snap +8 -0
  260. package/dist/.test/assets/expo-fullusecase/declarations/practices/typescript-expo/__snapshots__/tsconfig.json.declapract.integration.test.ts.snap +19 -0
  261. 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
  262. 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
  263. package/dist/.test/assets/expo-migration/declarations/practices/cicd-app-react-native-expo/.declapract.integration.test.ts +122 -22
  264. package/dist/.test/assets/expo-migration/declarations/practices/cicd-app-react-native-expo/__snapshots__/.declapract.integration.test.ts.snap +40 -29
  265. package/dist/.test/assets/expo-migration/declarations/practices/cicd-app-react-native-expo/best-practice/.github/workflows/.deploy-expo.yml +16 -6
  266. package/dist/.test/assets/expo-migration/declarations/practices/cicd-app-react-native-expo/best-practice/.github/workflows/deploy.yml +11 -11
  267. package/dist/.test/assets/expo-migration/declarations/practices/cicd-app-react-native-expo/best-practice/.github/workflows/test.yml +3 -5
  268. package/dist/.test/assets/expo-migration/declarations/practices/cicd-app-react-native-expo/best-practice/package.json +2 -2
  269. package/dist/.test/assets/expo-migration/declarations/practices/domain/.declapract.integration.test.ts +115 -0
  270. 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
  271. package/dist/.test/assets/expo-migration/declarations/practices/domain/best-practice/package.json +2 -2
  272. package/dist/.test/assets/expo-migration/declarations/practices/domain/best-practice/src/domain.objects/index.ts.declapract.ts +12 -0
  273. package/dist/.test/assets/expo-migration/declarations/practices/git/.declapract.integration.test.ts +57 -6
  274. package/dist/.test/assets/expo-migration/declarations/practices/git/__snapshots__/.declapract.integration.test.ts.snap +2 -0
  275. package/dist/.test/assets/expo-migration/declarations/practices/git/best-practice/.gitattributes.declapract.ts +50 -37
  276. package/dist/.test/assets/expo-migration/declarations/practices/git/best-practice/.gitignore.declapract.ts +8 -0
  277. package/dist/.test/assets/expo-migration/declarations/practices/node/bad-practices/self-deps-not-link/.declapract.integration.test.ts +102 -0
  278. 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
  279. 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
  280. 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
  281. package/dist/.test/assets/expo-migration/declarations/practices/node/bad-practices/self-deps-not-link/__snapshots__/.declapract.integration.test.ts.snap +46 -0
  282. package/dist/.test/assets/expo-migration/declarations/practices/node/bad-practices/self-deps-not-link/package.json.declapract.ts +22 -29
  283. package/dist/.test/assets/expo-migration/declarations/practices/node/best-practice/.npmrc.declapract.ts +5 -1
  284. package/dist/.test/assets/expo-migration/declarations/practices/node/best-practice/package.json +1 -1
  285. package/dist/.test/assets/expo-migration/declarations/practices/pnpm/.declapract.integration.test.ts +163 -13
  286. package/dist/.test/assets/expo-migration/declarations/practices/pnpm/.test/assets/repo-npm-to-pnpm/package.json +1 -1
  287. package/dist/.test/assets/expo-migration/declarations/practices/pnpm/.test/assets/repo-npm-to-pnpm/pnpm-workspace.yaml +3 -0
  288. package/dist/.test/assets/expo-migration/declarations/practices/pnpm/__snapshots__/.declapract.integration.test.ts.snap +9 -2
  289. package/dist/.test/assets/expo-migration/declarations/practices/pnpm/bad-practices/inert-build-allowlist/pnpm-workspace.yaml.declapract.ts +59 -0
  290. package/dist/.test/assets/expo-migration/declarations/practices/pnpm/best-practice/.declapract.readme.md +1 -1
  291. package/dist/.test/assets/expo-migration/declarations/practices/pnpm/best-practice/package.json +1 -1
  292. package/dist/.test/assets/expo-migration/declarations/practices/pnpm/best-practice/package.json.declapract.ts +4 -2
  293. package/dist/.test/assets/expo-migration/declarations/practices/rhachet/.declapract.integration.test.ts +98 -0
  294. 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
  295. package/dist/.test/assets/expo-migration/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/declapract.declare.yml +4 -0
  296. package/dist/.test/assets/expo-migration/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/declapract.use.yml +2 -0
  297. package/dist/.test/assets/expo-migration/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/package.json +4 -0
  298. package/dist/.test/assets/expo-migration/declarations/practices/rhachet/__snapshots__/.declapract.integration.test.ts.snap +45 -0
  299. package/dist/.test/assets/expo-migration/declarations/practices/rhachet/__snapshots__/boot-refs-glossary.declapract.integration.test.ts.snap +6 -0
  300. package/dist/.test/assets/expo-migration/declarations/practices/rhachet/__snapshots__/boot-yml-findsert.declapract.integration.test.ts.snap +27 -0
  301. package/dist/.test/assets/expo-migration/declarations/practices/rhachet/bad-practices/prod-deps/.declapract.readme.md +6 -2
  302. 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
  303. 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
  304. 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
  305. package/dist/.test/assets/expo-migration/declarations/practices/rhachet/bad-practices/prod-deps/package.json.declapract.ts +58 -17
  306. package/dist/.test/assets/expo-migration/declarations/practices/rhachet/best-practice/.agent/repo=.this/role=any/boot.yml +46 -0
  307. package/dist/.test/assets/expo-migration/declarations/practices/rhachet/best-practice/.agent/repo=.this/role=any/boot.yml.declapract.ts +165 -0
  308. package/dist/.test/assets/expo-migration/declarations/practices/rhachet/best-practice/.gitignore.declapract.ts +18 -5
  309. package/dist/.test/assets/expo-migration/declarations/practices/rhachet/best-practice/package.json +8 -8
  310. package/dist/.test/assets/expo-migration/declarations/practices/rhachet/boot-refs-glossary.declapract.integration.test.ts +89 -0
  311. package/dist/.test/assets/expo-migration/declarations/practices/rhachet/boot-yml-findsert.declapract.integration.test.ts +145 -0
  312. package/dist/.test/assets/expo-migration/declarations/practices/tests-any/__snapshots__/changedsince-origin-main.declapract.integration.test.ts.snap +8 -0
  313. package/dist/.test/assets/expo-migration/declarations/practices/tests-any/autoprune-hooks.declapract.integration.test.ts +104 -0
  314. package/dist/.test/assets/expo-migration/declarations/practices/tests-any/bad-practices/old-acceptance-import-paths/.declapract.readme.md +2 -2
  315. package/dist/.test/assets/expo-migration/declarations/practices/tests-any/bad-practices/old-acceptance-test-utils/blackbox/lambdas/<star>.ts.declapract.ts +9 -9
  316. package/dist/.test/assets/expo-migration/declarations/practices/tests-any/best-practice/package.json +3 -3
  317. package/dist/.test/assets/expo-migration/declarations/practices/tests-any/changedsince-origin-main.declapract.integration.test.ts +58 -0
  318. 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
  319. package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/.declapract.integration.test.ts +7 -3
  320. package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/.test/assets/repo-expo-greenfield/package.json +5 -1
  321. package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/__snapshots__/.declapract.integration.test.ts.snap +17 -8
  322. package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/__snapshots__/package.json.declapract.integration.test.ts.snap +60 -0
  323. package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/best-practice/jest.acceptance.config.ts +5 -0
  324. package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/best-practice/jest.integration.config.ts +5 -0
  325. package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/best-practice/jest.integration.env.ts +5 -1
  326. package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/best-practice/jest.unit.config.ts +5 -0
  327. package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/best-practice/jest.unit.env.ts +6 -1
  328. package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/best-practice/package.json.declapract.ts +190 -13
  329. package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/package.json.declapract.integration.test.ts +94 -0
  330. package/dist/.test/assets/expo-migration/declarations/practices/typescript-expo/__snapshots__/package.json.declapract.integration.test.ts.snap +8 -0
  331. package/dist/.test/assets/expo-migration/declarations/practices/typescript-expo/__snapshots__/tsconfig.json.declapract.integration.test.ts.snap +19 -0
  332. 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
  333. 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
  334. package/dist/.test/assets/expo-migration/repo-app-protools-shaped/.github/workflows/.deploy-expo.yml +1 -1
  335. package/dist/.test/assets/expo-toolchain/declarations/practices/tests-any/__snapshots__/changedsince-origin-main.declapract.integration.test.ts.snap +8 -0
  336. package/dist/.test/assets/expo-toolchain/declarations/practices/tests-any/autoprune-hooks.declapract.integration.test.ts +104 -0
  337. package/dist/.test/assets/expo-toolchain/declarations/practices/tests-any/bad-practices/old-acceptance-import-paths/.declapract.readme.md +2 -2
  338. package/dist/.test/assets/expo-toolchain/declarations/practices/tests-any/bad-practices/old-acceptance-test-utils/blackbox/lambdas/<star>.ts.declapract.ts +9 -9
  339. package/dist/.test/assets/expo-toolchain/declarations/practices/tests-any/best-practice/package.json +3 -3
  340. package/dist/.test/assets/expo-toolchain/declarations/practices/tests-any/changedsince-origin-main.declapract.integration.test.ts +58 -0
  341. 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
  342. package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/.declapract.integration.test.ts +7 -3
  343. package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/.test/assets/repo-expo-greenfield/package.json +5 -1
  344. package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/__snapshots__/.declapract.integration.test.ts.snap +17 -8
  345. package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/__snapshots__/package.json.declapract.integration.test.ts.snap +60 -0
  346. package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/best-practice/jest.acceptance.config.ts +5 -0
  347. package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/best-practice/jest.integration.config.ts +5 -0
  348. package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/best-practice/jest.integration.env.ts +5 -1
  349. package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/best-practice/jest.unit.config.ts +5 -0
  350. package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/best-practice/jest.unit.env.ts +6 -1
  351. package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/best-practice/package.json.declapract.ts +190 -13
  352. package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/package.json.declapract.integration.test.ts +94 -0
  353. package/dist/.test/assets/expo-toolchain/declarations/practices/typescript-expo/__snapshots__/package.json.declapract.integration.test.ts.snap +8 -0
  354. package/dist/.test/assets/expo-toolchain/declarations/practices/typescript-expo/__snapshots__/tsconfig.json.declapract.integration.test.ts.snap +19 -0
  355. 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
  356. package/dist/{practices/typescript-expo/best-practice → .test/assets/expo-toolchain/declarations/practices/typescript-expo}/tsconfig.json.declapract.integration.test.ts +13 -2
  357. package/dist/.test/assets/format/declarations/declapract.declare.yml +9 -0
  358. package/dist/.test/assets/format/declarations/practices/format/.declapract.integration.test.ts +131 -0
  359. package/dist/.test/assets/format/declarations/practices/format/__snapshots__/.declapract.integration.test.ts.snap +17 -0
  360. package/dist/.test/assets/format/declarations/practices/format/bad-practices/format-script/package.json.declapract.ts +26 -0
  361. package/dist/.test/assets/format/declarations/practices/format/bad-practices/prettier/.declapract.readme.md +6 -0
  362. package/dist/.test/assets/format/declarations/practices/format/bad-practices/prettier/.prettierignore +3 -0
  363. package/dist/.test/assets/format/declarations/practices/format/bad-practices/prettier/.prettierignore.declapract.ts +8 -0
  364. package/dist/.test/assets/format/declarations/practices/format/bad-practices/prettier/package.json +10 -0
  365. package/dist/.test/assets/format/declarations/practices/format/bad-practices/prettier/package.json.declapract.ts +35 -0
  366. package/dist/.test/assets/format/declarations/practices/format/bad-practices/prettier/prettier.config.js +10 -0
  367. package/dist/.test/assets/format/declarations/practices/format/bad-practices/prettier/prettier.config.js.declapract.ts +8 -0
  368. package/dist/.test/assets/format/declarations/practices/format/best-practice/package.json.declapract.ts +50 -0
  369. package/dist/.test/assets/format/declarations/practices/terraform-common/bad-practices/terraform-dir/.declapract.readme.md +8 -0
  370. package/dist/.test/assets/format/declarations/practices/terraform-common/bad-practices/terraform-dir/provision/terraform/<star><star>/<star>.declapract.ts +17 -0
  371. package/dist/.test/assets/format/declarations/practices/terraform-common/best-practice/.terraform-version +1 -0
  372. package/dist/.test/assets/format/declarations/practices/terraform-common/best-practice/package.json +6 -0
  373. package/dist/.test/assets/format/declarations/practices/terraform-common/best-practice/package.json.declapract.ts +3 -0
  374. package/dist/.test/assets/format/declarations/useCases.yml +13 -0
  375. package/dist/.test/assets/format/repo-with-terraform/declapract.use.yml +8 -0
  376. package/dist/.test/assets/format/repo-with-terraform/package.json +5 -0
  377. package/dist/.test/assets/format/repo-without-terraform/declapract.use.yml +6 -0
  378. package/dist/.test/assets/format/repo-without-terraform/package.json +5 -0
  379. package/dist/.test/assets/node-service/declarations/declapract.declare.yml +4 -0
  380. package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/license/package.json.declapract.ts +22 -0
  381. package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-client/.declapract.readme.md +55 -0
  382. package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-client/package.json +5 -0
  383. package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-client/package.json.declapract.ts +27 -0
  384. package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-client/src/<star><star>/<star>.ts.declapract.ts +44 -0
  385. package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-handlers/.declapract.integration.test.ts +103 -0
  386. package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-handlers/.declapract.readme.md +60 -0
  387. 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
  388. 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
  389. 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
  390. package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-handlers/__snapshots__/.declapract.integration.test.ts.snap +44 -0
  391. package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-handlers/package.json +5 -0
  392. package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-handlers/package.json.declapract.ts +27 -0
  393. package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-handlers/src/<star><star>/<star>.ts.declapract.ts +130 -0
  394. package/dist/.test/assets/node-service/declarations/practices/node-service/best-practice/package.json +6 -0
  395. package/dist/.test/assets/node-service/declarations/practices/node-service/best-practice/package.json.declapract.ts +3 -0
  396. package/dist/.test/assets/node-service/declarations/useCases.yml +5 -0
  397. package/dist/.test/assets/pnpm/declarations/practices/pnpm/.declapract.integration.test.ts +163 -13
  398. package/dist/.test/assets/pnpm/declarations/practices/pnpm/.test/assets/repo-npm-to-pnpm/package.json +1 -1
  399. package/dist/.test/assets/pnpm/declarations/practices/pnpm/.test/assets/repo-npm-to-pnpm/pnpm-workspace.yaml +3 -0
  400. package/dist/.test/assets/pnpm/declarations/practices/pnpm/__snapshots__/.declapract.integration.test.ts.snap +9 -2
  401. package/dist/.test/assets/pnpm/declarations/practices/pnpm/bad-practices/inert-build-allowlist/pnpm-workspace.yaml.declapract.ts +59 -0
  402. package/dist/.test/assets/pnpm/declarations/practices/pnpm/best-practice/.declapract.readme.md +1 -1
  403. package/dist/.test/assets/pnpm/declarations/practices/pnpm/best-practice/package.json +1 -1
  404. package/dist/.test/assets/pnpm/declarations/practices/pnpm/best-practice/package.json.declapract.ts +4 -2
  405. package/dist/.test/assets/runtime-schemas/declarations/declapract.declare.yml +4 -0
  406. package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/bad-practices/joi/.declapract.integration.test.ts +102 -0
  407. package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/bad-practices/joi/.declapract.readme.md +3 -0
  408. package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/bad-practices/joi/.test/assets/demo-repo-with-joi/declapract.use.yml +5 -0
  409. package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/bad-practices/joi/.test/assets/demo-repo-with-joi/package.json +4 -0
  410. 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
  411. package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/bad-practices/joi/__snapshots__/.declapract.integration.test.ts.snap +37 -0
  412. package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/bad-practices/joi/package.json +5 -0
  413. package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/bad-practices/joi/package.json.declapract.ts +23 -0
  414. package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/bad-practices/joi/src/<star><star>/<star>.ts.declapract.ts +79 -0
  415. package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/best-practice/package.json +5 -0
  416. package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/best-practice/package.json.declapract.ts +3 -0
  417. package/dist/.test/assets/runtime-schemas/declarations/useCases.yml +5 -0
  418. package/dist/.test/assets/tests-service/declarations/declapract.declare.yml +10 -0
  419. package/dist/.test/assets/tests-service/declarations/practices/tests-service/.test/assets/demo-repo-service/declapract.use.yml +5 -0
  420. package/dist/.test/assets/tests-service/declarations/practices/tests-service/.test/assets/demo-repo-service/package.json +4 -0
  421. package/dist/.test/assets/tests-service/declarations/practices/tests-service/__snapshots__/package.json.declapract.integration.test.ts.snap +26 -0
  422. package/dist/.test/assets/tests-service/declarations/practices/tests-service/asFunctionNameFromTestFileName.ts +7 -0
  423. package/dist/.test/assets/tests-service/declarations/practices/tests-service/best-practice/.declapract.readme.md +68 -0
  424. package/dist/.test/assets/tests-service/declarations/practices/tests-service/best-practice/blackbox/<star><star>/<star>.acceptance.test.ts.declapract.ts +3 -0
  425. package/dist/.test/assets/tests-service/declarations/practices/tests-service/best-practice/blackbox/lambdas/<star>.acceptance.test.ts.declapract.ts +56 -0
  426. package/dist/.test/assets/tests-service/declarations/practices/tests-service/best-practice/package.json +8 -0
  427. package/dist/.test/assets/tests-service/declarations/practices/tests-service/best-practice/package.json.declapract.ts +101 -0
  428. package/dist/.test/assets/tests-service/declarations/practices/tests-service/best-practice/src/<star><star>/<star>.integration.test.ts.declapract.ts +3 -0
  429. package/dist/.test/assets/tests-service/declarations/practices/tests-service/best-practice/src/<star><star>/<star>.test.ts.declapract.ts +3 -0
  430. package/dist/.test/assets/tests-service/declarations/practices/tests-service/package.json.declapract.integration.test.ts +204 -0
  431. package/dist/.test/assets/tests-service/declarations/useCases.yml +9 -0
  432. package/dist/__snapshots__/ancientTargetPublished.declapract.integration.test.ts.snap +42 -0
  433. package/dist/__snapshots__/workflowCallerCalleeReconciliation.declapract.integration.test.ts.snap +450 -0
  434. package/dist/__snapshots__/workflowEnvDeploymentFalse.declapract.integration.test.ts.snap +36 -0
  435. package/dist/actionPins.declapract.integration.test.ts +3 -18
  436. package/dist/ancientTargetPublished.declapract.integration.test.ts +174 -0
  437. package/dist/bestPracticeTemplateParse.declapract.integration.test.ts +169 -0
  438. package/dist/parsePackageJSONAdoption.declapract.integration.test.ts +136 -0
  439. package/dist/practiceTestFileLocation.declapract.integration.test.ts +75 -0
  440. package/dist/practices/cache/.declapract.integration.test.ts +4 -4
  441. package/dist/practices/cache/.test/assets/repo-with-valid-cache-package/package.json +1 -1
  442. package/dist/practices/cache/best-practice/package.json +3 -3
  443. package/dist/practices/cicd-app-react-native-expo/.declapract.integration.test.ts +122 -22
  444. package/dist/practices/cicd-app-react-native-expo/__snapshots__/.declapract.integration.test.ts.snap +40 -29
  445. package/dist/practices/cicd-app-react-native-expo/best-practice/.github/workflows/.deploy-expo.yml +16 -6
  446. package/dist/practices/cicd-app-react-native-expo/best-practice/.github/workflows/deploy.yml +11 -11
  447. package/dist/practices/cicd-app-react-native-expo/best-practice/.github/workflows/test.yml +3 -5
  448. package/dist/practices/cicd-app-react-native-expo/best-practice/package.json +2 -2
  449. package/dist/practices/cicd-common/.declapract.integration.test.ts +25 -0
  450. package/dist/practices/cicd-common/__snapshots__/.declapract.integration.test.ts.snap +11 -23
  451. package/dist/practices/cicd-common/__snapshots__/declastruct-insync-grep.declapract.integration.test.ts.snap +3 -0
  452. package/dist/practices/cicd-common/best-practice/.github/workflows/.declastruct.yml +22 -8
  453. package/dist/practices/cicd-common/best-practice/.github/workflows/.test.yml +11 -23
  454. package/dist/practices/cicd-common/best-practice/.github/workflows/.test.yml.declapract.ts +12 -1
  455. package/dist/practices/cicd-common/best-practice/.github/workflows/report-slow-tests.sh +65 -0
  456. package/dist/practices/cicd-common/declastruct-insync-grep.declapract.integration.test.ts +49 -0
  457. package/dist/practices/cicd-common/report-slow-tests.play.declapract.integration.test.ts +144 -0
  458. package/dist/practices/cicd-package/best-practice/.github/workflows/provision.yml +2 -1
  459. package/dist/practices/cicd-service/.declapract.integration.test.ts +175 -0
  460. package/dist/practices/cicd-service/.test/assets/demo-repo-pre-stamped-nords/.github/workflows/provision.yml +110 -0
  461. package/dist/practices/cicd-service/.test/assets/demo-repo-pre-stamped-nords/declapract.use.nords.yml +20 -0
  462. package/dist/practices/cicd-service/.test/assets/demo-repo-pre-stamped-nords/declapract.use.rds.yml +20 -0
  463. package/dist/practices/cicd-service/.test/assets/demo-repo-pre-stamped-nords/package.json +4 -0
  464. package/dist/practices/cicd-service/.test/assets/demo-repo-service/declapract.use.nords.yml +20 -0
  465. package/dist/practices/cicd-service/.test/assets/demo-repo-service/declapract.use.rds.yml +20 -0
  466. package/dist/practices/cicd-service/.test/assets/demo-repo-service/package.json +4 -0
  467. package/dist/practices/cicd-service/__snapshots__/.declapract.integration.test.ts.snap +24 -0
  468. package/dist/practices/cicd-service/__snapshots__/acceptanceContempFleetGuard.declapract.integration.test.ts.snap +13 -0
  469. package/dist/practices/cicd-service/__snapshots__/insync-grep.declapract.integration.test.ts.snap +5 -0
  470. package/dist/practices/cicd-service/__snapshots__/provision.yml.declapract.integration.test.ts.snap +297 -0
  471. package/dist/practices/cicd-service/acceptanceContempFleetGuard.declapract.integration.test.ts +89 -0
  472. package/dist/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.declapract.integration.test.ts +153 -0
  473. package/dist/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.declapract.readme.md +38 -0
  474. package/dist/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.github/workflows/provision.yml.declapract.integration.test.ts +167 -0
  475. package/dist/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.github/workflows/provision.yml.declapract.ts +88 -0
  476. package/dist/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.test/assets/repo-non-rds/readme.md +9 -0
  477. 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
  478. 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
  479. package/dist/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/__snapshots__/.declapract.integration.test.ts.snap +183 -0
  480. package/dist/practices/cicd-service/best-practice/.declapract.readme.md +18 -0
  481. package/dist/practices/cicd-service/best-practice/.github/workflows/.deploy-sls.yml +32 -11
  482. package/dist/practices/cicd-service/best-practice/.github/workflows/.sql-schema-control.yml +20 -10
  483. package/dist/practices/cicd-service/best-practice/.github/workflows/.terraform.yml +14 -4
  484. package/dist/practices/cicd-service/best-practice/.github/workflows/deploy.yml +17 -9
  485. package/dist/practices/cicd-service/best-practice/.github/workflows/provision.yml +15 -10
  486. package/dist/practices/cicd-service/best-practice/.github/workflows/provision.yml.declapract.ts +74 -0
  487. package/dist/practices/cicd-service/best-practice/package.json +3 -3
  488. package/dist/practices/cicd-service/insync-grep.declapract.integration.test.ts +76 -0
  489. package/dist/practices/cicd-service/provision.yml.declapract.integration.test.ts +182 -0
  490. package/dist/practices/commands/best-practice/package.json +2 -2
  491. package/dist/practices/commands/best-practice/src/contract/commands/sayHello.ts +3 -2
  492. package/dist/practices/config/.declapract.integration.test.ts +116 -0
  493. package/dist/practices/config/.test/assets/demo-repo-with-dev-config/config/dev.json +17 -0
  494. package/dist/practices/config/.test/assets/demo-repo-with-dev-config/declapract.declare.yml +4 -0
  495. package/dist/practices/config/.test/assets/demo-repo-with-dev-config/declapract.use.yml +9 -0
  496. package/dist/practices/config/.test/assets/demo-repo-with-dev-config/package.json +4 -0
  497. package/dist/practices/config/__snapshots__/.declapract.integration.test.ts.snap +43 -0
  498. package/dist/practices/config/bad-practices/divergent-config-shapes/config/prep.json.declapract.ts +3 -3
  499. package/dist/practices/config/bad-practices/divergent-config-shapes/config/prod.json.declapract.ts +3 -3
  500. package/dist/practices/config/bad-practices/old-dev-config-location/config/dev.json.declapract.ts +10 -12
  501. package/dist/practices/config/best-practice/package.json +2 -2
  502. package/dist/practices/config/best-practice/src/utils/config/getConfig.ts +24 -5
  503. package/dist/practices/config/best-practice/src/utils/config/getOneCacheDirectory.ts +33 -0
  504. package/dist/practices/config/best-practice/src/utils/config/getOneProjectBucket.ts +22 -0
  505. package/dist/practices/config/best-practice/src/utils/environment.ts +9 -3
  506. package/dist/practices/config/best-practice/src/utils/environment.ts.declapract.ts +8 -0
  507. package/dist/practices/config/no-hand-written-config-type.declapract.integration.test.ts +64 -0
  508. package/dist/practices/conventional-commits/__snapshots__/commitlint-body-max-line.declapract.integration.test.ts.snap +3 -0
  509. package/dist/practices/conventional-commits/best-practice/commitlint.config.js +5 -0
  510. package/dist/practices/conventional-commits/best-practice/package.json +1 -1
  511. package/dist/practices/conventional-commits/commitlint-body-max-line.declapract.integration.test.ts +49 -0
  512. package/dist/practices/domain/.declapract.integration.test.ts +115 -0
  513. 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
  514. package/dist/practices/domain/best-practice/package.json +2 -2
  515. package/dist/practices/domain/best-practice/src/domain.objects/index.ts.declapract.ts +12 -0
  516. package/dist/practices/environments/.declapract.integration.test.ts +136 -0
  517. package/dist/practices/environments/__snapshots__/.declapract.integration.test.ts.snap +55 -0
  518. package/dist/practices/environments/bad-practices/old-dev-scripts/package.json.declapract.ts +6 -4
  519. package/dist/practices/environments/bad-practices/old-stage-enum/.declapract.integration.test.ts +133 -0
  520. package/dist/practices/environments/bad-practices/old-stage-enum/.test/assets/demo-repo-with-stage-enum/declapract.use.yml +8 -0
  521. package/dist/practices/environments/bad-practices/old-stage-enum/.test/assets/demo-repo-with-stage-enum/package.json +4 -0
  522. package/dist/practices/environments/bad-practices/old-stage-enum/.test/assets/demo-repo-with-stage-enum/src/logic/getDeployTarget.ts +15 -0
  523. package/dist/practices/environments/bad-practices/old-stage-enum/__snapshots__/.declapract.integration.test.ts.snap +40 -0
  524. package/dist/practices/environments/bad-practices/old-stage-enum/src/<star><star>/<star>.ts.declapract.ts +291 -24
  525. package/dist/practices/environments/best-practice/.declapract.readme.md +44 -11
  526. package/dist/practices/environments/best-practice/src/access/sdks/sdkAwsLambdaEnvAccessAncient.ts +32 -0
  527. package/dist/practices/environments/best-practice/src/access/sdks/sdkAwsLambdaEnvAccessContemp.ts +14 -0
  528. package/dist/practices/environments/best-practice/src/utils/environment.ts +3 -2
  529. package/dist/practices/errors/.declapract.integration.test.ts +121 -0
  530. package/dist/practices/errors/bad-practices/own-implementation/src/<star><star>/UnexpectedCodePathError.ts.declapract.ts +8 -0
  531. package/dist/practices/errors/best-practice/package.json +1 -1
  532. package/dist/practices/format/.declapract.integration.test.ts +131 -0
  533. package/dist/practices/format/__snapshots__/.declapract.integration.test.ts.snap +17 -0
  534. package/dist/practices/format/bad-practices/prettier/prettier.config.js.declapract.ts +1 -1
  535. package/dist/practices/format/best-practice/package.json.declapract.ts +36 -18
  536. package/dist/practices/git/.declapract.integration.test.ts +57 -6
  537. package/dist/practices/git/__snapshots__/.declapract.integration.test.ts.snap +2 -0
  538. package/dist/practices/git/best-practice/.gitattributes.declapract.ts +50 -37
  539. package/dist/practices/git/best-practice/.gitignore.declapract.ts +8 -0
  540. package/dist/practices/husky/__snapshots__/check.timestamps.play.declapract.integration.test.ts.snap +7 -0
  541. package/dist/practices/husky/best-practice/.husky/check.timestamps.sh +11 -2
  542. package/dist/practices/husky/check.timestamps.play.declapract.integration.test.ts +65 -0
  543. package/dist/practices/lint/__snapshots__/dpdmrc-exclude-policy.declapract.integration.test.ts.snap +3 -0
  544. package/dist/practices/lint/bad-practices/depcheck-denylisted-ignores/.depcheckrc.yml.declapract.ts +4 -0
  545. package/dist/practices/lint/best-practice/.depcheckrc.yml.declapract.ts +10 -9
  546. package/dist/practices/lint/best-practice/.dpdmrc.yaml +10 -6
  547. package/dist/practices/lint/dpdmrc-exclude-policy.declapract.integration.test.ts +50 -0
  548. package/dist/practices/logs/.declapract.integration.test.ts +100 -0
  549. package/dist/practices/logs/__snapshots__/.declapract.integration.test.ts.snap +33 -0
  550. package/dist/practices/logs/bad-practices/leveled-term/.test/assets/demo-repo-with-leveled-term/declapract.declare.yml +4 -0
  551. package/dist/practices/logs/bad-practices/leveled-term/.test/assets/demo-repo-with-leveled-term/declapract.use.yml +2 -0
  552. package/dist/practices/logs/bad-practices/leveled-term/.test/assets/demo-repo-with-leveled-term/package.json +12 -0
  553. package/dist/practices/logs/bad-practices/leveled-term/package.json.declapract.ts +56 -12
  554. package/dist/practices/node/bad-practices/self-deps-not-link/.declapract.integration.test.ts +102 -0
  555. package/dist/practices/node/bad-practices/self-deps-not-link/.test/assets/demo-repo-with-self-deps/declapract.declare.yml +4 -0
  556. package/dist/practices/node/bad-practices/self-deps-not-link/.test/assets/demo-repo-with-self-deps/declapract.use.yml +8 -0
  557. package/dist/practices/node/bad-practices/self-deps-not-link/.test/assets/demo-repo-with-self-deps/package.json +15 -0
  558. package/dist/practices/node/bad-practices/self-deps-not-link/__snapshots__/.declapract.integration.test.ts.snap +46 -0
  559. package/dist/practices/node/bad-practices/self-deps-not-link/package.json.declapract.ts +22 -29
  560. package/dist/practices/node/best-practice/.npmrc.declapract.ts +5 -1
  561. package/dist/practices/node/best-practice/package.json +1 -1
  562. package/dist/practices/node-service/bad-practices/simple-lambda-handlers/.declapract.integration.test.ts +103 -0
  563. package/dist/practices/node-service/bad-practices/simple-lambda-handlers/.declapract.readme.md +8 -0
  564. package/dist/practices/node-service/bad-practices/simple-lambda-handlers/.test/assets/demo-repo-with-simple-lambda-handlers/declapract.use.yml +5 -0
  565. package/dist/practices/node-service/bad-practices/simple-lambda-handlers/.test/assets/demo-repo-with-simple-lambda-handlers/package.json +4 -0
  566. 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
  567. package/dist/practices/node-service/bad-practices/simple-lambda-handlers/__snapshots__/.declapract.integration.test.ts.snap +44 -0
  568. package/dist/practices/node-service/bad-practices/simple-lambda-handlers/src/<star><star>/<star>.ts.declapract.ts +90 -10
  569. package/dist/practices/node-service/best-practice/package.json +1 -1
  570. package/dist/practices/package-json-order/best-practice/package.json.declapract.ts +7 -1
  571. package/dist/practices/persist-with-dynamodb/.declapract.integration.test.ts +92 -0
  572. package/dist/practices/persist-with-dynamodb/.test/assets/demo-repo-with-divergent-jest-env/declapract.declare.yml +4 -0
  573. package/dist/practices/persist-with-dynamodb/.test/assets/demo-repo-with-divergent-jest-env/declapract.use.yml +2 -0
  574. package/dist/practices/persist-with-dynamodb/.test/assets/demo-repo-with-divergent-jest-env/jest.integration.env.ts +4 -0
  575. package/dist/practices/persist-with-dynamodb/.test/assets/demo-repo-with-divergent-jest-env/package.json +4 -0
  576. package/dist/practices/persist-with-dynamodb/__snapshots__/.declapract.integration.test.ts.snap +20 -0
  577. package/dist/practices/persist-with-dynamodb/best-practice/jest.integration.env.ts +3 -3
  578. package/dist/practices/persist-with-dynamodb/best-practice/package.json +2 -2
  579. package/dist/practices/persist-with-rds/.declapract.integration.test.ts +224 -0
  580. package/dist/practices/persist-with-rds/.extensions.sql.declapract.integration.test.ts +38 -0
  581. package/dist/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/config/dev.json +18 -0
  582. package/dist/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/declapract.declare.yml +4 -0
  583. package/dist/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/declapract.use.yml +18 -0
  584. package/dist/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/package.json +4 -0
  585. package/dist/practices/persist-with-rds/__snapshots__/.declapract.integration.test.ts.snap +45 -0
  586. package/dist/practices/persist-with-rds/__snapshots__/.extensions.sql.declapract.integration.test.ts.snap +42 -0
  587. package/dist/practices/persist-with-rds/__snapshots__/deploy-database-gerunds.declapract.integration.test.ts.snap +102 -0
  588. package/dist/practices/persist-with-rds/__snapshots__/provision-testdb-access.declapract.integration.test.ts.snap +3 -0
  589. package/dist/practices/persist-with-rds/__snapshots__/ssm-cicd-param-names.declapract.integration.test.ts.snap +10 -0
  590. package/dist/practices/persist-with-rds/__snapshots__/testdb-preflight-failloud.declapract.integration.test.ts.snap +30 -0
  591. package/dist/practices/persist-with-rds/bad-practices/old-dev-config-location/config/dev.json.declapract.ts +22 -8
  592. package/dist/practices/persist-with-rds/best-practice/.declapract.readme.md +32 -0
  593. package/dist/practices/persist-with-rds/best-practice/codegen.sql.dao.yml +1 -1
  594. package/dist/practices/persist-with-rds/best-practice/package.json +5 -5
  595. package/dist/practices/persist-with-rds/best-practice/provision/aws/readme.md +9 -6
  596. package/dist/practices/persist-with-rds/best-practice/provision/aws/resources.parameters.ts +38 -14
  597. package/dist/practices/persist-with-rds/best-practice/provision/aws/resources.ts +6 -3
  598. package/dist/practices/persist-with-rds/best-practice/provision/docker/testdb/wait-for-postgres.sh +13 -3
  599. package/dist/practices/persist-with-rds/best-practice/provision/schema/deploy.database.sh +27 -22
  600. package/dist/practices/persist-with-rds/best-practice/src/utils/config/config.schema.ts +13 -6
  601. package/dist/practices/persist-with-rds/best-practice/src/utils/database/getOneDatabaseConnection.integration.test.ts +10 -0
  602. package/dist/practices/persist-with-rds/best-practice/src/utils/database/getOneDatabaseConnection.ts +90 -0
  603. package/dist/practices/persist-with-rds/best-practice/src/utils/database/withDatabaseContext.ts +12 -4
  604. package/dist/practices/persist-with-rds/best-practice/src/utils/database/withDatabaseTransaction.ts +16 -4
  605. package/dist/practices/persist-with-rds/deploy-database-gerunds.declapract.integration.test.ts +57 -0
  606. package/dist/practices/persist-with-rds/empty-template-declares-zero-clusters.declapract.integration.test.ts +71 -0
  607. package/dist/practices/persist-with-rds/provision-testdb-access.declapract.integration.test.ts +50 -0
  608. package/dist/practices/persist-with-rds/ssm-cicd-param-names.declapract.integration.test.ts +73 -0
  609. package/dist/practices/persist-with-rds/testdb-preflight-failloud.declapract.integration.test.ts +83 -0
  610. package/dist/practices/pnpm/.declapract.integration.test.ts +163 -13
  611. package/dist/practices/pnpm/.test/assets/repo-npm-to-pnpm/package.json +1 -1
  612. package/dist/practices/pnpm/.test/assets/repo-npm-to-pnpm/pnpm-workspace.yaml +3 -0
  613. package/dist/practices/pnpm/__snapshots__/.declapract.integration.test.ts.snap +9 -2
  614. package/dist/practices/pnpm/bad-practices/inert-build-allowlist/pnpm-workspace.yaml.declapract.ts +59 -0
  615. package/dist/practices/pnpm/best-practice/.declapract.readme.md +1 -1
  616. package/dist/practices/pnpm/best-practice/package.json +1 -1
  617. package/dist/practices/pnpm/best-practice/package.json.declapract.ts +4 -2
  618. package/dist/practices/provision-github/best-practice/package.json +2 -2
  619. package/dist/practices/provision-github/best-practice/provision/github.repo/resources.ts +16 -0
  620. package/dist/practices/rhachet/.declapract.integration.test.ts +98 -0
  621. package/dist/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/.agent/repo=.this/role=any/boot.yml +7 -0
  622. package/dist/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/declapract.declare.yml +4 -0
  623. package/dist/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/declapract.use.yml +2 -0
  624. package/dist/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/package.json +4 -0
  625. package/dist/practices/rhachet/__snapshots__/.declapract.integration.test.ts.snap +45 -0
  626. package/dist/practices/rhachet/__snapshots__/boot-refs-glossary.declapract.integration.test.ts.snap +6 -0
  627. package/dist/practices/rhachet/__snapshots__/boot-yml-findsert.declapract.integration.test.ts.snap +27 -0
  628. package/dist/practices/rhachet/bad-practices/prod-deps/.declapract.readme.md +6 -2
  629. package/dist/practices/rhachet/bad-practices/prod-deps/.test/assets/demo-repo-with-rhachet-prod-deps/declapract.declare.yml +4 -0
  630. package/dist/practices/rhachet/bad-practices/prod-deps/.test/assets/demo-repo-with-rhachet-prod-deps/declapract.use.yml +2 -0
  631. package/dist/practices/rhachet/bad-practices/prod-deps/.test/assets/demo-repo-with-rhachet-prod-deps/package.json +12 -0
  632. package/dist/practices/rhachet/bad-practices/prod-deps/package.json.declapract.ts +58 -17
  633. package/dist/practices/rhachet/best-practice/.agent/repo=.this/role=any/boot.yml +46 -0
  634. package/dist/practices/rhachet/best-practice/.agent/repo=.this/role=any/boot.yml.declapract.ts +165 -0
  635. package/dist/practices/rhachet/best-practice/.gitignore.declapract.ts +18 -5
  636. package/dist/practices/rhachet/best-practice/package.json +8 -8
  637. package/dist/practices/rhachet/boot-refs-glossary.declapract.integration.test.ts +89 -0
  638. package/dist/practices/rhachet/boot-yml-findsert.declapract.integration.test.ts +145 -0
  639. package/dist/practices/runtime-schemas/bad-practices/joi/.declapract.integration.test.ts +102 -0
  640. package/dist/practices/runtime-schemas/bad-practices/joi/.test/assets/demo-repo-with-joi/declapract.use.yml +5 -0
  641. package/dist/practices/runtime-schemas/bad-practices/joi/.test/assets/demo-repo-with-joi/package.json +4 -0
  642. package/dist/practices/runtime-schemas/bad-practices/joi/.test/assets/demo-repo-with-joi/src/contract/schemas/widget.schema.ts +9 -0
  643. package/dist/practices/runtime-schemas/bad-practices/joi/__snapshots__/.declapract.integration.test.ts.snap +37 -0
  644. package/dist/practices/runtime-schemas/bad-practices/joi/src/<star><star>/<star>.ts.declapract.ts +32 -3
  645. package/dist/practices/serverless/.declapract.integration.test.ts +230 -0
  646. package/dist/practices/serverless/.test/assets/demo-repo-with-serverless/declapract.declare.yml +4 -0
  647. package/dist/practices/serverless/.test/assets/demo-repo-with-serverless/declapract.use.yml +8 -0
  648. package/dist/practices/serverless/.test/assets/demo-repo-with-serverless/package.json +4 -0
  649. package/dist/practices/serverless/.test/assets/demo-repo-with-serverless/serverless.yml +8 -0
  650. package/dist/practices/serverless/__snapshots__/.declapract.integration.test.ts.snap +43 -0
  651. package/dist/practices/serverless/__snapshots__/cache-grant-stage-globbed.declapract.integration.test.ts.snap +3 -0
  652. package/dist/practices/serverless/__snapshots__/deployment-bucket-account-scoped.declapract.integration.test.ts.snap +9 -0
  653. package/dist/practices/serverless/__snapshots__/divergentStageGuard.declapract.integration.test.ts.snap +15 -0
  654. package/dist/practices/serverless/__snapshots__/serverless.yml.declapract.integration.test.ts.snap +165 -0
  655. package/dist/practices/serverless/best-practice/.declapract.readme.md +111 -0
  656. package/dist/practices/serverless/best-practice/package.json +7 -5
  657. package/dist/practices/serverless/best-practice/serverless.yml +14 -6
  658. package/dist/practices/serverless/best-practice/serverless.yml.declapract.ts +609 -64
  659. package/dist/practices/serverless/cache-grant-stage-globbed.declapract.integration.test.ts +69 -0
  660. package/dist/practices/serverless/deployment-bucket-account-scoped.declapract.integration.test.ts +78 -0
  661. package/dist/practices/serverless/divergentStageGuard.declapract.integration.test.ts +280 -0
  662. package/dist/practices/serverless/serverless.yml.declapract.integration.test.ts +1285 -0
  663. package/dist/practices/terraform-aws/best-practice/provision/aws/environments/prep/main.tf +1 -1
  664. package/dist/practices/tests-any/__snapshots__/changedsince-origin-main.declapract.integration.test.ts.snap +8 -0
  665. package/dist/practices/tests-any/autoprune-hooks.declapract.integration.test.ts +104 -0
  666. package/dist/practices/tests-any/bad-practices/old-acceptance-import-paths/.declapract.readme.md +2 -2
  667. package/dist/practices/tests-any/bad-practices/old-acceptance-test-utils/blackbox/lambdas/<star>.ts.declapract.ts +9 -9
  668. package/dist/practices/tests-any/best-practice/package.json +3 -3
  669. package/dist/practices/tests-any/changedsince-origin-main.declapract.integration.test.ts +58 -0
  670. 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
  671. package/dist/practices/tests-expo/.declapract.integration.test.ts +7 -3
  672. package/dist/practices/tests-expo/.test/assets/repo-expo-greenfield/package.json +5 -1
  673. package/dist/practices/tests-expo/__snapshots__/.declapract.integration.test.ts.snap +17 -8
  674. package/dist/practices/tests-expo/__snapshots__/package.json.declapract.integration.test.ts.snap +60 -0
  675. package/dist/practices/tests-expo/best-practice/jest.acceptance.config.ts +5 -0
  676. package/dist/practices/tests-expo/best-practice/jest.integration.config.ts +5 -0
  677. package/dist/practices/tests-expo/best-practice/jest.integration.env.ts +5 -1
  678. package/dist/practices/tests-expo/best-practice/jest.unit.config.ts +5 -0
  679. package/dist/practices/tests-expo/best-practice/jest.unit.env.ts +6 -1
  680. package/dist/practices/tests-expo/best-practice/package.json.declapract.ts +190 -13
  681. package/dist/practices/tests-expo/package.json.declapract.integration.test.ts +94 -0
  682. package/dist/practices/tests-node/__snapshots__/livedb-wake-branches.declapract.integration.test.ts.snap +6 -0
  683. package/dist/practices/tests-node/best-practice/jest.acceptance.config.ts +8 -0
  684. package/dist/practices/tests-node/best-practice/jest.acceptance.env.ts +16 -26
  685. package/dist/practices/tests-node/best-practice/jest.acceptance.prepare.ts +36 -0
  686. package/dist/practices/tests-node/best-practice/jest.integration.config.ts +8 -0
  687. package/dist/practices/tests-node/best-practice/jest.integration.env.db.ts +90 -0
  688. package/dist/practices/tests-node/best-practice/jest.integration.env.ts +26 -74
  689. package/dist/practices/tests-node/best-practice/jest.integration.prepare.ts +33 -0
  690. package/dist/practices/tests-node/best-practice/jest.unit.config.ts +7 -0
  691. package/dist/practices/tests-node/best-practice/jest.unit.env.ts +11 -4
  692. package/dist/practices/tests-node/best-practice/jest.unit.env.ts.declapract.ts +3 -1
  693. package/dist/practices/tests-node/best-practice/src/.test/useKeyrack.ts +211 -0
  694. package/dist/practices/tests-node/best-practice/src/.test/useWakeOfLivedb.ts +181 -0
  695. package/dist/practices/tests-node/best-practice/src/.test/useWakeOfTestdb.ts +71 -0
  696. package/dist/practices/tests-node/livedb-wake-branches.declapract.integration.test.ts +227 -0
  697. package/dist/practices/tests-node/livedb-wake-prepare.declapract.integration.test.ts +112 -0
  698. package/dist/practices/tests-node/testdb-preflight-branches.declapract.integration.test.ts +203 -0
  699. package/dist/practices/tests-node/testdb-preflight-env.declapract.integration.test.ts +65 -0
  700. package/dist/practices/tests-service/.test/assets/demo-repo-service/declapract.use.yml +5 -0
  701. package/dist/practices/tests-service/.test/assets/demo-repo-service/package.json +4 -0
  702. package/dist/practices/tests-service/__snapshots__/package.json.declapract.integration.test.ts.snap +26 -0
  703. package/dist/practices/tests-service/asFunctionNameFromTestFileName.ts +7 -0
  704. package/dist/practices/tests-service/best-practice/.declapract.readme.md +68 -0
  705. package/dist/practices/tests-service/best-practice/blackbox/lambdas/<star>.acceptance.test.ts.declapract.ts +33 -8
  706. package/dist/practices/tests-service/best-practice/package.json +4 -1
  707. package/dist/practices/tests-service/best-practice/package.json.declapract.ts +99 -1
  708. package/dist/practices/tests-service/package.json.declapract.integration.test.ts +204 -0
  709. package/dist/practices/typescript-expo/__snapshots__/package.json.declapract.integration.test.ts.snap +8 -0
  710. package/dist/practices/typescript-expo/__snapshots__/tsconfig.json.declapract.integration.test.ts.snap +19 -0
  711. package/dist/practices/typescript-expo/{best-practice/package.json.declapract.integration.test.ts → package.json.declapract.integration.test.ts} +15 -2
  712. package/dist/{.test/assets/expo-migration/declarations/practices/typescript-expo/best-practice → practices/typescript-expo}/tsconfig.json.declapract.integration.test.ts +13 -2
  713. package/dist/practices/typescript-node/best-practice/package.json.declapract.ts +3 -1
  714. package/dist/practices/uuid/best-practice/package.json +1 -1
  715. package/dist/stageAccessBridge.declapract.integration.test.ts +163 -0
  716. package/dist/utils/asPackageJSON.ts +57 -0
  717. package/dist/utils/asPrepConfigPath.ts +12 -0
  718. package/dist/utils/getAllPathsUnderDir.ts +45 -0
  719. package/dist/utils/getAllPracticesForUsecase.ts +35 -9
  720. package/dist/utils/migrateDevConfigToPrep.ts +47 -0
  721. package/dist/utils/readFile.ts +2 -2
  722. package/dist/workflowCallerCalleeReconciliation.declapract.integration.test.ts +319 -0
  723. package/dist/workflowEnvDeploymentFalse.declapract.integration.test.ts +173 -0
  724. package/package.json +10 -9
  725. package/dist/.test/assets/expo-fullusecase/declarations/practices/domain/best-practice/src/domain/objects/index.ts.declapract.ts +0 -4
  726. package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/best-practice/package.json +0 -9
  727. package/dist/.test/assets/expo-migration/declarations/practices/domain/best-practice/src/domain/objects/index.ts.declapract.ts +0 -4
  728. package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/best-practice/package.json +0 -9
  729. package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/best-practice/package.json +0 -9
  730. package/dist/practices/config/best-practice/src/utils/config/Config.ts +0 -10
  731. package/dist/practices/config/best-practice/src/utils/config/Config.ts.declapract.ts +0 -16
  732. package/dist/practices/config/best-practice/src/utils/config/getCacheDirectory.ts +0 -42
  733. package/dist/practices/domain/best-practice/src/domain/objects/index.ts.declapract.ts +0 -4
  734. package/dist/practices/logs/bad-practices/leveled-term/package.json +0 -5
  735. package/dist/practices/persist-with-rds/best-practice/src/utils/config/Config.ts +0 -26
  736. package/dist/practices/persist-with-rds/best-practice/src/utils/config/Config.ts.declapract.ts +0 -39
  737. package/dist/practices/persist-with-rds/best-practice/src/utils/config/config.schema.ts.declapract.ts +0 -49
  738. package/dist/practices/persist-with-rds/best-practice/src/utils/config/getConfig.ts +0 -2
  739. package/dist/practices/tests-expo/best-practice/package.json +0 -9
  740. package/dist/practices/tests-service/defineFunctionNameFromTestFileName.ts +0 -11
  741. /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
  742. /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
  743. /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
  744. /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
  745. /package/dist/.test/assets/expo/declarations/practices/node/{best-practice/.npmrc.declapract.integration.test.ts → .npmrc.declapract.integration.test.ts} +0 -0
  746. /package/dist/.test/assets/expo/declarations/practices/node/{best-practice/__snapshots__ → __snapshots__}/.npmrc.declapract.integration.test.ts.snap +0 -0
  747. /package/dist/.test/assets/expo-fullusecase/declarations/practices/node/{best-practice/.npmrc.declapract.integration.test.ts → .npmrc.declapract.integration.test.ts} +0 -0
  748. /package/dist/.test/assets/expo-fullusecase/declarations/practices/node/{best-practice/__snapshots__ → __snapshots__}/.npmrc.declapract.integration.test.ts.snap +0 -0
  749. /package/dist/.test/assets/expo-migration/declarations/practices/node/{best-practice/.npmrc.declapract.integration.test.ts → .npmrc.declapract.integration.test.ts} +0 -0
  750. /package/dist/.test/assets/expo-migration/declarations/practices/node/{best-practice/__snapshots__ → __snapshots__}/.npmrc.declapract.integration.test.ts.snap +0 -0
  751. /package/dist/practices/node/{best-practice/.npmrc.declapract.integration.test.ts → .npmrc.declapract.integration.test.ts} +0 -0
  752. /package/dist/practices/node/{best-practice/__snapshots__ → __snapshots__}/.npmrc.declapract.integration.test.ts.snap +0 -0
@@ -0,0 +1,103 @@
1
+ import fs from 'fs/promises';
2
+ import path from 'node:path';
3
+
4
+ import { executeApply } from 'declapract';
5
+ import { genTempDir, given, then, useThen, when } from 'test-fns';
6
+
7
+ // executeApply is slow (full practice evaluation), so grant a generous limit
8
+ jest.setTimeout(180_000);
9
+
10
+ /**
11
+ * .what = end-to-end proof of the simple-lambda-handlers migration, run through the REAL declapract
12
+ * apply pipeline against a genTempDir clone of a consumer repo. per
13
+ * rule.require.declapract-integration-tests, a fix that TRANSFORMS a file (regex rewrite + a
14
+ * value-rewrite @declapract:review marker) owes a pipeline test — a unit test of the exported
15
+ * `fix` never exercises the source-file glob -> file match, nor that the marker lands on disk.
16
+ * .why = the fix rewrites the `simple-lambda-handlers` import to `sdk-aws-lambda` and prepends a
17
+ * loud @declapract:review marker, because the schema+invoke CONTRACT differs between the two
18
+ * frameworks and a rename-only migration answers 400 to every request yet typechecks (#594). the
19
+ * marker names the two manual edits rather than let a regex guess the contract.
20
+ * .note = the target file is snapshotted in full (before AND after), so a reviewer can eyeball the
21
+ * exact end-state, per rule.require.declapract-integration-tests.
22
+ * .teeth = the input imports + CALLS `createApiGatewayHandler`. the after-state proves the import is
23
+ * rewritten to `sdk-aws-lambda`, the call is rewritten to `genLambdaEndpoint.for.apiGateway`, and
24
+ * the @declapract:review marker lands on disk — the glue a mocked-context unit test cannot show.
25
+ */
26
+ describe('simple-lambda-handlers migration', () => {
27
+ given('[case1] a repo with a simple-lambda-handlers api-gateway handler', () => {
28
+ const tempDir = genTempDir({
29
+ slug: 'declapract-simple-lambda-handlers',
30
+ clone: './src/practices/node-service/bad-practices/simple-lambda-handlers/.test/assets/demo-repo-with-simple-lambda-handlers',
31
+ symlink: [
32
+ {
33
+ at: 'declarations',
34
+ to: './src/.test/assets/node-service/declarations',
35
+ },
36
+ { at: 'node_modules', to: 'node_modules' },
37
+ ],
38
+ });
39
+
40
+ const targetPath = 'src/contract/handlers/getWidget.ts';
41
+ const read = (relativePath: string) =>
42
+ fs.readFile(path.join(tempDir, relativePath), 'utf-8');
43
+ const applyMigrate = () =>
44
+ executeApply({
45
+ config: path.join(tempDir, 'declapract.use.yml'),
46
+ practice: 'node-service',
47
+ file: targetPath,
48
+ });
49
+
50
+ when('[t0] the migration input (before any fix)', () => {
51
+ then('the src file imports + calls the simple-lambda-handlers factory + matches snapshot', async () => {
52
+ const before = await read(targetPath);
53
+ expect(before).toContain("from 'simple-lambda-handlers'");
54
+ expect(before).toContain('createApiGatewayHandler(');
55
+ expect(before).not.toContain('@declapract:review');
56
+ expect(before).toMatchSnapshot('getWidget.ts — before');
57
+ });
58
+ });
59
+
60
+ when('[t1] the simple-lambda-handlers fix is applied', () => {
61
+ useThen('migrate the handler import + call', async () => applyMigrate());
62
+
63
+ then(
64
+ 'the import + call are rewritten to sdk-aws-lambda, the review marker lands, and it matches snapshot',
65
+ async () => {
66
+ const after = await read(targetPath);
67
+
68
+ // the import is rewritten to the sdk
69
+ expect(after).toContain("from 'sdk-aws-lambda'");
70
+ expect(after).not.toContain("from 'simple-lambda-handlers'");
71
+
72
+ // the api-gateway factory call is rewritten to its sdk equivalent
73
+ expect(after).toContain('genLambdaEndpoint.for.apiGateway(');
74
+ expect(after).not.toContain('createApiGatewayHandler(');
75
+
76
+ // the value-rewrite marker lands on disk — the un-rewritable schema+invoke contract
77
+ // is loud, so a consumer cannot ship a handler that answers 400 to every request
78
+ expect(after).toContain('@declapract:review');
79
+ expect(after).toContain('rawEvent');
80
+
81
+ // full content, for the reviewer's eye
82
+ expect(after).toMatchSnapshot('getWidget.ts — after');
83
+ },
84
+ );
85
+ });
86
+
87
+ when('[t2] the fix is applied a second time (idempotency)', () => {
88
+ // post-rewrite the file imports from sdk-aws-lambda, so the check no longer detects the bad
89
+ // practice and the fix does not run — the second apply changes zero bytes, and the marker is
90
+ // never double-prepended (per rule.require.idempotent-fixes).
91
+ const passes = useThen('a second apply over its own output', async () => {
92
+ const before = await read(targetPath); // post-first-migrate
93
+ await applyMigrate(); // second apply
94
+ const after = await read(targetPath);
95
+ return { before, after };
96
+ });
97
+
98
+ then('the second apply is a no-op', () => {
99
+ expect(passes.after).toEqual(passes.before);
100
+ });
101
+ });
102
+ });
103
+ });
@@ -0,0 +1,60 @@
1
+ # simple-lambda-handlers
2
+
3
+ ## what
4
+
5
+ detects and transforms simple-lambda-handlers usage to sdk-aws-lambda.
6
+
7
+ ## why
8
+
9
+ sdk-aws-lambda provides modern lambda handler patterns:
10
+ - better schema validation with zod (input + output)
11
+ - log context passed to invoke function
12
+ - trail.exid auto-propagation
13
+
14
+ ## transforms
15
+
16
+ | old | new |
17
+ |-----|-----|
18
+ | `import { createStandardHandler } from 'simple-lambda-handlers'` | `import { genLambdaEndpoint } from 'sdk-aws-lambda'` |
19
+ | `import { createApiGatewayHandler } from 'simple-lambda-handlers'` | `import { genLambdaEndpoint } from 'sdk-aws-lambda'` |
20
+ | `createStandardHandler(...)` | `genLambdaEndpoint(...)` |
21
+ | `createApiGatewayHandler(...)` | `genLambdaEndpoint.for.apiGateway(...)` |
22
+
23
+ ## limitations
24
+
25
+ these patterns require manual migration:
26
+
27
+ - `schema` (single joi) → `schema: { input, output }` (split zod)
28
+ - `logic: (event) => O` → `invoke: ({ event }, { log }) => O`
29
+ - `log` passed at creation → `log` also received in invoke context
30
+
31
+ the contract differs in a way a regex cannot get right: the prior framework's schema described the
32
+ WHOLE event, while sdk-aws-lambda's input schema describes the request BODY (the handler then reads
33
+ headers off a separate `rawEvent`). a rename-only rewrite answers 400 to every request yet
34
+ typechecks. so a handler CALL now carries a `@declapract:review` marker that names the two manual
35
+ edits (unwrap the `body` key into the input schema; thread headers via `rawEvent.headers`). the
36
+ codemod does NOT guess the contract — it flags it loud, and the consumer deletes the marker once the
37
+ call is restructured (#594).
38
+
39
+ ## example
40
+
41
+ before:
42
+ ```ts
43
+ import { createStandardHandler } from 'simple-lambda-handlers';
44
+
45
+ export const handler = createStandardHandler({
46
+ log,
47
+ schema,
48
+ logic: async (event) => doStuff(event),
49
+ });
50
+ ```
51
+
52
+ after (requires manual refinement):
53
+ ```ts
54
+ import { genLambdaEndpoint } from 'sdk-aws-lambda';
55
+
56
+ export const handler = genLambdaEndpoint({
57
+ schema: { input: inputSchema, output: outputSchema },
58
+ invoke: async ({ event }, { log }) => doStuff(event),
59
+ }, { log });
60
+ ```
@@ -0,0 +1,5 @@
1
+ # .note = the declarations dir is symlinked by the test (holds declapract.declare.yml + a
2
+ # practices/node-service symlink to the real practice), so the consumer's own src/ tree
3
+ # stays free to hold the target .ts file the src/**/*.ts glob matches.
4
+ declarations: 'declarations/declapract.declare.yml'
5
+ useCase: lambda-service
@@ -0,0 +1,13 @@
1
+ import { createApiGatewayHandler } from 'simple-lambda-handlers';
2
+
3
+ import { log } from '../../utils/logger';
4
+ import { getWidgetSchema } from './getWidget.schema';
5
+
6
+ // an api-gateway handler CALL — the schema+invoke contract differs between the two
7
+ // frameworks, so the fix cannot rename-only; it must emit a loud review marker.
8
+ export const handler = createApiGatewayHandler({
9
+ log,
10
+ schema: getWidgetSchema,
11
+ logic: async (event) => ({ widget: event.widgetId }),
12
+ cors: true,
13
+ });
@@ -0,0 +1,44 @@
1
+ // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
+
3
+ exports[`simple-lambda-handlers migration given: [case1] a repo with a simple-lambda-handlers api-gateway handler when: [t0] the migration input (before any fix) then: the src file imports + calls the simple-lambda-handlers factory + matches snapshot: getWidget.ts — before 1`] = `
4
+ "import { createApiGatewayHandler } from 'simple-lambda-handlers';
5
+
6
+ import { log } from '../../utils/logger';
7
+ import { getWidgetSchema } from './getWidget.schema';
8
+
9
+ // an api-gateway handler CALL — the schema+invoke contract differs between the two
10
+ // frameworks, so the fix cannot rename-only; it must emit a loud review marker.
11
+ export const handler = createApiGatewayHandler({
12
+ log,
13
+ schema: getWidgetSchema,
14
+ logic: async (event) => ({ widget: event.widgetId }),
15
+ cors: true,
16
+ });
17
+ "
18
+ `;
19
+
20
+ exports[`simple-lambda-handlers migration given: [case1] a repo with a simple-lambda-handlers api-gateway handler when: [t1] the simple-lambda-handlers fix is applied then: the import + call are rewritten to sdk-aws-lambda, the review marker lands, and it matches snapshot: getWidget.ts — after 1`] = `
21
+ "/**
22
+ * @declapract:review — auto-migrated to sdk-aws-lambda; the api-gateway handler CONTRACT differs
23
+ * and MUST be restructured by hand (a rename-only migration answers 400 to every request):
24
+ * - schema: the prior single schema described the WHOLE event; the sdk input schema describes the
25
+ * request BODY only. split into \`schema: { input, output }\` and unwrap the \`body\` key.
26
+ * - invoke: \`logic: (event) => O\` becomes \`invoke: async ({ event, rawEvent }) => O\`. \`event\` is
27
+ * the parsed body; thread headers through \`rawEvent.headers\`.
28
+ * delete this marker once restructured.
29
+ */
30
+ import { genLambdaEndpoint } from 'sdk-aws-lambda';
31
+
32
+ import { log } from '../../utils/logger';
33
+ import { getWidgetSchema } from './getWidget.schema';
34
+
35
+ // an api-gateway handler CALL — the schema+invoke contract differs between the two
36
+ // frameworks, so the fix cannot rename-only; it must emit a loud review marker.
37
+ export const handler = genLambdaEndpoint.for.apiGateway({
38
+ log,
39
+ schema: getWidgetSchema,
40
+ logic: async (event) => ({ widget: event.widgetId }),
41
+ cors: true,
42
+ });
43
+ "
44
+ `;
@@ -0,0 +1,5 @@
1
+ {
2
+ "dependencies": {
3
+ "simple-lambda-handlers": "@declapract{check.minVersion('0.0.0')}"
4
+ }
5
+ }
@@ -0,0 +1,27 @@
1
+ import { FileCheckType, type FileFixFunction } from 'declapract';
2
+
3
+ export const check = FileCheckType.CONTAINS;
4
+
5
+ /**
6
+ * .what = removes simple-lambda-handlers and adds sdk-aws-lambda
7
+ * .why = sdk-aws-lambda is the modern replacement with better patterns
8
+ */
9
+ export const fix: FileFixFunction = (contents) => {
10
+ if (!contents) return { contents };
11
+
12
+ const packageJSON = JSON.parse(contents);
13
+
14
+ const updatedPackageJSON = {
15
+ ...packageJSON,
16
+ dependencies: {
17
+ ...packageJSON.dependencies,
18
+ 'simple-lambda-handlers': undefined,
19
+ 'sdk-aws-lambda':
20
+ packageJSON.dependencies?.['sdk-aws-lambda'] ?? '^0.1.0',
21
+ },
22
+ };
23
+
24
+ return {
25
+ contents: JSON.stringify(updatedPackageJSON, null, 2),
26
+ };
27
+ };
@@ -0,0 +1,130 @@
1
+ import type { FileCheckFunction, FileFixFunction } from 'declapract';
2
+
3
+ /**
4
+ * .what = detects simple-lambda-handlers imports in source files
5
+ * .why = simple-lambda-handlers should be replaced with sdk-aws-lambda
6
+ */
7
+ export const check: FileCheckFunction = (contents) => {
8
+ // match if file imports from simple-lambda-handlers
9
+ if (contents?.includes("from 'simple-lambda-handlers'")) return;
10
+ if (contents?.includes('from "simple-lambda-handlers"')) return;
11
+
12
+ // no match
13
+ throw new Error('does not import from simple-lambda-handlers');
14
+ };
15
+
16
+ /**
17
+ * .what = a loud marker for an api-gateway handler call, whose schema+invoke CONTRACT differs
18
+ * between the two frameworks and cannot be mechanically rewritten.
19
+ * .why = the prior framework's schema described the WHOLE event and the handler received the whole
20
+ * event; the sdk's input schema describes the request BODY and the handler receives the
21
+ * parsed body plus a separate rawEvent. a rename-only rewrite leaves a handler that answers
22
+ * 400 to every request, yet typechecks (#594). the marker flags the two manual edits rather
23
+ * than let a regex guess the contract.
24
+ */
25
+ const apiGatewayReviewMarker = `/**
26
+ * @declapract:review — auto-migrated to sdk-aws-lambda; the api-gateway handler CONTRACT differs
27
+ * and MUST be restructured by hand (a rename-only migration answers 400 to every request):
28
+ * - schema: the prior single schema described the WHOLE event; the sdk input schema describes the
29
+ * request BODY only. split into \`schema: { input, output }\` and unwrap the \`body\` key.
30
+ * - invoke: \`logic: (event) => O\` becomes \`invoke: async ({ event, rawEvent }) => O\`. \`event\` is
31
+ * the parsed body; thread headers through \`rawEvent.headers\`.
32
+ * delete this marker once restructured.
33
+ */
34
+ `;
35
+
36
+ /**
37
+ * .what = a loud marker for a standard handler call, whose schema+invoke shape also differs.
38
+ * .why = the rename does not restructure the args; the sdk splits the schema and passes log in the
39
+ * invoke context. the marker flags the manual edits (#594).
40
+ */
41
+ const standardReviewMarker = `/**
42
+ * @declapract:review — auto-migrated to sdk-aws-lambda; the handler CONTRACT differs and MUST be
43
+ * restructured by hand:
44
+ * - schema: the prior single schema splits into \`schema: { input, output }\`.
45
+ * - invoke: \`logic: (event) => O\` becomes \`invoke: async ({ event }, { log }) => O\`; \`log\` is now
46
+ * received in the invoke context, not only at creation.
47
+ * delete this marker once restructured.
48
+ */
49
+ `;
50
+
51
+ /**
52
+ * .what = parse a comma-separated import clause into its trimmed import names
53
+ * .why = names the split/trim parse, so the fix orchestrator reads as narrative rather than
54
+ * an inline array-manipulation chain (rule.forbid.inline-decode-friction)
55
+ */
56
+ const asImportNames = (input: { clause: string }): string[] =>
57
+ input.clause.split(',').map((name) => name.trim());
58
+
59
+ /**
60
+ * .what = map one simple-lambda-handlers import name to its sdk-aws-lambda equivalent
61
+ * .why = both handler-factory names collapse onto `genLambdaEndpoint`; the named map keeps the
62
+ * fix orchestrator narrative rather than an inline conditional (rule.forbid.inline-decode-friction)
63
+ */
64
+ const asTransformedImportName = (input: { name: string }): string => {
65
+ if (input.name === 'createStandardHandler') return 'genLambdaEndpoint';
66
+ if (input.name === 'createApiGatewayHandler') return 'genLambdaEndpoint';
67
+ return input.name;
68
+ };
69
+
70
+ /**
71
+ * .what = dedupe import names, first-seen order retained
72
+ * .why = the two handler factories both map to `genLambdaEndpoint`, so a clause that imports both
73
+ * would emit a duplicate; the named dedupe hides the Set semantics from the orchestrator
74
+ */
75
+ const asDedupedImportNames = (input: { names: string[] }): string[] => [
76
+ ...new Set(input.names),
77
+ ];
78
+
79
+ /**
80
+ * .what = transforms simple-lambda-handlers imports to sdk-aws-lambda, with a review marker
81
+ * .why = automated migration reduces manual toil, but the schema+invoke contract cannot be
82
+ * mechanically rewritten — so a handler CALL gets a @declapract:review marker that names the
83
+ * manual edits, rather than a silent rename that answers 400 to every request (#594).
84
+ *
85
+ * .note = basic transforms only; complex patterns require manual fix
86
+ *
87
+ * API map:
88
+ * - createStandardHandler → genLambdaEndpoint
89
+ * - createApiGatewayHandler → genLambdaEndpoint.for.apiGateway
90
+ */
91
+ export const fix: FileFixFunction = (contents) => {
92
+ if (!contents) return {};
93
+
94
+ // detect a handler CALL (name + paren) on the ORIGINAL contents, before the rename
95
+ const hasApiGatewayCall = /createApiGatewayHandler\s*\(/.test(contents);
96
+ const hasStandardCall = /createStandardHandler\s*\(/.test(contents);
97
+
98
+ const transformed = contents
99
+ // transform imports (dedupe to avoid duplicate genLambdaEndpoint)
100
+ .replace(
101
+ /import\s+\{([^}]*)\}\s+from\s+['"]simple-lambda-handlers['"]/g,
102
+ (match, imports) => {
103
+ // split, replace, dedupe, join
104
+ const importNames = asImportNames({ clause: imports });
105
+ const mapped = importNames.map((name) =>
106
+ asTransformedImportName({ name }),
107
+ );
108
+ const deduped = asDedupedImportNames({ names: mapped });
109
+ return `import { ${deduped.join(', ')} } from 'sdk-aws-lambda'`;
110
+ },
111
+ )
112
+ // transform function calls
113
+ .replace(/createStandardHandler/g, 'genLambdaEndpoint')
114
+ .replace(/createApiGatewayHandler/g, 'genLambdaEndpoint.for.apiGateway');
115
+
116
+ // prepend the review marker for a handler CALL (api-gateway takes precedence), so the
117
+ // un-rewritable schema+invoke contract is loud. idempotent: the check no longer fires
118
+ // post-rewrite, and a second pass would find the marker already present.
119
+ const marker = hasApiGatewayCall
120
+ ? apiGatewayReviewMarker
121
+ : hasStandardCall
122
+ ? standardReviewMarker
123
+ : '';
124
+ const updated =
125
+ marker && !transformed.includes('@declapract:review')
126
+ ? marker + transformed
127
+ : transformed;
128
+
129
+ return { contents: updated };
130
+ };
@@ -0,0 +1,6 @@
1
+ {
2
+ "private": true,
3
+ "dependencies": {
4
+ "sdk-aws-lambda": "@declapract{check.minVersion('0.4.0')}"
5
+ }
6
+ }
@@ -0,0 +1,3 @@
1
+ import { FileCheckType } from 'declapract';
2
+
3
+ export const check = FileCheckType.CONTAINS;
@@ -0,0 +1,5 @@
1
+ # minimal use case for the node-service practice integration test
2
+ use-cases:
3
+ lambda-service:
4
+ practices:
5
+ - node-service
@@ -1,4 +1,6 @@
1
1
  import fs from 'fs/promises';
2
+ import { execFileSync } from 'node:child_process';
3
+ import { readFileSync } from 'node:fs';
2
4
  import path from 'node:path';
3
5
 
4
6
  import { executeApply } from 'declapract';
@@ -7,6 +9,52 @@ import { genTempDir, given, then, useBeforeAll, when } from 'test-fns';
7
9
  // executeApply is slow (full practice evaluation)
8
10
  jest.setTimeout(180_000);
9
11
 
12
+ /** extract the pinned version out of a `packageManager` field (`pnpm@10.34.5` → `10.34.5`). */
13
+ const asPinnedVersionFromPackageManager = (packageManager: string): string =>
14
+ packageManager.split('@')[1] ?? '';
15
+
16
+ const sleep = (ms: number): Promise<void> =>
17
+ new Promise((done) => setTimeout(done, ms));
18
+
19
+ /**
20
+ * .what = query the npm registry for a package's published version, with bounded retry-with-backoff.
21
+ * .why = a bare one-shot `npm view` makes a TRANSIENT registry blip (DNS hiccup, rate limit, brief
22
+ * outage) redden the whole suite even when the pin is fine — the intermittent-failure class
23
+ * rule.forbid.behavior-hazards targets. a phantom pin (never published) fails EVERY attempt
24
+ * and still reddens after the budget, so the phantom-guard intent holds; a transient blip
25
+ * recovers on a later attempt. fails loud with the last error once the budget is spent
26
+ * (rule.forbid.failhide) — never a silent skip.
27
+ * .note = a committed/metadata source cannot substitute here: only the registry can confirm a pin
28
+ * was actually PUBLISHED (a phantom pin parses fine locally). so the registry read stays,
29
+ * hardened by retry rather than replaced.
30
+ */
31
+ const getPublishedVersionFromRegistry = async (input: {
32
+ packageName: string;
33
+ version: string;
34
+ attemptsLeft: number;
35
+ backoffMs: number;
36
+ }): Promise<string> => {
37
+ try {
38
+ return execFileSync(
39
+ 'npm',
40
+ ['view', `${input.packageName}@${input.version}`, 'version'],
41
+ { timeout: 15_000 },
42
+ )
43
+ .toString('utf-8')
44
+ .trim();
45
+ } catch (error) {
46
+ // budget spent → fail loud with the last error (never swallow)
47
+ if (input.attemptsLeft <= 1) throw error;
48
+ // otherwise back off and retry — a transient blip recovers, a phantom pin fails again
49
+ await sleep(input.backoffMs);
50
+ return getPublishedVersionFromRegistry({
51
+ ...input,
52
+ attemptsLeft: input.attemptsLeft - 1,
53
+ backoffMs: input.backoffMs * 2,
54
+ });
55
+ }
56
+ };
57
+
10
58
  /**
11
59
  * .what = pipeline test for the pnpm npm→pnpm migration bad-practices
12
60
  * .why = the unit tests prove each fix in isolation; only the real executeApply pipeline
@@ -87,7 +135,7 @@ describe('pnpm npm→pnpm migration — pipeline', () => {
87
135
 
88
136
  then('the packageManager pin survives (best-practice no-op)', () => {
89
137
  const pkg = JSON.parse(state.pkgAfter1);
90
- expect(pkg.packageManager).toEqual('pnpm@10.31.7');
138
+ expect(pkg.packageManager).toEqual('pnpm@10.34.5');
91
139
  });
92
140
 
93
141
  then('before + after match snapshot', () => {
@@ -119,14 +167,14 @@ describe('pnpm npm→pnpm migration — pipeline', () => {
119
167
  });
120
168
  });
121
169
 
122
- given('[case2] a repo AHEAD of the blessed pnpm pin (10.32.1)', () => {
123
- // the [case1] fixture seeds the pin already AT 10.31.7, so it proves only the no-op
124
- // path. this case seeds the pin AHEAD of the blessed version to prove the DOWNGRADE
125
- // rewrite (10.32.1 → 10.31.7) in pnpm's OWN suite — where an engineer looks first —
170
+ given('[case2] a repo OFF the blessed pnpm pin (10.32.1)', () => {
171
+ // the [case1] fixture seeds the pin already AT 10.34.5, so it proves only the no-op
172
+ // path. this case seeds the pin OFF the blessed version to prove the convergence
173
+ // rewrite (10.32.1 → 10.34.5) in pnpm's OWN suite — where an engineer looks first —
126
174
  // not only inside the expo migration fixture. the best-practice CONTAINS check rejects
127
- // a package.json that does not carry the exact `pnpm@10.31.7`, so `declapract fix`
128
- // merges the blessed pin over the ahead one. that convergence-to-one-version is the
129
- // org-standardization intent, not a regression.
175
+ // a package.json that does not carry the exact `pnpm@10.34.5`, so `declapract fix`
176
+ // merges the blessed pin over the off one, in either direction. that
177
+ // convergence-to-one-version is the org-standardization intent, not a regression.
130
178
  const tempDir = genTempDir({
131
179
  slug: 'pnpm-ahead-of-pin',
132
180
  clone: './src/practices/pnpm/.test/assets/repo-npm-to-pnpm',
@@ -140,7 +188,7 @@ describe('pnpm npm→pnpm migration — pipeline', () => {
140
188
  const readPkg = () => fs.readFile(pkgPath(), 'utf-8');
141
189
 
142
190
  const state = useBeforeAll(async () => {
143
- // seed the pin AHEAD of the blessed version, then apply the practice
191
+ // seed the pin OFF the blessed version, then apply the practice
144
192
  const seeded = { ...JSON.parse(await readPkg()), packageManager: 'pnpm@10.32.1' };
145
193
  await fs.writeFile(pkgPath(), `${JSON.stringify(seeded, null, 2)}\n`);
146
194
  const pkgBefore = await readPkg();
@@ -161,15 +209,117 @@ describe('pnpm npm→pnpm migration — pipeline', () => {
161
209
  return { pkgBefore, pkgAfter1, pkgAfter2 };
162
210
  }, 170_000);
163
211
 
164
- when('[t0] the ahead-of-pin package.json is applied', () => {
165
- then('the pin is rewritten DOWN to the blessed 10.31.7', () => {
212
+ when('[t0] the off-pin package.json is applied', () => {
213
+ then('the pin is rewritten to the blessed 10.34.5', () => {
166
214
  expect(JSON.parse(state.pkgBefore).packageManager).toEqual('pnpm@10.32.1');
167
- expect(JSON.parse(state.pkgAfter1).packageManager).toEqual('pnpm@10.31.7');
215
+ expect(JSON.parse(state.pkgAfter1).packageManager).toEqual('pnpm@10.34.5');
168
216
  });
169
217
 
170
- then('a second apply is a fixed point (the downgrade converges)', () => {
218
+ then('a second apply is a fixed point (the convergence holds)', () => {
171
219
  expect(state.pkgAfter2).toEqual(state.pkgAfter1);
172
220
  });
173
221
  });
174
222
  });
223
+
224
+ given('[case3] the blessed packageManager pin is a real published version', () => {
225
+ // a phantom pin (e.g. pnpm@10.31.7, which was never published) 404s corepack on EVERY
226
+ // pm command in a consumer the moment `declapract fix` applies it — a repo-wide outage,
227
+ // not a lint nit (#576). so the blessed pin MUST exist on the npm registry. this guard
228
+ // reads the pin the best-practice ships and puts the question to the registry itself, so
229
+ // a future bump to an unpublished version reddens HERE rather than in a bricked consumer.
230
+ // anchor on __dirname, not process.cwd(): a nested `jest src/practices/...` run has a different
231
+ // cwd. from this file (src/practices/pnpm/) the best-practice package.json is one segment down.
232
+ const bestPracticePkgPath = path.join(
233
+ __dirname,
234
+ 'best-practice/package.json',
235
+ );
236
+
237
+ when('[t0] the best-practice package.json pin is read', () => {
238
+ const readPinnedVersion = (): string => {
239
+ const pkg = JSON.parse(readFileSync(bestPracticePkgPath, 'utf-8'));
240
+ return asPinnedVersionFromPackageManager(String(pkg.packageManager));
241
+ };
242
+
243
+ then('the pinned pnpm version has a valid semver shape (hermetic, every run)', () => {
244
+ expect(readPinnedVersion()).toMatch(/^\d+\.\d+\.\d+$/);
245
+ });
246
+
247
+ then('the pinned pnpm version is published on the npm registry (every build)', async () => {
248
+ // the phantom-pin guard (#576) needs the LIVE registry — only it confirms a pin was
249
+ // PUBLISHED (a phantom pin parses fine locally, then 404s corepack in every consumer). the
250
+ // read runs on EVERY build, CI included, per rule.require.external-contract-integration-tests:
251
+ // an external contract owes a real call, never a silent skip ("either run the real call, or
252
+ // fail the gate"). the transient-blip hazard rule.forbid.behavior-hazards names is absorbed by
253
+ // getPublishedVersionFromRegistry's bounded retry-with-backoff (3 attempts) — a brief blip
254
+ // recovers, a phantom pin fails all 3 and reddens the gate. the read needs no credential (a
255
+ // public `npm view`), and this repo's CI already reaches the registry to install deps, so a
256
+ // sustained outage would fail the install too. the shape check above stays hermetic.
257
+ const pinnedVersion = readPinnedVersion();
258
+ const published = await getPublishedVersionFromRegistry({
259
+ packageName: 'pnpm',
260
+ version: pinnedVersion,
261
+ attemptsLeft: 3,
262
+ backoffMs: 500,
263
+ });
264
+ expect(published).toContain(pinnedVersion);
265
+ });
266
+ });
267
+ });
268
+
269
+ given('[case4] a repo carrying an inert v11 allowBuilds block under the v10 pin', () => {
270
+ // the fixture's pnpm-workspace.yaml holds ONLY an `allowBuilds:` block — pnpm v11 syntax
271
+ // under a v10 pin, so it does ZERO work yet reads like a live allowlist (#575). the
272
+ // inert-build-allowlist bad-practice must DELETE the file (its whole content is the block),
273
+ // and a re-apply must be a no-op (the file is already gone → no key to detect).
274
+ const tempDir = genTempDir({
275
+ slug: 'pnpm-inert-allowbuilds',
276
+ clone: './src/practices/pnpm/.test/assets/repo-npm-to-pnpm',
277
+ symlink: [
278
+ { at: 'declarations', to: './src/.test/assets/pnpm/declarations' },
279
+ { at: 'node_modules', to: 'node_modules' },
280
+ ],
281
+ });
282
+
283
+ const wsPath = () => path.join(tempDir, 'pnpm-workspace.yaml');
284
+ const exists = async () =>
285
+ fs
286
+ .access(wsPath())
287
+ .then(() => true)
288
+ .catch(() => false);
289
+
290
+ const state = useBeforeAll(async () => {
291
+ const before = await fs.readFile(wsPath(), 'utf-8');
292
+
293
+ await executeApply({
294
+ config: path.join(tempDir, 'declapract.use.yml'),
295
+ practice: 'pnpm',
296
+ file: 'pnpm-workspace.yaml',
297
+ });
298
+ const existsAfter1 = await exists();
299
+
300
+ // a re-apply on the now-absent file must be a clean no-op
301
+ await executeApply({
302
+ config: path.join(tempDir, 'declapract.use.yml'),
303
+ practice: 'pnpm',
304
+ file: 'pnpm-workspace.yaml',
305
+ });
306
+ const existsAfter2 = await exists();
307
+
308
+ return { before, existsAfter1, existsAfter2 };
309
+ }, 170_000);
310
+
311
+ when('[t0] the pnpm practice is applied to pnpm-workspace.yaml', () => {
312
+ then('the inert allowBuilds-only file is deleted', () => {
313
+ expect(state.existsAfter1).toEqual(false);
314
+ });
315
+
316
+ then('before matches snapshot (the inert block that was removed)', () => {
317
+ expect(state.before).toMatchSnapshot('pnpm-workspace.yaml — before');
318
+ });
319
+
320
+ then('a second apply is a fixed point (absent stays absent)', () => {
321
+ expect(state.existsAfter2).toEqual(false);
322
+ });
323
+ });
324
+ });
175
325
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "app-example-native",
3
3
  "version": "1.0.0",
4
- "packageManager": "pnpm@10.31.7",
4
+ "packageManager": "pnpm@10.34.5",
5
5
  "scripts": {
6
6
  "fix:format": "npm run fix:format:prettier",
7
7
  "prepush": "npm run test && npm run build",