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,230 @@
|
|
|
1
|
+
import fs from 'fs/promises';
|
|
2
|
+
import { readFileSync } from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
|
|
5
|
+
import { executeApply } from 'declapract';
|
|
6
|
+
import { genTempDir, given, then, useBeforeAll, useThen, when } from 'test-fns';
|
|
7
|
+
|
|
8
|
+
jest.setTimeout(180_000);
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* .what = holds the serverless `package.json` deploy commands to the dual-publish split —
|
|
12
|
+
* the council-gated fulcrum that a wrong guess would ship as a permanent 2×-deploy.
|
|
13
|
+
* .why = the `package.json` is a CONTAINS template with no `fix`, so no unit test covers it.
|
|
14
|
+
* per `rule.require.clamp-edge-cases`, the deploy-split (and the contemp prune it needs)
|
|
15
|
+
* owes a clamp. this reads the template + pins the split shape.
|
|
16
|
+
* .note = INTEGRATION by `rule.forbid.unit.remote-boundaries`: it reads the filesystem (the
|
|
17
|
+
* template file). no credential, no network.
|
|
18
|
+
* .teeth = (a) `deploy:release` MUST invoke BOTH halves — a revert to a single-fleet release
|
|
19
|
+
* reddens it; (b) `deploy:prune` MUST also prune the contemp `-prep-` fleet — a revert
|
|
20
|
+
* to the ancient-only prune (the B1 leak) reddens it.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
const PACKAGE_JSON_PATH = `${__dirname}/best-practice/package.json`;
|
|
24
|
+
const SERVERLESS_YML_PATH = `${__dirname}/best-practice/serverless.yml`;
|
|
25
|
+
|
|
26
|
+
describe('serverless practice — the dual-publish deploy split (north-star clamp)', () => {
|
|
27
|
+
given('[case1] the shipped serverless package.json template', () => {
|
|
28
|
+
const scene = useBeforeAll(() => ({
|
|
29
|
+
scripts: JSON.parse(readFileSync(PACKAGE_JSON_PATH, 'utf8')).scripts as Record<
|
|
30
|
+
string,
|
|
31
|
+
string
|
|
32
|
+
>,
|
|
33
|
+
}));
|
|
34
|
+
|
|
35
|
+
when('[t0] the deploy commands are read', () => {
|
|
36
|
+
then('the ancient release publishes the dev-below-prod slug', () => {
|
|
37
|
+
expect(scene.scripts['deploy:release:ancient']).toContain(
|
|
38
|
+
"[ \"${ACCESS:-}\" = 'prep' ] && echo 'dev'",
|
|
39
|
+
);
|
|
40
|
+
expect(scene.scripts['deploy:release:ancient']).toContain(
|
|
41
|
+
'--stage "${SLS_STAGE:-}"',
|
|
42
|
+
);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
then('the contemp release publishes the prep slug', () => {
|
|
46
|
+
expect(scene.scripts['deploy:release:contemp']).toContain('--stage prep');
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
then('deploy:release runs BOTH fleets (the dual-publish teeth)', () => {
|
|
50
|
+
expect(scene.scripts['deploy:release']).toContain(
|
|
51
|
+
'npm run deploy:release:ancient',
|
|
52
|
+
);
|
|
53
|
+
expect(scene.scripts['deploy:release']).toContain(
|
|
54
|
+
'npm run deploy:release:contemp',
|
|
55
|
+
);
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
then('deploy:prod publishes the ancient fleet only (prod is prod on both axes)', () => {
|
|
59
|
+
expect(scene.scripts['deploy:prod']).toContain(
|
|
60
|
+
'npm run deploy:release:ancient',
|
|
61
|
+
);
|
|
62
|
+
expect(scene.scripts['deploy:prod']).not.toContain(
|
|
63
|
+
'npm run deploy:release:contemp',
|
|
64
|
+
);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
then('deploy:prune also prunes the contemp -prep- fleet (the B1 leak clamp)', () => {
|
|
68
|
+
expect(scene.scripts['deploy:prune']).toContain('--stage prep');
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
given('[case2] the shipped serverless.yml template', () => {
|
|
74
|
+
const scene = useBeforeAll(() => ({
|
|
75
|
+
yml: readFileSync(SERVERLESS_YML_PATH, 'utf8'),
|
|
76
|
+
}));
|
|
77
|
+
|
|
78
|
+
when('[t0] the domain-driven-cache IAM grant is read', () => {
|
|
79
|
+
then('it grants the cache family with the stage segment globbed (#597)', () => {
|
|
80
|
+
// the shared cache is one table addressed by a single name (below prod that name is -dev-);
|
|
81
|
+
// a globbed grant covers -dev-, -prep-, -prod- in one line, so the contemp -prep- fleet's
|
|
82
|
+
// -dev- cache read is authorized. supersedes the earlier D27 two-line stage+access grant.
|
|
83
|
+
expect(scene.yml).toContain(
|
|
84
|
+
'table/infrastructure-*-table-domain-driven-cache',
|
|
85
|
+
);
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
then('no stage- or access-templated cache grant survives (the #597 teeth)', () => {
|
|
89
|
+
// a templated grant covers only the deployed fleet's own slug — the exact #597 break where
|
|
90
|
+
// the contemp -prep- fleet AccessDenied on the shared -dev- cache. the glob replaces both.
|
|
91
|
+
expect(scene.yml).not.toContain(
|
|
92
|
+
'table/infrastructure-${self:provider.stage}-table-domain-driven-cache',
|
|
93
|
+
);
|
|
94
|
+
expect(scene.yml).not.toContain(
|
|
95
|
+
'table/infrastructure-${self:custom.access}-table-domain-driven-cache',
|
|
96
|
+
);
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
then('the glue-db grants read the single hoisted custom.access var (D: no 4x dup)', () => {
|
|
100
|
+
// teeth: the accessByStage lookup is declared ONCE, as custom.access; a partial edit that
|
|
101
|
+
// re-inlined the lookup at one arn site (and missed another) is the D27-reopen hazard.
|
|
102
|
+
expect(scene.yml).toContain(
|
|
103
|
+
"access: ${self:custom.accessByStage.${opt:stage}, 'prep'}",
|
|
104
|
+
);
|
|
105
|
+
// exactly one occurrence of the raw accessByStage lookup — the hoisted var, nowhere else
|
|
106
|
+
expect(
|
|
107
|
+
(scene.yml.match(/accessByStage\.\$\{opt:stage\}/g) || []).length,
|
|
108
|
+
).toBe(1);
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
when('[t1] the glue db + table IAM grants are read', () => {
|
|
113
|
+
// the vision names the cache AND the glue db as the SAME stage/access disease (D27). the
|
|
114
|
+
// cache dual-grant alone is a point-fix; the glue db + table owe the identical dual-grant, or
|
|
115
|
+
// the ancient stack's access-keyed glue lookup 403s exactly the way the cache did.
|
|
116
|
+
then('the glue db grants BOTH the stage-keyed and access-keyed name', () => {
|
|
117
|
+
expect(scene.yml).toContain(
|
|
118
|
+
'database/@declapract{variable.databaseName}_${self:provider.stage}',
|
|
119
|
+
);
|
|
120
|
+
// teeth: drop the access-keyed glue db grant and the glue instance of D27 reopens.
|
|
121
|
+
expect(scene.yml).toContain(
|
|
122
|
+
'database/@declapract{variable.databaseName}_${self:custom.access}',
|
|
123
|
+
);
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
then('the glue table grants BOTH the stage-keyed and access-keyed name', () => {
|
|
127
|
+
expect(scene.yml).toContain(
|
|
128
|
+
'table/@declapract{variable.databaseName}_${self:provider.stage}/*',
|
|
129
|
+
);
|
|
130
|
+
// teeth: drop the access-keyed glue table grant and the glue instance of D27 reopens.
|
|
131
|
+
expect(scene.yml).toContain(
|
|
132
|
+
'table/@declapract{variable.databaseName}_${self:custom.access}/*',
|
|
133
|
+
);
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* .what = end-to-end proof of the serverless.yml fix through the REAL declapract apply pipeline,
|
|
141
|
+
* run against a genTempDir clone of a legacy consumer repo.
|
|
142
|
+
* .why = serverless.yml.declapract.ts is a 17-transform fold of regex-over-structured-text
|
|
143
|
+
* rewrites — per rule.require.declapract-integration-tests a transform-blocks fix REQUIRES
|
|
144
|
+
* a test that runs the REAL executeApply, not a static template read. this proves what the
|
|
145
|
+
* unit suite cannot: the `.declapract.ts` companion matched to `best-practice/serverless.yml`,
|
|
146
|
+
* the file glob→match, the emitted file a consumer receives on disk, and a second-apply
|
|
147
|
+
* fixed point.
|
|
148
|
+
* .note = INTEGRATION: reads the filesystem + runs executeApply against a temp clone. no credential,
|
|
149
|
+
* no network. the fixture lives under a `.test` dot-dir (excluded from tsconfig/jest globs),
|
|
150
|
+
* and mounts THIS repo's real `src` via the `src`→`src` symlink so declapract resolves the
|
|
151
|
+
* serverless practice from source.
|
|
152
|
+
* .teeth = the env-block trio proves the CHAIN ORDER: withConnectionReuse anchors the legacy
|
|
153
|
+
* NODE_ENV form and MUST run before withNodeEnvProduction rewrites that value to
|
|
154
|
+
* `production`. so the presence of the connection-reuse flag beside a `NODE_ENV: production`
|
|
155
|
+
* line proves the order held — a reorder that ran the production rewrite first would erase
|
|
156
|
+
* the anchor and the flag would never land (the r007.b3 order-dependence clamp + the
|
|
157
|
+
* r001.b1 pipeline clamp in one).
|
|
158
|
+
*/
|
|
159
|
+
describe('serverless practice — the real executeApply pipeline (r001.b1)', () => {
|
|
160
|
+
given('[case1] a legacy consumer serverless.yml (old runtime, legacy env block)', () => {
|
|
161
|
+
const tempDir = genTempDir({
|
|
162
|
+
slug: 'declapract-serverless-fix',
|
|
163
|
+
clone: './src/practices/serverless/.test/assets/demo-repo-with-serverless',
|
|
164
|
+
symlink: [{ at: 'src', to: 'src' }],
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
const ymlPath = 'serverless.yml';
|
|
168
|
+
const read = () => fs.readFile(path.join(tempDir, ymlPath), 'utf-8');
|
|
169
|
+
const applyFix = () =>
|
|
170
|
+
executeApply({
|
|
171
|
+
config: path.join(tempDir, 'declapract.use.yml'),
|
|
172
|
+
practice: 'serverless',
|
|
173
|
+
file: ymlPath,
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
when('[t0] the legacy input (before any fix)', () => {
|
|
177
|
+
then('the serverless.yml input matches snapshot', async () => {
|
|
178
|
+
expect(await read()).toMatchSnapshot('serverless.yml — before');
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
when('[t1] the serverless fix is applied', () => {
|
|
183
|
+
useThen('apply the serverless fix', async () => applyFix());
|
|
184
|
+
|
|
185
|
+
then('the node runtime is bumped to the pinned major', async () => {
|
|
186
|
+
const yml = await read();
|
|
187
|
+
expect(yml).toContain('runtime: nodejs22.x');
|
|
188
|
+
expect(yml).not.toContain('nodejs14.x');
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
then('the legacy NODE_ENV value is rewritten to production', async () => {
|
|
192
|
+
const yml = await read();
|
|
193
|
+
expect(yml).toContain('NODE_ENV: production');
|
|
194
|
+
expect(yml).not.toContain('stageToNodeEnvMapping');
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
then('the connection-reuse flag lands beside the production NODE_ENV (chain-order teeth)', async () => {
|
|
198
|
+
const yml = await read();
|
|
199
|
+
// withConnectionReuse ran BEFORE withNodeEnvProduction: it anchored the legacy NODE_ENV form
|
|
200
|
+
// and inserted the flag on the next line, then the production rewrite hit the same line. the
|
|
201
|
+
// flag on the line after `NODE_ENV: production` proves the order held.
|
|
202
|
+
expect(yml).toContain(
|
|
203
|
+
'NODE_ENV: production # deploy with production optimizations of all resources, to make `prep` and `prod` stage deployments equivalent functionally (i.e., the same code paths in prep and prod)\n AWS_NODEJS_CONNECTION_REUSE_ENABLED: true',
|
|
204
|
+
);
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
then('the utc timezone guard is inserted under the env block', async () => {
|
|
208
|
+
const yml = await read();
|
|
209
|
+
expect(yml).toContain('TZ: UTC # guarantee');
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
then('the emitted file matches snapshot', async () => {
|
|
213
|
+
expect(await read()).toMatchSnapshot('serverless.yml — after');
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
when('[t2] the fix is applied a second time (idempotency)', () => {
|
|
218
|
+
const passes = useThen('a second fix over its own output', async () => {
|
|
219
|
+
const before = await read(); // post-first-fix
|
|
220
|
+
await applyFix(); // second apply
|
|
221
|
+
const after = await read();
|
|
222
|
+
return { before, after };
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
then('the second fix is a no-op', () => {
|
|
226
|
+
expect(passes.after).toEqual(passes.before);
|
|
227
|
+
});
|
|
228
|
+
});
|
|
229
|
+
});
|
|
230
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
+
|
|
3
|
+
exports[`serverless practice — the real executeApply pipeline (r001.b1) given: [case1] a legacy consumer serverless.yml (old runtime, legacy env block) when: [t0] the legacy input (before any fix) then: the serverless.yml input matches snapshot: serverless.yml — before 1`] = `
|
|
4
|
+
"service: test-project
|
|
5
|
+
|
|
6
|
+
provider:
|
|
7
|
+
name: aws
|
|
8
|
+
runtime: nodejs14.x
|
|
9
|
+
stage: \${opt:stage}
|
|
10
|
+
environment:
|
|
11
|
+
NODE_ENV: \${self:custom.stageToNodeEnvMapping.\${self:provider.stage}}
|
|
12
|
+
"
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
exports[`serverless practice — the real executeApply pipeline (r001.b1) given: [case1] a legacy consumer serverless.yml (old runtime, legacy env block) when: [t1] the serverless fix is applied then: the emitted file matches snapshot: serverless.yml — after 1`] = `
|
|
16
|
+
"# @declapract:review — could not auto-insert \`ACCESS: \${self:custom.access}\` + \`COMMIT: \${env:COMMIT}\` under \`environment:\` because no \`STAGE: \${self:provider.stage}\` env var was present to convert; add both as children of your \`environment:\` block by hand — the failing \`declapract plan\` diff names them.
|
|
17
|
+
service: test-project
|
|
18
|
+
|
|
19
|
+
variablesResolutionMode: 20210326
|
|
20
|
+
|
|
21
|
+
package:
|
|
22
|
+
artifact: .artifact/contents.zip
|
|
23
|
+
|
|
24
|
+
plugins:
|
|
25
|
+
- serverless-prune-plugin
|
|
26
|
+
|
|
27
|
+
custom:
|
|
28
|
+
accessByStage:
|
|
29
|
+
dev: prep # stage=dev deploys to $service-dev but uses ACCESS=prep (config/prep.json)
|
|
30
|
+
prep: prep # stage=prep deploys to $service-prep also with ACCESS=prep; one service answers to both the -dev and -prep fleets while callers migrate
|
|
31
|
+
prod: prod
|
|
32
|
+
access: \${self:custom.accessByStage.\${opt:stage}, 'prep'} # the resolved access for this deploy — one source, referenced by the ACCESS env var + every access-keyed resource arn below, so a partial edit cannot re-split the stage/access axes
|
|
33
|
+
|
|
34
|
+
provider:
|
|
35
|
+
name: aws
|
|
36
|
+
runtime: nodejs22.x
|
|
37
|
+
stage: \${opt:stage}
|
|
38
|
+
environment:
|
|
39
|
+
TZ: UTC # guarantee that utc timezone will be used explicitly, to facilitate a pit of success
|
|
40
|
+
NODE_ENV: production # deploy with production optimizations of all resources, to make \`prep\` and \`prod\` stage deployments equivalent functionally (i.e., the same code paths in prep and prod)
|
|
41
|
+
AWS_NODEJS_CONNECTION_REUSE_ENABLED: true # https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/node-reusing-connections.html
|
|
42
|
+
"
|
|
43
|
+
`;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
+
|
|
3
|
+
exports[`serverless shared-cache IAM grant globs the stage segment (#597) given: [case1] the shared domain-driven cache grant when: [t0] serverless.yml is read then: the emitted cache grant line matches snapshot: serverless cache IAM grant 1`] = `"- arn:aws:dynamodb:\${aws:region}:\${aws:accountId}:table/infrastructure-*-table-domain-driven-cache # global cache: one SHARED table, name-globbed so every fleet's role can read it — see .declapract.readme.md"`;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
+
|
|
3
|
+
exports[`serverless deployment bucket is account-scoped by stage (#596) given: [case2] the provider.deploymentBucket reference when: [t0] serverless.yml is read then: the emitted deploymentBucketByStage map matches snapshot: serverless deploymentBucketByStage map 1`] = `
|
|
4
|
+
" deploymentBucketByStage: # the deployment bucket is ACCOUNT-scoped: it must live in the account the deploy role assumes, so it is keyed by stage like accessByStage above
|
|
5
|
+
dev: serverless-deployment-@declapract{variable.infrastructureNamespaceId}-dev # prep-account bucket
|
|
6
|
+
prep: serverless-deployment-@declapract{variable.infrastructureNamespaceId}-dev # prep-account bucket, shared with the -dev fleet, so no separate -prep bucket need exist
|
|
7
|
+
prod: serverless-deployment-@declapract{variable.infrastructureNamespaceId}-prod # prod-account bucket — a prod deploy assumes the prod-account oidc role, which has no cross-account grant to the prep-account -dev bucket
|
|
8
|
+
"
|
|
9
|
+
`;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
+
|
|
3
|
+
exports[`divergent-stage guard — the shipped templates cannot re-split the stage/access axis given: [case4] the deploy-command ACCESS fall-through when: [t0] every deploy command that derives SLS_STAGE is read then: the shipped deploy commands match snapshot (a reworded message reddens): serverless deploy commands 1`] = `
|
|
4
|
+
{
|
|
5
|
+
"deploy": "if [ "\${ACCESS:-}" = 'prod' ]; then npm run deploy:prod; elif [ "\${ACCESS:-}" = 'prep' ]; then npm run deploy:prep; else echo '🛑 invalid ACCESS, must be prod or prep' && exit 2; fi",
|
|
6
|
+
"deploy:prep": "ACCESS=prep npm run deploy:release",
|
|
7
|
+
"deploy:prod": "ACCESS=prod npm run deploy:release:ancient && npm run deploy:send-notification",
|
|
8
|
+
"deploy:prune": "if [ "\${ACCESS:-}" != 'prep' ] && [ "\${ACCESS:-}" != 'prod' ]; then echo '🛑 invalid ACCESS, must be prod or prep' && exit 2; fi && export COMMIT=$(npx sdk-environment get commit) && export SLS_STAGE=$([ "\${ACCESS:-}" = 'prep' ] && echo 'dev' || echo "\${ACCESS:-}") && npx sls prune -n 7 --stage "\${SLS_STAGE:-}" && if [ "\${ACCESS:-}" = 'prep' ]; then npx sls prune -n 7 --stage prep; fi",
|
|
9
|
+
"deploy:release": "npm run deploy:release:ancient && npm run deploy:release:contemp",
|
|
10
|
+
"deploy:release:ancient": "if [ "\${ACCESS:-}" != 'prep' ] && [ "\${ACCESS:-}" != 'prod' ]; then echo '🛑 invalid ACCESS, must be prod or prep' && exit 2; fi && export COMMIT=$(npx sdk-environment get commit) && export SLS_STAGE=$([ "\${ACCESS:-}" = 'prep' ] && echo 'dev' || echo "\${ACCESS:-}") && npm run build && sls deploy --verbose --stage "\${SLS_STAGE:-}"",
|
|
11
|
+
"deploy:release:contemp": "export COMMIT=$(npx sdk-environment get commit) && if [ "\${ACCESS:-}" = 'prep' ]; then sls deploy --verbose --stage prep; else echo '🛑 skip contemp dual-publish: ACCESS is not prep (contemp publishes the -prep- fleet only)'; fi",
|
|
12
|
+
"deploy:send-notification": "curl -X POST -H 'Content-type: application/json' --data "{\\"text\\":\\"$([ -z "\${DEPLOYER_NAME:-}" ] && git config user.name || echo "\${DEPLOYER_NAME:-}") has deployed $npm_package_name@v$npm_package_version:
|
|
13
|
+
https://github.com/@declapract{variable.organizationName}/$npm_package_name/tree/v$npm_package_version\\"}" @declapract{variable.slackWebhookUrl}",
|
|
14
|
+
}
|
|
15
|
+
`;
|
package/dist/practices/serverless/__snapshots__/serverless.yml.declapract.integration.test.ts.snap
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
+
|
|
3
|
+
exports[`serverless.yml given: a legacy serverless.yml — the full composed fix (snapshot + idempotency) then: the full composed fix matches snapshot (after): legacy serverless.yml — after 1`] = `
|
|
4
|
+
"# @declapract:review — could not auto-insert \`ACCESS: \${self:custom.access}\` + \`COMMIT: \${env:COMMIT}\` under \`environment:\` because no \`STAGE: \${self:provider.stage}\` env var was present to convert; add both as children of your \`environment:\` block by hand — the failing \`declapract plan\` diff names them.
|
|
5
|
+
service: svc-orders # orders domain service
|
|
6
|
+
|
|
7
|
+
variablesResolutionMode: 20210326
|
|
8
|
+
|
|
9
|
+
plugins:
|
|
10
|
+
- serverless-prune-plugin
|
|
11
|
+
|
|
12
|
+
package:
|
|
13
|
+
artifact: .artifact/contents.zip
|
|
14
|
+
|
|
15
|
+
custom:
|
|
16
|
+
accessByStage:
|
|
17
|
+
dev: prep # stage=dev deploys to $service-dev but uses ACCESS=prep (config/prep.json)
|
|
18
|
+
prep: prep # stage=prep deploys to $service-prep also with ACCESS=prep; one service answers to both the -dev and -prep fleets while callers migrate
|
|
19
|
+
prod: prod
|
|
20
|
+
access: \${self:custom.accessByStage.\${opt:stage}, 'prep'} # the resolved access for this deploy — one source, referenced by the ACCESS env var + every access-keyed resource arn below, so a partial edit cannot re-split the stage/access axes
|
|
21
|
+
deploymentBucketByStage: # the deployment bucket is ACCOUNT-scoped: it must live in the account the deploy role assumes, so it is keyed by stage like accessByStage above
|
|
22
|
+
dev: serverless-deployment-dev # prep-account bucket
|
|
23
|
+
prep: serverless-deployment-dev # prep-account bucket, shared with the -dev fleet, so no separate -prep bucket need exist
|
|
24
|
+
prod: serverless-deployment-prod # prod-account bucket — a prod deploy assumes the prod-account oidc role, which has no cross-account grant to the prep-account -dev bucket
|
|
25
|
+
|
|
26
|
+
provider:
|
|
27
|
+
name: aws
|
|
28
|
+
runtime: nodejs22.x
|
|
29
|
+
memorySize: 1024
|
|
30
|
+
timeout: 60 # default timeout to 1min, for resilience against increased cold start times; individual functions can override this
|
|
31
|
+
stage: \${opt:stage}
|
|
32
|
+
environment:
|
|
33
|
+
TZ: UTC # guarantee that utc timezone will be used explicitly, to facilitate a pit of success
|
|
34
|
+
NODE_ENV: production # deploy with production optimizations of all resources, to make \`prep\` and \`prod\` stage deployments equivalent functionally (i.e., the same code paths in prep and prod)
|
|
35
|
+
AWS_NODEJS_CONNECTION_REUSE_ENABLED: true # https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/node-reusing-connections.html
|
|
36
|
+
deploymentBucket: \${self:custom.deploymentBucketByStage.\${opt:stage}, 'serverless-deployment-dev'} # account-scoped via deploymentBucketByStage above; provision the -prod bucket in the prod account before the first prod deploy, or a prod deploy trades a cross-account-deny for an absent-bucket error
|
|
37
|
+
iamRoleStatements:
|
|
38
|
+
# parameter store access
|
|
39
|
+
- Effect: Allow
|
|
40
|
+
Action:
|
|
41
|
+
- ssm:GetParameter
|
|
42
|
+
- ssm:GetParameters
|
|
43
|
+
Resource: arn:aws:ssm:\${aws:region}:\${aws:accountId}:parameter/*
|
|
44
|
+
# allow access inference from account name
|
|
45
|
+
- Effect: Allow
|
|
46
|
+
Action:
|
|
47
|
+
- account:GetAccountInformation
|
|
48
|
+
Resource: '*'
|
|
49
|
+
# allow invocation of other lambdas
|
|
50
|
+
- Effect: Allow
|
|
51
|
+
Action:
|
|
52
|
+
- lambda:InvokeFunction
|
|
53
|
+
Resource: '*'"
|
|
54
|
+
`;
|
|
55
|
+
|
|
56
|
+
exports[`serverless.yml given: a legacy serverless.yml — the full composed fix (snapshot + idempotency) then: the legacy input matches snapshot (before): legacy serverless.yml — before 1`] = `
|
|
57
|
+
"service: svc-orders # orders domain service
|
|
58
|
+
|
|
59
|
+
plugins:
|
|
60
|
+
- serverless-offline # local invoke for dev
|
|
61
|
+
- serverless-pseudo-parameters # obsolete once native vars land
|
|
62
|
+
- serverless-prune-plugin
|
|
63
|
+
|
|
64
|
+
provider:
|
|
65
|
+
name: aws
|
|
66
|
+
runtime: nodejs18.x
|
|
67
|
+
memorySize: 1024
|
|
68
|
+
timeout: 10
|
|
69
|
+
stage: \${opt:stage}
|
|
70
|
+
environment:
|
|
71
|
+
NODE_ENV: \${self:custom.stageToNodeEnvMapping.\${self:provider.stage}}
|
|
72
|
+
deploymentBucket: serverless-deployment-\${self:provider.stage}
|
|
73
|
+
iamRoleStatements:
|
|
74
|
+
## paramstore access
|
|
75
|
+
- Effect: Allow
|
|
76
|
+
Action: 'ssm:GetParameters'
|
|
77
|
+
Resource: arn:aws:ssm:#{AWS::Region}:#{AWS::AccountId}:parameter/*
|
|
78
|
+
# allow inferring access from account alias
|
|
79
|
+
- Effect: Allow
|
|
80
|
+
Action:
|
|
81
|
+
- iam:ListAccountAliases
|
|
82
|
+
Resource: '*'
|
|
83
|
+
## allow invocation of other lambdas
|
|
84
|
+
- Effect: Allow
|
|
85
|
+
Action:
|
|
86
|
+
- lambda:InvokeFunction
|
|
87
|
+
Resource: '*'"
|
|
88
|
+
`;
|
|
89
|
+
|
|
90
|
+
exports[`serverless.yml given: a legacy sls.yaml that already holds a section under different content (r7 clobber-refusal) then: the section soft-skip injects an actionable @declapract:review marker, not a silent stall: section soft-skip custom clobber — review marker 1`] = `
|
|
91
|
+
"service: svc-hascustom
|
|
92
|
+
|
|
93
|
+
variablesResolutionMode: 20210326
|
|
94
|
+
|
|
95
|
+
# @declapract:review — a \`custom:\` block is already present; merge the declared \`custom\` keys (from the failing \`declapract plan\` diff) into your extant \`custom:\` block by hand — auto-insert was declined to avoid a yaml last-wins clobber that would drop your block.
|
|
96
|
+
custom:
|
|
97
|
+
domain: api.example.com
|
|
98
|
+
|
|
99
|
+
package:
|
|
100
|
+
artifact: .artifact/contents.zip
|
|
101
|
+
|
|
102
|
+
plugins:
|
|
103
|
+
- serverless-prune-plugin
|
|
104
|
+
|
|
105
|
+
provider:
|
|
106
|
+
name: aws
|
|
107
|
+
stage: \${opt:stage}"
|
|
108
|
+
`;
|
|
109
|
+
|
|
110
|
+
exports[`serverless.yml given: a sls.yaml whose environment block exists but the anchors miss (r7 soft-skip) then: withUtcTimezone emits an actionable review marker when NODE_ENV sits below another env var: withUtcTimezone shuffled-env — review marker 1`] = `
|
|
111
|
+
"# @declapract:review — could not auto-insert \`TZ: UTC\` under \`environment:\` because NODE_ENV is not the block's first key (the positional anchor missed); add \`TZ: UTC\` as a child of your \`environment:\` block by hand — the failing \`declapract plan\` diff names it.
|
|
112
|
+
service: svc-shuffled
|
|
113
|
+
|
|
114
|
+
variablesResolutionMode: 20210326
|
|
115
|
+
|
|
116
|
+
package:
|
|
117
|
+
artifact: .artifact/contents.zip
|
|
118
|
+
|
|
119
|
+
plugins:
|
|
120
|
+
- serverless-prune-plugin
|
|
121
|
+
|
|
122
|
+
custom:
|
|
123
|
+
accessByStage:
|
|
124
|
+
dev: prep # stage=dev deploys to $service-dev but uses ACCESS=prep (config/prep.json)
|
|
125
|
+
prep: prep # stage=prep deploys to $service-prep also with ACCESS=prep; one service answers to both the -dev and -prep fleets while callers migrate
|
|
126
|
+
prod: prod
|
|
127
|
+
access: \${self:custom.accessByStage.\${opt:stage}, 'prep'} # the resolved access for this deploy — one source, referenced by the ACCESS env var + every access-keyed resource arn below, so a partial edit cannot re-split the stage/access axes
|
|
128
|
+
|
|
129
|
+
provider:
|
|
130
|
+
name: aws
|
|
131
|
+
environment:
|
|
132
|
+
ACCESS: \${self:custom.access} # sdk-environment access, to target the correct config + resources (e.g., hit prep db -vs- prod db)
|
|
133
|
+
COMMIT: \${env:COMMIT} # sdk-environment commit slug, must be set by deploy command
|
|
134
|
+
NODE_ENV: production
|
|
135
|
+
AWS_NODEJS_CONNECTION_REUSE_ENABLED: true # https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/node-reusing-connections.html"
|
|
136
|
+
`;
|
|
137
|
+
|
|
138
|
+
exports[`serverless.yml given: a sls.yaml with STAGE env var then: the composed fix over this example matches snapshot: STAGE example — after 1`] = `
|
|
139
|
+
"service: svc-example
|
|
140
|
+
|
|
141
|
+
variablesResolutionMode: 20210326
|
|
142
|
+
|
|
143
|
+
package:
|
|
144
|
+
artifact: .artifact/contents.zip
|
|
145
|
+
|
|
146
|
+
plugins:
|
|
147
|
+
- serverless-prune-plugin
|
|
148
|
+
|
|
149
|
+
custom:
|
|
150
|
+
accessByStage:
|
|
151
|
+
dev: prep # stage=dev deploys to $service-dev but uses ACCESS=prep (config/prep.json)
|
|
152
|
+
prep: prep # stage=prep deploys to $service-prep also with ACCESS=prep; one service answers to both the -dev and -prep fleets while callers migrate
|
|
153
|
+
prod: prod
|
|
154
|
+
access: \${self:custom.accessByStage.\${opt:stage}, 'prep'} # the resolved access for this deploy — one source, referenced by the ACCESS env var + every access-keyed resource arn below, so a partial edit cannot re-split the stage/access axes
|
|
155
|
+
|
|
156
|
+
provider:
|
|
157
|
+
name: aws
|
|
158
|
+
stage: \${opt:stage}
|
|
159
|
+
environment:
|
|
160
|
+
TZ: UTC # guarantee that utc timezone will be used explicitly, to facilitate a pit of success
|
|
161
|
+
NODE_ENV: production
|
|
162
|
+
ACCESS: \${self:custom.access} # sdk-environment access, to target the correct config + resources (e.g., hit prep db -vs- prod db)
|
|
163
|
+
COMMIT: \${env:COMMIT} # sdk-environment commit slug, must be set by deploy command
|
|
164
|
+
AWS_NODEJS_CONNECTION_REUSE_ENABLED: true"
|
|
165
|
+
`;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# serverless
|
|
2
|
+
|
|
3
|
+
the serverless-framework deploy config for a lambda service.
|
|
4
|
+
|
|
5
|
+
## dual-publish, across the ancient→contemp transition
|
|
6
|
+
|
|
7
|
+
`custom.accessByStage` maps the deploy slug (`stage`) to the access (`ACCESS`):
|
|
8
|
+
|
|
9
|
+
```yaml
|
|
10
|
+
accessByStage:
|
|
11
|
+
dev: prep # stage=dev deploys $service-dev (ancient slug), runs ACCESS=prep
|
|
12
|
+
prep: prep # stage=prep deploys $service-prep (contemp slug), also ACCESS=prep
|
|
13
|
+
prod: prod
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
so a single `prep`-access service dual-publishes BOTH fleets from one artifact:
|
|
17
|
+
`deploy:release` runs `deploy:release:ancient` (`--stage dev`) then `deploy:release:contemp`
|
|
18
|
+
(`--stage prep`). `deploy:prune` prunes the ancient fleet always and the contemp (`-prep-`) fleet
|
|
19
|
+
when `ACCESS=prep`, so neither accumulates unpruned versions. `deploy:prod` publishes the ancient
|
|
20
|
+
(`prod`) fleet only — prod is `prod` on both axes, so it has no divergent slug.
|
|
21
|
+
|
|
22
|
+
### why prod does NOT dual-publish (the contemp→prod edge)
|
|
23
|
+
|
|
24
|
+
the dual-publish exists to bridge ONE divergence: below prod, `access=prep` deploys under a `-dev-`
|
|
25
|
+
slug (ancient) while migrated callers address the `-prep-` slug (contemp). prod has no such
|
|
26
|
+
divergence — `access=prod ⟺ stage=prod` — so there is one `-prod-` fleet and no second slug to
|
|
27
|
+
publish.
|
|
28
|
+
|
|
29
|
+
a contemp→prod 404 is therefore unreachable, because the `sdkAwsLambdaEnvAccess{Ancient|Contemp}`
|
|
30
|
+
target helper resolves against the CALLER's OWN `access`, not a fixed `-prep-` string. a prod-access
|
|
31
|
+
caller resolves BOTH `Ancient` and `Contemp` to `prod` (there is no dev/prep split at prod), so it
|
|
32
|
+
always addresses the published `-prod-` fleet. the `-prep-` slug is only ever emitted by a
|
|
33
|
+
`prep`-access caller, which addresses `prep`-tier peers — never a prod service. a `prep`-access
|
|
34
|
+
caller that reaches a prod service is a cross-tier call, which is not a supported pattern and is not
|
|
35
|
+
what dual-publish covers. so prod's ancient-only publish leaves no cross-service call uncovered.
|
|
36
|
+
|
|
37
|
+
the north-star of the fix-lambdas wish is to retire the `stage` axis entirely; this dual-publish is
|
|
38
|
+
the transition scaffold, built to be torn down once every peer addresses self by `access`. see
|
|
39
|
+
`.behavior/v2026_08_31.fix-lambdas-3/1.vision.yield.md`.
|
|
40
|
+
|
|
41
|
+
### the transition cost — watch the Lambda code-storage cap
|
|
42
|
+
|
|
43
|
+
dual-publish doubles a service's deployed function count AND its code-storage footprint in the
|
|
44
|
+
test/prep account, for the life of the transition. AWS Lambda's per-region **code storage is a
|
|
45
|
+
75 GB soft cap**. before a fleet-wide dual-publish, confirm `usage × 2 < 75 GB` via
|
|
46
|
+
`aws lambda get-account-settings` (the `AccountLimit.TotalCodeSize` vs `AccountUsage.TotalCodeSize`
|
|
47
|
+
fields). the cap is soft (raisable by a support request), the 2× is transition-only, and it drops
|
|
48
|
+
back to 1× at the north-star endpoint when the `-dev-` publish retires. function count has no hard
|
|
49
|
+
cap, and concurrency is unaffected (the `-dev-` fleet takes ~no traffic).
|
|
50
|
+
|
|
51
|
+
### this practice ships the ADD half only; the REMOVE half waits on an opt-in marker
|
|
52
|
+
|
|
53
|
+
this practice adds the `accessByStage` insert + the dual IAM grants. it ships no paired remove.
|
|
54
|
+
|
|
55
|
+
the remove half waits on an explicit opt-in marker that a consumer has completed its migration —
|
|
56
|
+
the marker cannot be inferred from the filesystem, because a fresh scaffold and a fully-migrated
|
|
57
|
+
consumer both hold zero `AccessAncient` imports, so any auto-strip re-adds and re-strips on each
|
|
58
|
+
`declapract fix`. the marker also authorizes case=1's one-axis deletion.
|
|
59
|
+
|
|
60
|
+
the transform that adds the scaffold is labeled in `serverless.yml.declapract.ts`. the full
|
|
61
|
+
rationale is in the vision's settled design §2.
|
|
62
|
+
|
|
63
|
+
## the deployment bucket is account-scoped, not just stage-scoped (#596)
|
|
64
|
+
|
|
65
|
+
`custom.deploymentBucketByStage` keys the serverless deployment bucket by stage, the same shape as
|
|
66
|
+
`accessByStage`:
|
|
67
|
+
|
|
68
|
+
```yaml
|
|
69
|
+
deploymentBucketByStage:
|
|
70
|
+
dev: serverless-deployment-<ns>-dev # prep-account bucket (ancient slug)
|
|
71
|
+
prep: serverless-deployment-<ns>-dev # prep-account bucket, shared with dev
|
|
72
|
+
prod: serverless-deployment-<ns>-prod # prod-account bucket
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
the deployment bucket is not merely service-scoped — it is **account-scoped**: it must live in the
|
|
76
|
+
same account the deploy role assumes. a prod deploy assumes the prod-account oidc role
|
|
77
|
+
(`ahbode-prod-oidc-for-apply`), which has no cross-account grant to the prep-account `-dev` bucket, so
|
|
78
|
+
a single hardcoded `-dev` bucket fails a prod deploy at bucket lookup
|
|
79
|
+
(`s3:GetBucketLocation ... not authorized`). the map keeps ancient (`dev`) + contemp (`prep`) on the
|
|
80
|
+
one shared prep-account `-dev` bucket, and points `prod` at a prod-account `-prod` bucket, so every
|
|
81
|
+
deploy's bucket sits in the account of its role.
|
|
82
|
+
|
|
83
|
+
the -prod bucket must be provisioned in the prod account (e.g. via the terraform under
|
|
84
|
+
`provision/aws/environments/prod/`), or the fix trades a cross-account-deny for an absent-bucket
|
|
85
|
+
error. this is the deploy-bucket facet of the same prep→dev account divergence the `accessByStage` +
|
|
86
|
+
dual-IAM sections above address; it collapses with the rest at the north-star `stage`→`access`
|
|
87
|
+
endpoint.
|
|
88
|
+
|
|
89
|
+
## the domain-driven-cache IAM — the middle segment is name-globbed, not templated (D27, #597)
|
|
90
|
+
|
|
91
|
+
the `iamRoleStatements` grant for the global cache table globs the middle name segment, rather than
|
|
92
|
+
template it on `provider.stage` or `custom.access`:
|
|
93
|
+
|
|
94
|
+
```yaml
|
|
95
|
+
Resource:
|
|
96
|
+
- arn:aws:dynamodb:...:table/infrastructure-*-table-domain-driven-cache
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
the cache is one SHARED dynamodb table addressed by a single name (below prod that name is `-dev-`),
|
|
100
|
+
while a dual-publish service runs two fleets whose roles key on different slugs (ancient `dev`,
|
|
101
|
+
contemp `prep`). a slug-templated grant covers only the deployed fleet's own slug — so the contemp
|
|
102
|
+
`-prep-` fleet's `-dev-` cache read AccessDenies, and a with-simple-cache read-back throws a 500
|
|
103
|
+
instead of a null. this was a real break on svc-gateway `prep / assure`: 3 chat endpoints 500'd on
|
|
104
|
+
the contemp fleet only, and cloudwatch named the AccessDeny on
|
|
105
|
+
`infrastructure-dev-table-domain-driven-cache` (#597).
|
|
106
|
+
|
|
107
|
+
the glob covers `-dev-`, `-prep-`, and `-prod-` in one line. it stays least-privilege:
|
|
108
|
+
account-scoped (`${aws:accountId}`) and name-scoped to the one cache family — it widens only across
|
|
109
|
+
the middle segment, the axis the fleets differ on. the glob already covers every slug, so it needs
|
|
110
|
+
no change at the north-star `stage`→`access` endpoint. tracked in the wish roster (D27,
|
|
111
|
+
north-star tier-C).
|
|
@@ -5,11 +5,13 @@
|
|
|
5
5
|
"if-env": "@declapract{check.minVersion('1.0.4')}"
|
|
6
6
|
},
|
|
7
7
|
"scripts": {
|
|
8
|
-
"deploy:prune": "export COMMIT=$(npx sdk-environment get commit) && export SLS_STAGE=$([ \"$ACCESS\" = 'prep' ] && echo 'dev' || echo \"$ACCESS\") && npx sls prune -n 7 --stage $SLS_STAGE",
|
|
9
|
-
"deploy:release": "export COMMIT=$(npx sdk-environment get commit) && export SLS_STAGE=$([ \"$ACCESS\" = 'prep' ] && echo 'dev' || echo \"$ACCESS\") && npm run build && sls deploy --verbose --stage $SLS_STAGE",
|
|
10
|
-
"deploy:
|
|
8
|
+
"deploy:prune": "if [ \"${ACCESS:-}\" != 'prep' ] && [ \"${ACCESS:-}\" != 'prod' ]; then echo '🛑 invalid ACCESS, must be prod or prep' && exit 2; fi && export COMMIT=$(npx sdk-environment get commit) && export SLS_STAGE=$([ \"${ACCESS:-}\" = 'prep' ] && echo 'dev' || echo \"${ACCESS:-}\") && npx sls prune -n 7 --stage \"${SLS_STAGE:-}\" && if [ \"${ACCESS:-}\" = 'prep' ]; then npx sls prune -n 7 --stage prep; fi",
|
|
9
|
+
"deploy:release:ancient": "if [ \"${ACCESS:-}\" != 'prep' ] && [ \"${ACCESS:-}\" != 'prod' ]; then echo '🛑 invalid ACCESS, must be prod or prep' && exit 2; fi && export COMMIT=$(npx sdk-environment get commit) && export SLS_STAGE=$([ \"${ACCESS:-}\" = 'prep' ] && echo 'dev' || echo \"${ACCESS:-}\") && npm run build && sls deploy --verbose --stage \"${SLS_STAGE:-}\"",
|
|
10
|
+
"deploy:release:contemp": "export COMMIT=$(npx sdk-environment get commit) && if [ \"${ACCESS:-}\" = 'prep' ]; then sls deploy --verbose --stage prep; else echo '🛑 skip contemp dual-publish: ACCESS is not prep (contemp publishes the -prep- fleet only)'; fi",
|
|
11
|
+
"deploy:release": "npm run deploy:release:ancient && npm run deploy:release:contemp",
|
|
12
|
+
"deploy:send-notification": "curl -X POST -H 'Content-type: application/json' --data \"{\\\"text\\\":\\\"$([ -z \"${DEPLOYER_NAME:-}\" ] && git config user.name || echo \"${DEPLOYER_NAME:-}\") has deployed $npm_package_name@v$npm_package_version:\nhttps://github.com/@declapract{variable.organizationName}/$npm_package_name/tree/v$npm_package_version\\\"}\" @declapract{variable.slackWebhookUrl}",
|
|
11
13
|
"deploy:prep": "ACCESS=prep npm run deploy:release",
|
|
12
|
-
"deploy:prod": "ACCESS=prod npm run deploy:release && npm run deploy:send-notification",
|
|
13
|
-
"deploy": "if
|
|
14
|
+
"deploy:prod": "ACCESS=prod npm run deploy:release:ancient && npm run deploy:send-notification",
|
|
15
|
+
"deploy": "if [ \"${ACCESS:-}\" = 'prod' ]; then npm run deploy:prod; elif [ \"${ACCESS:-}\" = 'prep' ]; then npm run deploy:prep; else echo '🛑 invalid ACCESS, must be prod or prep' && exit 2; fi"
|
|
14
16
|
}
|
|
15
17
|
}
|