projen 0.52.22 → 0.52.26
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 +139 -107
- package/changelog.md +1 -1
- package/docs/api/API.md +42 -39
- package/lib/awscdk/auto-discover.d.ts +14 -46
- package/lib/awscdk/auto-discover.js +8 -22
- package/lib/awscdk/awscdk-app-java.d.ts +10 -32
- package/lib/awscdk/awscdk-app-java.js +5 -9
- package/lib/awscdk/awscdk-app-ts.d.ts +15 -35
- package/lib/awscdk/awscdk-app-ts.js +6 -14
- package/lib/awscdk/awscdk-construct.d.ts +14 -28
- package/lib/awscdk/awscdk-construct.js +8 -16
- package/lib/awscdk/awscdk-deps-java.d.ts +1 -8
- package/lib/awscdk/awscdk-deps-java.js +3 -10
- package/lib/awscdk/awscdk-deps-js.d.ts +1 -8
- package/lib/awscdk/awscdk-deps-js.js +3 -10
- package/lib/awscdk/awscdk-deps.d.ts +28 -67
- package/lib/awscdk/awscdk-deps.js +5 -12
- package/lib/awscdk/cdk-config.d.ts +19 -51
- package/lib/awscdk/cdk-config.js +13 -11
- package/lib/awscdk/cdk-tasks.d.ts +7 -24
- package/lib/awscdk/cdk-tasks.js +3 -8
- package/lib/awscdk/integration-test.d.ts +7 -29
- package/lib/awscdk/integration-test.js +3 -8
- package/lib/awscdk/lambda-function.d.ts +22 -50
- package/lib/awscdk/lambda-function.js +11 -24
- package/lib/build/build-workflow.d.ts +33 -78
- package/lib/build/build-workflow.js +15 -25
- package/lib/cdk/auto-discover-base.d.ts +11 -34
- package/lib/cdk/auto-discover-base.js +5 -15
- package/lib/cdk/construct-lib.d.ts +8 -22
- package/lib/cdk/construct-lib.js +3 -8
- package/lib/cdk/integration-test-base.d.ts +12 -38
- package/lib/cdk/integration-test-base.js +2 -8
- package/lib/cdk/jsii-docgen.d.ts +6 -12
- package/lib/cdk/jsii-docgen.js +6 -8
- package/lib/cdk/jsii-project.d.ts +16 -95
- package/lib/cdk/jsii-project.js +3 -10
- package/lib/cdk8s/auto-discover.d.ts +6 -23
- package/lib/cdk8s/auto-discover.js +6 -15
- package/lib/cdk8s/cdk8s-app-ts.d.ts +21 -43
- package/lib/cdk8s/cdk8s-app-ts.js +4 -7
- package/lib/cdk8s/cdk8s-construct.d.ts +12 -27
- package/lib/cdk8s/cdk8s-construct.js +3 -7
- package/lib/cdk8s/integration-test.d.ts +2 -9
- package/lib/cdk8s/integration-test.js +3 -8
- package/lib/cdktf/cdktf-construct.d.ts +3 -12
- package/lib/cdktf/cdktf-construct.js +3 -7
- package/lib/component.d.ts +4 -17
- package/lib/component.js +6 -19
- package/lib/dependencies.d.ts +44 -77
- package/lib/dependencies.js +50 -38
- package/lib/dev-env.d.ts +26 -53
- package/lib/dev-env.js +9 -19
- package/lib/docker-compose.d.ts +83 -209
- package/lib/docker-compose.js +38 -61
- package/lib/file.d.ts +24 -71
- package/lib/file.js +4 -16
- package/lib/gitattributes.d.ts +3 -14
- package/lib/gitattributes.js +5 -16
- package/lib/github/auto-approve.d.ts +7 -23
- package/lib/github/auto-approve.js +3 -8
- package/lib/github/auto-merge.d.ts +7 -29
- package/lib/github/auto-merge.js +7 -16
- package/lib/github/dependabot.d.ts +54 -147
- package/lib/github/dependabot.js +81 -22
- package/lib/github/github-project.d.ts +26 -70
- package/lib/github/github-project.js +5 -10
- package/lib/github/github.d.ts +19 -58
- package/lib/github/github.js +9 -30
- package/lib/github/mergify.d.ts +9 -54
- package/lib/github/mergify.js +2 -14
- package/lib/github/pr-template.d.ts +3 -13
- package/lib/github/pr-template.js +3 -8
- package/lib/github/pull-request-lint.d.ts +8 -28
- package/lib/github/pull-request-lint.js +3 -9
- package/lib/github/stale.d.ts +17 -47
- package/lib/github/stale.js +6 -10
- package/lib/github/task-workflow.d.ts +21 -63
- package/lib/github/task-workflow.js +3 -8
- package/lib/github/workflows-model.d.ts +199 -582
- package/lib/github/workflows-model.js +5 -4
- package/lib/github/workflows.d.ts +14 -41
- package/lib/github/workflows.js +8 -16
- package/lib/gitlab/configuration-model.d.ts +145 -947
- package/lib/gitlab/configuration-model.js +11 -28
- package/lib/gitlab/configuration.d.ts +31 -121
- package/lib/gitlab/configuration.js +14 -49
- package/lib/gitlab/gitlab-configuration.d.ts +2 -13
- package/lib/gitlab/gitlab-configuration.js +4 -15
- package/lib/gitlab/nested-configuration.d.ts +1 -9
- package/lib/gitlab/nested-configuration.js +3 -8
- package/lib/gitpod.d.ts +71 -167
- package/lib/gitpod.js +75 -42
- package/lib/ignore-file.d.ts +4 -23
- package/lib/ignore-file.js +6 -25
- package/lib/ini.d.ts +2 -14
- package/lib/ini.js +3 -13
- package/lib/java/java-project.d.ts +29 -70
- package/lib/java/java-project.js +10 -17
- package/lib/java/junit.d.ts +5 -17
- package/lib/java/junit.js +3 -8
- package/lib/java/maven-compile.d.ts +4 -13
- package/lib/java/maven-compile.js +3 -8
- package/lib/java/maven-packaging.d.ts +6 -21
- package/lib/java/maven-packaging.js +3 -8
- package/lib/java/maven-sample.d.ts +2 -12
- package/lib/java/maven-sample.js +3 -8
- package/lib/java/pom.d.ts +38 -100
- package/lib/java/pom.js +13 -25
- package/lib/java/projenrc.d.ts +7 -22
- package/lib/java/projenrc.js +3 -8
- package/lib/javascript/bundler.d.ts +30 -72
- package/lib/javascript/bundler.js +13 -21
- package/lib/javascript/eslint.d.ts +27 -84
- package/lib/javascript/eslint.js +11 -30
- package/lib/javascript/jest.d.ts +91 -344
- package/lib/javascript/jest.js +6 -23
- package/lib/javascript/node-package.d.ts +111 -259
- package/lib/javascript/node-package.js +64 -81
- package/lib/javascript/node-project.d.ts +112 -220
- package/lib/javascript/node-project.js +54 -73
- package/lib/javascript/npm-config.d.ts +9 -19
- package/lib/javascript/npm-config.js +9 -16
- package/lib/javascript/prettier.d.ts +65 -196
- package/lib/javascript/prettier.js +70 -46
- package/lib/javascript/projenrc.d.ts +2 -12
- package/lib/javascript/projenrc.js +3 -8
- package/lib/javascript/typescript-config.d.ts +62 -158
- package/lib/javascript/typescript-config.js +31 -18
- package/lib/javascript/upgrade-dependencies.d.ts +35 -94
- package/lib/javascript/upgrade-dependencies.js +21 -51
- package/lib/json.d.ts +3 -17
- package/lib/json.js +3 -13
- package/lib/license.d.ts +3 -20
- package/lib/license.js +2 -13
- package/lib/logger.d.ts +18 -62
- package/lib/logger.js +17 -37
- package/lib/makefile.d.ts +14 -45
- package/lib/makefile.js +7 -25
- package/lib/object-file.d.ts +19 -39
- package/lib/object-file.js +17 -28
- package/lib/option-hints.d.ts +4 -13
- package/lib/option-hints.js +11 -5
- package/lib/project-build.d.ts +7 -26
- package/lib/project-build.js +3 -8
- package/lib/project.d.ts +64 -186
- package/lib/project.js +43 -91
- package/lib/projects.d.ts +11 -32
- package/lib/projects.js +4 -8
- package/lib/projenrc-json.d.ts +2 -12
- package/lib/projenrc-json.js +3 -8
- package/lib/python/pip.d.ts +7 -23
- package/lib/python/pip.js +8 -17
- package/lib/python/poetry.d.ts +36 -121
- package/lib/python/poetry.js +12 -26
- package/lib/python/projenrc.d.ts +4 -15
- package/lib/python/projenrc.js +3 -8
- package/lib/python/pytest.d.ts +3 -16
- package/lib/python/pytest.js +2 -8
- package/lib/python/python-deps.d.ts +7 -21
- package/lib/python/python-deps.js +1 -1
- package/lib/python/python-env.d.ts +1 -6
- package/lib/python/python-env.js +1 -1
- package/lib/python/python-packaging.d.ts +12 -34
- package/lib/python/python-packaging.js +1 -1
- package/lib/python/python-project.d.ts +34 -79
- package/lib/python/python-project.js +7 -20
- package/lib/python/python-sample.d.ts +2 -9
- package/lib/python/python-sample.js +3 -8
- package/lib/python/requirements-file.d.ts +4 -19
- package/lib/python/requirements-file.js +5 -15
- package/lib/python/setuppy.d.ts +11 -39
- package/lib/python/setuppy.js +3 -13
- package/lib/python/setuptools.d.ts +2 -14
- package/lib/python/setuptools.js +3 -8
- package/lib/python/venv.d.ts +4 -14
- package/lib/python/venv.js +4 -11
- package/lib/readme.d.ts +7 -16
- package/lib/readme.js +5 -7
- package/lib/release/publisher.d.ts +103 -206
- package/lib/release/publisher.js +47 -59
- package/lib/release/release-trigger.d.ts +16 -48
- package/lib/release/release-trigger.js +8 -18
- package/lib/release/release.d.ts +50 -110
- package/lib/release/release.js +9 -24
- package/lib/sample-file.d.ts +14 -47
- package/lib/sample-file.js +9 -30
- package/lib/semver.d.ts +4 -21
- package/lib/semver.js +6 -20
- package/lib/source-code.d.ts +7 -23
- package/lib/source-code.js +7 -19
- package/lib/task-model.d.ts +21 -61
- package/lib/task-model.js +1 -1
- package/lib/task-runtime.d.ts +7 -24
- package/lib/task-runtime.js +7 -20
- package/lib/task.d.ts +29 -73
- package/lib/task.js +28 -61
- package/lib/tasks.d.ts +12 -34
- package/lib/tasks.js +14 -36
- package/lib/testing.d.ts +6 -10
- package/lib/testing.js +8 -12
- package/lib/textfile.d.ts +9 -24
- package/lib/textfile.js +9 -19
- package/lib/toml.d.ts +2 -14
- package/lib/toml.js +3 -13
- package/lib/typescript/projenrc.d.ts +4 -14
- package/lib/typescript/projenrc.js +3 -8
- package/lib/typescript/typescript-typedoc.d.ts +1 -6
- package/lib/typescript/typescript-typedoc.js +3 -8
- package/lib/typescript/typescript.d.ts +24 -82
- package/lib/typescript/typescript.js +6 -15
- package/lib/version.d.ts +9 -38
- package/lib/version.js +2 -11
- package/lib/vscode/devcontainer.d.ts +10 -30
- package/lib/vscode/devcontainer.js +10 -26
- package/lib/vscode/launch-config.d.ts +18 -97
- package/lib/vscode/launch-config.js +9 -15
- package/lib/vscode/vscode.d.ts +0 -9
- package/lib/vscode/vscode.js +2 -11
- package/lib/web/next.d.ts +19 -60
- package/lib/web/next.js +6 -20
- package/lib/web/postcss.d.ts +3 -24
- package/lib/web/postcss.js +3 -8
- package/lib/web/react.d.ts +13 -60
- package/lib/web/react.js +7 -32
- package/lib/web/tailwind.d.ts +1 -15
- package/lib/web/tailwind.js +3 -7
- package/lib/xmlfile.d.ts +2 -14
- package/lib/xmlfile.js +3 -13
- package/lib/yaml.d.ts +4 -19
- package/lib/yaml.js +3 -13
- package/node_modules/xmlbuilder2/node_modules/@types/node/README.md +1 -1
- package/node_modules/xmlbuilder2/node_modules/@types/node/buffer.d.ts +90 -0
- package/node_modules/xmlbuilder2/node_modules/@types/node/package.json +2 -2
- package/package.json +4 -4
- package/releasetag.txt +1 -1
- package/version.txt +1 -1
|
@@ -1,29 +1,21 @@
|
|
|
1
1
|
import { Component } from "../component";
|
|
2
2
|
import { Project } from "../project";
|
|
3
|
-
/**
|
|
4
|
-
* @experimental
|
|
5
|
-
*/
|
|
6
3
|
export interface NodePackageOptions {
|
|
7
4
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* The "name" in package.json
|
|
10
6
|
* @default - defaults to project name
|
|
11
|
-
* @
|
|
12
|
-
* @featured true
|
|
7
|
+
* @featured
|
|
13
8
|
*/
|
|
14
9
|
readonly packageName?: string;
|
|
15
10
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
11
|
+
* The description is just a string that helps people understand the purpose of the package.
|
|
18
12
|
* It can be used when searching for packages in a package manager as well.
|
|
19
13
|
* See https://classic.yarnpkg.com/en/docs/package-json/#toc-description
|
|
20
|
-
*
|
|
21
|
-
* @experimental
|
|
22
|
-
* @featured true
|
|
14
|
+
* @featured
|
|
23
15
|
*/
|
|
24
16
|
readonly description?: string;
|
|
25
17
|
/**
|
|
26
|
-
*
|
|
18
|
+
* Runtime dependencies of this module.
|
|
27
19
|
*
|
|
28
20
|
* The recommendation is to only specify the module name here (e.g.
|
|
29
21
|
* `express`). This will behave similar to `yarn add` or `npm install` in the
|
|
@@ -32,18 +24,13 @@ export interface NodePackageOptions {
|
|
|
32
24
|
* the same syntax passed to `npm i` or `yarn add` (e.g. `express@^2`) and
|
|
33
25
|
* this will be what you `package.json` will eventually include.
|
|
34
26
|
*
|
|
27
|
+
* @example [ 'express', 'lodash', 'foo@^2' ]
|
|
35
28
|
* @default []
|
|
36
|
-
* @
|
|
37
|
-
* @featured true
|
|
38
|
-
* @example
|
|
39
|
-
*
|
|
40
|
-
* [ 'express', 'lodash', 'foo@^2' ]
|
|
29
|
+
* @featured
|
|
41
30
|
*/
|
|
42
31
|
readonly deps?: string[];
|
|
43
32
|
/**
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* These dependencies will only be
|
|
33
|
+
* Build dependencies for this module. These dependencies will only be
|
|
47
34
|
* available in your build environment but will not be fetched when this
|
|
48
35
|
* module is consumed.
|
|
49
36
|
*
|
|
@@ -54,18 +41,13 @@ export interface NodePackageOptions {
|
|
|
54
41
|
* the same syntax passed to `npm i` or `yarn add` (e.g. `express@^2`) and
|
|
55
42
|
* this will be what you `package.json` will eventually include.
|
|
56
43
|
*
|
|
44
|
+
* @example [ 'typescript', '@types/express' ]
|
|
57
45
|
* @default []
|
|
58
|
-
* @
|
|
59
|
-
* @featured true
|
|
60
|
-
* @example
|
|
61
|
-
*
|
|
62
|
-
* [ 'typescript', '@types/express' ]
|
|
46
|
+
* @featured
|
|
63
47
|
*/
|
|
64
48
|
readonly devDeps?: string[];
|
|
65
49
|
/**
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* Dependencies listed here are required to
|
|
50
|
+
* Peer dependencies for this module. Dependencies listed here are required to
|
|
69
51
|
* be installed (and satisfied) by the _consumer_ of this library. Using peer
|
|
70
52
|
* dependencies allows you to ensure that only a single module of a certain
|
|
71
53
|
* library exists in the `node_modules` tree of your consumers.
|
|
@@ -80,13 +62,10 @@ export interface NodePackageOptions {
|
|
|
80
62
|
* test your module against the lowest peer version required.
|
|
81
63
|
*
|
|
82
64
|
* @default []
|
|
83
|
-
* @experimental
|
|
84
65
|
*/
|
|
85
66
|
readonly peerDeps?: string[];
|
|
86
67
|
/**
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
* These modules will be
|
|
68
|
+
* List of dependencies to bundle into this module. These modules will be
|
|
90
69
|
* added both to the `dependencies` section and `bundledDependencies` section of
|
|
91
70
|
* your `package.json`.
|
|
92
71
|
*
|
|
@@ -96,269 +75,206 @@ export interface NodePackageOptions {
|
|
|
96
75
|
* file with the latest version (`^`). You can specify semver requirements in
|
|
97
76
|
* the same syntax passed to `npm i` or `yarn add` (e.g. `express@^2`) and
|
|
98
77
|
* this will be what you `package.json` will eventually include.
|
|
99
|
-
*
|
|
100
|
-
* @experimental
|
|
101
78
|
*/
|
|
102
79
|
readonly bundledDeps?: string[];
|
|
103
80
|
/**
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
* @experimental
|
|
81
|
+
* Options for `peerDeps`.
|
|
107
82
|
*/
|
|
108
83
|
readonly peerDependencyOptions?: PeerDependencyOptions;
|
|
109
84
|
/**
|
|
110
|
-
*
|
|
111
|
-
*
|
|
85
|
+
* Allow the project to include `peerDependencies` and `bundledDependencies`.
|
|
112
86
|
* This is normally only allowed for libraries. For apps, there's no meaning
|
|
113
87
|
* for specifying these.
|
|
114
88
|
*
|
|
115
89
|
* @default true
|
|
116
|
-
* @experimental
|
|
117
90
|
*/
|
|
118
91
|
readonly allowLibraryDependencies?: boolean;
|
|
119
92
|
/**
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
* @experimental
|
|
93
|
+
* Keywords to include in `package.json`.
|
|
123
94
|
*/
|
|
124
95
|
readonly keywords?: string[];
|
|
125
96
|
/**
|
|
126
|
-
*
|
|
97
|
+
* Module entrypoint (`main` in `package.json`)
|
|
127
98
|
*
|
|
128
99
|
* Set to an empty string to not include `main` in your package.json
|
|
129
100
|
*
|
|
130
101
|
* @default "lib/index.js"
|
|
131
|
-
* @experimental
|
|
132
102
|
*/
|
|
133
103
|
readonly entrypoint?: string;
|
|
134
104
|
/**
|
|
135
|
-
*
|
|
105
|
+
* Binary programs vended with your module.
|
|
136
106
|
*
|
|
137
107
|
* You can use this option to add/customize how binaries are represented in
|
|
138
108
|
* your `package.json`, but unless `autoDetectBin` is `false`, every
|
|
139
109
|
* executable file under `bin` will automatically be added to this section.
|
|
140
|
-
*
|
|
141
|
-
* @experimental
|
|
142
110
|
*/
|
|
143
111
|
readonly bin?: Record<string, string>;
|
|
144
112
|
/**
|
|
145
|
-
*
|
|
113
|
+
* Automatically add all executables under the `bin` directory to your
|
|
114
|
+
* `package.json` file under the `bin` section.
|
|
146
115
|
*
|
|
147
116
|
* @default true
|
|
148
|
-
* @experimental
|
|
149
117
|
*/
|
|
150
118
|
readonly autoDetectBin?: boolean;
|
|
151
119
|
/**
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
* If a script has the same name as a standard script,
|
|
120
|
+
* npm scripts to include. If a script has the same name as a standard script,
|
|
155
121
|
* the standard script will be overwritten.
|
|
156
122
|
*
|
|
157
123
|
* @default {}
|
|
158
|
-
* @experimental
|
|
159
124
|
*/
|
|
160
125
|
readonly scripts?: {
|
|
161
126
|
[name: string]: string;
|
|
162
127
|
};
|
|
163
128
|
/**
|
|
164
|
-
*
|
|
129
|
+
* The Node Package Manager used to execute scripts
|
|
165
130
|
*
|
|
166
131
|
* @default NodePackageManager.YARN
|
|
167
|
-
* @experimental
|
|
168
132
|
*/
|
|
169
133
|
readonly packageManager?: NodePackageManager;
|
|
170
134
|
/**
|
|
171
|
-
*
|
|
172
|
-
*
|
|
135
|
+
* The repository is the location where the actual code for your package lives.
|
|
173
136
|
* See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository
|
|
174
|
-
*
|
|
175
|
-
* @experimental
|
|
176
137
|
*/
|
|
177
138
|
readonly repository?: string;
|
|
178
139
|
/**
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
* @experimental
|
|
140
|
+
* If the package.json for your package is not in the root directory (for example if it is part of a monorepo),
|
|
141
|
+
* you can specify the directory in which it lives.
|
|
182
142
|
*/
|
|
183
143
|
readonly repositoryDirectory?: string;
|
|
184
144
|
/**
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
* @experimental
|
|
145
|
+
* Author's name
|
|
188
146
|
*/
|
|
189
147
|
readonly authorName?: string;
|
|
190
148
|
/**
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
* @experimental
|
|
149
|
+
* Author's e-mail
|
|
194
150
|
*/
|
|
195
151
|
readonly authorEmail?: string;
|
|
196
152
|
/**
|
|
197
|
-
*
|
|
198
|
-
*
|
|
199
|
-
* @experimental
|
|
153
|
+
* Author's URL / Website
|
|
200
154
|
*/
|
|
201
155
|
readonly authorUrl?: string;
|
|
202
156
|
/**
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
* @experimental
|
|
157
|
+
* Author's Organization
|
|
206
158
|
*/
|
|
207
159
|
readonly authorOrganization?: boolean;
|
|
208
160
|
/**
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
* @experimental
|
|
161
|
+
* Package's Homepage / Website
|
|
212
162
|
*/
|
|
213
163
|
readonly homepage?: string;
|
|
214
164
|
/**
|
|
215
|
-
*
|
|
216
|
-
*
|
|
217
|
-
* @experimental
|
|
165
|
+
* Package's Stability
|
|
218
166
|
*/
|
|
219
167
|
readonly stability?: string;
|
|
220
168
|
/**
|
|
221
|
-
*
|
|
169
|
+
* Minimum Node.js version to require via package.json `engines` (inclusive).
|
|
222
170
|
*
|
|
223
171
|
* @default - no "engines" specified
|
|
224
|
-
* @experimental
|
|
225
172
|
*/
|
|
226
173
|
readonly minNodeVersion?: string;
|
|
227
174
|
/**
|
|
228
|
-
*
|
|
175
|
+
* Minimum node.js version to require via `engines` (inclusive).
|
|
229
176
|
*
|
|
230
177
|
* @default - no max
|
|
231
|
-
* @experimental
|
|
232
178
|
*/
|
|
233
179
|
readonly maxNodeVersion?: string;
|
|
234
180
|
/**
|
|
235
|
-
*
|
|
236
|
-
*
|
|
181
|
+
* License's SPDX identifier.
|
|
237
182
|
* See https://github.com/projen/projen/tree/main/license-text for a list of supported licenses.
|
|
238
183
|
* Use the `licensed` option if you want to no license to be specified.
|
|
239
184
|
*
|
|
240
185
|
* @default "Apache-2.0"
|
|
241
|
-
* @experimental
|
|
242
186
|
*/
|
|
243
187
|
readonly license?: string;
|
|
244
188
|
/**
|
|
245
|
-
*
|
|
189
|
+
* Indicates if a license should be added.
|
|
246
190
|
*
|
|
247
191
|
* @default true
|
|
248
|
-
* @experimental
|
|
249
192
|
*/
|
|
250
193
|
readonly licensed?: boolean;
|
|
251
194
|
/**
|
|
252
|
-
*
|
|
195
|
+
* The base URL of the npm package registry.
|
|
253
196
|
*
|
|
254
197
|
* Must be a URL (e.g. start with "https://" or "http://")
|
|
255
198
|
*
|
|
256
199
|
* @default "https://registry.npmjs.org"
|
|
257
|
-
* @experimental
|
|
258
200
|
*/
|
|
259
201
|
readonly npmRegistryUrl?: string;
|
|
260
202
|
/**
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
* Cannot be set together with `npmRegistryUrl`.
|
|
203
|
+
* The host name of the npm registry to publish to. Cannot be set together with `npmRegistryUrl`.
|
|
264
204
|
*
|
|
265
205
|
* @deprecated use `npmRegistryUrl` instead
|
|
266
206
|
*/
|
|
267
207
|
readonly npmRegistry?: string;
|
|
268
208
|
/**
|
|
269
|
-
*
|
|
270
|
-
*
|
|
271
|
-
* @experimental
|
|
209
|
+
* The url to your project's issue tracker.
|
|
272
210
|
*/
|
|
273
211
|
readonly bugsUrl?: string;
|
|
274
212
|
/**
|
|
275
|
-
*
|
|
276
|
-
*
|
|
277
|
-
* @experimental
|
|
213
|
+
* The email address to which issues should be reported.
|
|
278
214
|
*/
|
|
279
215
|
readonly bugsEmail?: string;
|
|
280
216
|
/**
|
|
281
|
-
*
|
|
217
|
+
* Access level of the npm package.
|
|
282
218
|
*
|
|
283
219
|
* @default - for scoped packages (e.g. `foo@bar`), the default is
|
|
284
220
|
* `NpmAccess.RESTRICTED`, for non-scoped packages, the default is
|
|
285
221
|
* `NpmAccess.PUBLIC`.
|
|
286
|
-
* @experimental
|
|
287
222
|
*/
|
|
288
223
|
readonly npmAccess?: NpmAccess;
|
|
289
224
|
/**
|
|
290
|
-
*
|
|
225
|
+
* GitHub secret which contains the NPM token to use when publishing packages.
|
|
291
226
|
*
|
|
292
227
|
* @default "NPM_TOKEN"
|
|
293
|
-
* @experimental
|
|
294
228
|
*/
|
|
295
229
|
readonly npmTokenSecret?: string;
|
|
296
230
|
/**
|
|
297
|
-
*
|
|
231
|
+
* Options for publishing npm package to AWS CodeArtifact.
|
|
298
232
|
*
|
|
299
233
|
* @default - undefined
|
|
300
|
-
* @experimental
|
|
301
234
|
*/
|
|
302
235
|
readonly codeArtifactOptions?: CodeArtifactOptions;
|
|
303
236
|
}
|
|
304
|
-
/**
|
|
305
|
-
* @experimental
|
|
306
|
-
*/
|
|
307
237
|
export interface CodeArtifactOptions {
|
|
308
238
|
/**
|
|
309
|
-
*
|
|
310
|
-
*
|
|
239
|
+
* GitHub secret which contains the AWS access key ID to use when publishing packages to AWS CodeArtifact.
|
|
311
240
|
* This property must be specified only when publishing to AWS CodeArtifact (`npmRegistryUrl` contains AWS CodeArtifact URL).
|
|
312
241
|
*
|
|
313
242
|
* @default "AWS_ACCESS_KEY_ID"
|
|
314
|
-
* @experimental
|
|
315
243
|
*/
|
|
316
244
|
readonly accessKeyIdSecret?: string;
|
|
317
245
|
/**
|
|
318
|
-
*
|
|
319
|
-
*
|
|
246
|
+
* GitHub secret which contains the AWS secret access key to use when publishing packages to AWS CodeArtifact.
|
|
320
247
|
* This property must be specified only when publishing to AWS CodeArtifact (`npmRegistryUrl` contains AWS CodeArtifact URL).
|
|
321
248
|
*
|
|
322
249
|
* @default "AWS_SECRET_ACCESS_KEY"
|
|
323
|
-
* @experimental
|
|
324
250
|
*/
|
|
325
251
|
readonly secretAccessKeySecret?: string;
|
|
326
252
|
/**
|
|
327
|
-
*
|
|
253
|
+
* ARN of AWS role to be assumed prior to get authorization token from AWS CodeArtifact
|
|
254
|
+
* This property must be specified only when publishing to AWS CodeArtifact (`registry` contains AWS CodeArtifact URL).
|
|
328
255
|
*
|
|
329
256
|
* @default undefined
|
|
330
|
-
* @experimental
|
|
331
257
|
*/
|
|
332
258
|
readonly roleToAssume?: string;
|
|
333
259
|
}
|
|
334
260
|
/**
|
|
335
|
-
*
|
|
336
|
-
*
|
|
337
|
-
* @experimental
|
|
261
|
+
* Represents the npm `package.json` file.
|
|
338
262
|
*/
|
|
339
263
|
export declare class NodePackage extends Component {
|
|
340
264
|
/**
|
|
341
|
-
*
|
|
342
|
-
*
|
|
343
|
-
* @experimental
|
|
265
|
+
* The name of the npm package.
|
|
344
266
|
*/
|
|
345
267
|
readonly packageName: string;
|
|
346
268
|
/**
|
|
347
|
-
*
|
|
348
|
-
*
|
|
349
|
-
* @experimental
|
|
269
|
+
* The module's entrypoint (e.g. `lib/index.js`).
|
|
350
270
|
*/
|
|
351
271
|
readonly entrypoint: string;
|
|
352
272
|
/**
|
|
353
|
-
*
|
|
354
|
-
*
|
|
355
|
-
* @experimental
|
|
273
|
+
* Allow project to take library dependencies.
|
|
356
274
|
*/
|
|
357
275
|
readonly allowLibraryDependencies: boolean;
|
|
358
276
|
/**
|
|
359
|
-
*
|
|
360
|
-
*
|
|
361
|
-
* @experimental
|
|
277
|
+
* The package manager to use.
|
|
362
278
|
*/
|
|
363
279
|
readonly packageManager: NodePackageManager;
|
|
364
280
|
/**
|
|
@@ -366,62 +282,43 @@ export declare class NodePackage extends Component {
|
|
|
366
282
|
*/
|
|
367
283
|
readonly manifest: any;
|
|
368
284
|
/**
|
|
369
|
-
*
|
|
370
|
-
*
|
|
285
|
+
* Minimum node.js version required by this package.
|
|
371
286
|
* @default - no minimum
|
|
372
|
-
* @experimental
|
|
373
287
|
*/
|
|
374
288
|
readonly minNodeVersion?: string;
|
|
375
289
|
/**
|
|
376
|
-
*
|
|
377
|
-
*
|
|
290
|
+
* Maximum node version required by this pacakge.
|
|
378
291
|
* @default - no maximum.
|
|
379
|
-
* @experimental
|
|
380
292
|
*/
|
|
381
293
|
readonly maxNodeVersion?: string;
|
|
382
294
|
/**
|
|
383
|
-
*
|
|
384
|
-
*
|
|
385
|
-
* `undefined` if this package is not licensed.
|
|
386
|
-
*
|
|
387
|
-
* @experimental
|
|
295
|
+
* The SPDX license of this module. `undefined` if this package is not licensed.
|
|
388
296
|
*/
|
|
389
297
|
readonly license?: string;
|
|
390
298
|
/**
|
|
391
|
-
*
|
|
392
|
-
*
|
|
393
|
-
* @experimental
|
|
299
|
+
* npm registry (e.g. `https://registry.npmjs.org`). Use `npmRegistryHost` to get just the host name.
|
|
394
300
|
*/
|
|
395
301
|
readonly npmRegistryUrl: string;
|
|
396
302
|
/**
|
|
397
|
-
*
|
|
398
|
-
*
|
|
399
|
-
* @experimental
|
|
303
|
+
* The npm registry host (e.g. `registry.npmjs.org`).
|
|
400
304
|
*/
|
|
401
305
|
readonly npmRegistry: string;
|
|
402
306
|
/**
|
|
403
|
-
*
|
|
404
|
-
*
|
|
405
|
-
* @experimental
|
|
307
|
+
* GitHub secret which contains the NPM token to use when publishing packages.
|
|
406
308
|
*/
|
|
407
309
|
readonly npmTokenSecret?: string;
|
|
408
310
|
/**
|
|
409
|
-
*
|
|
311
|
+
* Options for publishing npm package to AWS CodeArtifact.
|
|
410
312
|
*
|
|
411
313
|
* @default - undefined
|
|
412
|
-
* @experimental
|
|
413
314
|
*/
|
|
414
315
|
readonly codeArtifactOptions?: CodeArtifactOptions;
|
|
415
316
|
/**
|
|
416
|
-
*
|
|
417
|
-
*
|
|
418
|
-
* @experimental
|
|
317
|
+
* npm package access level.
|
|
419
318
|
*/
|
|
420
319
|
readonly npmAccess: NpmAccess;
|
|
421
320
|
/**
|
|
422
|
-
*
|
|
423
|
-
*
|
|
424
|
-
* @experimental
|
|
321
|
+
* The name of the lock file.
|
|
425
322
|
*/
|
|
426
323
|
readonly lockFile: string;
|
|
427
324
|
private readonly keywords;
|
|
@@ -430,138 +327,112 @@ export declare class NodePackage extends Component {
|
|
|
430
327
|
private readonly peerDependencyOptions;
|
|
431
328
|
private readonly file;
|
|
432
329
|
private _renderedDeps?;
|
|
433
|
-
/**
|
|
434
|
-
* @experimental
|
|
435
|
-
*/
|
|
436
330
|
constructor(project: Project, options?: NodePackageOptions);
|
|
437
331
|
/**
|
|
438
|
-
*
|
|
332
|
+
* Defines normal dependencies.
|
|
439
333
|
*
|
|
440
|
-
* @param deps Names modules to install.
|
|
441
|
-
*
|
|
334
|
+
* @param deps Names modules to install. By default, the the dependency will
|
|
335
|
+
* be installed in the next `npx projen` run and the version will be recorded
|
|
336
|
+
* in your `package.json` file. You can upgrade manually or using `yarn
|
|
337
|
+
* add/upgrade`. If you wish to specify a version range use this syntax:
|
|
338
|
+
* `module@^7`.
|
|
442
339
|
*/
|
|
443
340
|
addDeps(...deps: string[]): void;
|
|
444
341
|
/**
|
|
445
|
-
*
|
|
342
|
+
* Defines development/test dependencies.
|
|
446
343
|
*
|
|
447
|
-
* @param deps Names modules to install.
|
|
448
|
-
*
|
|
344
|
+
* @param deps Names modules to install. By default, the the dependency will
|
|
345
|
+
* be installed in the next `npx projen` run and the version will be recorded
|
|
346
|
+
* in your `package.json` file. You can upgrade manually or using `yarn
|
|
347
|
+
* add/upgrade`. If you wish to specify a version range use this syntax:
|
|
348
|
+
* `module@^7`.
|
|
449
349
|
*/
|
|
450
350
|
addDevDeps(...deps: string[]): void;
|
|
451
351
|
/**
|
|
452
|
-
*
|
|
352
|
+
* Defines peer dependencies.
|
|
453
353
|
*
|
|
454
354
|
* When adding peer dependencies, a devDependency will also be added on the
|
|
455
355
|
* pinned version of the declared peer. This will ensure that you are testing
|
|
456
356
|
* your code against the minimum version required from your consumers.
|
|
457
357
|
*
|
|
458
|
-
* @param deps Names modules to install.
|
|
459
|
-
*
|
|
358
|
+
* @param deps Names modules to install. By default, the the dependency will
|
|
359
|
+
* be installed in the next `npx projen` run and the version will be recorded
|
|
360
|
+
* in your `package.json` file. You can upgrade manually or using `yarn
|
|
361
|
+
* add/upgrade`. If you wish to specify a version range use this syntax:
|
|
362
|
+
* `module@^7`.
|
|
460
363
|
*/
|
|
461
364
|
addPeerDeps(...deps: string[]): void;
|
|
462
365
|
/**
|
|
463
|
-
*
|
|
366
|
+
* Defines bundled dependencies.
|
|
464
367
|
*
|
|
465
368
|
* Bundled dependencies will be added as normal dependencies as well as to the
|
|
466
369
|
* `bundledDependencies` section of your `package.json`.
|
|
467
370
|
*
|
|
468
|
-
* @param deps Names modules to install.
|
|
469
|
-
*
|
|
371
|
+
* @param deps Names modules to install. By default, the the dependency will
|
|
372
|
+
* be installed in the next `npx projen` run and the version will be recorded
|
|
373
|
+
* in your `package.json` file. You can upgrade manually or using `yarn
|
|
374
|
+
* add/upgrade`. If you wish to specify a version range use this syntax:
|
|
375
|
+
* `module@^7`.
|
|
470
376
|
*/
|
|
471
377
|
addBundledDeps(...deps: string[]): void;
|
|
472
378
|
/**
|
|
473
|
-
*
|
|
474
|
-
*
|
|
475
|
-
* @param
|
|
476
|
-
* @param version The semantic version requirement (e.g. `^10`).
|
|
477
|
-
* @experimental
|
|
379
|
+
* Adds an `engines` requirement to your package.
|
|
380
|
+
* @param engine The engine (e.g. `node`)
|
|
381
|
+
* @param version The semantic version requirement (e.g. `^10`)
|
|
478
382
|
*/
|
|
479
383
|
addEngine(engine: string, version: string): void;
|
|
480
384
|
/**
|
|
481
|
-
*
|
|
482
|
-
*
|
|
483
|
-
* @param keywords The keywords to add.
|
|
484
|
-
* @experimental
|
|
385
|
+
* Adds keywords to package.json (deduplicated)
|
|
386
|
+
* @param keywords The keywords to add
|
|
485
387
|
*/
|
|
486
388
|
addKeywords(...keywords: string[]): void;
|
|
487
|
-
/**
|
|
488
|
-
* @experimental
|
|
489
|
-
*/
|
|
490
389
|
addBin(bins: Record<string, string>): void;
|
|
491
390
|
/**
|
|
492
|
-
*
|
|
391
|
+
* Override the contents of an npm package.json script.
|
|
493
392
|
*
|
|
494
|
-
* @param name The script name
|
|
495
|
-
* @param command The command to execute
|
|
496
|
-
* @experimental
|
|
393
|
+
* @param name The script name
|
|
394
|
+
* @param command The command to execute
|
|
497
395
|
*/
|
|
498
396
|
setScript(name: string, command: string): void;
|
|
499
397
|
/**
|
|
500
|
-
*
|
|
501
|
-
*
|
|
398
|
+
* Removes the npm script (always successful).
|
|
502
399
|
* @param name The name of the script.
|
|
503
|
-
* @experimental
|
|
504
400
|
*/
|
|
505
401
|
removeScript(name: string): void;
|
|
506
402
|
/**
|
|
507
|
-
*
|
|
508
|
-
*
|
|
509
|
-
* @param name The name of the script.
|
|
403
|
+
* Indicates if a script by the given name is defined.
|
|
404
|
+
* @param name The name of the script
|
|
510
405
|
* @deprecated Use `project.tasks.tryFind(name)`
|
|
511
406
|
*/
|
|
512
407
|
hasScript(name: string): boolean;
|
|
513
408
|
/**
|
|
514
|
-
*
|
|
515
|
-
*
|
|
516
|
-
* @param name field name
|
|
517
|
-
* @param value field value
|
|
518
|
-
* @experimental
|
|
519
|
-
* @escape true
|
|
409
|
+
* Directly set fields in `package.json`.
|
|
410
|
+
* @escape
|
|
411
|
+
* @param name field name
|
|
412
|
+
* @param value field value
|
|
520
413
|
*/
|
|
521
414
|
addField(name: string, value: any): void;
|
|
522
415
|
/**
|
|
523
|
-
*
|
|
524
|
-
*
|
|
416
|
+
* Sets the package version.
|
|
525
417
|
* @param version Package version.
|
|
526
|
-
* @experimental
|
|
527
418
|
*/
|
|
528
419
|
addVersion(version: string): void;
|
|
529
420
|
/**
|
|
530
|
-
*
|
|
531
|
-
*
|
|
532
|
-
* @experimental
|
|
421
|
+
* Returns the command to execute in order to install all dependencies (always frozen).
|
|
533
422
|
*/
|
|
534
423
|
get installCommand(): string;
|
|
535
424
|
/**
|
|
536
|
-
*
|
|
537
|
-
*
|
|
538
|
-
* @experimental
|
|
425
|
+
* Renders `yarn install` or `npm install` with lockfile update (not frozen)
|
|
539
426
|
*/
|
|
540
427
|
get installAndUpdateLockfileCommand(): string;
|
|
541
428
|
/**
|
|
542
|
-
*
|
|
543
|
-
*
|
|
544
|
-
* @experimental
|
|
429
|
+
* Render a package manager specific command to upgrade all requested dependencies.
|
|
545
430
|
*/
|
|
546
431
|
renderUpgradePackagesCommand(exclude: string[], include?: string[]): string;
|
|
547
|
-
/**
|
|
548
|
-
* (experimental) Called before synthesis.
|
|
549
|
-
*
|
|
550
|
-
* @experimental
|
|
551
|
-
*/
|
|
552
432
|
preSynthesize(): void;
|
|
553
|
-
/**
|
|
554
|
-
* (experimental) Called after synthesis.
|
|
555
|
-
*
|
|
556
|
-
* Order is *not* guaranteed.
|
|
557
|
-
*
|
|
558
|
-
* @experimental
|
|
559
|
-
*/
|
|
560
433
|
postSynthesize(): void;
|
|
561
434
|
/**
|
|
562
|
-
*
|
|
563
|
-
*
|
|
564
|
-
* @experimental
|
|
435
|
+
* The command which executes "projen".
|
|
565
436
|
*/
|
|
566
437
|
get projenCommand(): string;
|
|
567
438
|
/**
|
|
@@ -597,59 +468,40 @@ export declare class NodePackage extends Component {
|
|
|
597
468
|
private readPackageJson;
|
|
598
469
|
private installDependencies;
|
|
599
470
|
}
|
|
600
|
-
/**
|
|
601
|
-
* @experimental
|
|
602
|
-
*/
|
|
603
471
|
export interface PeerDependencyOptions {
|
|
604
472
|
/**
|
|
605
|
-
*
|
|
606
|
-
*
|
|
473
|
+
* Automatically add a pinned dev dependency.
|
|
607
474
|
* @default true
|
|
608
|
-
* @experimental
|
|
609
475
|
*/
|
|
610
476
|
readonly pinnedDevDependency?: boolean;
|
|
611
477
|
}
|
|
612
478
|
/**
|
|
613
|
-
*
|
|
614
|
-
*
|
|
615
|
-
* @experimental
|
|
479
|
+
* The node package manager to use.
|
|
616
480
|
*/
|
|
617
481
|
export declare enum NodePackageManager {
|
|
618
482
|
/**
|
|
619
|
-
*
|
|
620
|
-
*
|
|
621
|
-
* @experimental
|
|
483
|
+
* Use `yarn` as the package manager.
|
|
622
484
|
*/
|
|
623
485
|
YARN = "yarn",
|
|
624
486
|
/**
|
|
625
|
-
*
|
|
626
|
-
*
|
|
627
|
-
* @experimental
|
|
487
|
+
* Use `npm` as the package manager.
|
|
628
488
|
*/
|
|
629
489
|
NPM = "npm",
|
|
630
490
|
/**
|
|
631
|
-
*
|
|
632
|
-
*
|
|
633
|
-
* @experimental
|
|
491
|
+
* Use `pnpm` as the package manager.
|
|
634
492
|
*/
|
|
635
493
|
PNPM = "pnpm"
|
|
636
494
|
}
|
|
637
495
|
/**
|
|
638
|
-
*
|
|
639
|
-
*
|
|
640
|
-
* @experimental
|
|
496
|
+
* Npm package access level
|
|
641
497
|
*/
|
|
642
498
|
export declare enum NpmAccess {
|
|
643
499
|
/**
|
|
644
|
-
*
|
|
645
|
-
*
|
|
646
|
-
* @experimental
|
|
500
|
+
* Package is public.
|
|
647
501
|
*/
|
|
648
502
|
PUBLIC = "public",
|
|
649
503
|
/**
|
|
650
|
-
*
|
|
651
|
-
*
|
|
652
|
-
* @experimental
|
|
504
|
+
* Package can only be accessed with credentials.
|
|
653
505
|
*/
|
|
654
506
|
RESTRICTED = "restricted"
|
|
655
507
|
}
|