projen 0.70.2 → 0.70.4
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/.jsii +108 -90
- package/docs/api/API.md +2 -0
- package/lib/.types-compat/ts3.9/lib/_resolve.d.ts +2 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/auto-discover.d.ts +129 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/awscdk-app-java.d.ts +53 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/awscdk-app-py.d.ts +49 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/awscdk-app-ts.d.ts +81 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/awscdk-construct.d.ts +89 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/awscdk-deps-java.d.ts +7 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/awscdk-deps-js.d.ts +7 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/awscdk-deps-py.d.ts +7 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/awscdk-deps.d.ts +168 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/awscdk-pytest-sample.d.ts +5 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/cdk-config.d.ts +122 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/cdk-tasks.d.ts +33 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/index.d.ts +14 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/integration-test.d.ts +46 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/internal.d.ts +20 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/lambda-extension.d.ts +68 -0
- package/lib/.types-compat/ts3.9/lib/awscdk/lambda-function.d.ts +171 -0
- package/lib/.types-compat/ts3.9/lib/build/build-workflow.d.ts +180 -0
- package/lib/.types-compat/ts3.9/lib/build/index.d.ts +1 -0
- package/lib/.types-compat/ts3.9/lib/builtin-example.task.d.ts +0 -0
- package/lib/.types-compat/ts3.9/lib/cdk/auto-discover-base.d.ts +45 -0
- package/lib/.types-compat/ts3.9/lib/cdk/construct-lib.d.ts +38 -0
- package/lib/.types-compat/ts3.9/lib/cdk/consts.d.ts +6 -0
- package/lib/.types-compat/ts3.9/lib/cdk/index.d.ts +5 -0
- package/lib/.types-compat/ts3.9/lib/cdk/integration-test-base.d.ts +53 -0
- package/lib/.types-compat/ts3.9/lib/cdk/internal.d.ts +4 -0
- package/lib/.types-compat/ts3.9/lib/cdk/jsii-docgen.d.ts +20 -0
- package/lib/.types-compat/ts3.9/lib/cdk/jsii-project.d.ts +153 -0
- package/lib/.types-compat/ts3.9/lib/cdk8s/auto-discover.d.ts +33 -0
- package/lib/.types-compat/ts3.9/lib/cdk8s/cdk8s-app-py.d.ts +39 -0
- package/lib/.types-compat/ts3.9/lib/cdk8s/cdk8s-app-ts.d.ts +45 -0
- package/lib/.types-compat/ts3.9/lib/cdk8s/cdk8s-construct.d.ts +71 -0
- package/lib/.types-compat/ts3.9/lib/cdk8s/cdk8s-deps-js.d.ts +4 -0
- package/lib/.types-compat/ts3.9/lib/cdk8s/cdk8s-deps-py.d.ts +4 -0
- package/lib/.types-compat/ts3.9/lib/cdk8s/cdk8s-deps.d.ts +144 -0
- package/lib/.types-compat/ts3.9/lib/cdk8s/index.d.ts +7 -0
- package/lib/.types-compat/ts3.9/lib/cdk8s/integration-test.d.ts +13 -0
- package/lib/.types-compat/ts3.9/lib/cdktf/cdktf-construct.d.ts +26 -0
- package/lib/.types-compat/ts3.9/lib/cdktf/index.d.ts +1 -0
- package/lib/.types-compat/ts3.9/lib/circleci/circleci.d.ts +132 -0
- package/lib/.types-compat/ts3.9/lib/circleci/constant.d.ts +5 -0
- package/lib/.types-compat/ts3.9/lib/circleci/index.d.ts +3 -0
- package/lib/.types-compat/ts3.9/lib/circleci/model.d.ts +260 -0
- package/lib/.types-compat/ts3.9/lib/cleanup.d.ts +2 -0
- package/lib/.types-compat/ts3.9/lib/cli/cmds/new.d.ts +9 -0
- package/lib/.types-compat/ts3.9/lib/cli/index.d.ts +1 -0
- package/lib/.types-compat/ts3.9/lib/cli/macros.d.ts +1 -0
- package/lib/.types-compat/ts3.9/lib/cli/synth.d.ts +19 -0
- package/lib/.types-compat/ts3.9/lib/cli/tasks.d.ts +7 -0
- package/lib/.types-compat/ts3.9/lib/cli/util.d.ts +19 -0
- package/lib/.types-compat/ts3.9/lib/clobber.d.ts +5 -0
- package/lib/.types-compat/ts3.9/lib/common.d.ts +5 -0
- package/lib/.types-compat/ts3.9/lib/component.d.ts +20 -0
- package/lib/.types-compat/ts3.9/lib/dependencies.d.ts +160 -0
- package/lib/.types-compat/ts3.9/lib/dev-env.d.ts +80 -0
- package/lib/.types-compat/ts3.9/lib/docker-compose/docker-compose-network.d.ts +103 -0
- package/lib/.types-compat/ts3.9/lib/docker-compose/docker-compose-port.d.ts +44 -0
- package/lib/.types-compat/ts3.9/lib/docker-compose/docker-compose-render.d.ts +2 -0
- package/lib/.types-compat/ts3.9/lib/docker-compose/docker-compose-service.d.ts +155 -0
- package/lib/.types-compat/ts3.9/lib/docker-compose/docker-compose-volume.d.ts +64 -0
- package/lib/.types-compat/ts3.9/lib/docker-compose/docker-compose.d.ts +99 -0
- package/lib/.types-compat/ts3.9/lib/docker-compose/index.d.ts +5 -0
- package/lib/.types-compat/ts3.9/lib/file.d.ts +119 -0
- package/lib/.types-compat/ts3.9/lib/gitattributes.d.ts +26 -0
- package/lib/.types-compat/ts3.9/lib/github/actions-provider.d.ts +28 -0
- package/lib/.types-compat/ts3.9/lib/github/auto-approve.d.ts +44 -0
- package/lib/.types-compat/ts3.9/lib/github/auto-merge.d.ts +41 -0
- package/lib/.types-compat/ts3.9/lib/github/constants.d.ts +20 -0
- package/lib/.types-compat/ts3.9/lib/github/dependabot.d.ts +247 -0
- package/lib/.types-compat/ts3.9/lib/github/github-credentials.d.ts +58 -0
- package/lib/.types-compat/ts3.9/lib/github/github-project.d.ts +177 -0
- package/lib/.types-compat/ts3.9/lib/github/github.d.ts +110 -0
- package/lib/.types-compat/ts3.9/lib/github/index.d.ts +15 -0
- package/lib/.types-compat/ts3.9/lib/github/mergify.d.ts +81 -0
- package/lib/.types-compat/ts3.9/lib/github/pr-template.d.ts +19 -0
- package/lib/.types-compat/ts3.9/lib/github/pull-request-lint.d.ts +48 -0
- package/lib/.types-compat/ts3.9/lib/github/stale-util.d.ts +8 -0
- package/lib/.types-compat/ts3.9/lib/github/stale.d.ts +85 -0
- package/lib/.types-compat/ts3.9/lib/github/task-workflow.d.ts +119 -0
- package/lib/.types-compat/ts3.9/lib/github/util.d.ts +1 -0
- package/lib/.types-compat/ts3.9/lib/github/workflow-actions.d.ts +78 -0
- package/lib/.types-compat/ts3.9/lib/github/workflows-model.d.ts +1031 -0
- package/lib/.types-compat/ts3.9/lib/github/workflows.d.ts +108 -0
- package/lib/.types-compat/ts3.9/lib/gitlab/configuration-model.d.ts +536 -0
- package/lib/.types-compat/ts3.9/lib/gitlab/configuration.d.ts +170 -0
- package/lib/.types-compat/ts3.9/lib/gitlab/gitlab-configuration.d.ts +19 -0
- package/lib/.types-compat/ts3.9/lib/gitlab/index.d.ts +4 -0
- package/lib/.types-compat/ts3.9/lib/gitlab/nested-configuration.d.ts +11 -0
- package/lib/.types-compat/ts3.9/lib/gitpod.d.ts +301 -0
- package/lib/.types-compat/ts3.9/lib/ignore-file.d.ts +59 -0
- package/lib/.types-compat/ts3.9/lib/index.d.ts +51 -0
- package/lib/.types-compat/ts3.9/lib/ini.d.ts +15 -0
- package/lib/.types-compat/ts3.9/lib/inventory.d.ts +46 -0
- package/lib/.types-compat/ts3.9/lib/java/index.d.ts +7 -0
- package/lib/.types-compat/ts3.9/lib/java/java-project.d.ts +141 -0
- package/lib/.types-compat/ts3.9/lib/java/junit.d.ts +29 -0
- package/lib/.types-compat/ts3.9/lib/java/maven-compile.d.ts +26 -0
- package/lib/.types-compat/ts3.9/lib/java/maven-packaging.d.ts +34 -0
- package/lib/.types-compat/ts3.9/lib/java/maven-sample.d.ts +14 -0
- package/lib/.types-compat/ts3.9/lib/java/pom.d.ts +214 -0
- package/lib/.types-compat/ts3.9/lib/java/projenrc.d.ts +59 -0
- package/lib/.types-compat/ts3.9/lib/javascript/bundler.d.ts +174 -0
- package/lib/.types-compat/ts3.9/lib/javascript/eslint.d.ts +175 -0
- package/lib/.types-compat/ts3.9/lib/javascript/index.d.ts +10 -0
- package/lib/.types-compat/ts3.9/lib/javascript/jest.d.ts +599 -0
- package/lib/.types-compat/ts3.9/lib/javascript/node-package.d.ts +605 -0
- package/lib/.types-compat/ts3.9/lib/javascript/node-project.d.ts +464 -0
- package/lib/.types-compat/ts3.9/lib/javascript/npm-config.d.ts +40 -0
- package/lib/.types-compat/ts3.9/lib/javascript/prettier.d.ts +358 -0
- package/lib/.types-compat/ts3.9/lib/javascript/projenrc.d.ts +18 -0
- package/lib/.types-compat/ts3.9/lib/javascript/render-options.d.ts +88 -0
- package/lib/.types-compat/ts3.9/lib/javascript/typescript-config.d.ts +403 -0
- package/lib/.types-compat/ts3.9/lib/javascript/upgrade-dependencies.d.ts +188 -0
- package/lib/.types-compat/ts3.9/lib/javascript/util.d.ts +21 -0
- package/lib/.types-compat/ts3.9/lib/json-patch.d.ts +75 -0
- package/lib/.types-compat/ts3.9/lib/json.d.ts +27 -0
- package/lib/.types-compat/ts3.9/lib/license.d.ts +31 -0
- package/lib/.types-compat/ts3.9/lib/logger.d.ts +73 -0
- package/lib/.types-compat/ts3.9/lib/logging.d.ts +8 -0
- package/lib/.types-compat/ts3.9/lib/makefile.d.ts +77 -0
- package/lib/.types-compat/ts3.9/lib/object-file.d.ts +155 -0
- package/lib/.types-compat/ts3.9/lib/option-hints.d.ts +18 -0
- package/lib/.types-compat/ts3.9/lib/project-build.d.ts +41 -0
- package/lib/.types-compat/ts3.9/lib/project.d.ts +374 -0
- package/lib/.types-compat/ts3.9/lib/projects.d.ts +63 -0
- package/lib/.types-compat/ts3.9/lib/projenrc-json.d.ts +27 -0
- package/lib/.types-compat/ts3.9/lib/projenrc.d.ts +18 -0
- package/lib/.types-compat/ts3.9/lib/python/index.d.ts +14 -0
- package/lib/.types-compat/ts3.9/lib/python/pip.d.ts +32 -0
- package/lib/.types-compat/ts3.9/lib/python/poetry.d.ts +177 -0
- package/lib/.types-compat/ts3.9/lib/python/projenrc.d.ts +32 -0
- package/lib/.types-compat/ts3.9/lib/python/pytest-sample.d.ts +21 -0
- package/lib/.types-compat/ts3.9/lib/python/pytest.d.ts +24 -0
- package/lib/.types-compat/ts3.9/lib/python/python-deps.d.ts +30 -0
- package/lib/.types-compat/ts3.9/lib/python/python-env.d.ts +6 -0
- package/lib/.types-compat/ts3.9/lib/python/python-packaging.d.ts +62 -0
- package/lib/.types-compat/ts3.9/lib/python/python-project.d.ts +190 -0
- package/lib/.types-compat/ts3.9/lib/python/python-sample.d.ts +17 -0
- package/lib/.types-compat/ts3.9/lib/python/requirements-file.d.ts +29 -0
- package/lib/.types-compat/ts3.9/lib/python/setuppy.d.ts +70 -0
- package/lib/.types-compat/ts3.9/lib/python/setuptools.d.ts +15 -0
- package/lib/.types-compat/ts3.9/lib/python/venv.d.ts +28 -0
- package/lib/.types-compat/ts3.9/lib/readme.d.ts +28 -0
- package/lib/.types-compat/ts3.9/lib/release/bump-version.d.ts +72 -0
- package/lib/.types-compat/ts3.9/lib/release/bump-version.task.d.ts +1 -0
- package/lib/.types-compat/ts3.9/lib/release/index.d.ts +3 -0
- package/lib/.types-compat/ts3.9/lib/release/publisher.d.ts +533 -0
- package/lib/.types-compat/ts3.9/lib/release/release-trigger.d.ts +97 -0
- package/lib/.types-compat/ts3.9/lib/release/release.d.ts +338 -0
- package/lib/.types-compat/ts3.9/lib/release/reset-version.task.d.ts +1 -0
- package/lib/.types-compat/ts3.9/lib/release/tag-version.d.ts +31 -0
- package/lib/.types-compat/ts3.9/lib/release/tag-version.task.d.ts +1 -0
- package/lib/.types-compat/ts3.9/lib/release/update-changelog.d.ts +36 -0
- package/lib/.types-compat/ts3.9/lib/release/update-changelog.task.d.ts +1 -0
- package/lib/.types-compat/ts3.9/lib/renovatebot.d.ts +99 -0
- package/lib/.types-compat/ts3.9/lib/run-projenrc-json.task.d.ts +1 -0
- package/lib/.types-compat/ts3.9/lib/sample-file.d.ts +88 -0
- package/lib/.types-compat/ts3.9/lib/semver.d.ts +34 -0
- package/lib/.types-compat/ts3.9/lib/smithy/smithy-build.d.ts +156 -0
- package/lib/.types-compat/ts3.9/lib/source-code.d.ts +46 -0
- package/lib/.types-compat/ts3.9/lib/task-model.d.ts +130 -0
- package/lib/.types-compat/ts3.9/lib/task-runtime.d.ts +32 -0
- package/lib/.types-compat/ts3.9/lib/task.d.ts +129 -0
- package/lib/.types-compat/ts3.9/lib/tasks.d.ts +51 -0
- package/lib/.types-compat/ts3.9/lib/testing.d.ts +18 -0
- package/lib/.types-compat/ts3.9/lib/textfile.d.ts +33 -0
- package/lib/.types-compat/ts3.9/lib/toml.d.ts +15 -0
- package/lib/.types-compat/ts3.9/lib/typescript/index.d.ts +4 -0
- package/lib/.types-compat/ts3.9/lib/typescript/projenrc-ts.d.ts +43 -0
- package/lib/.types-compat/ts3.9/lib/typescript/projenrc.d.ts +27 -0
- package/lib/.types-compat/ts3.9/lib/typescript/typescript-typedoc.d.ts +7 -0
- package/lib/.types-compat/ts3.9/lib/typescript/typescript.d.ts +163 -0
- package/lib/.types-compat/ts3.9/lib/util/semver.d.ts +43 -0
- package/lib/.types-compat/ts3.9/lib/util/synth.d.ts +42 -0
- package/lib/.types-compat/ts3.9/lib/util.d.ts +131 -0
- package/lib/.types-compat/ts3.9/lib/version.d.ts +45 -0
- package/lib/.types-compat/ts3.9/lib/vscode/devcontainer.d.ts +86 -0
- package/lib/.types-compat/ts3.9/lib/vscode/extensions.d.ts +36 -0
- package/lib/.types-compat/ts3.9/lib/vscode/index.d.ts +5 -0
- package/lib/.types-compat/ts3.9/lib/vscode/launch-config.d.ts +90 -0
- package/lib/.types-compat/ts3.9/lib/vscode/settings.d.ts +24 -0
- package/lib/.types-compat/ts3.9/lib/vscode/vscode.d.ts +14 -0
- package/lib/.types-compat/ts3.9/lib/web/index.d.ts +4 -0
- package/lib/.types-compat/ts3.9/lib/web/next.d.ts +100 -0
- package/lib/.types-compat/ts3.9/lib/web/postcss.d.ts +28 -0
- package/lib/.types-compat/ts3.9/lib/web/react.d.ts +105 -0
- package/lib/.types-compat/ts3.9/lib/web/tailwind.d.ts +21 -0
- package/lib/.types-compat/ts3.9/lib/xmlfile.d.ts +18 -0
- package/lib/.types-compat/ts3.9/lib/yaml.d.ts +25 -0
- package/lib/awscdk/auto-discover.js +5 -5
- package/lib/awscdk/awscdk-app-java.js +1 -1
- package/lib/awscdk/awscdk-app-py.js +1 -1
- package/lib/awscdk/awscdk-app-ts.js +1 -1
- package/lib/awscdk/awscdk-construct.js +2 -2
- package/lib/awscdk/awscdk-deps-java.js +1 -1
- package/lib/awscdk/awscdk-deps-js.js +1 -1
- package/lib/awscdk/awscdk-deps-py.js +1 -1
- package/lib/awscdk/awscdk-deps.js +1 -1
- package/lib/awscdk/cdk-config.js +1 -1
- package/lib/awscdk/cdk-tasks.js +1 -1
- package/lib/awscdk/integration-test.js +1 -1
- package/lib/awscdk/lambda-extension.js +1 -1
- package/lib/awscdk/lambda-function.js +2 -2
- package/lib/build/build-workflow.js +1 -1
- package/lib/cdk/auto-discover-base.js +2 -2
- package/lib/cdk/construct-lib.js +1 -1
- package/lib/cdk/integration-test-base.js +1 -1
- package/lib/cdk/jsii-docgen.js +1 -1
- package/lib/cdk/jsii-project.js +8 -5
- package/lib/cdk8s/auto-discover.js +2 -2
- package/lib/cdk8s/cdk8s-app-py.js +1 -1
- package/lib/cdk8s/cdk8s-app-ts.js +1 -1
- package/lib/cdk8s/cdk8s-construct.js +1 -1
- package/lib/cdk8s/cdk8s-deps-py.js +1 -1
- package/lib/cdk8s/cdk8s-deps.js +1 -1
- package/lib/cdk8s/integration-test.js +1 -1
- package/lib/cdktf/cdktf-construct.js +1 -1
- package/lib/circleci/circleci.js +1 -1
- package/lib/cli/index.js +2 -18
- package/lib/component.js +1 -1
- package/lib/dependencies.js +1 -1
- package/lib/dev-env.js +1 -1
- package/lib/docker-compose/docker-compose-service.js +1 -1
- package/lib/docker-compose/docker-compose.js +1 -1
- package/lib/file.js +1 -1
- package/lib/gitattributes.js +1 -1
- package/lib/github/actions-provider.js +1 -1
- package/lib/github/auto-approve.js +1 -1
- package/lib/github/auto-merge.js +1 -1
- package/lib/github/dependabot.js +1 -1
- package/lib/github/github-credentials.js +1 -1
- package/lib/github/github-project.js +1 -1
- package/lib/github/github.js +1 -1
- package/lib/github/mergify.js +1 -1
- package/lib/github/pr-template.js +1 -1
- package/lib/github/pull-request-lint.js +1 -1
- package/lib/github/stale.js +1 -1
- package/lib/github/task-workflow.js +1 -1
- package/lib/github/workflows.js +1 -1
- package/lib/gitlab/configuration.js +1 -1
- package/lib/gitlab/gitlab-configuration.js +1 -1
- package/lib/gitlab/nested-configuration.js +1 -1
- package/lib/gitpod.js +1 -1
- package/lib/ignore-file.js +1 -1
- package/lib/ini.js +1 -1
- package/lib/java/java-project.js +1 -1
- package/lib/java/junit.js +1 -1
- package/lib/java/maven-compile.js +1 -1
- package/lib/java/maven-packaging.js +1 -1
- package/lib/java/maven-sample.js +1 -1
- package/lib/java/pom.js +1 -1
- package/lib/java/projenrc.js +1 -1
- package/lib/javascript/bundler.js +1 -1
- package/lib/javascript/eslint.js +1 -1
- package/lib/javascript/jest.js +4 -4
- package/lib/javascript/node-package.js +1 -1
- package/lib/javascript/node-project.js +1 -1
- package/lib/javascript/npm-config.js +1 -1
- package/lib/javascript/prettier.js +1 -1
- package/lib/javascript/projenrc.js +1 -1
- package/lib/javascript/typescript-config.js +1 -1
- package/lib/javascript/upgrade-dependencies.js +2 -2
- package/lib/json-patch.js +1 -1
- package/lib/json.js +1 -1
- package/lib/license.js +1 -1
- package/lib/logger.js +1 -1
- package/lib/makefile.js +1 -1
- package/lib/object-file.js +1 -1
- package/lib/project-build.js +1 -1
- package/lib/project.js +1 -1
- package/lib/projects.js +1 -1
- package/lib/projenrc-json.js +2 -2
- package/lib/projenrc.js +1 -1
- package/lib/python/pip.js +1 -1
- package/lib/python/poetry.js +2 -2
- package/lib/python/projenrc.js +1 -1
- package/lib/python/pytest-sample.js +1 -1
- package/lib/python/pytest.js +1 -1
- package/lib/python/python-project.js +1 -1
- package/lib/python/python-sample.js +1 -1
- package/lib/python/requirements-file.js +1 -1
- package/lib/python/setuppy.js +1 -1
- package/lib/python/setuptools.js +1 -1
- package/lib/python/venv.js +1 -1
- package/lib/readme.js +1 -1
- package/lib/release/publisher.d.ts +7 -0
- package/lib/release/publisher.js +9 -2
- package/lib/release/release-trigger.js +1 -1
- package/lib/release/release.js +3 -2
- package/lib/renovatebot.js +1 -1
- package/lib/sample-file.js +2 -2
- package/lib/semver.js +1 -1
- package/lib/source-code.js +1 -1
- package/lib/task-runtime.js +1 -1
- package/lib/task.js +1 -1
- package/lib/tasks.js +1 -1
- package/lib/testing.js +1 -1
- package/lib/textfile.js +1 -1
- package/lib/toml.js +1 -1
- package/lib/typescript/projenrc-ts.js +1 -1
- package/lib/typescript/projenrc.js +1 -1
- package/lib/typescript/typescript-typedoc.js +1 -1
- package/lib/typescript/typescript.js +3 -3
- package/lib/util.d.ts +19 -0
- package/lib/util.js +33 -2
- package/lib/version.js +1 -1
- package/lib/vscode/devcontainer.js +1 -1
- package/lib/vscode/extensions.js +1 -1
- package/lib/vscode/launch-config.js +1 -1
- package/lib/vscode/settings.js +1 -1
- package/lib/vscode/vscode.js +1 -1
- package/lib/web/next.js +3 -3
- package/lib/web/postcss.js +1 -1
- package/lib/web/react.js +4 -4
- package/lib/web/tailwind.js +1 -1
- package/lib/xmlfile.js +1 -1
- package/lib/yaml.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { Junit, JunitOptions } from "./junit";
|
|
2
|
+
import { MavenCompile, MavenCompileOptions } from "./maven-compile";
|
|
3
|
+
import { MavenPackaging, MavenPackagingOptions } from "./maven-packaging";
|
|
4
|
+
import { PluginOptions, Pom, PomOptions } from "./pom";
|
|
5
|
+
import { Projenrc as ProjenrcJava, ProjenrcOptions } from "./projenrc";
|
|
6
|
+
import { GitHubProject, GitHubProjectOptions } from "../github";
|
|
7
|
+
/**
|
|
8
|
+
* Options for `JavaProject`.
|
|
9
|
+
*/
|
|
10
|
+
export interface JavaProjectCommonOptions extends GitHubProjectOptions, PomOptions {
|
|
11
|
+
/**
|
|
12
|
+
* Final artifact output directory.
|
|
13
|
+
*
|
|
14
|
+
* @default "dist/java"
|
|
15
|
+
*/
|
|
16
|
+
readonly distdir?: string;
|
|
17
|
+
/**
|
|
18
|
+
* List of runtime dependencies for this project.
|
|
19
|
+
*
|
|
20
|
+
* Dependencies use the format: `<groupId>/<artifactId>@<semver>`
|
|
21
|
+
*
|
|
22
|
+
* Additional dependencies can be added via `project.addDependency()`.
|
|
23
|
+
*
|
|
24
|
+
* @default []
|
|
25
|
+
* @featured
|
|
26
|
+
*/
|
|
27
|
+
readonly deps?: string[];
|
|
28
|
+
/**
|
|
29
|
+
* List of test dependencies for this project.
|
|
30
|
+
*
|
|
31
|
+
* Dependencies use the format: `<groupId>/<artifactId>@<semver>`
|
|
32
|
+
*
|
|
33
|
+
* Additional dependencies can be added via `project.addTestDependency()`.
|
|
34
|
+
*
|
|
35
|
+
* @default []
|
|
36
|
+
* @featured
|
|
37
|
+
*/
|
|
38
|
+
readonly testDeps?: string[];
|
|
39
|
+
/**
|
|
40
|
+
* Include junit tests.
|
|
41
|
+
* @default true
|
|
42
|
+
*/
|
|
43
|
+
readonly junit?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* junit options
|
|
46
|
+
* @default - defaults
|
|
47
|
+
*/
|
|
48
|
+
readonly junitOptions?: JunitOptions;
|
|
49
|
+
/**
|
|
50
|
+
* Packaging options.
|
|
51
|
+
* @default - defaults
|
|
52
|
+
*/
|
|
53
|
+
readonly packagingOptions?: MavenPackagingOptions;
|
|
54
|
+
/**
|
|
55
|
+
* Compile options.
|
|
56
|
+
* @default - defaults
|
|
57
|
+
*/
|
|
58
|
+
readonly compileOptions?: MavenCompileOptions;
|
|
59
|
+
/**
|
|
60
|
+
* Use projenrc in java.
|
|
61
|
+
*
|
|
62
|
+
* This will install `projen` as a java dependency and will add a `synth` task which
|
|
63
|
+
* will compile & execute `main()` from `src/main/java/projenrc.java`.
|
|
64
|
+
*
|
|
65
|
+
* @default true
|
|
66
|
+
*/
|
|
67
|
+
readonly projenrcJava?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Options related to projenrc in java.
|
|
70
|
+
* @default - default options
|
|
71
|
+
*/
|
|
72
|
+
readonly projenrcJavaOptions?: ProjenrcOptions;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Options for `JavaProject`.
|
|
76
|
+
*/
|
|
77
|
+
export interface JavaProjectOptions extends JavaProjectCommonOptions {
|
|
78
|
+
/**
|
|
79
|
+
* Include sample code and test if the relevant directories don't exist.
|
|
80
|
+
* @default true
|
|
81
|
+
*/
|
|
82
|
+
readonly sample?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* The java package to use for the code sample.
|
|
85
|
+
* @default "org.acme"
|
|
86
|
+
*/
|
|
87
|
+
readonly sampleJavaPackage?: string;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Java project.
|
|
91
|
+
*
|
|
92
|
+
* @pjid java
|
|
93
|
+
*/
|
|
94
|
+
export declare class JavaProject extends GitHubProject {
|
|
95
|
+
/**
|
|
96
|
+
* API for managing `pom.xml`.
|
|
97
|
+
*/
|
|
98
|
+
readonly pom: Pom;
|
|
99
|
+
/**
|
|
100
|
+
* JUnit component.
|
|
101
|
+
*/
|
|
102
|
+
readonly junit?: Junit;
|
|
103
|
+
/**
|
|
104
|
+
* Packaging component.
|
|
105
|
+
*/
|
|
106
|
+
readonly packaging: MavenPackaging;
|
|
107
|
+
/**
|
|
108
|
+
* Compile component.
|
|
109
|
+
*/
|
|
110
|
+
readonly compile: MavenCompile;
|
|
111
|
+
/**
|
|
112
|
+
* Projenrc component.
|
|
113
|
+
*/
|
|
114
|
+
readonly projenrc?: ProjenrcJava;
|
|
115
|
+
/**
|
|
116
|
+
* Maven artifact output directory.
|
|
117
|
+
*/
|
|
118
|
+
readonly distdir: string;
|
|
119
|
+
constructor(options: JavaProjectOptions);
|
|
120
|
+
/**
|
|
121
|
+
* Adds a runtime dependency.
|
|
122
|
+
*
|
|
123
|
+
* @param spec Format `<groupId>/<artifactId>@<semver>`
|
|
124
|
+
*/
|
|
125
|
+
addDependency(spec: string): void;
|
|
126
|
+
/**
|
|
127
|
+
* Adds a test dependency.
|
|
128
|
+
*
|
|
129
|
+
* @param spec Format `<groupId>/<artifactId>@<semver>`
|
|
130
|
+
*/
|
|
131
|
+
addTestDependency(spec: string): void;
|
|
132
|
+
/**
|
|
133
|
+
* Adds a build plugin to the pom.
|
|
134
|
+
*
|
|
135
|
+
* The plug in is also added as a BUILD dep to the project.
|
|
136
|
+
*
|
|
137
|
+
* @param spec dependency spec (`group/artifact@version`)
|
|
138
|
+
* @param options plugin options
|
|
139
|
+
*/
|
|
140
|
+
addPlugin(spec: string, options?: PluginOptions): import("..").Dependency;
|
|
141
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Pom } from "./pom";
|
|
2
|
+
import { Component } from "../component";
|
|
3
|
+
import { Project } from "../project";
|
|
4
|
+
/**
|
|
5
|
+
* Options for `Junit`.
|
|
6
|
+
*/
|
|
7
|
+
export interface JunitOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Java pom.
|
|
10
|
+
*/
|
|
11
|
+
readonly pom: Pom;
|
|
12
|
+
/**
|
|
13
|
+
* Junit version
|
|
14
|
+
*
|
|
15
|
+
* @default "5.7.0"
|
|
16
|
+
*/
|
|
17
|
+
readonly version?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Java package for test sample.
|
|
20
|
+
* @default "org.acme"
|
|
21
|
+
*/
|
|
22
|
+
readonly sampleJavaPackage?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Implements JUnit-based testing.
|
|
26
|
+
*/
|
|
27
|
+
export declare class Junit extends Component {
|
|
28
|
+
constructor(project: Project, options: JunitOptions);
|
|
29
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Pom } from "./pom";
|
|
2
|
+
import { Component } from "../component";
|
|
3
|
+
import { Project } from "../project";
|
|
4
|
+
/**
|
|
5
|
+
* Options for `MavenCompile`.
|
|
6
|
+
*/
|
|
7
|
+
export interface MavenCompileOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Source language version.
|
|
10
|
+
*
|
|
11
|
+
* @default "1.8"
|
|
12
|
+
*/
|
|
13
|
+
readonly source?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Target JVM version.
|
|
16
|
+
*
|
|
17
|
+
* @default "1.8"
|
|
18
|
+
*/
|
|
19
|
+
readonly target?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Adds the maven-compiler plugin to a POM file and the `compile` task.
|
|
23
|
+
*/
|
|
24
|
+
export declare class MavenCompile extends Component {
|
|
25
|
+
constructor(project: Project, pom: Pom, options?: MavenCompileOptions);
|
|
26
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Pom } from "./pom";
|
|
2
|
+
import { Component } from "../component";
|
|
3
|
+
import { Project } from "../project";
|
|
4
|
+
/**
|
|
5
|
+
* Options for `MavenPackage`.
|
|
6
|
+
*/
|
|
7
|
+
export interface MavenPackagingOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Include sources jar in package.
|
|
10
|
+
* @default true
|
|
11
|
+
*/
|
|
12
|
+
readonly sources?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Where to place the package output?
|
|
15
|
+
* @default "dist/java"
|
|
16
|
+
*/
|
|
17
|
+
readonly distdir?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Include javadocs jar in package.
|
|
20
|
+
* @default true
|
|
21
|
+
*/
|
|
22
|
+
readonly javadocs?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Exclude source files from docs.
|
|
25
|
+
* @default []
|
|
26
|
+
*/
|
|
27
|
+
readonly javadocsExclude?: string[];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Configures a maven project to produce a .jar archive with sources and javadocs.
|
|
31
|
+
*/
|
|
32
|
+
export declare class MavenPackaging extends Component {
|
|
33
|
+
constructor(project: Project, pom: Pom, options?: MavenPackagingOptions);
|
|
34
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component } from "../component";
|
|
2
|
+
import { Project } from "../project";
|
|
3
|
+
export interface MavenSampleOptions {
|
|
4
|
+
/**
|
|
5
|
+
* Project root java package.
|
|
6
|
+
*/
|
|
7
|
+
readonly package: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Java code sample.
|
|
11
|
+
*/
|
|
12
|
+
export declare class MavenSample extends Component {
|
|
13
|
+
constructor(project: Project, options: MavenSampleOptions);
|
|
14
|
+
}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { Component } from "../component";
|
|
2
|
+
import { Project } from "../project";
|
|
3
|
+
/**
|
|
4
|
+
* Options for `Pom`.
|
|
5
|
+
*/
|
|
6
|
+
export interface PomOptions {
|
|
7
|
+
/**
|
|
8
|
+
* This is generally unique amongst an organization or a project. For example,
|
|
9
|
+
* all core Maven artifacts do (well, should) live under the groupId
|
|
10
|
+
* org.apache.maven. Group ID's do not necessarily use the dot notation, for
|
|
11
|
+
* example, the junit project. Note that the dot-notated groupId does not have
|
|
12
|
+
* to correspond to the package structure that the project contains. It is,
|
|
13
|
+
* however, a good practice to follow. When stored within a repository, the
|
|
14
|
+
* group acts much like the Java packaging structure does in an operating
|
|
15
|
+
* system. The dots are replaced by OS specific directory separators (such as
|
|
16
|
+
* '/' in Unix) which becomes a relative directory structure from the base
|
|
17
|
+
* repository. In the example given, the org.codehaus.mojo group lives within
|
|
18
|
+
* the directory $M2_REPO/org/codehaus/mojo.
|
|
19
|
+
* @default "org.acme"
|
|
20
|
+
* @featured
|
|
21
|
+
*/
|
|
22
|
+
readonly groupId: string;
|
|
23
|
+
/**
|
|
24
|
+
* The artifactId is generally the name that the project is known by. Although
|
|
25
|
+
* the groupId is important, people within the group will rarely mention the
|
|
26
|
+
* groupId in discussion (they are often all be the same ID, such as the
|
|
27
|
+
* MojoHaus project groupId: org.codehaus.mojo). It, along with the groupId,
|
|
28
|
+
* creates a key that separates this project from every other project in the
|
|
29
|
+
* world (at least, it should :) ). Along with the groupId, the artifactId
|
|
30
|
+
* fully defines the artifact's living quarters within the repository. In the
|
|
31
|
+
* case of the above project, my-project lives in
|
|
32
|
+
* $M2_REPO/org/codehaus/mojo/my-project.
|
|
33
|
+
* @default "my-app"
|
|
34
|
+
* @featured
|
|
35
|
+
*/
|
|
36
|
+
readonly artifactId: string;
|
|
37
|
+
/**
|
|
38
|
+
* This is the last piece of the naming puzzle. groupId:artifactId denotes a
|
|
39
|
+
* single project but they cannot delineate which incarnation of that project
|
|
40
|
+
* we are talking about. Do we want the junit:junit of 2018 (version 4.12), or
|
|
41
|
+
* of 2007 (version 3.8.2)? In short: code changes, those changes should be
|
|
42
|
+
* versioned, and this element keeps those versions in line. It is also used
|
|
43
|
+
* within an artifact's repository to separate versions from each other.
|
|
44
|
+
* my-project version 1.0 files live in the directory structure
|
|
45
|
+
* $M2_REPO/org/codehaus/mojo/my-project/1.0.
|
|
46
|
+
* @default "0.1.0"
|
|
47
|
+
* @featured
|
|
48
|
+
*/
|
|
49
|
+
readonly version: string;
|
|
50
|
+
/**
|
|
51
|
+
* Project packaging format.
|
|
52
|
+
*
|
|
53
|
+
* @default "jar"
|
|
54
|
+
*/
|
|
55
|
+
readonly packaging?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Description of a project is always good. Although this should not replace
|
|
58
|
+
* formal documentation, a quick comment to any readers of the POM is always
|
|
59
|
+
* helpful.
|
|
60
|
+
*
|
|
61
|
+
* @default undefined
|
|
62
|
+
* @featured
|
|
63
|
+
*/
|
|
64
|
+
readonly description?: string;
|
|
65
|
+
/**
|
|
66
|
+
* The URL, like the name, is not required. This is a nice gesture for
|
|
67
|
+
* projects users, however, so that they know where the project lives.
|
|
68
|
+
*
|
|
69
|
+
* @default undefined
|
|
70
|
+
* @featured
|
|
71
|
+
*/
|
|
72
|
+
readonly url?: string;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Represents a Maven repository
|
|
76
|
+
* @see https://maven.apache.org/guides/introduction/introduction-to-repositories.html
|
|
77
|
+
*/
|
|
78
|
+
export interface MavenRepository {
|
|
79
|
+
/**
|
|
80
|
+
* The identifier for the repository
|
|
81
|
+
*/
|
|
82
|
+
readonly id: string;
|
|
83
|
+
/**
|
|
84
|
+
* The url of the repository
|
|
85
|
+
*/
|
|
86
|
+
readonly url: string;
|
|
87
|
+
/**
|
|
88
|
+
* The name of the repository
|
|
89
|
+
*/
|
|
90
|
+
readonly name?: string;
|
|
91
|
+
/**
|
|
92
|
+
* The layout of the repository
|
|
93
|
+
*/
|
|
94
|
+
readonly layout?: string;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* A Project Object Model or POM is the fundamental unit of work in Maven. It is
|
|
98
|
+
* an XML file that contains information about the project and configuration
|
|
99
|
+
* details used by Maven to build the project.
|
|
100
|
+
*/
|
|
101
|
+
export declare class Pom extends Component {
|
|
102
|
+
/**
|
|
103
|
+
* The name of the pom file.
|
|
104
|
+
*/
|
|
105
|
+
readonly fileName: string;
|
|
106
|
+
/**
|
|
107
|
+
* Maven group ID.
|
|
108
|
+
*/
|
|
109
|
+
readonly groupId: string;
|
|
110
|
+
/**
|
|
111
|
+
* Maven artifact ID.
|
|
112
|
+
*/
|
|
113
|
+
readonly artifactId: string;
|
|
114
|
+
/**
|
|
115
|
+
* Project version.
|
|
116
|
+
*/
|
|
117
|
+
readonly version: string;
|
|
118
|
+
/**
|
|
119
|
+
* Maven packaging format.
|
|
120
|
+
*/
|
|
121
|
+
readonly packaging: string;
|
|
122
|
+
/**
|
|
123
|
+
* Project display name.
|
|
124
|
+
*/
|
|
125
|
+
readonly name?: string;
|
|
126
|
+
/**
|
|
127
|
+
* Project description.
|
|
128
|
+
*/
|
|
129
|
+
readonly description?: string;
|
|
130
|
+
/**
|
|
131
|
+
* Project URL.
|
|
132
|
+
*/
|
|
133
|
+
readonly url?: string;
|
|
134
|
+
private readonly properties;
|
|
135
|
+
private readonly repositories;
|
|
136
|
+
constructor(project: Project, options: PomOptions);
|
|
137
|
+
/**
|
|
138
|
+
* Adds a key/value property to the pom.
|
|
139
|
+
* @param key the key
|
|
140
|
+
* @param value the value
|
|
141
|
+
*/
|
|
142
|
+
addProperty(key: string, value: string): void;
|
|
143
|
+
/**
|
|
144
|
+
* Adds a runtime dependency.
|
|
145
|
+
*
|
|
146
|
+
* @param spec Format `<groupId>/<artifactId>@<semver>`
|
|
147
|
+
*/
|
|
148
|
+
addDependency(spec: string): void;
|
|
149
|
+
/**
|
|
150
|
+
* Adds a test dependency.
|
|
151
|
+
*
|
|
152
|
+
* @param spec Format `<groupId>/<artifactId>@<semver>`
|
|
153
|
+
*/
|
|
154
|
+
addTestDependency(spec: string): void;
|
|
155
|
+
/**
|
|
156
|
+
* Adds a build plugin to the pom.
|
|
157
|
+
*
|
|
158
|
+
* The plug in is also added as a BUILD dep to the project.
|
|
159
|
+
*
|
|
160
|
+
* @param spec dependency spec (`group/artifact@version`)
|
|
161
|
+
* @param options plugin options
|
|
162
|
+
*/
|
|
163
|
+
addPlugin(spec: string, options?: PluginOptions): import("../dependencies").Dependency;
|
|
164
|
+
/**
|
|
165
|
+
* Adds a repository to the pom
|
|
166
|
+
* @param repository the repository to add
|
|
167
|
+
*/
|
|
168
|
+
addRepository(repository: MavenRepository): void;
|
|
169
|
+
private synthPom;
|
|
170
|
+
private synthDependencies;
|
|
171
|
+
private synthRepositories;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Options for Maven plugins.
|
|
175
|
+
*/
|
|
176
|
+
export interface PluginOptions {
|
|
177
|
+
/**
|
|
178
|
+
* Plugin key/value configuration
|
|
179
|
+
* @default {}
|
|
180
|
+
*/
|
|
181
|
+
readonly configuration?: {
|
|
182
|
+
[key: string]: any;
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* Plugin executions
|
|
186
|
+
* @default []
|
|
187
|
+
*/
|
|
188
|
+
readonly executions?: PluginExecution[];
|
|
189
|
+
/**
|
|
190
|
+
* You could configure the dependencies for the plugin.
|
|
191
|
+
*
|
|
192
|
+
* Dependencies are in `<groupId>/<artifactId>@<semver>` format.
|
|
193
|
+
*
|
|
194
|
+
* @default []
|
|
195
|
+
*/
|
|
196
|
+
readonly dependencies?: string[];
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Plugin execution definition.
|
|
200
|
+
*/
|
|
201
|
+
export interface PluginExecution {
|
|
202
|
+
/**
|
|
203
|
+
* The ID.
|
|
204
|
+
*/
|
|
205
|
+
readonly id: string;
|
|
206
|
+
/**
|
|
207
|
+
* Which Maven goals this plugin should be associated with.
|
|
208
|
+
*/
|
|
209
|
+
readonly goals: string[];
|
|
210
|
+
/**
|
|
211
|
+
* The phase in which the plugin should execute.
|
|
212
|
+
*/
|
|
213
|
+
readonly phase?: string;
|
|
214
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Pom } from "./pom";
|
|
2
|
+
import { ProjectOption } from "../inventory";
|
|
3
|
+
import { Project } from "../project";
|
|
4
|
+
import { ProjenrcFile } from "../projenrc";
|
|
5
|
+
/**
|
|
6
|
+
* Options for `Projenrc`.
|
|
7
|
+
*/
|
|
8
|
+
export interface ProjenrcOptions {
|
|
9
|
+
/**
|
|
10
|
+
* The name of the Java class which contains the `main()` method for projen.
|
|
11
|
+
* @default "projenrc"
|
|
12
|
+
*/
|
|
13
|
+
readonly className?: string;
|
|
14
|
+
/**
|
|
15
|
+
* The projen version to use
|
|
16
|
+
* @default - current version
|
|
17
|
+
*/
|
|
18
|
+
readonly projenVersion?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Defines projenrc under the test scope instead of the main scope, which is
|
|
21
|
+
* reserved to the app. This means that projenrc will be under
|
|
22
|
+
* `src/test/java/projenrc.java` and projen will be defined as a test
|
|
23
|
+
* dependency. This enforces that application code does not take a dependency
|
|
24
|
+
* on projen code.
|
|
25
|
+
*
|
|
26
|
+
* If this is disabled, projenrc should be under
|
|
27
|
+
* `src/main/java/projenrc.java`.
|
|
28
|
+
*
|
|
29
|
+
* @default true
|
|
30
|
+
*/
|
|
31
|
+
readonly testScope?: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Allows writing projenrc files in java.
|
|
35
|
+
*
|
|
36
|
+
* This will install `org.projen/projen` as a Maven dependency and will add a
|
|
37
|
+
* `synth` task which will compile & execute `main()` from
|
|
38
|
+
* `src/main/java/projenrc.java`.
|
|
39
|
+
*/
|
|
40
|
+
export declare class Projenrc extends ProjenrcFile {
|
|
41
|
+
/**
|
|
42
|
+
* The name of the java class that includes the projen entrypoint.
|
|
43
|
+
*/
|
|
44
|
+
readonly className: string;
|
|
45
|
+
/**
|
|
46
|
+
* Whether the class is in the "test" or "main" scope?
|
|
47
|
+
*/
|
|
48
|
+
private readonly testScope;
|
|
49
|
+
constructor(project: Project, pom: Pom, options?: ProjenrcOptions);
|
|
50
|
+
private get javaClass();
|
|
51
|
+
private get javaPackage();
|
|
52
|
+
/**
|
|
53
|
+
* The path of the projenrc file.
|
|
54
|
+
*/
|
|
55
|
+
get filePath(): string;
|
|
56
|
+
private generateProjenrc;
|
|
57
|
+
}
|
|
58
|
+
export declare function generateJavaOptionNames(options: ProjectOption[], jsiiManifest: any): Record<string, string>;
|
|
59
|
+
export declare function getJavaImport(jsiiType: any, jsiiManifest: any): string;
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { Component } from "../component";
|
|
2
|
+
import { Project } from "../project";
|
|
3
|
+
import { Task } from "../task";
|
|
4
|
+
/**
|
|
5
|
+
* Options for `Bundler`.
|
|
6
|
+
*/
|
|
7
|
+
export interface BundlerOptions {
|
|
8
|
+
/**
|
|
9
|
+
* The semantic version requirement for `esbuild`.
|
|
10
|
+
*
|
|
11
|
+
* @default - no specific version (implies latest)
|
|
12
|
+
*/
|
|
13
|
+
readonly esbuildVersion?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Output directory for all bundles.
|
|
16
|
+
* @default "assets"
|
|
17
|
+
*/
|
|
18
|
+
readonly assetsDir?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Install the `bundle` command as a pre-compile phase.
|
|
21
|
+
*
|
|
22
|
+
* @default true
|
|
23
|
+
*/
|
|
24
|
+
readonly addToPreCompile?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Map of file extensions (without dot) and loaders to use for this file type.
|
|
27
|
+
* Loaders are appended to the esbuild command by `--loader:.extension=loader`
|
|
28
|
+
*/
|
|
29
|
+
readonly loaders?: {
|
|
30
|
+
[key: string]: string;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Adds support for bundling JavaScript applications and dependencies into a
|
|
35
|
+
* single file. In the future, this will also supports bundling websites.
|
|
36
|
+
*/
|
|
37
|
+
export declare class Bundler extends Component {
|
|
38
|
+
/**
|
|
39
|
+
* Returns the `Bundler` instance associated with a project or `undefined` if
|
|
40
|
+
* there is no Bundler.
|
|
41
|
+
* @param project The project
|
|
42
|
+
* @returns A bundler
|
|
43
|
+
*/
|
|
44
|
+
static of(project: Project): Bundler | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* The semantic version requirement for `esbuild` (if defined).
|
|
47
|
+
*/
|
|
48
|
+
readonly esbuildVersion: string | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Root bundle directory.
|
|
51
|
+
*/
|
|
52
|
+
readonly bundledir: string;
|
|
53
|
+
private _task;
|
|
54
|
+
private readonly addToPreCompile;
|
|
55
|
+
private readonly loaders?;
|
|
56
|
+
/**
|
|
57
|
+
* Creates a `Bundler`.
|
|
58
|
+
*/
|
|
59
|
+
constructor(project: Project, options?: BundlerOptions);
|
|
60
|
+
/**
|
|
61
|
+
* Gets or creates the singleton "bundle" task of the project.
|
|
62
|
+
*
|
|
63
|
+
* If the project doesn't have a "bundle" task, it will be created and spawned
|
|
64
|
+
* during the pre-compile phase.
|
|
65
|
+
*/
|
|
66
|
+
get bundleTask(): Task;
|
|
67
|
+
/**
|
|
68
|
+
* Adds a task to the project which bundles a specific entrypoint and all of
|
|
69
|
+
* its dependencies into a single javascript output file.
|
|
70
|
+
*
|
|
71
|
+
* @param entrypoint The relative path of the artifact within the project
|
|
72
|
+
* @param options Bundling options
|
|
73
|
+
*/
|
|
74
|
+
addBundle(entrypoint: string, options: AddBundleOptions): Bundle;
|
|
75
|
+
/**
|
|
76
|
+
* Add bundling support to a project. This is called implicitly when
|
|
77
|
+
* `bundleTask` is referenced first. It adds the dependency on `esbuild`,
|
|
78
|
+
* gitignore/npmignore, etc.
|
|
79
|
+
*/
|
|
80
|
+
private addBundlingSupport;
|
|
81
|
+
}
|
|
82
|
+
export interface Bundle {
|
|
83
|
+
/**
|
|
84
|
+
* The task that produces this bundle.
|
|
85
|
+
*/
|
|
86
|
+
readonly bundleTask: Task;
|
|
87
|
+
/**
|
|
88
|
+
* The "watch" task for this bundle.
|
|
89
|
+
*/
|
|
90
|
+
readonly watchTask?: Task;
|
|
91
|
+
/**
|
|
92
|
+
* Location of the output file (relative to project root).
|
|
93
|
+
*/
|
|
94
|
+
readonly outfile: string;
|
|
95
|
+
/**
|
|
96
|
+
* Base directory containing the output file (relative to project root).
|
|
97
|
+
*/
|
|
98
|
+
readonly outdir: string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Options for bundling.
|
|
102
|
+
*/
|
|
103
|
+
export interface BundlingOptions {
|
|
104
|
+
/**
|
|
105
|
+
* You can mark a file or a package as external to exclude it from your build.
|
|
106
|
+
* Instead of being bundled, the import will be preserved (using require for
|
|
107
|
+
* the iife and cjs formats and using import for the esm format) and will be
|
|
108
|
+
* evaluated at run time instead.
|
|
109
|
+
*
|
|
110
|
+
* This has several uses. First of all, it can be used to trim unnecessary
|
|
111
|
+
* code from your bundle for a code path that you know will never be executed.
|
|
112
|
+
* For example, a package may contain code that only runs in node but you will
|
|
113
|
+
* only be using that package in the browser. It can also be used to import
|
|
114
|
+
* code in node at run time from a package that cannot be bundled. For
|
|
115
|
+
* example, the fsevents package contains a native extension, which esbuild
|
|
116
|
+
* doesn't support.
|
|
117
|
+
*
|
|
118
|
+
* @default []
|
|
119
|
+
*/
|
|
120
|
+
readonly externals?: string[];
|
|
121
|
+
/**
|
|
122
|
+
* Include a source map in the bundle.
|
|
123
|
+
*
|
|
124
|
+
* @default false
|
|
125
|
+
*/
|
|
126
|
+
readonly sourcemap?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* In addition to the `bundle:xyz` task, creates `bundle:xyz:watch` task which will
|
|
129
|
+
* invoke the same esbuild command with the `--watch` flag. This can be used
|
|
130
|
+
* to continusouly watch for changes.
|
|
131
|
+
*
|
|
132
|
+
* @default true
|
|
133
|
+
*/
|
|
134
|
+
readonly watchTask?: boolean;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Options for `addBundle()`.
|
|
138
|
+
*/
|
|
139
|
+
export interface AddBundleOptions extends BundlingOptions {
|
|
140
|
+
/**
|
|
141
|
+
* esbuild target.
|
|
142
|
+
*
|
|
143
|
+
* @example "node12"
|
|
144
|
+
*/
|
|
145
|
+
readonly target: string;
|
|
146
|
+
/**
|
|
147
|
+
* esbuild platform.
|
|
148
|
+
*
|
|
149
|
+
* @example "node"
|
|
150
|
+
*/
|
|
151
|
+
readonly platform: string;
|
|
152
|
+
/**
|
|
153
|
+
* Bundler output path relative to the asset's output directory.
|
|
154
|
+
* @default "index.js"
|
|
155
|
+
*/
|
|
156
|
+
readonly outfile?: string;
|
|
157
|
+
/**
|
|
158
|
+
* Mark the output file as executable.
|
|
159
|
+
* @default false
|
|
160
|
+
*/
|
|
161
|
+
readonly executable?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* The path of the tsconfig.json file to use for bundling
|
|
164
|
+
* @default "tsconfig.json"
|
|
165
|
+
*/
|
|
166
|
+
readonly tsconfigPath?: string;
|
|
167
|
+
/**
|
|
168
|
+
* Map of file extensions (without dot) and loaders to use for this file type.
|
|
169
|
+
* Loaders are appended to the esbuild command by `--loader:.extension=loader`
|
|
170
|
+
*/
|
|
171
|
+
readonly loaders?: {
|
|
172
|
+
[key: string]: string;
|
|
173
|
+
};
|
|
174
|
+
}
|