declapract-typescript-ehmpathy 0.49.11 → 0.49.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.test/assets/cache/declarations/practices/cache/.declapract.integration.test.ts +4 -4
- package/dist/.test/assets/cache/declarations/practices/cache/.test/assets/repo-with-valid-cache-package/package.json +1 -1
- package/dist/.test/assets/cache/declarations/practices/cache/best-practice/package.json +3 -3
- package/dist/.test/assets/cicd-service/declarations/declapract.declare.yml +9 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/.declapract.integration.test.ts +175 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/.test/assets/demo-repo-pre-stamped-nords/.github/workflows/provision.yml +110 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/.test/assets/demo-repo-pre-stamped-nords/declapract.use.nords.yml +20 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/.test/assets/demo-repo-pre-stamped-nords/declapract.use.rds.yml +20 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/.test/assets/demo-repo-pre-stamped-nords/package.json +4 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/.test/assets/demo-repo-service/declapract.use.nords.yml +20 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/.test/assets/demo-repo-service/declapract.use.rds.yml +20 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/.test/assets/demo-repo-service/package.json +4 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/__snapshots__/.declapract.integration.test.ts.snap +24 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/__snapshots__/acceptanceContempFleetGuard.declapract.integration.test.ts.snap +13 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/__snapshots__/insync-grep.declapract.integration.test.ts.snap +5 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/__snapshots__/provision.yml.declapract.integration.test.ts.snap +297 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/acceptanceContempFleetGuard.declapract.integration.test.ts +89 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/old-names/.github/workflows/deploy_dev_on_master.yml.declapract.ts +3 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/old-names/.github/workflows/deploy_on_tag.yml.declapract.ts +3 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/old-names/.github/workflows/deploy_prod_on_tag.yml.declapract.ts +3 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.declapract.integration.test.ts +153 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.declapract.readme.md +38 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.github/workflows/provision.yml.declapract.integration.test.ts +167 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.github/workflows/provision.yml.declapract.ts +88 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.test/assets/repo-non-rds/readme.md +9 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.test/assets/repo-with-aws-resources-callee/provision/aws/resources.ts +5 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.test/assets/repo-with-schema-callee/provision/schema/init.sql +5 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/__snapshots__/.declapract.integration.test.ts.snap +183 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/best-practice/.declapract.readme.md +22 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/best-practice/.github/workflows/.deploy-sls.yml +163 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/best-practice/.github/workflows/.sql-schema-control.yml +154 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/best-practice/.github/workflows/.terraform.yml +118 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/best-practice/.github/workflows/deploy.yml +77 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/best-practice/.github/workflows/deploy.yml.declapract.ts +15 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/best-practice/.github/workflows/provision.yml +110 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/best-practice/.github/workflows/provision.yml.declapract.ts +74 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/best-practice/package.json +7 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/insync-grep.declapract.integration.test.ts +76 -0
- package/dist/.test/assets/cicd-service/declarations/practices/cicd-service/provision.yml.declapract.integration.test.ts +182 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/.declapract.integration.test.ts +224 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/.extensions.sql.declapract.integration.test.ts +38 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/config/dev.json +18 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/declapract.declare.yml +4 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/declapract.use.yml +18 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/package.json +4 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/__snapshots__/.declapract.integration.test.ts.snap +45 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/__snapshots__/.extensions.sql.declapract.integration.test.ts.snap +42 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/__snapshots__/deploy-database-gerunds.declapract.integration.test.ts.snap +102 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/__snapshots__/provision-testdb-access.declapract.integration.test.ts.snap +3 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/__snapshots__/ssm-cicd-param-names.declapract.integration.test.ts.snap +10 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/__snapshots__/testdb-preflight-failloud.declapract.integration.test.ts.snap +30 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/non-prefixed-manual-init-sqls/provision/schema/sql/init/database.sql.declapract.ts +3 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/non-prefixed-manual-init-sqls/provision/schema/sql/init/extensions.sql.declapract.ts +13 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/non-prefixed-manual-init-sqls/provision/schema/sql/init/schema.sql.declapract.ts +3 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/non-prefixed-manual-init-sqls/provision/schema/sql/init/user.cicd.sql.declapract.ts +3 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/non-prefixed-manual-init-sqls/provision/schema/sql/init/user.datalakedb.sql.declapract.ts +3 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/non-prefixed-manual-init-sqls/readme.md +5 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-config-file-names/codegen.sql.yml.declapract.ts +3 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-dev-config-location/config/dev.json.declapract.ts +33 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-dir/.declapract.readme.md +1 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-dir/provision/docker/integration_test_db/<star><star>/<star>.declapract.ts +15 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-hyphen-dir/.declapract.readme.md +1 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-hyphen-dir/provision/docker/integration-test-db/<star><star>/<star>.declapract.ts +15 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-paths/.declapract.readme.md +1 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-paths/package.json +8 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-paths/package.json.declapract.ts +10 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-packagejson-script-names/package.json +9 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-packagejson-script-names/package.json.declapract.ts +22 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/old-param-placeholder/config/<star>.json.declapract.ts +14 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/schema-entities-dir/.declapract.readme.md +1 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/schema-entities-dir/provision/schema/entities/<star>.ts.declapract.ts +12 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/schema-entities-dir/provision/schema/sql/entities.yml.declapract.ts +13 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/terraform-parameters/.declapract.integration.test.ts +88 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/terraform-parameters/.test/assets/demo-repo-with-terraform-ssm/declapract.declare.yml +4 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/terraform-parameters/.test/assets/demo-repo-with-terraform-ssm/declapract.use.yml +18 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/terraform-parameters/.test/assets/demo-repo-with-terraform-ssm/package.json +4 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/terraform-parameters/.test/assets/demo-repo-with-terraform-ssm/provision/aws/product/parameter-store.tf +23 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/terraform-parameters/__snapshots__/.declapract.integration.test.ts.snap +44 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/terraform-parameters/provision/aws/product/parameter-store.tf.declapract.ts +55 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/with-connection-in-input/.declapract.readme.md +1 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/bad-practices/with-connection-in-input/src/utils/database/withDatabaseConnection.ts +3 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/.declapract.readme.md +58 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/codegen.sql.dao.yml +18 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/codegen.sql.dao.yml.declapract.ts +3 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/codegen.sql.schema.yml +6 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/codegen.sql.types.yml +16 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/config/prep.json +36 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/config/prep.json.declapract.ts +15 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/config/prod.json +36 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/config/prod.json.declapract.ts +15 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/config/test.json +33 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/config/test.json.declapract.ts +15 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/package.json +30 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/package.json.declapract.ts +3 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/aws/readme.md +79 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/aws/resources.parameters.ts +106 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/aws/resources.ts +30 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/build-image.dockerfile +7 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/docker-compose.yml +18 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/init/.gitignore +3 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/init/readme.md +3 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/wait-for-postgres.sh +25 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/connection.config.js +29 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/control.yml +7 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/deploy.database.sh +97 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.database.sql +10 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.extensions.sql +16 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.extensions.sql.declapract.ts +37 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.schema.sql +11 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.user.cicd.sql +14 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.user.datalakedb.sql +12 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/default_transaction_isolation.sql +6 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/user.service.sql +16 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init.yml +9 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init.yml.declapract.ts +3 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/src/utils/config/config.schema.ts +110 -0
- package/dist/{practices/persist-with-rds/best-practice/src/utils/database/getDatabaseConnection.integration.test.ts → .test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/src/utils/database/getOneDatabaseConnection.integration.test.ts} +3 -3
- package/dist/{practices/persist-with-rds/best-practice/src/utils/database/getDatabaseConnection.ts → .test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/src/utils/database/getOneDatabaseConnection.ts} +1 -1
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/src/utils/database/withDatabaseContext.ts +53 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/src/utils/database/withDatabaseTransaction.ts +33 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/deploy-database-gerunds.declapract.integration.test.ts +57 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/empty-template-declares-zero-clusters.declapract.integration.test.ts +71 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/provision-testdb-access.declapract.integration.test.ts +50 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/ssm-cicd-param-names.declapract.integration.test.ts +73 -0
- package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/testdb-preflight-failloud.declapract.integration.test.ts +83 -0
- package/dist/.test/assets/cicd-service/declarations/useCases.yml +13 -0
- package/dist/.test/assets/environments/declarations/declapract.declare.yml +4 -0
- package/dist/.test/assets/environments/declarations/practices/environments/.declapract.integration.test.ts +136 -0
- package/dist/.test/assets/environments/declarations/practices/environments/__snapshots__/.declapract.integration.test.ts.snap +55 -0
- package/dist/.test/assets/environments/declarations/practices/environments/bad-practices/old-dev-scripts/package.json.declapract.ts +59 -0
- package/dist/.test/assets/environments/declarations/practices/environments/bad-practices/old-stage-enum/.declapract.integration.test.ts +133 -0
- package/dist/.test/assets/environments/declarations/practices/environments/bad-practices/old-stage-enum/.test/assets/demo-repo-with-stage-enum/declapract.use.yml +8 -0
- package/dist/.test/assets/environments/declarations/practices/environments/bad-practices/old-stage-enum/.test/assets/demo-repo-with-stage-enum/package.json +4 -0
- package/dist/.test/assets/environments/declarations/practices/environments/bad-practices/old-stage-enum/.test/assets/demo-repo-with-stage-enum/src/logic/getDeployTarget.ts +15 -0
- package/dist/.test/assets/environments/declarations/practices/environments/bad-practices/old-stage-enum/__snapshots__/.declapract.integration.test.ts.snap +40 -0
- package/dist/.test/assets/environments/declarations/practices/environments/bad-practices/old-stage-enum/src/<star><star>/<star>.ts.declapract.ts +304 -0
- package/dist/.test/assets/environments/declarations/practices/environments/best-practice/.declapract.readme.md +61 -0
- package/dist/.test/assets/environments/declarations/practices/environments/best-practice/package.json +7 -0
- package/dist/.test/assets/environments/declarations/practices/environments/best-practice/package.json.declapract.ts +3 -0
- package/dist/.test/assets/environments/declarations/practices/environments/best-practice/src/access/sdks/sdkAwsLambdaEnvAccessAncient.ts +32 -0
- package/dist/.test/assets/environments/declarations/practices/environments/best-practice/src/access/sdks/sdkAwsLambdaEnvAccessContemp.ts +14 -0
- package/dist/.test/assets/environments/declarations/practices/environments/best-practice/src/utils/environment.ts +9 -0
- package/dist/.test/assets/environments/declarations/useCases.yml +5 -0
- package/dist/.test/assets/expo/declarations/practices/cicd-app-react-native-expo/.declapract.integration.test.ts +122 -22
- package/dist/.test/assets/expo/declarations/practices/cicd-app-react-native-expo/__snapshots__/.declapract.integration.test.ts.snap +40 -29
- package/dist/.test/assets/expo/declarations/practices/cicd-app-react-native-expo/best-practice/.github/workflows/.deploy-expo.yml +16 -6
- package/dist/.test/assets/expo/declarations/practices/cicd-app-react-native-expo/best-practice/.github/workflows/deploy.yml +11 -11
- package/dist/.test/assets/expo/declarations/practices/cicd-app-react-native-expo/best-practice/.github/workflows/test.yml +3 -5
- package/dist/.test/assets/expo/declarations/practices/cicd-app-react-native-expo/best-practice/package.json +2 -2
- package/dist/.test/assets/expo/declarations/practices/node/bad-practices/self-deps-not-link/.declapract.integration.test.ts +102 -0
- package/dist/.test/assets/expo/declarations/practices/node/bad-practices/self-deps-not-link/.test/assets/demo-repo-with-self-deps/declapract.declare.yml +4 -0
- package/dist/.test/assets/expo/declarations/practices/node/bad-practices/self-deps-not-link/.test/assets/demo-repo-with-self-deps/declapract.use.yml +8 -0
- package/dist/.test/assets/expo/declarations/practices/node/bad-practices/self-deps-not-link/.test/assets/demo-repo-with-self-deps/package.json +15 -0
- package/dist/.test/assets/expo/declarations/practices/node/bad-practices/self-deps-not-link/__snapshots__/.declapract.integration.test.ts.snap +46 -0
- package/dist/.test/assets/expo/declarations/practices/node/bad-practices/self-deps-not-link/package.json.declapract.ts +22 -29
- package/dist/.test/assets/expo/declarations/practices/node/best-practice/.npmrc.declapract.ts +5 -1
- package/dist/.test/assets/expo/declarations/practices/node/best-practice/package.json +1 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cache/.declapract.integration.test.ts +4 -4
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cache/.test/assets/repo-with-valid-cache-package/package.json +1 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cache/best-practice/package.json +3 -3
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-app-react-native-expo/.declapract.integration.test.ts +122 -22
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-app-react-native-expo/__snapshots__/.declapract.integration.test.ts.snap +40 -29
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-app-react-native-expo/best-practice/.github/workflows/.deploy-expo.yml +16 -6
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-app-react-native-expo/best-practice/.github/workflows/deploy.yml +11 -11
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-app-react-native-expo/best-practice/.github/workflows/test.yml +3 -5
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-app-react-native-expo/best-practice/package.json +2 -2
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/.declapract.integration.test.ts +25 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/__snapshots__/.declapract.integration.test.ts.snap +11 -23
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/__snapshots__/declastruct-insync-grep.declapract.integration.test.ts.snap +3 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/best-practice/.github/workflows/.declastruct.yml +22 -8
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/best-practice/.github/workflows/.test.yml +11 -23
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/best-practice/.github/workflows/.test.yml.declapract.ts +12 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/best-practice/.github/workflows/report-slow-tests.sh +65 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/declastruct-insync-grep.declapract.integration.test.ts +49 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/report-slow-tests.play.declapract.integration.test.ts +144 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/conventional-commits/__snapshots__/commitlint-body-max-line.declapract.integration.test.ts.snap +3 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/conventional-commits/best-practice/commitlint.config.js +5 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/conventional-commits/best-practice/package.json +1 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/conventional-commits/commitlint-body-max-line.declapract.integration.test.ts +49 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/domain/.declapract.integration.test.ts +115 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/domain/bad-practices/schematic-joi-model/src/{domain → domain.objects}/<star><star>/<star>.ts.declapract.ts +4 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/domain/best-practice/package.json +2 -2
- package/dist/.test/assets/expo-fullusecase/declarations/practices/domain/best-practice/src/domain.objects/index.ts.declapract.ts +12 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/errors/.declapract.integration.test.ts +121 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/errors/bad-practices/own-implementation/src/<star><star>/UnexpectedCodePathError.ts.declapract.ts +8 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/errors/best-practice/package.json +1 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/format/.declapract.integration.test.ts +131 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/format/__snapshots__/.declapract.integration.test.ts.snap +17 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/format/bad-practices/prettier/prettier.config.js.declapract.ts +1 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/format/best-practice/package.json.declapract.ts +36 -18
- package/dist/.test/assets/expo-fullusecase/declarations/practices/git/.declapract.integration.test.ts +57 -6
- package/dist/.test/assets/expo-fullusecase/declarations/practices/git/__snapshots__/.declapract.integration.test.ts.snap +2 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/git/best-practice/.gitattributes.declapract.ts +50 -37
- package/dist/.test/assets/expo-fullusecase/declarations/practices/git/best-practice/.gitignore.declapract.ts +8 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/husky/__snapshots__/check.timestamps.play.declapract.integration.test.ts.snap +7 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/husky/best-practice/.husky/check.timestamps.sh +11 -2
- package/dist/.test/assets/expo-fullusecase/declarations/practices/husky/check.timestamps.play.declapract.integration.test.ts +65 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/lint/__snapshots__/dpdmrc-exclude-policy.declapract.integration.test.ts.snap +3 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/lint/bad-practices/depcheck-denylisted-ignores/.depcheckrc.yml.declapract.ts +4 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/lint/best-practice/.depcheckrc.yml.declapract.ts +10 -9
- package/dist/.test/assets/expo-fullusecase/declarations/practices/lint/best-practice/.dpdmrc.yaml +10 -6
- package/dist/.test/assets/expo-fullusecase/declarations/practices/lint/dpdmrc-exclude-policy.declapract.integration.test.ts +50 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/node/bad-practices/self-deps-not-link/.declapract.integration.test.ts +102 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/node/bad-practices/self-deps-not-link/.test/assets/demo-repo-with-self-deps/declapract.declare.yml +4 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/node/bad-practices/self-deps-not-link/.test/assets/demo-repo-with-self-deps/declapract.use.yml +8 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/node/bad-practices/self-deps-not-link/.test/assets/demo-repo-with-self-deps/package.json +15 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/node/bad-practices/self-deps-not-link/__snapshots__/.declapract.integration.test.ts.snap +46 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/node/bad-practices/self-deps-not-link/package.json.declapract.ts +22 -29
- package/dist/.test/assets/expo-fullusecase/declarations/practices/node/best-practice/.npmrc.declapract.ts +5 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/node/best-practice/package.json +1 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/package-json-order/best-practice/package.json.declapract.ts +7 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/.declapract.integration.test.ts +163 -13
- package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/.test/assets/repo-npm-to-pnpm/package.json +1 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/.test/assets/repo-npm-to-pnpm/pnpm-workspace.yaml +3 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/__snapshots__/.declapract.integration.test.ts.snap +9 -2
- package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/bad-practices/inert-build-allowlist/pnpm-workspace.yaml.declapract.ts +59 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/best-practice/.declapract.readme.md +1 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/best-practice/package.json +1 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/pnpm/best-practice/package.json.declapract.ts +4 -2
- package/dist/.test/assets/expo-fullusecase/declarations/practices/provision-github/best-practice/package.json +2 -2
- package/dist/.test/assets/expo-fullusecase/declarations/practices/provision-github/best-practice/provision/github.repo/resources.ts +16 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/.declapract.integration.test.ts +98 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/.agent/repo=.this/role=any/boot.yml +7 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/declapract.declare.yml +4 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/declapract.use.yml +2 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/package.json +4 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/__snapshots__/.declapract.integration.test.ts.snap +45 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/__snapshots__/boot-refs-glossary.declapract.integration.test.ts.snap +6 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/__snapshots__/boot-yml-findsert.declapract.integration.test.ts.snap +27 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/bad-practices/prod-deps/.declapract.readme.md +6 -2
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/bad-practices/prod-deps/.test/assets/demo-repo-with-rhachet-prod-deps/declapract.declare.yml +4 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/bad-practices/prod-deps/.test/assets/demo-repo-with-rhachet-prod-deps/declapract.use.yml +2 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/bad-practices/prod-deps/.test/assets/demo-repo-with-rhachet-prod-deps/package.json +12 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/bad-practices/prod-deps/package.json.declapract.ts +58 -17
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/best-practice/.agent/repo=.this/role=any/boot.yml +46 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/best-practice/.agent/repo=.this/role=any/boot.yml.declapract.ts +165 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/best-practice/.gitignore.declapract.ts +18 -5
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/best-practice/package.json +8 -8
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/boot-refs-glossary.declapract.integration.test.ts +89 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/boot-yml-findsert.declapract.integration.test.ts +145 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-any/__snapshots__/changedsince-origin-main.declapract.integration.test.ts.snap +8 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-any/autoprune-hooks.declapract.integration.test.ts +104 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-any/bad-practices/old-acceptance-import-paths/.declapract.readme.md +2 -2
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-any/bad-practices/old-acceptance-test-utils/blackbox/lambdas/<star>.ts.declapract.ts +9 -9
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-any/best-practice/package.json +3 -3
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-any/changedsince-origin-main.declapract.integration.test.ts +58 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-any/{best-practice/package.json.shell-flags.declapract.integration.test.ts → package.json.shell-flags.declapract.integration.test.ts} +26 -16
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/.declapract.integration.test.ts +7 -3
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/.test/assets/repo-expo-greenfield/package.json +5 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/__snapshots__/.declapract.integration.test.ts.snap +17 -8
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/__snapshots__/package.json.declapract.integration.test.ts.snap +60 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/best-practice/jest.acceptance.config.ts +5 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/best-practice/jest.integration.config.ts +5 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/best-practice/jest.integration.env.ts +5 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/best-practice/jest.unit.config.ts +5 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/best-practice/jest.unit.env.ts +6 -1
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/best-practice/package.json.declapract.ts +190 -13
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/package.json.declapract.integration.test.ts +94 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/typescript-expo/__snapshots__/package.json.declapract.integration.test.ts.snap +8 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/typescript-expo/__snapshots__/tsconfig.json.declapract.integration.test.ts.snap +19 -0
- package/dist/.test/assets/expo-fullusecase/declarations/practices/typescript-expo/{best-practice/package.json.declapract.integration.test.ts → package.json.declapract.integration.test.ts} +15 -2
- package/dist/.test/assets/{expo-toolchain/declarations/practices/typescript-expo/best-practice → expo-fullusecase/declarations/practices/typescript-expo}/tsconfig.json.declapract.integration.test.ts +13 -2
- package/dist/.test/assets/expo-migration/declarations/practices/cicd-app-react-native-expo/.declapract.integration.test.ts +122 -22
- package/dist/.test/assets/expo-migration/declarations/practices/cicd-app-react-native-expo/__snapshots__/.declapract.integration.test.ts.snap +40 -29
- package/dist/.test/assets/expo-migration/declarations/practices/cicd-app-react-native-expo/best-practice/.github/workflows/.deploy-expo.yml +16 -6
- package/dist/.test/assets/expo-migration/declarations/practices/cicd-app-react-native-expo/best-practice/.github/workflows/deploy.yml +11 -11
- package/dist/.test/assets/expo-migration/declarations/practices/cicd-app-react-native-expo/best-practice/.github/workflows/test.yml +3 -5
- package/dist/.test/assets/expo-migration/declarations/practices/cicd-app-react-native-expo/best-practice/package.json +2 -2
- package/dist/.test/assets/expo-migration/declarations/practices/domain/.declapract.integration.test.ts +115 -0
- package/dist/{practices/domain/bad-practices/schematic-joi-model/src/domain → .test/assets/expo-migration/declarations/practices/domain/bad-practices/schematic-joi-model/src/domain.objects}/<star><star>/<star>.ts.declapract.ts +4 -1
- package/dist/.test/assets/expo-migration/declarations/practices/domain/best-practice/package.json +2 -2
- package/dist/.test/assets/expo-migration/declarations/practices/domain/best-practice/src/domain.objects/index.ts.declapract.ts +12 -0
- package/dist/.test/assets/expo-migration/declarations/practices/git/.declapract.integration.test.ts +57 -6
- package/dist/.test/assets/expo-migration/declarations/practices/git/__snapshots__/.declapract.integration.test.ts.snap +2 -0
- package/dist/.test/assets/expo-migration/declarations/practices/git/best-practice/.gitattributes.declapract.ts +50 -37
- package/dist/.test/assets/expo-migration/declarations/practices/git/best-practice/.gitignore.declapract.ts +8 -0
- package/dist/.test/assets/expo-migration/declarations/practices/node/bad-practices/self-deps-not-link/.declapract.integration.test.ts +102 -0
- package/dist/.test/assets/expo-migration/declarations/practices/node/bad-practices/self-deps-not-link/.test/assets/demo-repo-with-self-deps/declapract.declare.yml +4 -0
- package/dist/.test/assets/expo-migration/declarations/practices/node/bad-practices/self-deps-not-link/.test/assets/demo-repo-with-self-deps/declapract.use.yml +8 -0
- package/dist/.test/assets/expo-migration/declarations/practices/node/bad-practices/self-deps-not-link/.test/assets/demo-repo-with-self-deps/package.json +15 -0
- package/dist/.test/assets/expo-migration/declarations/practices/node/bad-practices/self-deps-not-link/__snapshots__/.declapract.integration.test.ts.snap +46 -0
- package/dist/.test/assets/expo-migration/declarations/practices/node/bad-practices/self-deps-not-link/package.json.declapract.ts +22 -29
- package/dist/.test/assets/expo-migration/declarations/practices/node/best-practice/.npmrc.declapract.ts +5 -1
- package/dist/.test/assets/expo-migration/declarations/practices/node/best-practice/package.json +1 -1
- package/dist/.test/assets/expo-migration/declarations/practices/pnpm/.declapract.integration.test.ts +163 -13
- package/dist/.test/assets/expo-migration/declarations/practices/pnpm/.test/assets/repo-npm-to-pnpm/package.json +1 -1
- package/dist/.test/assets/expo-migration/declarations/practices/pnpm/.test/assets/repo-npm-to-pnpm/pnpm-workspace.yaml +3 -0
- package/dist/.test/assets/expo-migration/declarations/practices/pnpm/__snapshots__/.declapract.integration.test.ts.snap +9 -2
- package/dist/.test/assets/expo-migration/declarations/practices/pnpm/bad-practices/inert-build-allowlist/pnpm-workspace.yaml.declapract.ts +59 -0
- package/dist/.test/assets/expo-migration/declarations/practices/pnpm/best-practice/.declapract.readme.md +1 -1
- package/dist/.test/assets/expo-migration/declarations/practices/pnpm/best-practice/package.json +1 -1
- package/dist/.test/assets/expo-migration/declarations/practices/pnpm/best-practice/package.json.declapract.ts +4 -2
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/.declapract.integration.test.ts +98 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/.agent/repo=.this/role=any/boot.yml +7 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/declapract.declare.yml +4 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/declapract.use.yml +2 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/package.json +4 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/__snapshots__/.declapract.integration.test.ts.snap +45 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/__snapshots__/boot-refs-glossary.declapract.integration.test.ts.snap +6 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/__snapshots__/boot-yml-findsert.declapract.integration.test.ts.snap +27 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/bad-practices/prod-deps/.declapract.readme.md +6 -2
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/bad-practices/prod-deps/.test/assets/demo-repo-with-rhachet-prod-deps/declapract.declare.yml +4 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/bad-practices/prod-deps/.test/assets/demo-repo-with-rhachet-prod-deps/declapract.use.yml +2 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/bad-practices/prod-deps/.test/assets/demo-repo-with-rhachet-prod-deps/package.json +12 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/bad-practices/prod-deps/package.json.declapract.ts +58 -17
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/best-practice/.agent/repo=.this/role=any/boot.yml +46 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/best-practice/.agent/repo=.this/role=any/boot.yml.declapract.ts +165 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/best-practice/.gitignore.declapract.ts +18 -5
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/best-practice/package.json +8 -8
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/boot-refs-glossary.declapract.integration.test.ts +89 -0
- package/dist/.test/assets/expo-migration/declarations/practices/rhachet/boot-yml-findsert.declapract.integration.test.ts +145 -0
- package/dist/.test/assets/expo-migration/declarations/practices/tests-any/__snapshots__/changedsince-origin-main.declapract.integration.test.ts.snap +8 -0
- package/dist/.test/assets/expo-migration/declarations/practices/tests-any/autoprune-hooks.declapract.integration.test.ts +104 -0
- package/dist/.test/assets/expo-migration/declarations/practices/tests-any/bad-practices/old-acceptance-import-paths/.declapract.readme.md +2 -2
- package/dist/.test/assets/expo-migration/declarations/practices/tests-any/bad-practices/old-acceptance-test-utils/blackbox/lambdas/<star>.ts.declapract.ts +9 -9
- package/dist/.test/assets/expo-migration/declarations/practices/tests-any/best-practice/package.json +3 -3
- package/dist/.test/assets/expo-migration/declarations/practices/tests-any/changedsince-origin-main.declapract.integration.test.ts +58 -0
- package/dist/.test/assets/{expo-toolchain/declarations/practices/tests-any/best-practice → expo-migration/declarations/practices/tests-any}/package.json.shell-flags.declapract.integration.test.ts +26 -16
- package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/.declapract.integration.test.ts +7 -3
- package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/.test/assets/repo-expo-greenfield/package.json +5 -1
- package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/__snapshots__/.declapract.integration.test.ts.snap +17 -8
- package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/__snapshots__/package.json.declapract.integration.test.ts.snap +60 -0
- package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/best-practice/jest.acceptance.config.ts +5 -0
- package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/best-practice/jest.integration.config.ts +5 -0
- package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/best-practice/jest.integration.env.ts +5 -1
- package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/best-practice/jest.unit.config.ts +5 -0
- package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/best-practice/jest.unit.env.ts +6 -1
- package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/best-practice/package.json.declapract.ts +190 -13
- package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/package.json.declapract.integration.test.ts +94 -0
- package/dist/.test/assets/expo-migration/declarations/practices/typescript-expo/__snapshots__/package.json.declapract.integration.test.ts.snap +8 -0
- package/dist/.test/assets/expo-migration/declarations/practices/typescript-expo/__snapshots__/tsconfig.json.declapract.integration.test.ts.snap +19 -0
- package/dist/.test/assets/{expo-toolchain/declarations/practices/typescript-expo/best-practice → expo-migration/declarations/practices/typescript-expo}/package.json.declapract.integration.test.ts +15 -2
- package/dist/.test/assets/{expo-fullusecase/declarations/practices/typescript-expo/best-practice → expo-migration/declarations/practices/typescript-expo}/tsconfig.json.declapract.integration.test.ts +13 -2
- package/dist/.test/assets/expo-migration/repo-app-protools-shaped/.github/workflows/.deploy-expo.yml +1 -1
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-any/__snapshots__/changedsince-origin-main.declapract.integration.test.ts.snap +8 -0
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-any/autoprune-hooks.declapract.integration.test.ts +104 -0
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-any/bad-practices/old-acceptance-import-paths/.declapract.readme.md +2 -2
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-any/bad-practices/old-acceptance-test-utils/blackbox/lambdas/<star>.ts.declapract.ts +9 -9
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-any/best-practice/package.json +3 -3
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-any/changedsince-origin-main.declapract.integration.test.ts +58 -0
- package/dist/.test/assets/{expo-migration/declarations/practices/tests-any/best-practice → expo-toolchain/declarations/practices/tests-any}/package.json.shell-flags.declapract.integration.test.ts +26 -16
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/.declapract.integration.test.ts +7 -3
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/.test/assets/repo-expo-greenfield/package.json +5 -1
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/__snapshots__/.declapract.integration.test.ts.snap +17 -8
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/__snapshots__/package.json.declapract.integration.test.ts.snap +60 -0
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/best-practice/jest.acceptance.config.ts +5 -0
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/best-practice/jest.integration.config.ts +5 -0
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/best-practice/jest.integration.env.ts +5 -1
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/best-practice/jest.unit.config.ts +5 -0
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/best-practice/jest.unit.env.ts +6 -1
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/best-practice/package.json.declapract.ts +190 -13
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/package.json.declapract.integration.test.ts +94 -0
- package/dist/.test/assets/expo-toolchain/declarations/practices/typescript-expo/__snapshots__/package.json.declapract.integration.test.ts.snap +8 -0
- package/dist/.test/assets/expo-toolchain/declarations/practices/typescript-expo/__snapshots__/tsconfig.json.declapract.integration.test.ts.snap +19 -0
- package/dist/.test/assets/{expo-migration/declarations/practices/typescript-expo/best-practice → expo-toolchain/declarations/practices/typescript-expo}/package.json.declapract.integration.test.ts +15 -2
- package/dist/{practices/typescript-expo/best-practice → .test/assets/expo-toolchain/declarations/practices/typescript-expo}/tsconfig.json.declapract.integration.test.ts +13 -2
- package/dist/.test/assets/format/declarations/declapract.declare.yml +9 -0
- package/dist/.test/assets/format/declarations/practices/format/.declapract.integration.test.ts +131 -0
- package/dist/.test/assets/format/declarations/practices/format/__snapshots__/.declapract.integration.test.ts.snap +17 -0
- package/dist/.test/assets/format/declarations/practices/format/bad-practices/format-script/package.json.declapract.ts +26 -0
- package/dist/.test/assets/format/declarations/practices/format/bad-practices/prettier/.declapract.readme.md +6 -0
- package/dist/.test/assets/format/declarations/practices/format/bad-practices/prettier/.prettierignore +3 -0
- package/dist/.test/assets/format/declarations/practices/format/bad-practices/prettier/.prettierignore.declapract.ts +8 -0
- package/dist/.test/assets/format/declarations/practices/format/bad-practices/prettier/package.json +10 -0
- package/dist/.test/assets/format/declarations/practices/format/bad-practices/prettier/package.json.declapract.ts +35 -0
- package/dist/.test/assets/format/declarations/practices/format/bad-practices/prettier/prettier.config.js +10 -0
- package/dist/.test/assets/format/declarations/practices/format/bad-practices/prettier/prettier.config.js.declapract.ts +8 -0
- package/dist/.test/assets/format/declarations/practices/format/best-practice/package.json.declapract.ts +50 -0
- package/dist/.test/assets/format/declarations/practices/terraform-common/bad-practices/terraform-dir/.declapract.readme.md +8 -0
- package/dist/.test/assets/format/declarations/practices/terraform-common/bad-practices/terraform-dir/provision/terraform/<star><star>/<star>.declapract.ts +17 -0
- package/dist/.test/assets/format/declarations/practices/terraform-common/best-practice/.terraform-version +1 -0
- package/dist/.test/assets/format/declarations/practices/terraform-common/best-practice/package.json +6 -0
- package/dist/.test/assets/format/declarations/practices/terraform-common/best-practice/package.json.declapract.ts +3 -0
- package/dist/.test/assets/format/declarations/useCases.yml +13 -0
- package/dist/.test/assets/format/repo-with-terraform/declapract.use.yml +8 -0
- package/dist/.test/assets/format/repo-with-terraform/package.json +5 -0
- package/dist/.test/assets/format/repo-without-terraform/declapract.use.yml +6 -0
- package/dist/.test/assets/format/repo-without-terraform/package.json +5 -0
- package/dist/.test/assets/node-service/declarations/declapract.declare.yml +4 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/license/package.json.declapract.ts +22 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-client/.declapract.readme.md +55 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-client/package.json +5 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-client/package.json.declapract.ts +27 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-client/src/<star><star>/<star>.ts.declapract.ts +44 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-handlers/.declapract.integration.test.ts +103 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-handlers/.declapract.readme.md +60 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-handlers/.test/assets/demo-repo-with-simple-lambda-handlers/declapract.use.yml +5 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-handlers/.test/assets/demo-repo-with-simple-lambda-handlers/package.json +4 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-handlers/.test/assets/demo-repo-with-simple-lambda-handlers/src/contract/handlers/getWidget.ts +13 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-handlers/__snapshots__/.declapract.integration.test.ts.snap +44 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-handlers/package.json +5 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-handlers/package.json.declapract.ts +27 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/bad-practices/simple-lambda-handlers/src/<star><star>/<star>.ts.declapract.ts +130 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/best-practice/package.json +6 -0
- package/dist/.test/assets/node-service/declarations/practices/node-service/best-practice/package.json.declapract.ts +3 -0
- package/dist/.test/assets/node-service/declarations/useCases.yml +5 -0
- package/dist/.test/assets/pnpm/declarations/practices/pnpm/.declapract.integration.test.ts +163 -13
- package/dist/.test/assets/pnpm/declarations/practices/pnpm/.test/assets/repo-npm-to-pnpm/package.json +1 -1
- package/dist/.test/assets/pnpm/declarations/practices/pnpm/.test/assets/repo-npm-to-pnpm/pnpm-workspace.yaml +3 -0
- package/dist/.test/assets/pnpm/declarations/practices/pnpm/__snapshots__/.declapract.integration.test.ts.snap +9 -2
- package/dist/.test/assets/pnpm/declarations/practices/pnpm/bad-practices/inert-build-allowlist/pnpm-workspace.yaml.declapract.ts +59 -0
- package/dist/.test/assets/pnpm/declarations/practices/pnpm/best-practice/.declapract.readme.md +1 -1
- package/dist/.test/assets/pnpm/declarations/practices/pnpm/best-practice/package.json +1 -1
- package/dist/.test/assets/pnpm/declarations/practices/pnpm/best-practice/package.json.declapract.ts +4 -2
- package/dist/.test/assets/runtime-schemas/declarations/declapract.declare.yml +4 -0
- package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/bad-practices/joi/.declapract.integration.test.ts +102 -0
- package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/bad-practices/joi/.declapract.readme.md +3 -0
- package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/bad-practices/joi/.test/assets/demo-repo-with-joi/declapract.use.yml +5 -0
- package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/bad-practices/joi/.test/assets/demo-repo-with-joi/package.json +4 -0
- package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/bad-practices/joi/.test/assets/demo-repo-with-joi/src/contract/schemas/widget.schema.ts +9 -0
- package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/bad-practices/joi/__snapshots__/.declapract.integration.test.ts.snap +37 -0
- package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/bad-practices/joi/package.json +5 -0
- package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/bad-practices/joi/package.json.declapract.ts +23 -0
- package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/bad-practices/joi/src/<star><star>/<star>.ts.declapract.ts +79 -0
- package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/best-practice/package.json +5 -0
- package/dist/.test/assets/runtime-schemas/declarations/practices/runtime-schemas/best-practice/package.json.declapract.ts +3 -0
- package/dist/.test/assets/runtime-schemas/declarations/useCases.yml +5 -0
- package/dist/.test/assets/tests-service/declarations/declapract.declare.yml +10 -0
- package/dist/.test/assets/tests-service/declarations/practices/tests-service/.test/assets/demo-repo-service/declapract.use.yml +5 -0
- package/dist/.test/assets/tests-service/declarations/practices/tests-service/.test/assets/demo-repo-service/package.json +4 -0
- package/dist/.test/assets/tests-service/declarations/practices/tests-service/__snapshots__/package.json.declapract.integration.test.ts.snap +26 -0
- package/dist/.test/assets/tests-service/declarations/practices/tests-service/asFunctionNameFromTestFileName.ts +7 -0
- package/dist/.test/assets/tests-service/declarations/practices/tests-service/best-practice/.declapract.readme.md +68 -0
- package/dist/.test/assets/tests-service/declarations/practices/tests-service/best-practice/blackbox/<star><star>/<star>.acceptance.test.ts.declapract.ts +3 -0
- package/dist/.test/assets/tests-service/declarations/practices/tests-service/best-practice/blackbox/lambdas/<star>.acceptance.test.ts.declapract.ts +56 -0
- package/dist/.test/assets/tests-service/declarations/practices/tests-service/best-practice/package.json +8 -0
- package/dist/.test/assets/tests-service/declarations/practices/tests-service/best-practice/package.json.declapract.ts +101 -0
- package/dist/.test/assets/tests-service/declarations/practices/tests-service/best-practice/src/<star><star>/<star>.integration.test.ts.declapract.ts +3 -0
- package/dist/.test/assets/tests-service/declarations/practices/tests-service/best-practice/src/<star><star>/<star>.test.ts.declapract.ts +3 -0
- package/dist/.test/assets/tests-service/declarations/practices/tests-service/package.json.declapract.integration.test.ts +204 -0
- package/dist/.test/assets/tests-service/declarations/useCases.yml +9 -0
- package/dist/__snapshots__/ancientTargetPublished.declapract.integration.test.ts.snap +42 -0
- package/dist/__snapshots__/workflowCallerCalleeReconciliation.declapract.integration.test.ts.snap +450 -0
- package/dist/__snapshots__/workflowEnvDeploymentFalse.declapract.integration.test.ts.snap +36 -0
- package/dist/actionPins.declapract.integration.test.ts +3 -18
- package/dist/ancientTargetPublished.declapract.integration.test.ts +174 -0
- package/dist/bestPracticeTemplateParse.declapract.integration.test.ts +169 -0
- package/dist/parsePackageJSONAdoption.declapract.integration.test.ts +136 -0
- package/dist/practiceTestFileLocation.declapract.integration.test.ts +75 -0
- package/dist/practices/cache/.declapract.integration.test.ts +4 -4
- package/dist/practices/cache/.test/assets/repo-with-valid-cache-package/package.json +1 -1
- package/dist/practices/cache/best-practice/package.json +3 -3
- package/dist/practices/cicd-app-react-native-expo/.declapract.integration.test.ts +122 -22
- package/dist/practices/cicd-app-react-native-expo/__snapshots__/.declapract.integration.test.ts.snap +40 -29
- package/dist/practices/cicd-app-react-native-expo/best-practice/.github/workflows/.deploy-expo.yml +16 -6
- package/dist/practices/cicd-app-react-native-expo/best-practice/.github/workflows/deploy.yml +11 -11
- package/dist/practices/cicd-app-react-native-expo/best-practice/.github/workflows/test.yml +3 -5
- package/dist/practices/cicd-app-react-native-expo/best-practice/package.json +2 -2
- package/dist/practices/cicd-common/.declapract.integration.test.ts +25 -0
- package/dist/practices/cicd-common/__snapshots__/.declapract.integration.test.ts.snap +11 -23
- package/dist/practices/cicd-common/__snapshots__/declastruct-insync-grep.declapract.integration.test.ts.snap +3 -0
- package/dist/practices/cicd-common/best-practice/.github/workflows/.declastruct.yml +22 -8
- package/dist/practices/cicd-common/best-practice/.github/workflows/.test.yml +11 -23
- package/dist/practices/cicd-common/best-practice/.github/workflows/.test.yml.declapract.ts +12 -1
- package/dist/practices/cicd-common/best-practice/.github/workflows/report-slow-tests.sh +65 -0
- package/dist/practices/cicd-common/declastruct-insync-grep.declapract.integration.test.ts +49 -0
- package/dist/practices/cicd-common/report-slow-tests.play.declapract.integration.test.ts +144 -0
- package/dist/practices/cicd-package/best-practice/.github/workflows/provision.yml +2 -1
- package/dist/practices/cicd-service/.declapract.integration.test.ts +175 -0
- package/dist/practices/cicd-service/.test/assets/demo-repo-pre-stamped-nords/.github/workflows/provision.yml +110 -0
- package/dist/practices/cicd-service/.test/assets/demo-repo-pre-stamped-nords/declapract.use.nords.yml +20 -0
- package/dist/practices/cicd-service/.test/assets/demo-repo-pre-stamped-nords/declapract.use.rds.yml +20 -0
- package/dist/practices/cicd-service/.test/assets/demo-repo-pre-stamped-nords/package.json +4 -0
- package/dist/practices/cicd-service/.test/assets/demo-repo-service/declapract.use.nords.yml +20 -0
- package/dist/practices/cicd-service/.test/assets/demo-repo-service/declapract.use.rds.yml +20 -0
- package/dist/practices/cicd-service/.test/assets/demo-repo-service/package.json +4 -0
- package/dist/practices/cicd-service/__snapshots__/.declapract.integration.test.ts.snap +24 -0
- package/dist/practices/cicd-service/__snapshots__/acceptanceContempFleetGuard.declapract.integration.test.ts.snap +13 -0
- package/dist/practices/cicd-service/__snapshots__/insync-grep.declapract.integration.test.ts.snap +5 -0
- package/dist/practices/cicd-service/__snapshots__/provision.yml.declapract.integration.test.ts.snap +297 -0
- package/dist/practices/cicd-service/acceptanceContempFleetGuard.declapract.integration.test.ts +89 -0
- package/dist/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.declapract.integration.test.ts +153 -0
- package/dist/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.declapract.readme.md +38 -0
- package/dist/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.github/workflows/provision.yml.declapract.integration.test.ts +167 -0
- package/dist/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.github/workflows/provision.yml.declapract.ts +88 -0
- package/dist/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.test/assets/repo-non-rds/readme.md +9 -0
- package/dist/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.test/assets/repo-with-aws-resources-callee/provision/aws/resources.ts +5 -0
- package/dist/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/.test/assets/repo-with-schema-callee/provision/schema/init.sql +5 -0
- package/dist/practices/cicd-service/bad-practices/rds-jobs-in-non-rds-service/__snapshots__/.declapract.integration.test.ts.snap +183 -0
- package/dist/practices/cicd-service/best-practice/.declapract.readme.md +18 -0
- package/dist/practices/cicd-service/best-practice/.github/workflows/.deploy-sls.yml +32 -11
- package/dist/practices/cicd-service/best-practice/.github/workflows/.sql-schema-control.yml +20 -10
- package/dist/practices/cicd-service/best-practice/.github/workflows/.terraform.yml +14 -4
- package/dist/practices/cicd-service/best-practice/.github/workflows/deploy.yml +17 -9
- package/dist/practices/cicd-service/best-practice/.github/workflows/provision.yml +15 -10
- package/dist/practices/cicd-service/best-practice/.github/workflows/provision.yml.declapract.ts +74 -0
- package/dist/practices/cicd-service/best-practice/package.json +3 -3
- package/dist/practices/cicd-service/insync-grep.declapract.integration.test.ts +76 -0
- package/dist/practices/cicd-service/provision.yml.declapract.integration.test.ts +182 -0
- package/dist/practices/commands/best-practice/package.json +2 -2
- package/dist/practices/commands/best-practice/src/contract/commands/sayHello.ts +3 -2
- package/dist/practices/config/.declapract.integration.test.ts +116 -0
- package/dist/practices/config/.test/assets/demo-repo-with-dev-config/config/dev.json +17 -0
- package/dist/practices/config/.test/assets/demo-repo-with-dev-config/declapract.declare.yml +4 -0
- package/dist/practices/config/.test/assets/demo-repo-with-dev-config/declapract.use.yml +9 -0
- package/dist/practices/config/.test/assets/demo-repo-with-dev-config/package.json +4 -0
- package/dist/practices/config/__snapshots__/.declapract.integration.test.ts.snap +43 -0
- package/dist/practices/config/bad-practices/divergent-config-shapes/config/prep.json.declapract.ts +3 -3
- package/dist/practices/config/bad-practices/divergent-config-shapes/config/prod.json.declapract.ts +3 -3
- package/dist/practices/config/bad-practices/old-dev-config-location/config/dev.json.declapract.ts +10 -12
- package/dist/practices/config/best-practice/package.json +2 -2
- package/dist/practices/config/best-practice/src/utils/config/getConfig.ts +24 -5
- package/dist/practices/config/best-practice/src/utils/config/getOneCacheDirectory.ts +33 -0
- package/dist/practices/config/best-practice/src/utils/config/getOneProjectBucket.ts +22 -0
- package/dist/practices/config/best-practice/src/utils/environment.ts +9 -3
- package/dist/practices/config/best-practice/src/utils/environment.ts.declapract.ts +8 -0
- package/dist/practices/config/no-hand-written-config-type.declapract.integration.test.ts +64 -0
- package/dist/practices/conventional-commits/__snapshots__/commitlint-body-max-line.declapract.integration.test.ts.snap +3 -0
- package/dist/practices/conventional-commits/best-practice/commitlint.config.js +5 -0
- package/dist/practices/conventional-commits/best-practice/package.json +1 -1
- package/dist/practices/conventional-commits/commitlint-body-max-line.declapract.integration.test.ts +49 -0
- package/dist/practices/domain/.declapract.integration.test.ts +115 -0
- package/dist/{.test/assets/expo-migration/declarations/practices/domain/bad-practices/schematic-joi-model/src/domain → practices/domain/bad-practices/schematic-joi-model/src/domain.objects}/<star><star>/<star>.ts.declapract.ts +4 -1
- package/dist/practices/domain/best-practice/package.json +2 -2
- package/dist/practices/domain/best-practice/src/domain.objects/index.ts.declapract.ts +12 -0
- package/dist/practices/environments/.declapract.integration.test.ts +136 -0
- package/dist/practices/environments/__snapshots__/.declapract.integration.test.ts.snap +55 -0
- package/dist/practices/environments/bad-practices/old-dev-scripts/package.json.declapract.ts +6 -4
- package/dist/practices/environments/bad-practices/old-stage-enum/.declapract.integration.test.ts +133 -0
- package/dist/practices/environments/bad-practices/old-stage-enum/.test/assets/demo-repo-with-stage-enum/declapract.use.yml +8 -0
- package/dist/practices/environments/bad-practices/old-stage-enum/.test/assets/demo-repo-with-stage-enum/package.json +4 -0
- package/dist/practices/environments/bad-practices/old-stage-enum/.test/assets/demo-repo-with-stage-enum/src/logic/getDeployTarget.ts +15 -0
- package/dist/practices/environments/bad-practices/old-stage-enum/__snapshots__/.declapract.integration.test.ts.snap +40 -0
- package/dist/practices/environments/bad-practices/old-stage-enum/src/<star><star>/<star>.ts.declapract.ts +291 -24
- package/dist/practices/environments/best-practice/.declapract.readme.md +44 -11
- package/dist/practices/environments/best-practice/src/access/sdks/sdkAwsLambdaEnvAccessAncient.ts +32 -0
- package/dist/practices/environments/best-practice/src/access/sdks/sdkAwsLambdaEnvAccessContemp.ts +14 -0
- package/dist/practices/environments/best-practice/src/utils/environment.ts +3 -2
- package/dist/practices/errors/.declapract.integration.test.ts +121 -0
- package/dist/practices/errors/bad-practices/own-implementation/src/<star><star>/UnexpectedCodePathError.ts.declapract.ts +8 -0
- package/dist/practices/errors/best-practice/package.json +1 -1
- package/dist/practices/format/.declapract.integration.test.ts +131 -0
- package/dist/practices/format/__snapshots__/.declapract.integration.test.ts.snap +17 -0
- package/dist/practices/format/bad-practices/prettier/prettier.config.js.declapract.ts +1 -1
- package/dist/practices/format/best-practice/package.json.declapract.ts +36 -18
- package/dist/practices/git/.declapract.integration.test.ts +57 -6
- package/dist/practices/git/__snapshots__/.declapract.integration.test.ts.snap +2 -0
- package/dist/practices/git/best-practice/.gitattributes.declapract.ts +50 -37
- package/dist/practices/git/best-practice/.gitignore.declapract.ts +8 -0
- package/dist/practices/husky/__snapshots__/check.timestamps.play.declapract.integration.test.ts.snap +7 -0
- package/dist/practices/husky/best-practice/.husky/check.timestamps.sh +11 -2
- package/dist/practices/husky/check.timestamps.play.declapract.integration.test.ts +65 -0
- package/dist/practices/lint/__snapshots__/dpdmrc-exclude-policy.declapract.integration.test.ts.snap +3 -0
- package/dist/practices/lint/bad-practices/depcheck-denylisted-ignores/.depcheckrc.yml.declapract.ts +4 -0
- package/dist/practices/lint/best-practice/.depcheckrc.yml.declapract.ts +10 -9
- package/dist/practices/lint/best-practice/.dpdmrc.yaml +10 -6
- package/dist/practices/lint/dpdmrc-exclude-policy.declapract.integration.test.ts +50 -0
- package/dist/practices/logs/.declapract.integration.test.ts +100 -0
- package/dist/practices/logs/__snapshots__/.declapract.integration.test.ts.snap +33 -0
- package/dist/practices/logs/bad-practices/leveled-term/.test/assets/demo-repo-with-leveled-term/declapract.declare.yml +4 -0
- package/dist/practices/logs/bad-practices/leveled-term/.test/assets/demo-repo-with-leveled-term/declapract.use.yml +2 -0
- package/dist/practices/logs/bad-practices/leveled-term/.test/assets/demo-repo-with-leveled-term/package.json +12 -0
- package/dist/practices/logs/bad-practices/leveled-term/package.json.declapract.ts +56 -12
- package/dist/practices/node/bad-practices/self-deps-not-link/.declapract.integration.test.ts +102 -0
- package/dist/practices/node/bad-practices/self-deps-not-link/.test/assets/demo-repo-with-self-deps/declapract.declare.yml +4 -0
- package/dist/practices/node/bad-practices/self-deps-not-link/.test/assets/demo-repo-with-self-deps/declapract.use.yml +8 -0
- package/dist/practices/node/bad-practices/self-deps-not-link/.test/assets/demo-repo-with-self-deps/package.json +15 -0
- package/dist/practices/node/bad-practices/self-deps-not-link/__snapshots__/.declapract.integration.test.ts.snap +46 -0
- package/dist/practices/node/bad-practices/self-deps-not-link/package.json.declapract.ts +22 -29
- package/dist/practices/node/best-practice/.npmrc.declapract.ts +5 -1
- package/dist/practices/node/best-practice/package.json +1 -1
- package/dist/practices/node-service/bad-practices/simple-lambda-handlers/.declapract.integration.test.ts +103 -0
- package/dist/practices/node-service/bad-practices/simple-lambda-handlers/.declapract.readme.md +8 -0
- package/dist/practices/node-service/bad-practices/simple-lambda-handlers/.test/assets/demo-repo-with-simple-lambda-handlers/declapract.use.yml +5 -0
- package/dist/practices/node-service/bad-practices/simple-lambda-handlers/.test/assets/demo-repo-with-simple-lambda-handlers/package.json +4 -0
- package/dist/practices/node-service/bad-practices/simple-lambda-handlers/.test/assets/demo-repo-with-simple-lambda-handlers/src/contract/handlers/getWidget.ts +13 -0
- package/dist/practices/node-service/bad-practices/simple-lambda-handlers/__snapshots__/.declapract.integration.test.ts.snap +44 -0
- package/dist/practices/node-service/bad-practices/simple-lambda-handlers/src/<star><star>/<star>.ts.declapract.ts +90 -10
- package/dist/practices/node-service/best-practice/package.json +1 -1
- package/dist/practices/package-json-order/best-practice/package.json.declapract.ts +7 -1
- package/dist/practices/persist-with-dynamodb/.declapract.integration.test.ts +92 -0
- package/dist/practices/persist-with-dynamodb/.test/assets/demo-repo-with-divergent-jest-env/declapract.declare.yml +4 -0
- package/dist/practices/persist-with-dynamodb/.test/assets/demo-repo-with-divergent-jest-env/declapract.use.yml +2 -0
- package/dist/practices/persist-with-dynamodb/.test/assets/demo-repo-with-divergent-jest-env/jest.integration.env.ts +4 -0
- package/dist/practices/persist-with-dynamodb/.test/assets/demo-repo-with-divergent-jest-env/package.json +4 -0
- package/dist/practices/persist-with-dynamodb/__snapshots__/.declapract.integration.test.ts.snap +20 -0
- package/dist/practices/persist-with-dynamodb/best-practice/jest.integration.env.ts +3 -3
- package/dist/practices/persist-with-dynamodb/best-practice/package.json +2 -2
- package/dist/practices/persist-with-rds/.declapract.integration.test.ts +224 -0
- package/dist/practices/persist-with-rds/.extensions.sql.declapract.integration.test.ts +38 -0
- package/dist/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/config/dev.json +18 -0
- package/dist/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/declapract.declare.yml +4 -0
- package/dist/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/declapract.use.yml +18 -0
- package/dist/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/package.json +4 -0
- package/dist/practices/persist-with-rds/__snapshots__/.declapract.integration.test.ts.snap +45 -0
- package/dist/practices/persist-with-rds/__snapshots__/.extensions.sql.declapract.integration.test.ts.snap +42 -0
- package/dist/practices/persist-with-rds/__snapshots__/deploy-database-gerunds.declapract.integration.test.ts.snap +102 -0
- package/dist/practices/persist-with-rds/__snapshots__/provision-testdb-access.declapract.integration.test.ts.snap +3 -0
- package/dist/practices/persist-with-rds/__snapshots__/ssm-cicd-param-names.declapract.integration.test.ts.snap +10 -0
- package/dist/practices/persist-with-rds/__snapshots__/testdb-preflight-failloud.declapract.integration.test.ts.snap +30 -0
- package/dist/practices/persist-with-rds/bad-practices/old-dev-config-location/config/dev.json.declapract.ts +22 -8
- package/dist/practices/persist-with-rds/best-practice/.declapract.readme.md +32 -0
- package/dist/practices/persist-with-rds/best-practice/codegen.sql.dao.yml +1 -1
- package/dist/practices/persist-with-rds/best-practice/package.json +5 -5
- package/dist/practices/persist-with-rds/best-practice/provision/aws/readme.md +9 -6
- package/dist/practices/persist-with-rds/best-practice/provision/aws/resources.parameters.ts +38 -14
- package/dist/practices/persist-with-rds/best-practice/provision/aws/resources.ts +6 -3
- package/dist/practices/persist-with-rds/best-practice/provision/docker/testdb/wait-for-postgres.sh +13 -3
- package/dist/practices/persist-with-rds/best-practice/provision/schema/deploy.database.sh +27 -22
- package/dist/practices/persist-with-rds/best-practice/src/utils/config/config.schema.ts +13 -6
- package/dist/practices/persist-with-rds/best-practice/src/utils/database/getOneDatabaseConnection.integration.test.ts +10 -0
- package/dist/practices/persist-with-rds/best-practice/src/utils/database/getOneDatabaseConnection.ts +90 -0
- package/dist/practices/persist-with-rds/best-practice/src/utils/database/withDatabaseContext.ts +12 -4
- package/dist/practices/persist-with-rds/best-practice/src/utils/database/withDatabaseTransaction.ts +16 -4
- package/dist/practices/persist-with-rds/deploy-database-gerunds.declapract.integration.test.ts +57 -0
- package/dist/practices/persist-with-rds/empty-template-declares-zero-clusters.declapract.integration.test.ts +71 -0
- package/dist/practices/persist-with-rds/provision-testdb-access.declapract.integration.test.ts +50 -0
- package/dist/practices/persist-with-rds/ssm-cicd-param-names.declapract.integration.test.ts +73 -0
- package/dist/practices/persist-with-rds/testdb-preflight-failloud.declapract.integration.test.ts +83 -0
- package/dist/practices/pnpm/.declapract.integration.test.ts +163 -13
- package/dist/practices/pnpm/.test/assets/repo-npm-to-pnpm/package.json +1 -1
- package/dist/practices/pnpm/.test/assets/repo-npm-to-pnpm/pnpm-workspace.yaml +3 -0
- package/dist/practices/pnpm/__snapshots__/.declapract.integration.test.ts.snap +9 -2
- package/dist/practices/pnpm/bad-practices/inert-build-allowlist/pnpm-workspace.yaml.declapract.ts +59 -0
- package/dist/practices/pnpm/best-practice/.declapract.readme.md +1 -1
- package/dist/practices/pnpm/best-practice/package.json +1 -1
- package/dist/practices/pnpm/best-practice/package.json.declapract.ts +4 -2
- package/dist/practices/provision-github/best-practice/package.json +2 -2
- package/dist/practices/provision-github/best-practice/provision/github.repo/resources.ts +16 -0
- package/dist/practices/rhachet/.declapract.integration.test.ts +98 -0
- package/dist/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/.agent/repo=.this/role=any/boot.yml +7 -0
- package/dist/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/declapract.declare.yml +4 -0
- package/dist/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/declapract.use.yml +2 -0
- package/dist/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/package.json +4 -0
- package/dist/practices/rhachet/__snapshots__/.declapract.integration.test.ts.snap +45 -0
- package/dist/practices/rhachet/__snapshots__/boot-refs-glossary.declapract.integration.test.ts.snap +6 -0
- package/dist/practices/rhachet/__snapshots__/boot-yml-findsert.declapract.integration.test.ts.snap +27 -0
- package/dist/practices/rhachet/bad-practices/prod-deps/.declapract.readme.md +6 -2
- package/dist/practices/rhachet/bad-practices/prod-deps/.test/assets/demo-repo-with-rhachet-prod-deps/declapract.declare.yml +4 -0
- package/dist/practices/rhachet/bad-practices/prod-deps/.test/assets/demo-repo-with-rhachet-prod-deps/declapract.use.yml +2 -0
- package/dist/practices/rhachet/bad-practices/prod-deps/.test/assets/demo-repo-with-rhachet-prod-deps/package.json +12 -0
- package/dist/practices/rhachet/bad-practices/prod-deps/package.json.declapract.ts +58 -17
- package/dist/practices/rhachet/best-practice/.agent/repo=.this/role=any/boot.yml +46 -0
- package/dist/practices/rhachet/best-practice/.agent/repo=.this/role=any/boot.yml.declapract.ts +165 -0
- package/dist/practices/rhachet/best-practice/.gitignore.declapract.ts +18 -5
- package/dist/practices/rhachet/best-practice/package.json +8 -8
- package/dist/practices/rhachet/boot-refs-glossary.declapract.integration.test.ts +89 -0
- package/dist/practices/rhachet/boot-yml-findsert.declapract.integration.test.ts +145 -0
- package/dist/practices/runtime-schemas/bad-practices/joi/.declapract.integration.test.ts +102 -0
- package/dist/practices/runtime-schemas/bad-practices/joi/.test/assets/demo-repo-with-joi/declapract.use.yml +5 -0
- package/dist/practices/runtime-schemas/bad-practices/joi/.test/assets/demo-repo-with-joi/package.json +4 -0
- package/dist/practices/runtime-schemas/bad-practices/joi/.test/assets/demo-repo-with-joi/src/contract/schemas/widget.schema.ts +9 -0
- package/dist/practices/runtime-schemas/bad-practices/joi/__snapshots__/.declapract.integration.test.ts.snap +37 -0
- package/dist/practices/runtime-schemas/bad-practices/joi/src/<star><star>/<star>.ts.declapract.ts +32 -3
- package/dist/practices/serverless/.declapract.integration.test.ts +230 -0
- package/dist/practices/serverless/.test/assets/demo-repo-with-serverless/declapract.declare.yml +4 -0
- package/dist/practices/serverless/.test/assets/demo-repo-with-serverless/declapract.use.yml +8 -0
- package/dist/practices/serverless/.test/assets/demo-repo-with-serverless/package.json +4 -0
- package/dist/practices/serverless/.test/assets/demo-repo-with-serverless/serverless.yml +8 -0
- package/dist/practices/serverless/__snapshots__/.declapract.integration.test.ts.snap +43 -0
- package/dist/practices/serverless/__snapshots__/cache-grant-stage-globbed.declapract.integration.test.ts.snap +3 -0
- package/dist/practices/serverless/__snapshots__/deployment-bucket-account-scoped.declapract.integration.test.ts.snap +9 -0
- package/dist/practices/serverless/__snapshots__/divergentStageGuard.declapract.integration.test.ts.snap +15 -0
- package/dist/practices/serverless/__snapshots__/serverless.yml.declapract.integration.test.ts.snap +165 -0
- package/dist/practices/serverless/best-practice/.declapract.readme.md +111 -0
- package/dist/practices/serverless/best-practice/package.json +7 -5
- package/dist/practices/serverless/best-practice/serverless.yml +14 -6
- package/dist/practices/serverless/best-practice/serverless.yml.declapract.ts +609 -64
- package/dist/practices/serverless/cache-grant-stage-globbed.declapract.integration.test.ts +69 -0
- package/dist/practices/serverless/deployment-bucket-account-scoped.declapract.integration.test.ts +78 -0
- package/dist/practices/serverless/divergentStageGuard.declapract.integration.test.ts +280 -0
- package/dist/practices/serverless/serverless.yml.declapract.integration.test.ts +1285 -0
- package/dist/practices/terraform-aws/best-practice/provision/aws/environments/prep/main.tf +1 -1
- package/dist/practices/tests-any/__snapshots__/changedsince-origin-main.declapract.integration.test.ts.snap +8 -0
- package/dist/practices/tests-any/autoprune-hooks.declapract.integration.test.ts +104 -0
- package/dist/practices/tests-any/bad-practices/old-acceptance-import-paths/.declapract.readme.md +2 -2
- package/dist/practices/tests-any/bad-practices/old-acceptance-test-utils/blackbox/lambdas/<star>.ts.declapract.ts +9 -9
- package/dist/practices/tests-any/best-practice/package.json +3 -3
- package/dist/practices/tests-any/changedsince-origin-main.declapract.integration.test.ts +58 -0
- package/dist/practices/tests-any/{best-practice/package.json.shell-flags.declapract.integration.test.ts → package.json.shell-flags.declapract.integration.test.ts} +26 -16
- package/dist/practices/tests-expo/.declapract.integration.test.ts +7 -3
- package/dist/practices/tests-expo/.test/assets/repo-expo-greenfield/package.json +5 -1
- package/dist/practices/tests-expo/__snapshots__/.declapract.integration.test.ts.snap +17 -8
- package/dist/practices/tests-expo/__snapshots__/package.json.declapract.integration.test.ts.snap +60 -0
- package/dist/practices/tests-expo/best-practice/jest.acceptance.config.ts +5 -0
- package/dist/practices/tests-expo/best-practice/jest.integration.config.ts +5 -0
- package/dist/practices/tests-expo/best-practice/jest.integration.env.ts +5 -1
- package/dist/practices/tests-expo/best-practice/jest.unit.config.ts +5 -0
- package/dist/practices/tests-expo/best-practice/jest.unit.env.ts +6 -1
- package/dist/practices/tests-expo/best-practice/package.json.declapract.ts +190 -13
- package/dist/practices/tests-expo/package.json.declapract.integration.test.ts +94 -0
- package/dist/practices/tests-node/__snapshots__/livedb-wake-branches.declapract.integration.test.ts.snap +6 -0
- package/dist/practices/tests-node/best-practice/jest.acceptance.config.ts +8 -0
- package/dist/practices/tests-node/best-practice/jest.acceptance.env.ts +16 -26
- package/dist/practices/tests-node/best-practice/jest.acceptance.prepare.ts +36 -0
- package/dist/practices/tests-node/best-practice/jest.integration.config.ts +8 -0
- package/dist/practices/tests-node/best-practice/jest.integration.env.db.ts +90 -0
- package/dist/practices/tests-node/best-practice/jest.integration.env.ts +26 -74
- package/dist/practices/tests-node/best-practice/jest.integration.prepare.ts +33 -0
- package/dist/practices/tests-node/best-practice/jest.unit.config.ts +7 -0
- package/dist/practices/tests-node/best-practice/jest.unit.env.ts +11 -4
- package/dist/practices/tests-node/best-practice/jest.unit.env.ts.declapract.ts +3 -1
- package/dist/practices/tests-node/best-practice/src/.test/useKeyrack.ts +211 -0
- package/dist/practices/tests-node/best-practice/src/.test/useWakeOfLivedb.ts +181 -0
- package/dist/practices/tests-node/best-practice/src/.test/useWakeOfTestdb.ts +71 -0
- package/dist/practices/tests-node/livedb-wake-branches.declapract.integration.test.ts +227 -0
- package/dist/practices/tests-node/livedb-wake-prepare.declapract.integration.test.ts +112 -0
- package/dist/practices/tests-node/testdb-preflight-branches.declapract.integration.test.ts +203 -0
- package/dist/practices/tests-node/testdb-preflight-env.declapract.integration.test.ts +65 -0
- package/dist/practices/tests-service/.test/assets/demo-repo-service/declapract.use.yml +5 -0
- package/dist/practices/tests-service/.test/assets/demo-repo-service/package.json +4 -0
- package/dist/practices/tests-service/__snapshots__/package.json.declapract.integration.test.ts.snap +26 -0
- package/dist/practices/tests-service/asFunctionNameFromTestFileName.ts +7 -0
- package/dist/practices/tests-service/best-practice/.declapract.readme.md +68 -0
- package/dist/practices/tests-service/best-practice/blackbox/lambdas/<star>.acceptance.test.ts.declapract.ts +33 -8
- package/dist/practices/tests-service/best-practice/package.json +4 -1
- package/dist/practices/tests-service/best-practice/package.json.declapract.ts +99 -1
- package/dist/practices/tests-service/package.json.declapract.integration.test.ts +204 -0
- package/dist/practices/typescript-expo/__snapshots__/package.json.declapract.integration.test.ts.snap +8 -0
- package/dist/practices/typescript-expo/__snapshots__/tsconfig.json.declapract.integration.test.ts.snap +19 -0
- package/dist/practices/typescript-expo/{best-practice/package.json.declapract.integration.test.ts → package.json.declapract.integration.test.ts} +15 -2
- package/dist/{.test/assets/expo-migration/declarations/practices/typescript-expo/best-practice → practices/typescript-expo}/tsconfig.json.declapract.integration.test.ts +13 -2
- package/dist/practices/typescript-node/best-practice/package.json.declapract.ts +3 -1
- package/dist/practices/uuid/best-practice/package.json +1 -1
- package/dist/stageAccessBridge.declapract.integration.test.ts +163 -0
- package/dist/utils/asPackageJSON.ts +57 -0
- package/dist/utils/asPrepConfigPath.ts +12 -0
- package/dist/utils/getAllPathsUnderDir.ts +45 -0
- package/dist/utils/getAllPracticesForUsecase.ts +35 -9
- package/dist/utils/migrateDevConfigToPrep.ts +47 -0
- package/dist/utils/readFile.ts +2 -2
- package/dist/workflowCallerCalleeReconciliation.declapract.integration.test.ts +319 -0
- package/dist/workflowEnvDeploymentFalse.declapract.integration.test.ts +173 -0
- package/package.json +10 -9
- package/dist/.test/assets/expo-fullusecase/declarations/practices/domain/best-practice/src/domain/objects/index.ts.declapract.ts +0 -4
- package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-expo/best-practice/package.json +0 -9
- package/dist/.test/assets/expo-migration/declarations/practices/domain/best-practice/src/domain/objects/index.ts.declapract.ts +0 -4
- package/dist/.test/assets/expo-migration/declarations/practices/tests-expo/best-practice/package.json +0 -9
- package/dist/.test/assets/expo-toolchain/declarations/practices/tests-expo/best-practice/package.json +0 -9
- package/dist/practices/config/best-practice/src/utils/config/Config.ts +0 -10
- package/dist/practices/config/best-practice/src/utils/config/Config.ts.declapract.ts +0 -16
- package/dist/practices/config/best-practice/src/utils/config/getCacheDirectory.ts +0 -42
- package/dist/practices/domain/best-practice/src/domain/objects/index.ts.declapract.ts +0 -4
- package/dist/practices/logs/bad-practices/leveled-term/package.json +0 -5
- package/dist/practices/persist-with-rds/best-practice/src/utils/config/Config.ts +0 -26
- package/dist/practices/persist-with-rds/best-practice/src/utils/config/Config.ts.declapract.ts +0 -39
- package/dist/practices/persist-with-rds/best-practice/src/utils/config/config.schema.ts.declapract.ts +0 -49
- package/dist/practices/persist-with-rds/best-practice/src/utils/config/getConfig.ts +0 -2
- package/dist/practices/tests-expo/best-practice/package.json +0 -9
- package/dist/practices/tests-service/defineFunctionNameFromTestFileName.ts +0 -11
- /package/dist/.test/assets/{expo-fullusecase/declarations/practices/errors/bad-practices/own-implementation/src/utils/errors/UnexpectedCodePathError.ts.declapract.ts → cicd-service/declarations/practices/cicd-service/bad-practices/old-names/.github/workflows/deploy-dev-on-main.yml.declapract.ts} +0 -0
- /package/dist/{practices/errors/bad-practices/own-implementation/src/utils/errors/UnexpectedCodePathError.ts.declapract.ts → .test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/old-names/.github/workflows/deploy-prod-on-tag.yml.declapract.ts} +0 -0
- /package/dist/{practices/persist-with-rds/best-practice/src/utils/config/getConfig.ts.declapract.ts → .test/assets/cicd-service/declarations/practices/cicd-service/bad-practices/old-names/.github/workflows/deploy_dev_on_main.yml.declapract.ts} +0 -0
- /package/dist/{practices/persist-with-dynamodb/best-practice/jest.integration.env.ts.declapract.ts → .test/assets/cicd-service/declarations/practices/cicd-service/best-practice/package.json.declapract.ts} +0 -0
- /package/dist/.test/assets/expo/declarations/practices/node/{best-practice/.npmrc.declapract.integration.test.ts → .npmrc.declapract.integration.test.ts} +0 -0
- /package/dist/.test/assets/expo/declarations/practices/node/{best-practice/__snapshots__ → __snapshots__}/.npmrc.declapract.integration.test.ts.snap +0 -0
- /package/dist/.test/assets/expo-fullusecase/declarations/practices/node/{best-practice/.npmrc.declapract.integration.test.ts → .npmrc.declapract.integration.test.ts} +0 -0
- /package/dist/.test/assets/expo-fullusecase/declarations/practices/node/{best-practice/__snapshots__ → __snapshots__}/.npmrc.declapract.integration.test.ts.snap +0 -0
- /package/dist/.test/assets/expo-migration/declarations/practices/node/{best-practice/.npmrc.declapract.integration.test.ts → .npmrc.declapract.integration.test.ts} +0 -0
- /package/dist/.test/assets/expo-migration/declarations/practices/node/{best-practice/__snapshots__ → __snapshots__}/.npmrc.declapract.integration.test.ts.snap +0 -0
- /package/dist/practices/node/{best-practice/.npmrc.declapract.integration.test.ts → .npmrc.declapract.integration.test.ts} +0 -0
- /package/dist/practices/node/{best-practice/__snapshots__ → __snapshots__}/.npmrc.declapract.integration.test.ts.snap +0 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
|
|
4
|
+
import { given, then, when } from 'test-fns';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* .what = clamps #561: the .declastruct.yml apply-gate greps the LOWERCASE marker declastruct
|
|
8
|
+
* actually emits (`🎉 everything is in sync!`), so the in-sync fast path is live, not dead.
|
|
9
|
+
* .why = declastruct's marker is lowercase (planChanges.ts: `context.log.info('🎉 everything is in
|
|
10
|
+
* sync!')`). a capital-E `Everything is in sync` grep is case-sensitive and never matches, so
|
|
11
|
+
* every plan falls to the has-changes-planned=true arm — a fast path dead its whole life. it
|
|
12
|
+
* fails SAFE (over-gates), so no alarm ever fired; a clamp is the only thing that keeps the
|
|
13
|
+
* grep tied to the tool's real output.
|
|
14
|
+
* .teeth = revert the grep to `grep "Everything is in sync"` (capital E) and the "greps the
|
|
15
|
+
* lowercase marker" assertion reddens.
|
|
16
|
+
* .note = the subject is the shipped TEMPLATE, read from __dirname. this file sits at the practice
|
|
17
|
+
* ROOT, so declapract never emits it (per the #583 relocation convention).
|
|
18
|
+
*/
|
|
19
|
+
describe('cicd-common .declastruct.yml in-sync grep', () => {
|
|
20
|
+
given('the shipped .declastruct.yml', () => {
|
|
21
|
+
const yml = readFileSync(
|
|
22
|
+
join(__dirname, 'best-practice/.github/workflows/.declastruct.yml'),
|
|
23
|
+
'utf8',
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
when('the apply-gate grep is read', () => {
|
|
27
|
+
// declastruct emits this literal phrase, lowercase; the workflow must match it verbatim
|
|
28
|
+
const markerLower = 'everything is in sync';
|
|
29
|
+
const markerCapital = 'Everything is in sync';
|
|
30
|
+
|
|
31
|
+
then('it greps the lowercase marker declastruct actually emits', () => {
|
|
32
|
+
expect(yml).toContain(`grep -qF "${markerLower}"`);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
then('it does NOT grep the capital-E form that never matches (#561)', () => {
|
|
36
|
+
expect(yml).not.toContain(markerCapital);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
then('the emitted apply-gate grep line matches snapshot', () => {
|
|
40
|
+
// snapshot the caller-faced contract itself, so a reword that keeps the
|
|
41
|
+
// marker token green (a re-ordered -qF, a re-phrased fallback) reddens a vibecheck
|
|
42
|
+
const grepLine = yml
|
|
43
|
+
.split('\n')
|
|
44
|
+
.find((line) => line.includes('grep -qF "'));
|
|
45
|
+
expect(grepLine?.trim()).toMatchSnapshot('declastruct apply-gate grep');
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
});
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { spawnSync } from 'node:child_process';
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import os from 'node:os';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
|
|
6
|
+
import { given, then, useBeforeAll, when } from 'test-fns';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* .what = integration test for the report-slow-tests shell the .test.yml workflow shells out to.
|
|
10
|
+
* .why = the prior inline report filtered on `perfStats.runtime`, a key jest 30 dropped — so it
|
|
11
|
+
* matched zero rows and went silent-green for its whole life (radio #602). this clamps the
|
|
12
|
+
* go-forward: it reads endTime-startTime, ranks by wall-clock, and — the whole point of the
|
|
13
|
+
* fix — fails LOUD if a future schema change zeroes the durations again, never silent-green.
|
|
14
|
+
* .how = spawn the shipped best-practice/.github/workflows/report-slow-tests.sh against fixture
|
|
15
|
+
* jest-results.json files, with GITHUB_STEP_SUMMARY pointed at a temp file, and assert the
|
|
16
|
+
* exit code, the summary table, and the stdout annotations.
|
|
17
|
+
* .note = subject is the SHIPPED shell template. this file sits at the PRACTICE ROOT (not under
|
|
18
|
+
* best-practice/), so declapract's loader — which walks only best-practice/ for templates —
|
|
19
|
+
* never reads it as a declaration and never copies it to a consumer. it is the play-test
|
|
20
|
+
* counterpart to husky/check.timestamps.play.declapract.integration.test.ts.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
// the shell under test (the distributed best-practice template)
|
|
24
|
+
const scriptPath = path.join(
|
|
25
|
+
__dirname,
|
|
26
|
+
'best-practice/.github/workflows/report-slow-tests.sh',
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
// write a fixture jest-results.json + a fresh summary sink into a temp dir; return their paths
|
|
30
|
+
const genFixture = (
|
|
31
|
+
jestResults: unknown,
|
|
32
|
+
): { resultsPath: string; summaryPath: string } => {
|
|
33
|
+
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'report-slow-tests-'));
|
|
34
|
+
const resultsPath = path.join(dir, 'jest-results.json');
|
|
35
|
+
const summaryPath = path.join(dir, 'step-summary.md');
|
|
36
|
+
fs.writeFileSync(resultsPath, JSON.stringify(jestResults));
|
|
37
|
+
fs.writeFileSync(summaryPath, '');
|
|
38
|
+
return { resultsPath, summaryPath };
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// spawn the report against a fixture; return exit code + stdout + the summary file contents
|
|
42
|
+
const runReport = (
|
|
43
|
+
jestResults: unknown,
|
|
44
|
+
): { code: number | null; stdout: string; summary: string } => {
|
|
45
|
+
const { resultsPath, summaryPath } = genFixture(jestResults);
|
|
46
|
+
const res = spawnSync('bash', [scriptPath, resultsPath], {
|
|
47
|
+
encoding: 'utf-8',
|
|
48
|
+
env: { ...process.env, GITHUB_STEP_SUMMARY: summaryPath },
|
|
49
|
+
});
|
|
50
|
+
return {
|
|
51
|
+
code: res.status,
|
|
52
|
+
stdout: res.stdout,
|
|
53
|
+
summary: fs.readFileSync(summaryPath, 'utf-8'),
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
describe('report-slow-tests', () => {
|
|
58
|
+
given('[case1] a report with a slow (>30s), a medium (>10s), and a fast file', () => {
|
|
59
|
+
when('[t0] the report runs', () => {
|
|
60
|
+
const result = useBeforeAll(() =>
|
|
61
|
+
runReport({
|
|
62
|
+
testResults: [
|
|
63
|
+
{ name: '/repo/src/medium.test.ts', startTime: 1000, endTime: 16000 }, // 15s
|
|
64
|
+
{ name: '/repo/src/fast.test.ts', startTime: 1000, endTime: 3000 }, // 2s
|
|
65
|
+
{ name: '/repo/src/slow.test.ts', startTime: 1000, endTime: 41000 }, // 40s
|
|
66
|
+
],
|
|
67
|
+
}),
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
then('it exits 0', () => {
|
|
71
|
+
expect(result.code).toEqual(0);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
then('the summary carries the ranked table', () => {
|
|
75
|
+
expect(result.summary).toContain('### slowest test files');
|
|
76
|
+
expect(result.summary).toContain('| duration | file |');
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
then('the slowest file is ranked first in the table', () => {
|
|
80
|
+
const slowIdx = result.summary.indexOf('/repo/src/slow.test.ts');
|
|
81
|
+
const mediumIdx = result.summary.indexOf('/repo/src/medium.test.ts');
|
|
82
|
+
const fastIdx = result.summary.indexOf('/repo/src/fast.test.ts');
|
|
83
|
+
expect(slowIdx).toBeGreaterThan(-1);
|
|
84
|
+
expect(slowIdx).toBeLessThan(mediumIdx);
|
|
85
|
+
expect(mediumIdx).toBeLessThan(fastIdx);
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
then('it emits a warn annotation for the >30s file', () => {
|
|
89
|
+
expect(result.stdout).toContain(
|
|
90
|
+
'::warning file=/repo/src/slow.test.ts::slow test: 40s',
|
|
91
|
+
);
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
then('it emits a notice annotation for the >10s file', () => {
|
|
95
|
+
expect(result.stdout).toContain(
|
|
96
|
+
'::notice file=/repo/src/medium.test.ts::test duration: 15s',
|
|
97
|
+
);
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
then('it emits no annotation for the fast file', () => {
|
|
101
|
+
expect(result.stdout).not.toContain('/repo/src/fast.test.ts::');
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
given('[case2] a non-empty report whose durations are all zero (schema drift)', () => {
|
|
107
|
+
// the exact silent-death #602 fixed: testResults present, but no real duration to be read.
|
|
108
|
+
when('[t0] the report runs', () => {
|
|
109
|
+
const result = useBeforeAll(() =>
|
|
110
|
+
runReport({
|
|
111
|
+
testResults: [
|
|
112
|
+
{ name: '/repo/src/a.test.ts', startTime: 1000, endTime: 1000 },
|
|
113
|
+
{ name: '/repo/src/b.test.ts', startTime: 2000, endTime: 2000 },
|
|
114
|
+
],
|
|
115
|
+
}),
|
|
116
|
+
);
|
|
117
|
+
|
|
118
|
+
then('it fails loud with exit 1 (never silent-green)', () => {
|
|
119
|
+
expect(result.code).toEqual(1);
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
then('it prints an error annotation that names the schema drift', () => {
|
|
123
|
+
expect(result.stdout).toContain('::error::');
|
|
124
|
+
expect(result.stdout).toContain('jest --json duration schema');
|
|
125
|
+
expect(result.stdout).toContain('#602');
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
given('[case3] an empty shard (0 test files)', () => {
|
|
131
|
+
when('[t0] the report runs', () => {
|
|
132
|
+
const result = useBeforeAll(() => runReport({ testResults: [] }));
|
|
133
|
+
|
|
134
|
+
then('it exits 0 (an empty shard is legitimate)', () => {
|
|
135
|
+
expect(result.code).toEqual(0);
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
then('the summary states the empty-shard state explicitly', () => {
|
|
139
|
+
expect(result.summary).toContain('0 test files');
|
|
140
|
+
expect(result.summary).toContain('empty shard');
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
});
|
|
@@ -25,7 +25,8 @@ jobs:
|
|
|
25
25
|
wish-path: provision/github.repo/resources.ts
|
|
26
26
|
scope: github
|
|
27
27
|
access: prod # github repo settings are inherently a prod resource
|
|
28
|
-
github-environment-
|
|
28
|
+
github-environment-plan: production-on-else-plan
|
|
29
|
+
github-environment-apply: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) && 'production-on-main' || 'production-on-else-apply' }} # main/tag => on-main; else => on-else-apply
|
|
29
30
|
creds-github-app-owner: ${{ github.repository_owner }}
|
|
30
31
|
creds-github-app-id: ${{ vars.DECLASTRUCT_GITHUB_CONFORMER_APP_ID }}
|
|
31
32
|
secrets:
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
|
|
3
|
+
import { given, then, useBeforeAll, when } from 'test-fns';
|
|
4
|
+
import yaml from 'yaml';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* .what = two clamps on the `deploy.yml` caller:
|
|
8
|
+
* 1. caller↔callee reconciliation — the caller must pass the `pagerduty-integration-key`
|
|
9
|
+
* secret the `.deploy-sls.yml` callee DECLARES and USES, so a prod deploy/acceptance
|
|
10
|
+
* failure actually pages (D29 / #573).
|
|
11
|
+
* 2. prod test-gate precedence — the prod job's `if:` must bind the `needs.test` gate to
|
|
12
|
+
* EVERY trigger branch, so a tag push cannot deploy to prod on a failed test (i014 r11).
|
|
13
|
+
* .why = (1) the callee marks the secret `required: false`, so github never errors when a caller
|
|
14
|
+
* omits it — the omission is SILENT. the callee's `alarm on failure` step gates on
|
|
15
|
+
* `if: failure() && env.PAGERDUTY_INTEGRATION_KEY`, so an unpassed secret leaves the step
|
|
16
|
+
* SKIPPED and every prod alert dead. the current template shipped a `prod` job with no
|
|
17
|
+
* `secrets:` block, and `deploy.yml` is EQUALS — so `declapract fix` STRIPPED the
|
|
18
|
+
* pass-through a consumer had, so its alerts died by conformance. this clamp is the guard
|
|
19
|
+
* github cannot be: it reconciles the caller's pass-through against the callee's declaration.
|
|
20
|
+
* (2) github-actions `&&` binds tighter than `||`, so an `if:` written
|
|
21
|
+
* `(tag) || (access==prod) && always() && (test ok)` parses as `tag || (access && always &&
|
|
22
|
+
* test)` — the test gate binds ONLY to the access branch, so a `v*` TAG PUSH deploys to prod
|
|
23
|
+
* even when `test` FAILED. the correct shape wraps both trigger branches in one outer group:
|
|
24
|
+
* `((tag) || access==prod) && always() && (test ok)`. this is the silent-break class the wish
|
|
25
|
+
* fights — an untested build reaches prod, every gate green. the clamp reads the raw `if:`
|
|
26
|
+
* and reddens on the un-grouped (bug) shape.
|
|
27
|
+
* .note = a filesystem walk → integration suite per `rule.forbid.unit.remote-boundaries`; no
|
|
28
|
+
* credential, no network — the boundary alone classifies it.
|
|
29
|
+
* .note = the secret clamp is scoped to the `prod` job by design. the callee marks the secret
|
|
30
|
+
* `required: false` and the org convention alerts under prod access alone (a prep failure that pages
|
|
31
|
+
* prod would be noise), so a `prep` job legitimately omits it. the reconciliation asserts
|
|
32
|
+
* the ONE call that matters.
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
const WORKFLOWS_DIR = `${__dirname}/best-practice/.github/workflows`;
|
|
36
|
+
const PAGERDUTY_SECRET = 'pagerduty-integration-key';
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* .what = whether the prod job's collapsed `if:` wraps BOTH trigger branches in ONE outer group
|
|
40
|
+
* that the ` && always()` test-gate binds over — the correct precedence.
|
|
41
|
+
* .why = a pure transformer leaf, named so the assertion below reads intent rather than a raw
|
|
42
|
+
* precedence regex a reader must simulate. the buggy single-group shape opens one paren
|
|
43
|
+
* `(startsWith`; the correct shape opens a second, OUTER paren `((startsWith` the
|
|
44
|
+
* ` && always()` gate closes over, so the gate binds to the tag-push branch too, not the
|
|
45
|
+
* access branch alone. mirrors the peer cicd-app-react-native-expo prod-gate clamp.
|
|
46
|
+
*/
|
|
47
|
+
const isProdGateGroupedCorrectly = (input: { collapsedIf: string }): boolean =>
|
|
48
|
+
/\(\(startsWith\(github\.ref, 'refs\/tags\/'\).*\|\| github\.event\.inputs\.access == 'prod'\) &&\s*always\(\)/.test(
|
|
49
|
+
input.collapsedIf,
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
const readWorkflow = (input: { file: string }): { text: string; parsed: any } => {
|
|
53
|
+
const text = readFileSync(`${WORKFLOWS_DIR}/${input.file}`, 'utf-8');
|
|
54
|
+
return { text, parsed: yaml.parse(text) };
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
describe('cicd-service — deploy caller↔callee secret reconciliation (D29 clamp)', () => {
|
|
58
|
+
given('[case1] the `.deploy-sls.yml` callee and the `deploy.yml` caller', () => {
|
|
59
|
+
const scene = useBeforeAll(() => ({
|
|
60
|
+
callee: readWorkflow({ file: '.deploy-sls.yml' }),
|
|
61
|
+
caller: readWorkflow({ file: 'deploy.yml' }),
|
|
62
|
+
}));
|
|
63
|
+
|
|
64
|
+
when('[t0] the callee declares and uses the pagerduty secret', () => {
|
|
65
|
+
then('it declares the secret under `workflow_call.secrets`', () => {
|
|
66
|
+
// guard the shape so an absent `on.workflow_call` fails as a clean red, not a
|
|
67
|
+
// raw TypeError — this file is a durable sentry, a crash undermines that role
|
|
68
|
+
const workflowCall = scene.callee.parsed.on?.workflow_call;
|
|
69
|
+
expect(workflowCall).toBeDefined();
|
|
70
|
+
const declared = workflowCall?.secrets ?? {};
|
|
71
|
+
expect(Object.keys(declared)).toContain(PAGERDUTY_SECRET);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
then('it USES the secret in a step (so an unpassed value is a live gap)', () => {
|
|
75
|
+
expect(scene.callee.text).toContain(`secrets.${PAGERDUTY_SECRET}`);
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
when('[t1] the caller invokes the callee for the prod deploy', () => {
|
|
80
|
+
then('the prod job passes the pagerduty secret through', () => {
|
|
81
|
+
// guard the shape: an absent `jobs.prod` fails as a clean red, not a raw TypeError
|
|
82
|
+
const prodJob = scene.caller.parsed.jobs?.prod;
|
|
83
|
+
expect(prodJob).toBeDefined();
|
|
84
|
+
// teeth: a `prod` job with no `secrets:` block (the shipped defect) leaves this undefined,
|
|
85
|
+
// so the assertion reddens — which is exactly the state that killed prod alerts.
|
|
86
|
+
const prodSecrets = prodJob?.secrets ?? {};
|
|
87
|
+
expect(Object.keys(prodSecrets)).toContain(PAGERDUTY_SECRET);
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
then('the prod job actually calls `.deploy-sls.yml`', () => {
|
|
91
|
+
// guard the shape: a `prod` job absent a `uses:` key leaves this undefined, so assert it
|
|
92
|
+
// is a string first — else `.toContain` on undefined throws a raw TypeError, not a clean
|
|
93
|
+
// red. this file is a durable sentry; a crash undermines that role (r7 i012 nitpick).
|
|
94
|
+
// guards the assertion above from vacuity — it reconciles a REAL call, not a renamed job
|
|
95
|
+
const prodUses = scene.caller.parsed.jobs?.prod?.uses;
|
|
96
|
+
expect(typeof prodUses).toBe('string');
|
|
97
|
+
expect(prodUses).toContain('.deploy-sls.yml');
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
when('[t2] the prod job gates on the test result across every trigger branch', () => {
|
|
102
|
+
// github-actions `&&` binds tighter than `||`. so a prod `if:` written
|
|
103
|
+
// (tag) || (access==prod) && always() && (test ok)
|
|
104
|
+
// parses as tag || (access && always && test) — the test gate binds ONLY to the access
|
|
105
|
+
// branch, and a `v*` TAG PUSH deploys to prod on a FAILED test. the correct shape wraps
|
|
106
|
+
// both trigger branches in one OUTER group the gate applies to:
|
|
107
|
+
// ((tag) || access==prod) && always() && (test ok)
|
|
108
|
+
// `scene` is a useBeforeAll proxy — read it only inside a `then` (post-setup), never at the
|
|
109
|
+
// `when` body level, so each `then` derives the collapsed `if:` string itself.
|
|
110
|
+
const collapseProdIf = (): string =>
|
|
111
|
+
(scene.caller.parsed.jobs?.prod?.if ?? '').replace(/\s+/g, ' ').trim();
|
|
112
|
+
|
|
113
|
+
then('the two trigger branches sit in one outer group the test-gate binds to', () => {
|
|
114
|
+
const collapsed = collapseProdIf();
|
|
115
|
+
// guard the shape: an absent `if` leaves collapsed empty, a clean red not a crash
|
|
116
|
+
expect(collapsed.length).toBeGreaterThan(0);
|
|
117
|
+
// teeth: revert the outer paren and isProdGateGroupedCorrectly reddens.
|
|
118
|
+
expect(isProdGateGroupedCorrectly({ collapsedIf: collapsed })).toEqual(
|
|
119
|
+
true,
|
|
120
|
+
);
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
then('the buggy per-branch group (access alone in parens after `||`) is absent', () => {
|
|
124
|
+
// teeth: the precedence bug wraps the access branch in its OWN parens after the `||`
|
|
125
|
+
// (`|| (github.event.inputs.access == 'prod') &&`), which lets the tag branch stand alone.
|
|
126
|
+
// the correct shape leaves the access branch bare inside the outer group.
|
|
127
|
+
expect(collapseProdIf()).not.toContain(
|
|
128
|
+
"|| (github.event.inputs.access == 'prod') &&",
|
|
129
|
+
);
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
then('the test-result gate itself is present (guards the above from vacuity)', () => {
|
|
133
|
+
expect(collapseProdIf()).toContain(
|
|
134
|
+
"always() && (needs.test.result == 'success' || needs.test.result == 'skipped')",
|
|
135
|
+
);
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
when('[t3] the emitted prod-job contract is snapshotted for review', () => {
|
|
140
|
+
// the regex + toContain clamps above prove the SHAPE; this snapshots the emitted
|
|
141
|
+
// contract itself so a reviewer vibechecks the actual `if:` gate and `secrets:`
|
|
142
|
+
// pass-through, and any drift (a reword, an operand reshuffle, a dropped secret)
|
|
143
|
+
// shows as a diff. per rule.require.contract-snapshot-exhaustiveness.
|
|
144
|
+
then('the prod job `if:` gate matches snapshot', () => {
|
|
145
|
+
const prodIf = scene.caller.parsed.jobs?.prod?.if ?? '';
|
|
146
|
+
expect(prodIf).toMatchSnapshot('deploy.yml prod job if: (test-gate precedence)');
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
then('the prod job `secrets:` pass-through matches snapshot', () => {
|
|
150
|
+
const prodSecrets = scene.caller.parsed.jobs?.prod?.secrets ?? {};
|
|
151
|
+
expect(yaml.stringify(prodSecrets)).toMatchSnapshot(
|
|
152
|
+
'deploy.yml prod job secrets: (pagerduty pass-through)',
|
|
153
|
+
);
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
then('the callee alarm-on-failure step matches snapshot', () => {
|
|
157
|
+
// the pass-through only pages if the callee still gates an alarm step on the secret;
|
|
158
|
+
// snapshot the CONTIGUOUS `alarm on failure` step block — not a line-filter join across the
|
|
159
|
+
// whole file, which spliced the `secrets:` declaration (6-space indent) and this step's
|
|
160
|
+
// env/with lines (10-space indent) into an unparseable, mis-indented fragment. the whole
|
|
161
|
+
// step is valid, uniformly-based yaml, and it still shows both secret usages, so a drop of
|
|
162
|
+
// the step (or of its secret reference) stays diff-visible.
|
|
163
|
+
const alarmBlock =
|
|
164
|
+
scene.callee.text.match(
|
|
165
|
+
/[ \t]*- name: alarm on failure[\s\S]*?pagerduty-dedup-key: github_workflow_failed\n/,
|
|
166
|
+
)?.[0] ?? '';
|
|
167
|
+
// guard vacuity: an empty match would snapshot '' and pass silently on a renamed step
|
|
168
|
+
expect(alarmBlock.length).toBeGreaterThan(0);
|
|
169
|
+
expect(alarmBlock).toMatchSnapshot(
|
|
170
|
+
'.deploy-sls.yml alarm-on-failure step',
|
|
171
|
+
);
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
});
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
name: provision
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- v*
|
|
7
|
+
branches:
|
|
8
|
+
- "main"
|
|
9
|
+
- "master"
|
|
10
|
+
pull_request:
|
|
11
|
+
workflow_dispatch:
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: ${{ github.workflow }}-${{ github.ref }} # per [workflow] x [branch, tag]
|
|
15
|
+
cancel-in-progress: true # cancel workflows for non-latest commits
|
|
16
|
+
|
|
17
|
+
permissions:
|
|
18
|
+
id-token: write # required for oidc; a called workflow cannot exceed its caller's grant
|
|
19
|
+
contents: read
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
aws-test-terraform:
|
|
23
|
+
uses: ./.github/workflows/.terraform.yml
|
|
24
|
+
with:
|
|
25
|
+
working-directory: provision/aws/environments/test
|
|
26
|
+
github-environment-plan: test
|
|
27
|
+
github-environment-apply: test
|
|
28
|
+
creds-aws-region: us-east-1
|
|
29
|
+
creds-aws-role-arn-plan: ${{ vars.CREDS_CICD_AWS_PREP_OIDC_ROLE_ARN }}
|
|
30
|
+
creds-aws-role-arn-apply: ${{ vars.CREDS_CICD_AWS_PREP_OIDC_ROLE_ARN }}
|
|
31
|
+
|
|
32
|
+
aws-prep-terraform:
|
|
33
|
+
uses: ./.github/workflows/.terraform.yml
|
|
34
|
+
with:
|
|
35
|
+
working-directory: provision/aws/environments/prep
|
|
36
|
+
github-environment-plan: prep
|
|
37
|
+
github-environment-apply: prep
|
|
38
|
+
creds-aws-region: us-east-1
|
|
39
|
+
creds-aws-role-arn-plan: ${{ vars.CREDS_CICD_AWS_PREP_OIDC_ROLE_ARN }}
|
|
40
|
+
creds-aws-role-arn-apply: ${{ vars.CREDS_CICD_AWS_PREP_OIDC_ROLE_ARN }}
|
|
41
|
+
|
|
42
|
+
aws-prod-terraform:
|
|
43
|
+
uses: ./.github/workflows/.terraform.yml
|
|
44
|
+
with:
|
|
45
|
+
working-directory: provision/aws/environments/prod
|
|
46
|
+
github-environment-plan: production-on-else-plan
|
|
47
|
+
github-environment-apply: production-on-main # tags cut from main; carries the tag v* deploy policy
|
|
48
|
+
allow-apply: ${{ startsWith(github.ref, 'refs/tags/') }} # only apply to prod on tags
|
|
49
|
+
creds-aws-region: us-east-1
|
|
50
|
+
creds-aws-role-arn-plan: ${{ vars.CREDS_CICD_AWS_PROD_OIDC_PLAN_ROLE_ARN }}
|
|
51
|
+
creds-aws-role-arn-apply: ${{ vars.CREDS_CICD_AWS_PROD_OIDC_APPLY_ROLE_ARN }}
|
|
52
|
+
|
|
53
|
+
github:
|
|
54
|
+
uses: ./.github/workflows/.declastruct.yml
|
|
55
|
+
with:
|
|
56
|
+
wish-path: provision/github.repo/resources.ts
|
|
57
|
+
scope: github
|
|
58
|
+
access: prod # github repo settings are inherently a prod resource
|
|
59
|
+
github-environment-plan: prod
|
|
60
|
+
github-environment-apply: prod
|
|
61
|
+
creds-github-app-owner: ${{ github.repository_owner }}
|
|
62
|
+
creds-github-app-id: ${{ vars.DECLASTRUCT_GITHUB_CONFORMER_APP_ID }}
|
|
63
|
+
secrets:
|
|
64
|
+
creds-github-app-private-key: ${{ secrets.DECLASTRUCT_GITHUB_CONFORMER_APP_PRIVATE_KEY }}
|
|
65
|
+
|
|
66
|
+
sql-schema-prep:
|
|
67
|
+
uses: ./.github/workflows/.sql-schema-control.yml
|
|
68
|
+
with:
|
|
69
|
+
access: prep
|
|
70
|
+
github-environment-plan: prep
|
|
71
|
+
github-environment-apply: prep
|
|
72
|
+
creds-aws-region: us-east-1
|
|
73
|
+
creds-aws-role-arn-plan: ${{ vars.CREDS_CICD_AWS_PREP_OIDC_ROLE_ARN }}
|
|
74
|
+
creds-aws-role-arn-apply: ${{ vars.CREDS_CICD_AWS_PREP_OIDC_ROLE_ARN }}
|
|
75
|
+
|
|
76
|
+
sql-schema-prod:
|
|
77
|
+
uses: ./.github/workflows/.sql-schema-control.yml
|
|
78
|
+
with:
|
|
79
|
+
access: prod
|
|
80
|
+
github-environment-plan: production-on-else-plan
|
|
81
|
+
github-environment-apply: production-on-main # tags cut from main; carries the tag v* deploy policy
|
|
82
|
+
allow-apply: ${{ startsWith(github.ref, 'refs/tags/') }} # only apply to prod on tags
|
|
83
|
+
creds-aws-region: us-east-1
|
|
84
|
+
creds-aws-role-arn-plan: ${{ vars.CREDS_CICD_AWS_PROD_OIDC_PLAN_ROLE_ARN }}
|
|
85
|
+
creds-aws-role-arn-apply: ${{ vars.CREDS_CICD_AWS_PROD_OIDC_APPLY_ROLE_ARN }}
|
|
86
|
+
|
|
87
|
+
aws-prep-declastruct:
|
|
88
|
+
uses: ./.github/workflows/.declastruct.yml
|
|
89
|
+
with:
|
|
90
|
+
wish-path: provision/aws/resources.ts
|
|
91
|
+
scope: aws
|
|
92
|
+
access: prep
|
|
93
|
+
github-environment-plan: prep
|
|
94
|
+
github-environment-apply: prep
|
|
95
|
+
creds-aws-region: us-east-1
|
|
96
|
+
creds-aws-role-arn-plan: ${{ vars.CREDS_CICD_AWS_PREP_OIDC_ROLE_ARN }}
|
|
97
|
+
creds-aws-role-arn-apply: ${{ vars.CREDS_CICD_AWS_PREP_OIDC_ROLE_ARN }}
|
|
98
|
+
|
|
99
|
+
aws-prod-declastruct:
|
|
100
|
+
uses: ./.github/workflows/.declastruct.yml
|
|
101
|
+
with:
|
|
102
|
+
wish-path: provision/aws/resources.ts
|
|
103
|
+
scope: aws
|
|
104
|
+
access: prod
|
|
105
|
+
github-environment-plan: production-on-else-plan
|
|
106
|
+
github-environment-apply: production-on-main # tags cut from main; carries the tag v* deploy policy
|
|
107
|
+
allow-apply: ${{ startsWith(github.ref, 'refs/tags/') }} # only apply to prod on tags
|
|
108
|
+
creds-aws-region: us-east-1
|
|
109
|
+
creds-aws-role-arn-plan: ${{ vars.CREDS_CICD_AWS_PROD_OIDC_PLAN_ROLE_ARN }}
|
|
110
|
+
creds-aws-role-arn-apply: ${{ vars.CREDS_CICD_AWS_PROD_OIDC_APPLY_ROLE_ARN }}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declarations: 'declarations/declapract.declare.yml'
|
|
2
|
+
useCase: service-without-rds
|
|
3
|
+
variables:
|
|
4
|
+
organizationName: 'test-org'
|
|
5
|
+
projectName: 'test-project'
|
|
6
|
+
infrastructureNamespaceId: 'testns'
|
|
7
|
+
slackWebhookUrl: 'https://hooks.slack.example.com/test'
|
|
8
|
+
awsAccountId:
|
|
9
|
+
prep: '123456789012'
|
|
10
|
+
prod: '123456789012'
|
|
11
|
+
databaseName: 'testdb'
|
|
12
|
+
databaseUserName:
|
|
13
|
+
cicdUser: 'cicd_user'
|
|
14
|
+
serviceUser: 'service_user'
|
|
15
|
+
databaseTunnelHost:
|
|
16
|
+
prep: 'tunnel.prep.example.com'
|
|
17
|
+
prod: 'tunnel.prod.example.com'
|
|
18
|
+
databaseClusterHost:
|
|
19
|
+
prep: 'cluster.prep.example.com'
|
|
20
|
+
prod: 'cluster.prod.example.com'
|
package/dist/practices/cicd-service/.test/assets/demo-repo-pre-stamped-nords/declapract.use.rds.yml
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declarations: 'declarations/declapract.declare.yml'
|
|
2
|
+
useCase: service-with-rds
|
|
3
|
+
variables:
|
|
4
|
+
organizationName: 'test-org'
|
|
5
|
+
projectName: 'test-project'
|
|
6
|
+
infrastructureNamespaceId: 'testns'
|
|
7
|
+
slackWebhookUrl: 'https://hooks.slack.example.com/test'
|
|
8
|
+
awsAccountId:
|
|
9
|
+
prep: '123456789012'
|
|
10
|
+
prod: '123456789012'
|
|
11
|
+
databaseName: 'testdb'
|
|
12
|
+
databaseUserName:
|
|
13
|
+
cicdUser: 'cicd_user'
|
|
14
|
+
serviceUser: 'service_user'
|
|
15
|
+
databaseTunnelHost:
|
|
16
|
+
prep: 'tunnel.prep.example.com'
|
|
17
|
+
prod: 'tunnel.prod.example.com'
|
|
18
|
+
databaseClusterHost:
|
|
19
|
+
prep: 'cluster.prep.example.com'
|
|
20
|
+
prod: 'cluster.prod.example.com'
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declarations: 'declarations/declapract.declare.yml'
|
|
2
|
+
useCase: service-without-rds
|
|
3
|
+
variables:
|
|
4
|
+
organizationName: 'test-org'
|
|
5
|
+
projectName: 'test-project'
|
|
6
|
+
infrastructureNamespaceId: 'testns'
|
|
7
|
+
slackWebhookUrl: 'https://hooks.slack.example.com/test'
|
|
8
|
+
awsAccountId:
|
|
9
|
+
prep: '123456789012'
|
|
10
|
+
prod: '123456789012'
|
|
11
|
+
databaseName: 'testdb'
|
|
12
|
+
databaseUserName:
|
|
13
|
+
cicdUser: 'cicd_user'
|
|
14
|
+
serviceUser: 'service_user'
|
|
15
|
+
databaseTunnelHost:
|
|
16
|
+
prep: 'tunnel.prep.example.com'
|
|
17
|
+
prod: 'tunnel.prod.example.com'
|
|
18
|
+
databaseClusterHost:
|
|
19
|
+
prep: 'cluster.prep.example.com'
|
|
20
|
+
prod: 'cluster.prod.example.com'
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declarations: 'declarations/declapract.declare.yml'
|
|
2
|
+
useCase: service-with-rds
|
|
3
|
+
variables:
|
|
4
|
+
organizationName: 'test-org'
|
|
5
|
+
projectName: 'test-project'
|
|
6
|
+
infrastructureNamespaceId: 'testns'
|
|
7
|
+
slackWebhookUrl: 'https://hooks.slack.example.com/test'
|
|
8
|
+
awsAccountId:
|
|
9
|
+
prep: '123456789012'
|
|
10
|
+
prod: '123456789012'
|
|
11
|
+
databaseName: 'testdb'
|
|
12
|
+
databaseUserName:
|
|
13
|
+
cicdUser: 'cicd_user'
|
|
14
|
+
serviceUser: 'service_user'
|
|
15
|
+
databaseTunnelHost:
|
|
16
|
+
prep: 'tunnel.prep.example.com'
|
|
17
|
+
prod: 'tunnel.prod.example.com'
|
|
18
|
+
databaseClusterHost:
|
|
19
|
+
prep: 'cluster.prep.example.com'
|
|
20
|
+
prod: 'cluster.prod.example.com'
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
+
|
|
3
|
+
exports[`cicd-service — deploy caller↔callee secret reconciliation (D29 clamp) given: [case1] the \`.deploy-sls.yml\` callee and the \`deploy.yml\` caller when: [t3] the emitted prod-job contract is snapshotted for review then: the callee alarm-on-failure step matches snapshot: .deploy-sls.yml alarm-on-failure step 1`] = `
|
|
4
|
+
" - name: alarm on failure
|
|
5
|
+
env:
|
|
6
|
+
PAGERDUTY_INTEGRATION_KEY: \${{ secrets.pagerduty-integration-key }}
|
|
7
|
+
if: failure() && env.PAGERDUTY_INTEGRATION_KEY
|
|
8
|
+
uses: Entle/action-pagerduty-alert@e6ca54cd88948b8a50f5bb1071dfa5bdb149ce7e # 0.2.0 — https://github.com/marketplace/actions/pagerduty-alert
|
|
9
|
+
with:
|
|
10
|
+
pagerduty-integration-key: "\${{ secrets.pagerduty-integration-key }}"
|
|
11
|
+
pagerduty-dedup-key: github_workflow_failed
|
|
12
|
+
"
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
exports[`cicd-service — deploy caller↔callee secret reconciliation (D29 clamp) given: [case1] the \`.deploy-sls.yml\` callee and the \`deploy.yml\` caller when: [t3] the emitted prod-job contract is snapshotted for review then: the prod job \`if:\` gate matches snapshot: deploy.yml prod job if: (test-gate precedence) 1`] = `
|
|
16
|
+
"((startsWith(github.ref, 'refs/tags/') && github.event_name != 'workflow_dispatch') || github.event.inputs.access == 'prod') &&
|
|
17
|
+
always() && (needs.test.result == 'success' || needs.test.result == 'skipped')
|
|
18
|
+
"
|
|
19
|
+
`;
|
|
20
|
+
|
|
21
|
+
exports[`cicd-service — deploy caller↔callee secret reconciliation (D29 clamp) given: [case1] the \`.deploy-sls.yml\` callee and the \`deploy.yml\` caller when: [t3] the emitted prod-job contract is snapshotted for review then: the prod job \`secrets:\` pass-through matches snapshot: deploy.yml prod job secrets: (pagerduty pass-through) 1`] = `
|
|
22
|
+
"pagerduty-integration-key: \${{ secrets.PAGERDUTY_INTEGRATION_KEY }}
|
|
23
|
+
"
|
|
24
|
+
`;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
+
|
|
3
|
+
exports[`contemp-only acceptance guard — the shipped deploy template cannot re-split into a dual fleet fan-out given: [case2] the acceptance-job block as a whole when: [t0] the block is read from the shipped deploy template then: the acceptance-job block matches snapshot (a reworded step reddens): deploy-sls acceptance-job block 1`] = `
|
|
4
|
+
" # acceptance targets the contemp fleet — the service's own access-tier slug (-prep- at prep,
|
|
5
|
+
# -prod- at prod). dual-publish ships the SAME artifact under the ancient (-dev-) slug too, so
|
|
6
|
+
# a run against contemp proves the deployed code; the ancient slug is an alias for inbound
|
|
7
|
+
# callers still on the old name, never a second target to test. contemp maps to the deployed
|
|
8
|
+
# access at both prep and prod, so one run covers every tier this job deploys — no
|
|
9
|
+
# per-fleet fan-out, no per-tier skip.
|
|
10
|
+
- name: test:acceptance
|
|
11
|
+
run: ACCESS=\${{ inputs.access }} npm run test:acceptance
|
|
12
|
+
"
|
|
13
|
+
`;
|
package/dist/practices/cicd-service/__snapshots__/insync-grep.declapract.integration.test.ts.snap
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
+
|
|
3
|
+
exports[`cicd-service apply-gate in-sync greps given: the shipped .sql-schema-control.yml when: the apply-gate grep is read then: the emitted apply-gate grep line matches snapshot: sql-schema-control apply-gate grep 1`] = `"if grep "connect ETIMEDOUT" ./plan.log"`;
|
|
4
|
+
|
|
5
|
+
exports[`cicd-service apply-gate in-sync greps given: the shipped .terraform.yml when: the apply-gate grep is read then: the emitted apply-gate grep line matches snapshot: terraform apply-gate grep 1`] = `"if grep "infrastructure matches the configuration" ./plan.log"`;
|