@aws-cdk-testing/cli-integ 3.5.0 → 3.7.0
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/README.md +48 -39
- package/lib/aws.js +20 -9
- package/lib/cli/query-github.js +2 -3
- package/lib/cli/run-suite.js +123 -52
- package/lib/cli/stage-distribution.js +4 -4
- package/lib/corking.js +2 -5
- package/lib/eventually.js +3 -3
- package/lib/files.js +2 -3
- package/lib/github.js +5 -6
- package/lib/integ-test.js +58 -3
- package/lib/npm.d.ts +2 -0
- package/lib/npm.js +30 -1
- package/lib/package-sources/cli-npm-source.d.ts +14 -0
- package/lib/package-sources/cli-npm-source.js +50 -0
- package/lib/package-sources/cli-repo-source.d.ts +19 -0
- package/lib/package-sources/cli-repo-source.js +49 -0
- package/lib/package-sources/find-root.d.ts +6 -0
- package/lib/package-sources/find-root.js +18 -0
- package/lib/package-sources/library-globalinstall-source.d.ts +20 -0
- package/lib/package-sources/library-globalinstall-source.js +70 -0
- package/lib/package-sources/library-npm-source.d.ts +17 -0
- package/lib/package-sources/library-npm-source.js +60 -0
- package/lib/package-sources/library-preinstalled-source.d.ts +21 -0
- package/lib/package-sources/library-preinstalled-source.js +78 -0
- package/lib/package-sources/repo-tools/npm.js +4 -5
- package/lib/package-sources/source.d.ts +36 -18
- package/lib/package-sources/source.js +1 -1
- package/lib/package-sources/subprocess.d.ts +10 -3
- package/lib/package-sources/subprocess.js +31 -12
- package/lib/process.js +7 -6
- package/lib/proxy.d.ts +1 -1
- package/lib/proxy.js +2 -2
- package/lib/resource-pool.js +10 -6
- package/lib/shell.d.ts +3 -3
- package/lib/shell.js +12 -16
- package/lib/staging/codeartifact.js +17 -18
- package/lib/staging/maven.d.ts +2 -2
- package/lib/staging/maven.js +3 -5
- package/lib/staging/npm.d.ts +2 -2
- package/lib/staging/npm.js +1 -1
- package/lib/staging/nuget.d.ts +2 -2
- package/lib/staging/nuget.js +1 -1
- package/lib/staging/parallel-shell.js +2 -2
- package/lib/staging/pypi.d.ts +2 -2
- package/lib/staging/pypi.js +1 -1
- package/lib/staging/usage-dir.js +4 -1
- package/lib/with-aws.d.ts +2 -2
- package/lib/with-aws.js +5 -4
- package/lib/with-cdk-app.d.ts +9 -6
- package/lib/with-cdk-app.js +48 -61
- package/lib/with-cli-lib.d.ts +4 -3
- package/lib/with-cli-lib.js +5 -8
- package/lib/with-packages.d.ts +3 -2
- package/lib/with-packages.js +3 -2
- package/lib/with-sam.d.ts +3 -3
- package/lib/with-sam.js +15 -33
- package/lib/with-temporary-directory.d.ts +1 -1
- package/lib/with-temporary-directory.js +1 -1
- package/lib/xpmutex.js +11 -4
- package/lib/yarn.d.ts +6 -0
- package/lib/yarn.js +31 -0
- package/npm-shrinkwrap.json +8724 -0
- package/package.json +16 -11
- package/resources/cdk-apps/refactoring/cdk.json +7 -0
- package/resources/cdk-apps/refactoring/refactoring.js +18 -0
- package/resources/integ.jest.config.js +45 -8
- package/test-reports/junit.xml +15 -0
- package/tests/cli-integ-tests/cdk---exclusively-selects-only-selected-stack.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-assets/cdk-assets-uses-profile.integtest.js +12 -12
- package/tests/cli-integ-tests/cdk-assets/smoketest.integtest.js +10 -10
- package/tests/cli-integ-tests/cdk-automatic-ordering-with-concurrency.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-automatic-ordering.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-automatic-rollback-if-paused-and---no-rollback-is-removed-from-flags.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-automatic-rollback-if-paused-and-change-contains-a-replacement.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-automatic-rollback-if-replacement-and---no-rollback-is-removed-from-flags.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-bootstrap-a-customized-template-vendor-will-not-overwrite-the-default-template.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-bootstrap-add-tags.integtest.js +3 -4
- package/tests/cli-integ-tests/cdk-bootstrap-can-add-tags-then-update-tags-during-re-bootstrap.integtest.js +3 -4
- package/tests/cli-integ-tests/cdk-bootstrap-can-and-deploy-if-omitting-execution-policies.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-bootstrap-can-bootstrap-without-execution.integtest.js +3 -4
- package/tests/cli-integ-tests/cdk-bootstrap-can-create-a-legacy-bootstrap-stack-with---public-access-block-configuration-false.integtest.js +3 -4
- package/tests/cli-integ-tests/cdk-bootstrap-can-create-multiple-legacy-bootstrap-stacks.integtest.js +3 -4
- package/tests/cli-integ-tests/cdk-bootstrap-can-deploy-modern-synthesized-stack-even-if-bootstrap-stack-name-is-unknown.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-bootstrap-can-deploy-with-session-tags-on-the-deploy.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-bootstrap-can-deploy-without-execution-role-and-with-session-tags-on-deploy-role.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-bootstrap-can-dump-the-template.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-bootstrap-can-remove-custompermissionsboundary.integtest.js +5 -7
- package/tests/cli-integ-tests/cdk-bootstrap-can-remove-trusted-account.integtest.js +3 -4
- package/tests/cli-integ-tests/cdk-bootstrap-can-use-the-custom-permissions-boundary-(with-slashes)-to-bootstrap.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-bootstrap-can-use-the-custom-permissions-boundary-to-bootstrap.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-bootstrap-can-use-the-default-permissions-boundary-to-bootstrap.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-bootstrap-create-ecr-with-tag-immutability-to-set-on.integtest.js +5 -6
- package/tests/cli-integ-tests/cdk-bootstrap-deploy-new-style-synthesis-to-new-style-bootstrap-(with-docker-image).integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-bootstrap-deploy-new-style-synthesis-to-new-style-bootstrap.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-bootstrap-deploy-old-style-synthesis-to-new-style-bootstrap.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-bootstrap-switch-on-termination-protection.integtest.js +3 -4
- package/tests/cli-integ-tests/cdk-bootstrap-upgrade-legacy-bootstrap-stack-to-new-bootstrap-stack-while-in-use.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-can-still-load-old-assemblies.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-cdk-diff---fail-on-multiple-stacks-exits-with-error-if-any-of-the-stacks-contains-a-diff.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-cdk-diff---fail-with-multiple-stack-exits-with-if-any-of-the-stacks-contains-a-diff.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-cdk-diff---quiet-does-not-print-there-were-no-differences-message-for-stacks-which-have-no-differences.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-cdk-diff---security-only---fail-exits-when-security-changes-are-present.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-cdk-diff---security-only---fail-exits-when-security-diff-for-sso-access-control-config.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-cdk-diff---security-only---fail-exits-when-security-diff-for-sso-assignment.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-cdk-diff---security-only---fail-exits-when-security-diff-for-sso-perm-set-with-managed-policy.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-cdk-diff---security-only---fail-exits-when-security-diff-for-sso-perm-set-without-managed-policy.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-cdk-diff---security-only-successfully-outputs-sso-access-control-information.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-cdk-diff---security-only-successfully-outputs-sso-assignment-information.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-cdk-diff---security-only-successfully-outputs-sso-permission-set-with-managed-policy-information.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-cdk-diff---security-only-successfully-outputs-sso-permission-set-without-managed-policy-information.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-cdk-diff-doesnt-show-resource-metadata-changes.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-cdk-diff-shows-resource-metadata-changes-with---no-change-set.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-cdk-diff-with-large-changeset-and-custom-toolkit-stack-name-and-qualifier-does-not-fail.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-cdk-diff-with-large-changeset-does-not-fail.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-cdk-diff.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-cdk-ls---show-dependencies---json---long.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-cdk-ls---show-dependencies---json.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-cdk-ls.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-cdk-notices-are-displayed-correctly.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-cdk-notices-with---unacknowledged.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-cdk-synth-add-the-metadata-properties-expected-by-sam.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-cdk-synth-bundled-functions-as-expected.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-cdk-synth.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-ci-output-to-stderr.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-ci-true-output-to-stdout.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-construct-with-builtin-lambda-function.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-context-in-stage-propagates-to-top.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-context-setting.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-deploy---method-direct.integtest.js +3 -4
- package/tests/cli-integ-tests/cdk-deploy-all-concurrently.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-deploy-all.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-deploy-and-test-stack-with-lambda-asset.integtest.js +4 -5
- package/tests/cli-integ-tests/cdk-deploy-deletes-all-notification-arns-when-empty-array-is-passed.integtest.js +4 -5
- package/tests/cli-integ-tests/cdk-deploy-no-stacks-error.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-deploy-no-stacks-with---ignore-no-stacks.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-deploy-preserves-existing-notification-arns-when-not-specified.integtest.js +3 -4
- package/tests/cli-integ-tests/cdk-deploy-stack-with-docker-asset.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-deploy-stack-with-lambda-asset-to-object-lock-enabled-asset-bucket.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-deploy-stack-without-resource.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-deploy-wildcard-with-outputs.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-deploy-with-import-existing-resources-true.integtest.js +3 -4
- package/tests/cli-integ-tests/cdk-deploy-with-method-direct-and-import-existing-resources-fails.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-deploy-with-notification-arn-as-flag.integtest.js +3 -4
- package/tests/cli-integ-tests/cdk-deploy-with-notification-arn-as-prop-and-flag.integtest.js +3 -4
- package/tests/cli-integ-tests/cdk-deploy-with-notification-arn-as-prop.integtest.js +3 -4
- package/tests/cli-integ-tests/cdk-deploy-with-parameters-multi.integtest.js +4 -5
- package/tests/cli-integ-tests/cdk-deploy-with-parameters.integtest.js +3 -4
- package/tests/cli-integ-tests/cdk-deploy-with-wildcard-and-parameters.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-deploy-without-execute-a-named-change-set.integtest.js +3 -4
- package/tests/cli-integ-tests/cdk-deploy-without-import-existing-resources.integtest.js +3 -4
- package/tests/cli-integ-tests/cdk-deploy.integtest.js +3 -4
- package/tests/cli-integ-tests/cdk-destroy-interactive.integtest.js +6 -7
- package/tests/cli-integ-tests/cdk-doubly-nested-stack.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-enablediffnofail.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-failed-deploy-does-not-hang.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-fast-deploy.integtest.js +5 -6
- package/tests/cli-integ-tests/cdk-gc-garbage-collection-deletes-unused-ecr-images.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-gc-garbage-collection-deletes-unused-s3-objects.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-gc-garbage-collection-keeps-in-use-ecr-images.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-gc-garbage-collection-keeps-in-use-s3-objects.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-gc-garbage-collection-tags-unused-ecr-images.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-gc-garbage-collection-tags-unused-s3-objects.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-gc-garbage-collection-untags-in-use-ecr-images.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-gc-garbage-collection-untags-in-use-s3-objects.integtest.js +3 -3
- package/tests/cli-integ-tests/cdk-generating-and-loading-assembly.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-hotswap-deployment-for-ecs-service-detects-failed-deployment-and-errors.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-hotswap-deployment-for-ecs-service-waits-for-deployment-to-complete.integtest.js +7 -6
- package/tests/cli-integ-tests/cdk-hotswap-deployment-supports-appsync-apis-with-many-functions.integtest.js +3 -4
- package/tests/cli-integ-tests/cdk-hotswap-deployment-supports-ecs-service.integtest.js +4 -5
- package/tests/cli-integ-tests/cdk-hotswap-deployment-supports-fn::importvalue-intrinsic.integtest.js +4 -5
- package/tests/cli-integ-tests/cdk-hotswap-deployment-supports-lambda-functions-description-and-environment-variables.integtest.js +4 -5
- package/tests/cli-integ-tests/cdk-hotswap-ecs-deployment-respects-properties-override.integtest.js +6 -7
- package/tests/cli-integ-tests/cdk-iam-diff.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-import-interactive.integtest.js +5 -6
- package/tests/cli-integ-tests/cdk-lib-cli-lib-deploy.integtest.js +3 -4
- package/tests/cli-integ-tests/cdk-lib-cli-lib-list.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-lib-cli-lib-synth.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-lib-security-related-changes-without-a-cli-are-expected-to-fail-when-approval-is-required.integtest.js +2 -3
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate--from-stack-creates-deployable-app-csharp.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate--from-stack-creates-deployable-app-java.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate--from-stack-creates-deployable-app-python.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate--from-stack-creates-deployable-app-typescript.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-deploys-successfully-csharp.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-deploys-successfully-java.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-deploys-successfully-python.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-deploys-successfully-typescript.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-generates-migrate.json.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-migrate/testcase.d.ts +1 -1
- package/tests/cli-integ-tests/cdk-migrate/testcase.js +4 -6
- package/tests/cli-integ-tests/cdk-nested-stack-with-parameters.integtest.js +3 -4
- package/tests/cli-integ-tests/cdk-refactor-dry-run.integtest.js +41 -0
- package/tests/cli-integ-tests/cdk-requests-go-through-a-proxy-when-configured.integtest.js +3 -4
- package/tests/cli-integ-tests/cdk-sam-can-locally-test-the-synthesized-cdk-application.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-security-related-changes-without-a-cli-are-expected-to-fail.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-skips-notice-refresh.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-ssm-parameter-provider-error.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-stack-in-update_rollback_complete-state-can-be-updated.integtest.js +6 -7
- package/tests/cli-integ-tests/cdk-stage-with-bundled-lambda-function.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-synth---quiet-can-be-specified-in-cdk.json.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-synthing-a-stage-with-errors-can-be-suppressed.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-synthing-a-stage-with-errors-leads-to-failure.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-templates-on-disk-contain-metadata-resource.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-termination-protection.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-test-cdk-rollback---force.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-test-cdk-rollback.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-test-migrate-deployment-for-app-with-localfile-source-in-migrate.json.integtest.js +5 -5
- package/tests/cli-integ-tests/cdk-test-resource-import-with-construct-that-requires-bundling.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-test-resource-import.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-two-ways-of-showing-the-version.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-update-to-stack-in-rollback_complete-state-will-delete-stack-and-create-a-new-one.integtest.js +6 -7
- package/tests/cli-integ-tests/cdk-vpc-lookup.integtest.js +2 -2
- package/tests/cli-integ-tests/proxy.integtest.js +2 -3
- package/tests/init-csharp/init-csharp.integtest.js +4 -4
- package/tests/init-fsharp/init-fsharp.integtest.js +4 -4
- package/tests/init-go/init-go.integtest.js +4 -5
- package/tests/init-java/init-java.integtest.js +3 -3
- package/tests/init-javascript/init-javascript.integtest.js +3 -3
- package/tests/init-python/init-python.integtest.js +3 -3
- package/tests/init-typescript-app/init-typescript-app.integtest.js +3 -3
- package/tests/init-typescript-lib/init-typescript-lib.integtest.js +2 -2
- package/tests/tool-integrations/amplify.integtest.js +6 -6
- package/tests/tool-integrations/with-tool-context.d.ts +5 -5
- package/tests/tool-integrations/with-tool-context.js +1 -1
- package/tests/toolkit-lib-integ-tests/toolkit-can-cdk-deploy.integtest.d.ts +1 -0
- package/tests/toolkit-lib-integ-tests/toolkit-can-cdk-deploy.integtest.js +17 -0
- package/tests/toolkit-lib-integ-tests/toolkit-helpers.d.ts +15 -0
- package/tests/toolkit-lib-integ-tests/toolkit-helpers.js +45 -0
- package/tests/uberpackage/uberpackage.integtest.js +2 -2
- package/.eslintrc.js +0 -9
- package/lib/aws.ts +0 -303
- package/lib/cli/query-github.ts +0 -56
- package/lib/cli/run-suite.ts +0 -153
- package/lib/cli/stage-distribution.ts +0 -262
- package/lib/cli/test-root.ts +0 -3
- package/lib/corking.ts +0 -33
- package/lib/eventually.ts +0 -42
- package/lib/files.ts +0 -80
- package/lib/github.ts +0 -43
- package/lib/index.ts +0 -13
- package/lib/integ-test.ts +0 -110
- package/lib/lists.ts +0 -9
- package/lib/memoize.ts +0 -14
- package/lib/npm.ts +0 -41
- package/lib/package-sources/release-source.d.ts +0 -23
- package/lib/package-sources/release-source.js +0 -71
- package/lib/package-sources/release-source.ts +0 -82
- package/lib/package-sources/repo-source.d.ts +0 -30
- package/lib/package-sources/repo-source.js +0 -97
- package/lib/package-sources/repo-source.ts +0 -112
- package/lib/package-sources/repo-tools/npm.ts +0 -48
- package/lib/package-sources/source.ts +0 -35
- package/lib/package-sources/subprocess.ts +0 -15
- package/lib/process.ts +0 -154
- package/lib/proxy.ts +0 -64
- package/lib/resource-pool.ts +0 -140
- package/lib/resources.ts +0 -4
- package/lib/shell.ts +0 -331
- package/lib/staging/codeartifact.ts +0 -387
- package/lib/staging/maven.ts +0 -95
- package/lib/staging/npm.ts +0 -62
- package/lib/staging/nuget.ts +0 -75
- package/lib/staging/parallel-shell.ts +0 -51
- package/lib/staging/pypi.ts +0 -50
- package/lib/staging/usage-dir.ts +0 -99
- package/lib/with-aws.ts +0 -111
- package/lib/with-cdk-app.ts +0 -847
- package/lib/with-cli-lib.ts +0 -150
- package/lib/with-packages.ts +0 -15
- package/lib/with-sam.ts +0 -295
- package/lib/with-temporary-directory.ts +0 -35
- package/lib/with-timeout.ts +0 -33
- package/lib/xpmutex.ts +0 -218
- package/resources/cli-regression-patches/v2.130.0/node_modules/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/lib/nested-stack.js +0 -19
- package/resources/cli-regression-patches/v2.130.0/node_modules/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/lib/test-stack.js +0 -134
- package/tests/cli-integ-tests/cdk---exclusively-selects-only-selected-stack.integtest.ts +0 -29
- package/tests/cli-integ-tests/cdk-assets/cdk-assets-uses-profile.integtest.ts +0 -92
- package/tests/cli-integ-tests/cdk-assets/smoketest.integtest.ts +0 -82
- package/tests/cli-integ-tests/cdk-automatic-ordering-with-concurrency.integtest.ts +0 -15
- package/tests/cli-integ-tests/cdk-automatic-ordering.integtest.ts +0 -15
- package/tests/cli-integ-tests/cdk-automatic-rollback-if-paused-and---no-rollback-is-removed-from-flags.integtest.ts +0 -40
- package/tests/cli-integ-tests/cdk-automatic-rollback-if-paused-and-change-contains-a-replacement.integtest.ts +0 -40
- package/tests/cli-integ-tests/cdk-automatic-rollback-if-replacement-and---no-rollback-is-removed-from-flags.integtest.ts +0 -29
- package/tests/cli-integ-tests/cdk-bootstrap-a-customized-template-vendor-will-not-overwrite-the-default-template.integtest.ts +0 -42
- package/tests/cli-integ-tests/cdk-bootstrap-add-tags.integtest.ts +0 -26
- package/tests/cli-integ-tests/cdk-bootstrap-can-add-tags-then-update-tags-during-re-bootstrap.integtest.ts +0 -28
- package/tests/cli-integ-tests/cdk-bootstrap-can-and-deploy-if-omitting-execution-policies.integtest.ts +0 -21
- package/tests/cli-integ-tests/cdk-bootstrap-can-bootstrap-without-execution.integtest.ts +0 -22
- package/tests/cli-integ-tests/cdk-bootstrap-can-create-a-legacy-bootstrap-stack-with---public-access-block-configuration-false.integtest.ts +0 -21
- package/tests/cli-integ-tests/cdk-bootstrap-can-create-multiple-legacy-bootstrap-stacks.integtest.ts +0 -27
- package/tests/cli-integ-tests/cdk-bootstrap-can-deploy-modern-synthesized-stack-even-if-bootstrap-stack-name-is-unknown.integtest.ts +0 -24
- package/tests/cli-integ-tests/cdk-bootstrap-can-deploy-with-session-tags-on-the-deploy.integtest.ts +0 -25
- package/tests/cli-integ-tests/cdk-bootstrap-can-deploy-without-execution-role-and-with-session-tags-on-deploy-role.integtest.ts +0 -22
- package/tests/cli-integ-tests/cdk-bootstrap-can-dump-the-template.integtest.ts +0 -32
- package/tests/cli-integ-tests/cdk-bootstrap-can-remove-custompermissionsboundary.integtest.ts +0 -77
- package/tests/cli-integ-tests/cdk-bootstrap-can-remove-trusted-account.integtest.ts +0 -30
- package/tests/cli-integ-tests/cdk-bootstrap-can-use-the-custom-permissions-boundary-(with-slashes)-to-bootstrap.integtest.ts +0 -15
- package/tests/cli-integ-tests/cdk-bootstrap-can-use-the-custom-permissions-boundary-to-bootstrap.integtest.ts +0 -15
- package/tests/cli-integ-tests/cdk-bootstrap-can-use-the-default-permissions-boundary-to-bootstrap.integtest.ts +0 -15
- package/tests/cli-integ-tests/cdk-bootstrap-create-ecr-with-tag-immutability-to-set-on.integtest.ts +0 -34
- package/tests/cli-integ-tests/cdk-bootstrap-deploy-new-style-synthesis-to-new-style-bootstrap-(with-docker-image).integtest.ts +0 -22
- package/tests/cli-integ-tests/cdk-bootstrap-deploy-new-style-synthesis-to-new-style-bootstrap.integtest.ts +0 -22
- package/tests/cli-integ-tests/cdk-bootstrap-deploy-old-style-synthesis-to-new-style-bootstrap.integtest.ts +0 -21
- package/tests/cli-integ-tests/cdk-bootstrap-switch-on-termination-protection.integtest.ts +0 -24
- package/tests/cli-integ-tests/cdk-bootstrap-upgrade-legacy-bootstrap-stack-to-new-bootstrap-stack-while-in-use.integtest.ts +0 -47
- package/tests/cli-integ-tests/cdk-can-still-load-old-assemblies.integtest.ts +0 -57
- package/tests/cli-integ-tests/cdk-cdk-diff---fail-on-multiple-stacks-exits-with-error-if-any-of-the-stacks-contains-a-diff.integtest.ts +0 -22
- package/tests/cli-integ-tests/cdk-cdk-diff---fail-with-multiple-stack-exits-with-if-any-of-the-stacks-contains-a-diff.integtest.ts +0 -22
- package/tests/cli-integ-tests/cdk-cdk-diff---quiet-does-not-print-there-were-no-differences-message-for-stacks-which-have-no-differences.integtest.ts +0 -19
- package/tests/cli-integ-tests/cdk-cdk-diff---security-only---fail-exits-when-security-changes-are-present.integtest.ts +0 -14
- package/tests/cli-integ-tests/cdk-cdk-diff---security-only---fail-exits-when-security-diff-for-sso-access-control-config.integtest.ts +0 -13
- package/tests/cli-integ-tests/cdk-cdk-diff---security-only---fail-exits-when-security-diff-for-sso-assignment.integtest.ts +0 -13
- package/tests/cli-integ-tests/cdk-cdk-diff---security-only---fail-exits-when-security-diff-for-sso-perm-set-with-managed-policy.integtest.ts +0 -13
- package/tests/cli-integ-tests/cdk-cdk-diff---security-only---fail-exits-when-security-diff-for-sso-perm-set-without-managed-policy.integtest.ts +0 -13
- package/tests/cli-integ-tests/cdk-cdk-diff---security-only-successfully-outputs-sso-access-control-information.integtest.ts +0 -35
- package/tests/cli-integ-tests/cdk-cdk-diff---security-only-successfully-outputs-sso-assignment-information.integtest.ts +0 -37
- package/tests/cli-integ-tests/cdk-cdk-diff---security-only-successfully-outputs-sso-permission-set-with-managed-policy-information.integtest.ts +0 -35
- package/tests/cli-integ-tests/cdk-cdk-diff---security-only-successfully-outputs-sso-permission-set-without-managed-policy-information.integtest.ts +0 -37
- package/tests/cli-integ-tests/cdk-cdk-diff-doesnt-show-resource-metadata-changes.integtest.ts +0 -23
- package/tests/cli-integ-tests/cdk-cdk-diff-shows-resource-metadata-changes-with---no-change-set.integtest.ts +0 -23
- package/tests/cli-integ-tests/cdk-cdk-diff-with-large-changeset-and-custom-toolkit-stack-name-and-qualifier-does-not-fail.integtest.ts +0 -39
- package/tests/cli-integ-tests/cdk-cdk-diff-with-large-changeset-does-not-fail.integtest.ts +0 -28
- package/tests/cli-integ-tests/cdk-cdk-diff.integtest.ts +0 -18
- package/tests/cli-integ-tests/cdk-cdk-ls---show-dependencies---json---long.integtest.ts +0 -50
- package/tests/cli-integ-tests/cdk-cdk-ls---show-dependencies---json.integtest.ts +0 -95
- package/tests/cli-integ-tests/cdk-cdk-ls.integtest.ts +0 -36
- package/tests/cli-integ-tests/cdk-cdk-notices-are-displayed-correctly.integtest.ts +0 -42
- package/tests/cli-integ-tests/cdk-cdk-notices-with---unacknowledged.integtest.ts +0 -14
- package/tests/cli-integ-tests/cdk-cdk-synth-add-the-metadata-properties-expected-by-sam.integtest.ts +0 -126
- package/tests/cli-integ-tests/cdk-cdk-synth-bundled-functions-as-expected.integtest.ts +0 -80
- package/tests/cli-integ-tests/cdk-cdk-synth.integtest.ts +0 -53
- package/tests/cli-integ-tests/cdk-ci-output-to-stderr.integtest.ts +0 -19
- package/tests/cli-integ-tests/cdk-ci-true-output-to-stdout.integtest.ts +0 -28
- package/tests/cli-integ-tests/cdk-construct-with-builtin-lambda-function.integtest.ts +0 -14
- package/tests/cli-integ-tests/cdk-context-in-stage-propagates-to-top.integtest.ts +0 -20
- package/tests/cli-integ-tests/cdk-context-setting.integtest.ts +0 -33
- package/tests/cli-integ-tests/cdk-deploy---method-direct.integtest.ts +0 -23
- package/tests/cli-integ-tests/cdk-deploy-all-concurrently.integtest.ts +0 -17
- package/tests/cli-integ-tests/cdk-deploy-all.integtest.ts +0 -14
- package/tests/cli-integ-tests/cdk-deploy-and-test-stack-with-lambda-asset.integtest.ts +0 -31
- package/tests/cli-integ-tests/cdk-deploy-deletes-all-notification-arns-when-empty-array-is-passed.integtest.ts +0 -50
- package/tests/cli-integ-tests/cdk-deploy-no-stacks-error.integtest.ts +0 -18
- package/tests/cli-integ-tests/cdk-deploy-no-stacks-with---ignore-no-stacks.integtest.ts +0 -17
- package/tests/cli-integ-tests/cdk-deploy-preserves-existing-notification-arns-when-not-specified.integtest.ts +0 -51
- package/tests/cli-integ-tests/cdk-deploy-stack-with-docker-asset.integtest.ts +0 -11
- package/tests/cli-integ-tests/cdk-deploy-stack-with-lambda-asset-to-object-lock-enabled-asset-bucket.integtest.ts +0 -42
- package/tests/cli-integ-tests/cdk-deploy-stack-without-resource.integtest.ts +0 -32
- package/tests/cli-integ-tests/cdk-deploy-wildcard-with-outputs.integtest.ts +0 -28
- package/tests/cli-integ-tests/cdk-deploy-with-import-existing-resources-true.integtest.ts +0 -29
- package/tests/cli-integ-tests/cdk-deploy-with-method-direct-and-import-existing-resources-fails.integtest.ts +0 -17
- package/tests/cli-integ-tests/cdk-deploy-with-notification-arn-as-flag.integtest.ts +0 -36
- package/tests/cli-integ-tests/cdk-deploy-with-notification-arn-as-prop-and-flag.integtest.ts +0 -45
- package/tests/cli-integ-tests/cdk-deploy-with-notification-arn-as-prop.integtest.ts +0 -37
- package/tests/cli-integ-tests/cdk-deploy-with-parameters-multi.integtest.ts +0 -33
- package/tests/cli-integ-tests/cdk-deploy-with-parameters.integtest.ts +0 -26
- package/tests/cli-integ-tests/cdk-deploy-with-role.integtest.js +0 -97
- package/tests/cli-integ-tests/cdk-deploy-with-role.integtest.ts +0 -119
- package/tests/cli-integ-tests/cdk-deploy-with-wildcard-and-parameters.integtest.ts +0 -22
- package/tests/cli-integ-tests/cdk-deploy-without-execute-a-named-change-set.integtest.ts +0 -36
- package/tests/cli-integ-tests/cdk-deploy-without-import-existing-resources.integtest.ts +0 -28
- package/tests/cli-integ-tests/cdk-deploy.integtest.ts +0 -20
- package/tests/cli-integ-tests/cdk-destroy-interactive.integtest.ts +0 -36
- package/tests/cli-integ-tests/cdk-doubly-nested-stack.integtest.ts +0 -12
- package/tests/cli-integ-tests/cdk-enablediffnofail.integtest.ts +0 -44
- package/tests/cli-integ-tests/cdk-failed-deploy-does-not-hang.integtest.ts +0 -12
- package/tests/cli-integ-tests/cdk-fast-deploy.integtest.ts +0 -41
- package/tests/cli-integ-tests/cdk-gc-garbage-collection-deletes-unused-ecr-images.integtest.ts +0 -48
- package/tests/cli-integ-tests/cdk-gc-garbage-collection-deletes-unused-s3-objects.integtest.ts +0 -51
- package/tests/cli-integ-tests/cdk-gc-garbage-collection-keeps-in-use-ecr-images.integtest.ts +0 -48
- package/tests/cli-integ-tests/cdk-gc-garbage-collection-keeps-in-use-s3-objects.integtest.ts +0 -52
- package/tests/cli-integ-tests/cdk-gc-garbage-collection-tags-unused-ecr-images.integtest.ts +0 -47
- package/tests/cli-integ-tests/cdk-gc-garbage-collection-tags-unused-s3-objects.integtest.ts +0 -63
- package/tests/cli-integ-tests/cdk-gc-garbage-collection-untags-in-use-ecr-images.integtest.ts +0 -55
- package/tests/cli-integ-tests/cdk-gc-garbage-collection-untags-in-use-s3-objects.integtest.ts +0 -63
- package/tests/cli-integ-tests/cdk-generating-and-loading-assembly.integtest.ts +0 -52
- package/tests/cli-integ-tests/cdk-hotswap-deployment-for-ecs-service-detects-failed-deployment-and-errors.integtest.ts +0 -29
- package/tests/cli-integ-tests/cdk-hotswap-deployment-for-ecs-service-waits-for-deployment-to-complete.integtest.ts +0 -45
- package/tests/cli-integ-tests/cdk-hotswap-deployment-supports-appsync-apis-with-many-functions.integtest.ts +0 -36
- package/tests/cli-integ-tests/cdk-hotswap-deployment-supports-ecs-service.integtest.ts +0 -41
- package/tests/cli-integ-tests/cdk-hotswap-deployment-supports-fn::importvalue-intrinsic.integtest.ts +0 -53
- package/tests/cli-integ-tests/cdk-hotswap-deployment-supports-lambda-functions-description-and-environment-variables.integtest.ts +0 -43
- package/tests/cli-integ-tests/cdk-hotswap-ecs-deployment-respects-properties-override.integtest.ts +0 -59
- package/tests/cli-integ-tests/cdk-iam-diff.integtest.ts +0 -23
- package/tests/cli-integ-tests/cdk-import-interactive.integtest.ts +0 -57
- package/tests/cli-integ-tests/cdk-lib-cli-lib-deploy.integtest.ts +0 -32
- package/tests/cli-integ-tests/cdk-lib-cli-lib-list.integtest.ts +0 -12
- package/tests/cli-integ-tests/cdk-lib-cli-lib-synth.integtest.ts +0 -27
- package/tests/cli-integ-tests/cdk-lib-security-related-changes-without-a-cli-are-expected-to-fail-when-approval-is-required.integtest.ts +0 -32
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate--from-stack-creates-deployable-app-csharp.integtest.ts +0 -13
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate--from-stack-creates-deployable-app-java.integtest.ts +0 -14
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate--from-stack-creates-deployable-app-python.integtest.ts +0 -13
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate--from-stack-creates-deployable-app-typescript.integtest.ts +0 -13
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-deploys-successfully-csharp.integtest.ts +0 -15
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-deploys-successfully-java.integtest.ts +0 -15
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-deploys-successfully-python.integtest.ts +0 -15
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-deploys-successfully-typescript.integtest.ts +0 -15
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-generates-migrate.json.integtest.ts +0 -20
- package/tests/cli-integ-tests/cdk-migrate/testcase.ts +0 -69
- package/tests/cli-integ-tests/cdk-nested-stack-with-parameters.integtest.ts +0 -28
- package/tests/cli-integ-tests/cdk-requests-go-through-a-proxy-when-configured.integtest.ts +0 -39
- package/tests/cli-integ-tests/cdk-sam-can-locally-test-the-synthesized-cdk-application.integtest.ts +0 -25
- package/tests/cli-integ-tests/cdk-security-related-changes-without-a-cli-are-expected-to-fail.integtest.ts +0 -30
- package/tests/cli-integ-tests/cdk-skips-notice-refresh.integtest.ts +0 -26
- package/tests/cli-integ-tests/cdk-ssm-parameter-provider-error.integtest.ts +0 -18
- package/tests/cli-integ-tests/cdk-stack-in-update_rollback_complete-state-can-be-updated.integtest.ts +0 -59
- package/tests/cli-integ-tests/cdk-stage-with-bundled-lambda-function.integtest.ts +0 -13
- package/tests/cli-integ-tests/cdk-synth---quiet-can-be-specified-in-cdk.json.integtest.ts +0 -20
- package/tests/cli-integ-tests/cdk-synthing-a-stage-with-errors-can-be-suppressed.integtest.ts +0 -15
- package/tests/cli-integ-tests/cdk-synthing-a-stage-with-errors-leads-to-failure.integtest.ts +0 -18
- package/tests/cli-integ-tests/cdk-templates-on-disk-contain-metadata-resource.integtest.ts +0 -25
- package/tests/cli-integ-tests/cdk-termination-protection.integtest.ts +0 -19
- package/tests/cli-integ-tests/cdk-test-cdk-rollback---force.integtest.ts +0 -48
- package/tests/cli-integ-tests/cdk-test-cdk-rollback.integtest.ts +0 -38
- package/tests/cli-integ-tests/cdk-test-migrate-deployment-for-app-with-localfile-source-in-migrate.json.integtest.ts +0 -56
- package/tests/cli-integ-tests/cdk-test-resource-import-with-construct-that-requires-bundling.integtest.ts +0 -74
- package/tests/cli-integ-tests/cdk-test-resource-import.integtest.ts +0 -64
- package/tests/cli-integ-tests/cdk-two-ways-of-showing-the-version.integtest.ts +0 -14
- package/tests/cli-integ-tests/cdk-update-to-stack-in-rollback_complete-state-will-delete-stack-and-create-a-new-one.integtest.ts +0 -47
- package/tests/cli-integ-tests/cdk-vpc-lookup.integtest.ts +0 -26
- package/tests/cli-integ-tests/proxy.integtest.ts +0 -168
- package/tests/init-csharp/init-csharp.integtest.ts +0 -15
- package/tests/init-fsharp/init-fsharp.integtest.ts +0 -15
- package/tests/init-go/init-go.integtest.ts +0 -28
- package/tests/init-java/init-java.integtest.ts +0 -14
- package/tests/init-javascript/init-javascript.integtest.ts +0 -58
- package/tests/init-python/init-python.integtest.ts +0 -20
- package/tests/init-typescript-app/init-typescript-app.integtest.ts +0 -67
- package/tests/init-typescript-lib/init-typescript-lib.integtest.ts +0 -13
- package/tests/tool-integrations/amplify.integtest.ts +0 -117
- package/tests/tool-integrations/with-tool-context.ts +0 -14
- package/tests/uberpackage/uberpackage.integtest.ts +0 -11
- /package/tests/cli-integ-tests/{cdk-deploy-with-role.integtest.d.ts → cdk-refactor-dry-run.integtest.d.ts} +0 -0
|
@@ -1,262 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-console */
|
|
2
|
-
import * as path from 'path';
|
|
3
|
-
import * as fs from 'fs-extra';
|
|
4
|
-
import * as glob from 'glob';
|
|
5
|
-
import * as yargs from 'yargs';
|
|
6
|
-
import { shell } from '..';
|
|
7
|
-
import { TestRepository } from '../staging/codeartifact';
|
|
8
|
-
import { uploadJavaPackages, mavenLogin } from '../staging/maven';
|
|
9
|
-
import { uploadNpmPackages, npmLogin } from '../staging/npm';
|
|
10
|
-
import { uploadDotnetPackages, nugetLogin } from '../staging/nuget';
|
|
11
|
-
import { uploadPythonPackages, pypiLogin } from '../staging/pypi';
|
|
12
|
-
import { UsageDir } from '../staging/usage-dir';
|
|
13
|
-
|
|
14
|
-
async function main() {
|
|
15
|
-
await yargs
|
|
16
|
-
.usage('$0 <command>')
|
|
17
|
-
.option('npm', {
|
|
18
|
-
description: 'Upload NPM packages only',
|
|
19
|
-
type: 'boolean',
|
|
20
|
-
requiresArg: false,
|
|
21
|
-
})
|
|
22
|
-
.option('python', {
|
|
23
|
-
description: 'Upload Python packages only',
|
|
24
|
-
type: 'boolean',
|
|
25
|
-
requiresArg: false,
|
|
26
|
-
})
|
|
27
|
-
.option('java', {
|
|
28
|
-
description: 'Upload Java packages only',
|
|
29
|
-
type: 'boolean',
|
|
30
|
-
requiresArg: false,
|
|
31
|
-
})
|
|
32
|
-
.option('dotnet', {
|
|
33
|
-
description: 'Upload Dotnet packages only',
|
|
34
|
-
type: 'boolean',
|
|
35
|
-
requiresArg: false,
|
|
36
|
-
})
|
|
37
|
-
.option('regression', {
|
|
38
|
-
description: 'Enable access to previous versions of the staged packages (this is expensive for CodeArtifact so we only do it when necessary)',
|
|
39
|
-
type: 'boolean',
|
|
40
|
-
requiresArg: false,
|
|
41
|
-
default: false,
|
|
42
|
-
})
|
|
43
|
-
.command('publish <DIRECTORY>', 'Publish a given directory', cmd => cmd
|
|
44
|
-
.positional('DIRECTORY', {
|
|
45
|
-
descripton: 'Directory distribution',
|
|
46
|
-
type: 'string',
|
|
47
|
-
demandOption: true,
|
|
48
|
-
})
|
|
49
|
-
.option('name', {
|
|
50
|
-
alias: 'n',
|
|
51
|
-
description: 'Name of the repository to create (default: generate unique name)',
|
|
52
|
-
type: 'string',
|
|
53
|
-
requiresArg: true,
|
|
54
|
-
}), async (args) => {
|
|
55
|
-
await validateDirectory(args);
|
|
56
|
-
const repo = await (args.name ? TestRepository.newWithName(args.name) : TestRepository.newRandom());
|
|
57
|
-
const usageDir = UsageDir.default();
|
|
58
|
-
|
|
59
|
-
await doLogin(repo, usageDir, args);
|
|
60
|
-
await publish(repo, usageDir, args);
|
|
61
|
-
|
|
62
|
-
header('Done');
|
|
63
|
-
usageDir.advertise();
|
|
64
|
-
})
|
|
65
|
-
.command('login', 'Login to a given repository', cmd => cmd
|
|
66
|
-
.option('name', {
|
|
67
|
-
alias: 'n',
|
|
68
|
-
description: 'Name of the repository to log in to',
|
|
69
|
-
type: 'string',
|
|
70
|
-
requiresArg: true,
|
|
71
|
-
demandOption: true,
|
|
72
|
-
}), async (args) => {
|
|
73
|
-
const repo = TestRepository.existing(args.name);
|
|
74
|
-
const usageDir = UsageDir.default();
|
|
75
|
-
|
|
76
|
-
await doLogin(repo, usageDir, args);
|
|
77
|
-
|
|
78
|
-
usageDir.advertise();
|
|
79
|
-
})
|
|
80
|
-
.command('run <DIRECTORY> <COMMAND..>', 'Publish and run a command', cmd => cmd
|
|
81
|
-
.positional('DIRECTORY', {
|
|
82
|
-
descripton: 'Directory distribution',
|
|
83
|
-
type: 'string',
|
|
84
|
-
demandOption: true,
|
|
85
|
-
})
|
|
86
|
-
.positional('COMMAND', {
|
|
87
|
-
alias: 'c',
|
|
88
|
-
description: 'Run the given command with the packages staged',
|
|
89
|
-
type: 'string',
|
|
90
|
-
array: true,
|
|
91
|
-
demandOption: true,
|
|
92
|
-
})
|
|
93
|
-
.option('cleanup', {
|
|
94
|
-
alias: 'C',
|
|
95
|
-
description: 'Cleanup the repository afterwards',
|
|
96
|
-
type: 'boolean',
|
|
97
|
-
default: true,
|
|
98
|
-
requiresArg: false,
|
|
99
|
-
}), async (args) => {
|
|
100
|
-
await validateDirectory(args);
|
|
101
|
-
const repo = await TestRepository.newRandom();
|
|
102
|
-
const usageDir = UsageDir.default();
|
|
103
|
-
|
|
104
|
-
await doLogin(repo, usageDir, args);
|
|
105
|
-
await publish(repo, usageDir, args);
|
|
106
|
-
|
|
107
|
-
try {
|
|
108
|
-
await usageDir.activateInCurrentProcess();
|
|
109
|
-
|
|
110
|
-
await shell(args.COMMAND ?? [], {
|
|
111
|
-
shell: true,
|
|
112
|
-
show: 'always',
|
|
113
|
-
});
|
|
114
|
-
} finally {
|
|
115
|
-
if (args.cleanup) {
|
|
116
|
-
await repo.delete();
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
})
|
|
120
|
-
.command('cleanup', 'Clean up testing repository', cmd => cmd
|
|
121
|
-
.option('name', {
|
|
122
|
-
alias: 'n',
|
|
123
|
-
description: 'Name of the repository to cleanup (default: most recent)',
|
|
124
|
-
type: 'string',
|
|
125
|
-
requiresArg: true,
|
|
126
|
-
}), async (args) => {
|
|
127
|
-
const usageDir = UsageDir.default();
|
|
128
|
-
|
|
129
|
-
let repositoryName = args.name;
|
|
130
|
-
if (!repositoryName) {
|
|
131
|
-
repositoryName = (await usageDir.currentEnv()).CODEARTIFACT_REPO;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
if (!repositoryName) {
|
|
135
|
-
console.log(`No --name given and no $CODEARTIFACT_REPO found in ${usageDir.directory}, nothing cleaned up`);
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
const repo = TestRepository.existing(repositoryName);
|
|
140
|
-
await repo.delete();
|
|
141
|
-
})
|
|
142
|
-
.command('gc', 'Clean up day-old testing repositories', cmd => cmd, async () => {
|
|
143
|
-
await TestRepository.gc();
|
|
144
|
-
})
|
|
145
|
-
.demandCommand(1, 'You must supply a command')
|
|
146
|
-
.help()
|
|
147
|
-
.showHelpOnFail(false)
|
|
148
|
-
.parse();
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
async function validateDirectory(args: {
|
|
152
|
-
DIRECTORY: string;
|
|
153
|
-
}) {
|
|
154
|
-
if (!await fs.pathExists(path.join(args.DIRECTORY, 'build.json'))) {
|
|
155
|
-
throw new Error(`${args.DIRECTORY} does not look like a CDK dist directory (build.json missing)`);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
async function doLogin(repo: TestRepository, usageDir: UsageDir, args: {
|
|
160
|
-
npm?: boolean;
|
|
161
|
-
python?: boolean;
|
|
162
|
-
java?: boolean;
|
|
163
|
-
dotnet?: boolean;
|
|
164
|
-
}) {
|
|
165
|
-
const login = await repo.loginInformation();
|
|
166
|
-
|
|
167
|
-
const oldEnv = await usageDir.currentEnv();
|
|
168
|
-
|
|
169
|
-
await usageDir.clean();
|
|
170
|
-
await usageDir.addToEnv({
|
|
171
|
-
CODEARTIFACT_REPO: login.repositoryName,
|
|
172
|
-
});
|
|
173
|
-
|
|
174
|
-
if (oldEnv.BUILD_VERSION) {
|
|
175
|
-
await usageDir.addToEnv({
|
|
176
|
-
BUILD_VERSION: oldEnv.BUILD_VERSION,
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
const doRepo = whichRepos(args);
|
|
181
|
-
|
|
182
|
-
await doRepo.npm(() => npmLogin(login, usageDir));
|
|
183
|
-
await doRepo.python(() => pypiLogin(login, usageDir));
|
|
184
|
-
await doRepo.java(() => mavenLogin(login, usageDir));
|
|
185
|
-
await doRepo.dotnet(() => nugetLogin(login, usageDir));
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
async function publish(repo: TestRepository, usageDir: UsageDir, args: {
|
|
189
|
-
DIRECTORY: string;
|
|
190
|
-
npm?: boolean;
|
|
191
|
-
python?: boolean;
|
|
192
|
-
java?: boolean;
|
|
193
|
-
dotnet?: boolean;
|
|
194
|
-
regression?: boolean;
|
|
195
|
-
}) {
|
|
196
|
-
const directory = `${args.DIRECTORY}`;
|
|
197
|
-
const login = await repo.loginInformation();
|
|
198
|
-
|
|
199
|
-
const doRepo = whichRepos(args);
|
|
200
|
-
|
|
201
|
-
const buildJson = await fs.readJson(path.join(directory, 'build.json'));
|
|
202
|
-
await usageDir.addToEnv({
|
|
203
|
-
BUILD_VERSION: buildJson.version,
|
|
204
|
-
});
|
|
205
|
-
|
|
206
|
-
await doRepo.npm(async () => {
|
|
207
|
-
header('NPM');
|
|
208
|
-
await uploadNpmPackages(glob.sync(path.join(directory, 'js', '*.tgz')), login, usageDir);
|
|
209
|
-
});
|
|
210
|
-
|
|
211
|
-
await doRepo.python(async () => {
|
|
212
|
-
header('Python');
|
|
213
|
-
await uploadPythonPackages(glob.sync(path.join(directory, 'python', '*')), login);
|
|
214
|
-
});
|
|
215
|
-
|
|
216
|
-
await doRepo.java(async () => {
|
|
217
|
-
header('Java');
|
|
218
|
-
await uploadJavaPackages(glob.sync(path.join(directory, 'java', '**', '*.pom')), login, usageDir);
|
|
219
|
-
});
|
|
220
|
-
|
|
221
|
-
await doRepo.dotnet(async () => {
|
|
222
|
-
header('.NET');
|
|
223
|
-
await uploadDotnetPackages(glob.sync(path.join(directory, 'dotnet', '**', '*.nupkg')), usageDir);
|
|
224
|
-
});
|
|
225
|
-
|
|
226
|
-
if (args.regression) {
|
|
227
|
-
console.log('🛍 Configuring packages for upstream versions');
|
|
228
|
-
await repo.markAllUpstreamAllow();
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
function whichRepos(args: {
|
|
233
|
-
npm?: boolean;
|
|
234
|
-
python?: boolean;
|
|
235
|
-
java?: boolean;
|
|
236
|
-
dotnet?: boolean;
|
|
237
|
-
}) {
|
|
238
|
-
const all = args.npm === undefined && args.python === undefined && args.java === undefined && args.dotnet === undefined;
|
|
239
|
-
|
|
240
|
-
const invoke = (block: () => Promise<void>) => block();
|
|
241
|
-
const skip = () => { };
|
|
242
|
-
|
|
243
|
-
return {
|
|
244
|
-
npm: args.npm || all ? invoke : skip,
|
|
245
|
-
python: args.python || all ? invoke : skip,
|
|
246
|
-
java: args.java || all ? invoke : skip,
|
|
247
|
-
dotnet: args.dotnet || all ? invoke : skip,
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
function header(caption: string) {
|
|
252
|
-
console.log('');
|
|
253
|
-
console.log('/'.repeat(70));
|
|
254
|
-
console.log(`// ${caption}`);
|
|
255
|
-
console.log('');
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
main().catch(e => {
|
|
259
|
-
// eslint-disable-next-line no-console
|
|
260
|
-
console.error(e);
|
|
261
|
-
process.exitCode = 1;
|
|
262
|
-
});
|
package/lib/cli/test-root.ts
DELETED
package/lib/corking.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Routines for corking stdout and stderr
|
|
3
|
-
*/
|
|
4
|
-
import * as stream from 'stream';
|
|
5
|
-
|
|
6
|
-
export class MemoryStream extends stream.Writable {
|
|
7
|
-
private parts = new Array<Buffer>();
|
|
8
|
-
|
|
9
|
-
public _write(chunk: Buffer, _encoding: string, callback: (error?: Error | null) => void): void {
|
|
10
|
-
this.parts.push(chunk);
|
|
11
|
-
callback();
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
public buffer() {
|
|
15
|
-
return Buffer.concat(this.parts);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
public clear() {
|
|
19
|
-
this.parts.splice(0, this.parts.length);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
public async flushTo(strm: NodeJS.WritableStream): Promise<void> {
|
|
23
|
-
const flushed = strm.write(this.buffer());
|
|
24
|
-
if (!flushed) {
|
|
25
|
-
return new Promise(ok => strm.once('drain', ok));
|
|
26
|
-
}
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
public toString() {
|
|
31
|
-
return this.buffer().toString();
|
|
32
|
-
}
|
|
33
|
-
}
|
package/lib/eventually.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param maxAttempts the maximum number of attempts
|
|
3
|
-
* @param interval interval in milliseconds to observe between attempts
|
|
4
|
-
*/
|
|
5
|
-
export type EventuallyOptions = {
|
|
6
|
-
maxAttempts?: number;
|
|
7
|
-
interval?: number;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const wait = (ms: number): Promise<void> => new Promise((resolve) => setTimeout(resolve, ms));
|
|
11
|
-
const DEFAULT_INTERVAL = 1000;
|
|
12
|
-
const DEFAULT_MAX_ATTEMPTS = 10;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Runs a function on an interval until the maximum number of attempts has
|
|
16
|
-
* been reached.
|
|
17
|
-
*
|
|
18
|
-
* Default interval = 1000 milliseconds
|
|
19
|
-
* Default maxAttempts = 10
|
|
20
|
-
*
|
|
21
|
-
* @param fn function to run
|
|
22
|
-
* @param options EventuallyOptions
|
|
23
|
-
*/
|
|
24
|
-
const eventually = async <T>(call: () => Promise<T>, options?: EventuallyOptions): Promise<T> => {
|
|
25
|
-
const opts = {
|
|
26
|
-
interval: options?.interval ? options.interval : DEFAULT_INTERVAL,
|
|
27
|
-
maxAttempts: options?.maxAttempts ? options.maxAttempts : DEFAULT_MAX_ATTEMPTS,
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
while (opts.maxAttempts-- >= 0) {
|
|
31
|
-
try {
|
|
32
|
-
return await call();
|
|
33
|
-
} catch (err) {
|
|
34
|
-
if (opts.maxAttempts <= 0) throw err;
|
|
35
|
-
}
|
|
36
|
-
await wait(opts.interval);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
throw new Error('An unexpected error has occurred.');
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export default eventually;
|
package/lib/files.ts
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import * as os from 'os';
|
|
2
|
-
import * as path from 'path';
|
|
3
|
-
import * as fs from 'fs-extra';
|
|
4
|
-
|
|
5
|
-
export async function rmFile(filename: string) {
|
|
6
|
-
if (await fs.pathExists(filename)) {
|
|
7
|
-
await fs.unlink(filename);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export async function addToFile(filename: string, line: string) {
|
|
12
|
-
let contents = await fs.pathExists(filename) ? await fs.readFile(filename, { encoding: 'utf-8' }) : '';
|
|
13
|
-
if (!contents.endsWith('\n')) {
|
|
14
|
-
contents += '\n';
|
|
15
|
-
}
|
|
16
|
-
contents += line + '\n';
|
|
17
|
-
|
|
18
|
-
await writeFile(filename, contents);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export async function writeFile(filename: string, contents: string) {
|
|
22
|
-
await fs.mkdirp(path.dirname(filename));
|
|
23
|
-
await fs.writeFile(filename, contents, { encoding: 'utf-8' });
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export async function copyDirectoryContents(dir: string, target: string) {
|
|
27
|
-
for (const file of await fs.readdir(path.join(dir), { encoding: 'utf-8' })) {
|
|
28
|
-
await fs.copyFile(path.join(dir, file), path.join(target, file));
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export function findUp(name: string, directory: string = process.cwd()): string | undefined {
|
|
33
|
-
const absoluteDirectory = path.resolve(directory);
|
|
34
|
-
|
|
35
|
-
const file = path.join(directory, name);
|
|
36
|
-
if (fs.existsSync(file)) {
|
|
37
|
-
return file;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const { root } = path.parse(absoluteDirectory);
|
|
41
|
-
if (absoluteDirectory == root) {
|
|
42
|
-
return undefined;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
return findUp(name, path.dirname(absoluteDirectory));
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Docker-safe home directory
|
|
50
|
-
*/
|
|
51
|
-
export function homeDir() {
|
|
52
|
-
return os.userInfo().homedir ?? os.homedir();
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export async function loadLines(filename: string): Promise<string[]> {
|
|
56
|
-
return await fs.pathExists(filename) ? (await fs.readFile(filename, { encoding: 'utf-8' })).trim().split('\n') : [];
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export async function writeLines(filename: string, lines: string[]) {
|
|
60
|
-
// Must end in a newline or our bash script won't read it properly
|
|
61
|
-
await fs.writeFile(filename, lines.join('\n') + '\n', { encoding: 'utf-8' });
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Update a spaceless ini file in place
|
|
66
|
-
*/
|
|
67
|
-
export function updateIniKey(lines: string[], key: string, value: string) {
|
|
68
|
-
const prefix = `${key}=`;
|
|
69
|
-
let found = false;
|
|
70
|
-
for (let i = 0; i < lines.length; i++) {
|
|
71
|
-
if (lines[i].startsWith(prefix)) {
|
|
72
|
-
lines[i] = prefix + value;
|
|
73
|
-
found = true;
|
|
74
|
-
break;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
if (!found) {
|
|
78
|
-
lines.push(prefix + value);
|
|
79
|
-
}
|
|
80
|
-
}
|
package/lib/github.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { Octokit } from '@octokit/rest';
|
|
2
|
-
import * as semver from 'semver';
|
|
3
|
-
|
|
4
|
-
export async function fetchPreviousVersion(token: string, options?: {
|
|
5
|
-
priorTo?: string;
|
|
6
|
-
majorVersion?: string;
|
|
7
|
-
}) {
|
|
8
|
-
const github = new Octokit({ auth: token });
|
|
9
|
-
const releases = await github.repos.listReleases({
|
|
10
|
-
owner: 'aws',
|
|
11
|
-
repo: 'aws-cdk',
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
// this returns a list in descending order, newest releases first
|
|
15
|
-
// opts for same major version where possible, falling back otherwise
|
|
16
|
-
// to previous major versions.
|
|
17
|
-
let previousMVRelease = undefined;
|
|
18
|
-
for (const release of releases.data) {
|
|
19
|
-
const version = release.name?.replace('v', '');
|
|
20
|
-
if (!version) { continue; }
|
|
21
|
-
|
|
22
|
-
// Any old version is fine
|
|
23
|
-
if (!options?.majorVersion && !options?.priorTo) {
|
|
24
|
-
return version;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
if (options?.majorVersion && `${semver.major(version)}` === options.majorVersion) {
|
|
28
|
-
return version;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (options?.priorTo && semver.lt(version, options?.priorTo) && semver.major(version) === semver.major(options.priorTo)) {
|
|
32
|
-
return version;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// Otherwise return the most recent version that didn't match any
|
|
36
|
-
if (!previousMVRelease) {
|
|
37
|
-
previousMVRelease = version;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
if (previousMVRelease) { return previousMVRelease; }
|
|
41
|
-
|
|
42
|
-
throw new Error(`Unable to find previous version given ${JSON.stringify(options)}`);
|
|
43
|
-
}
|
package/lib/index.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export * from './aws';
|
|
2
|
-
export * from './corking';
|
|
3
|
-
export * from './integ-test';
|
|
4
|
-
export * from './memoize';
|
|
5
|
-
export * from './resource-pool';
|
|
6
|
-
export * from './with-cli-lib';
|
|
7
|
-
export * from './with-sam';
|
|
8
|
-
export * from './shell';
|
|
9
|
-
export * from './with-aws';
|
|
10
|
-
export * from './with-cdk-app';
|
|
11
|
-
export * from './with-packages';
|
|
12
|
-
export * from './with-temporary-directory';
|
|
13
|
-
export * from './resources';
|
package/lib/integ-test.ts
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import * as fs from 'fs';
|
|
2
|
-
import * as path from 'path';
|
|
3
|
-
import { MemoryStream } from './corking';
|
|
4
|
-
|
|
5
|
-
const SKIP_TESTS = fs.readFileSync(path.join(__dirname, '..', 'skip-tests.txt'), { encoding: 'utf-8' })
|
|
6
|
-
.split('\n')
|
|
7
|
-
.map(x => x.trim())
|
|
8
|
-
.filter(x => x && !x.startsWith('#'));
|
|
9
|
-
|
|
10
|
-
if (SKIP_TESTS.length > 0) {
|
|
11
|
-
process.stderr.write(`ℹ️ Skipping tests: ${JSON.stringify(SKIP_TESTS)}\n`);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// Whether we want to stop after the first failure, for quicker debugging (hopefully).
|
|
15
|
-
const FAIL_FAST = process.env.FAIL_FAST === 'true';
|
|
16
|
-
|
|
17
|
-
// Keep track of whether the suite has failed. If so, we stop running.
|
|
18
|
-
let failed = false;
|
|
19
|
-
|
|
20
|
-
export interface TestContext {
|
|
21
|
-
readonly randomString: string;
|
|
22
|
-
readonly name: string;
|
|
23
|
-
readonly output: NodeJS.WritableStream;
|
|
24
|
-
log(s: string): void;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* A wrapper for jest's 'test' which takes regression-disabled tests into account and prints a banner
|
|
29
|
-
*/
|
|
30
|
-
export function integTest(
|
|
31
|
-
name: string,
|
|
32
|
-
callback: (context: TestContext) => Promise<void>,
|
|
33
|
-
timeoutMillis?: number,
|
|
34
|
-
): void {
|
|
35
|
-
const runner = shouldSkip(name) ? test.skip : test;
|
|
36
|
-
|
|
37
|
-
runner(name, async () => {
|
|
38
|
-
const output = new MemoryStream();
|
|
39
|
-
|
|
40
|
-
output.write('================================================================\n');
|
|
41
|
-
output.write(`${name}\n`);
|
|
42
|
-
output.write('================================================================\n');
|
|
43
|
-
|
|
44
|
-
const now = Date.now();
|
|
45
|
-
process.stderr.write(`[INTEG TEST::${name}] Starting (pid ${process.pid})...\n`);
|
|
46
|
-
try {
|
|
47
|
-
if (FAIL_FAST && failed) {
|
|
48
|
-
throw new Error('FAIL_FAST requested and currently failing. Stopping test early.');
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return await callback({
|
|
52
|
-
output,
|
|
53
|
-
randomString: randomString(),
|
|
54
|
-
name,
|
|
55
|
-
log(s: string) {
|
|
56
|
-
output.write(`${s}\n`);
|
|
57
|
-
},
|
|
58
|
-
});
|
|
59
|
-
} catch (e: any) {
|
|
60
|
-
failed = true;
|
|
61
|
-
|
|
62
|
-
// Print the buffered output, only if the test fails.
|
|
63
|
-
output.write(e.message);
|
|
64
|
-
output.write(e.stack);
|
|
65
|
-
process.stderr.write(`[INTEG TEST::${name}] Failed: ${e}\n`);
|
|
66
|
-
|
|
67
|
-
const isGitHub = !!process.env.GITHUB_RUN_ID;
|
|
68
|
-
|
|
69
|
-
if (isGitHub) {
|
|
70
|
-
// GitHub Actions compatible output formatting
|
|
71
|
-
// https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#setting-an-error-message
|
|
72
|
-
let written = process.stderr.write(`::error title=Failed ${name}::${e.message}\n`);
|
|
73
|
-
if (!written) {
|
|
74
|
-
// Wait for drain
|
|
75
|
-
await new Promise((ok) => process.stderr.once('drain', ok));
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// Print output only if the test fails. Use 'console.log' so the output is buffered by
|
|
79
|
-
// jest and prints without a stack trace (if verbose: false).
|
|
80
|
-
written = process.stdout.write([
|
|
81
|
-
`::group::Failure details: ${name} (click to expand)\n`,
|
|
82
|
-
`${output.buffer().toString()}\n`,
|
|
83
|
-
'::endgroup::\n',
|
|
84
|
-
].join(''));
|
|
85
|
-
if (!written) {
|
|
86
|
-
// Wait for drain
|
|
87
|
-
await new Promise((ok) => process.stdout.once('drain', ok));
|
|
88
|
-
}
|
|
89
|
-
} else {
|
|
90
|
-
// Use 'console.log' so the output is buffered by
|
|
91
|
-
// jest and prints without a stack trace (if verbose: false).
|
|
92
|
-
// eslint-disable-next-line no-console
|
|
93
|
-
console.log(output.buffer().toString());
|
|
94
|
-
}
|
|
95
|
-
throw e;
|
|
96
|
-
} finally {
|
|
97
|
-
const duration = Date.now() - now;
|
|
98
|
-
process.stderr.write(`[INTEG TEST::${name}] Done (${duration} ms).\n`);
|
|
99
|
-
}
|
|
100
|
-
}, timeoutMillis);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function shouldSkip(testName: string) {
|
|
104
|
-
return SKIP_TESTS.includes(testName);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
export function randomString() {
|
|
108
|
-
// Crazy
|
|
109
|
-
return Math.random().toString(36).replace(/[^a-z0-9]+/g, '');
|
|
110
|
-
}
|
package/lib/lists.ts
DELETED
package/lib/memoize.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Return a memoized version of an function with 0 arguments.
|
|
3
|
-
*
|
|
4
|
-
* Async-safe.
|
|
5
|
-
*/
|
|
6
|
-
export function memoize0<A>(fn: () => Promise<A>): () => Promise<A> {
|
|
7
|
-
let promise: Promise<A> | undefined;
|
|
8
|
-
return () => {
|
|
9
|
-
if (!promise) {
|
|
10
|
-
promise = fn();
|
|
11
|
-
}
|
|
12
|
-
return promise;
|
|
13
|
-
};
|
|
14
|
-
}
|
package/lib/npm.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { spawnSync } from 'child_process';
|
|
2
|
-
|
|
3
|
-
const MINIMUM_VERSION = '3.9';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Use NPM preinstalled on the machine to look up a list of TypeScript versions
|
|
7
|
-
*/
|
|
8
|
-
export function typescriptVersionsSync(): string[] {
|
|
9
|
-
const { stdout } = spawnSync('npm', ['--silent', 'view', `typescript@>=${MINIMUM_VERSION}`, 'version', '--json'], { encoding: 'utf-8' });
|
|
10
|
-
|
|
11
|
-
const versions: string[] = JSON.parse(stdout);
|
|
12
|
-
return Array.from(new Set(versions.map(v => v.split('.').slice(0, 2).join('.'))));
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Use NPM preinstalled on the machine to query publish times of versions
|
|
17
|
-
*/
|
|
18
|
-
export function typescriptVersionsYoungerThanDaysSync(days: number, versions: string[]): string[] {
|
|
19
|
-
const { stdout } = spawnSync('npm', ['--silent', 'view', 'typescript', 'time', '--json'], { encoding: 'utf-8' });
|
|
20
|
-
const versionTsMap: Record<string, string> = JSON.parse(stdout);
|
|
21
|
-
|
|
22
|
-
const cutoffDate = new Date(Date.now() - (days * 24 * 3600 * 1000));
|
|
23
|
-
const cutoffDateS = cutoffDate.toISOString();
|
|
24
|
-
|
|
25
|
-
const recentVersions = Object.entries(versionTsMap)
|
|
26
|
-
.filter(([_, dateS]) => dateS > cutoffDateS)
|
|
27
|
-
.map(([v]) => v);
|
|
28
|
-
|
|
29
|
-
// Input versions are of the form 3.9, 5.2, etc.
|
|
30
|
-
// Actual versions are of the form `3.9.15`, `5.3.0-dev.20511311`.
|
|
31
|
-
// Return only 2-digit versions for which there is a non-prerelease version in the set of recentVersions
|
|
32
|
-
// So a 2-digit versions that is followed by `.<digits>` until the end of the string.
|
|
33
|
-
return versions.filter((twoV) => {
|
|
34
|
-
const re = new RegExp(`^${reQuote(twoV)}\\.\\d+$`);
|
|
35
|
-
return recentVersions.some(fullV => fullV.match(re));
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function reQuote(str: string): string {
|
|
40
|
-
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
41
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { IPackageSourceSetup, IPackageSource } from './source';
|
|
2
|
-
export declare class ReleasePackageSourceSetup implements IPackageSourceSetup {
|
|
3
|
-
private readonly version;
|
|
4
|
-
private readonly frameworkVersion?;
|
|
5
|
-
readonly name = "release";
|
|
6
|
-
readonly description: string;
|
|
7
|
-
private tempDir?;
|
|
8
|
-
constructor(version: string, frameworkVersion?: string | undefined);
|
|
9
|
-
prepare(): Promise<void>;
|
|
10
|
-
cleanup(): Promise<void>;
|
|
11
|
-
}
|
|
12
|
-
export declare class ReleasePackageSource implements IPackageSource {
|
|
13
|
-
private readonly cliPath;
|
|
14
|
-
private readonly version;
|
|
15
|
-
constructor();
|
|
16
|
-
makeCliAvailable(): Promise<void>;
|
|
17
|
-
assertJsiiPackagesAvailable(): void;
|
|
18
|
-
initializeDotnetPackages(currentDir: string): Promise<void>;
|
|
19
|
-
majorVersion(): string;
|
|
20
|
-
requestedCliVersion(): string;
|
|
21
|
-
requestedFrameworkVersion(): string;
|
|
22
|
-
requestedAlphaVersion(): string;
|
|
23
|
-
}
|