projen-modules 4.4.1 → 4.6.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/.jsii +238 -25
- package/API.md +160 -3
- package/README.md +29 -27
- package/lib/components/github/deployments.d.ts +0 -2
- package/lib/components/github/deployments.js +4 -3
- package/lib/components/github/mergify.d.ts +0 -2
- package/lib/components/github/mergify.js +40 -14
- package/lib/components/readme/elements/section.js +1 -1
- package/lib/components/readme/getting-started.d.ts +5 -0
- package/lib/components/readme/getting-started.js +27 -0
- package/lib/components/readme/index.d.ts +59 -2
- package/lib/components/readme/index.js +93 -7
- package/lib/projects/cdk-ts/index.js +8 -6
- package/lib/projects/jsii/index.js +6 -5
- package/lib/projects/npm/index.js +6 -3
- package/lib/projects/python/index.js +6 -3
- package/package.json +1 -1
package/.jsii
CHANGED
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
},
|
|
100
100
|
"name": "projen-modules",
|
|
101
101
|
"readme": {
|
|
102
|
-
"markdown": "# projen-modules\n\nA collection of custom projen modules, that can be used to bootstrap and maintain consistent project configuration, tooling, dependencies, and builds.\n\n## Getting Started\n\n```sh\nyarn install\nnpx projen build\n```\n\nThis will:\n* Install the dependencies\n* Apply any projen changes\n* Run tests\n* Package project locally\n\nAny files changed by projen should be committed to git.\n\nRunning the tests like this will update any snapshot files, this should be reviewed and committed to git.\n\n## Testing\n\nTypes of testing:\n* Snapshot - projen project outputs are stored as a snapshot in the corresponding `__snapshots__` directory. When the project changes then it is expected that these snapshots change too and should be reviewed committed alongside the project.\n* Unit tests - these assert on specific functionality of the project and should be written for any new functionality added.\n\n\n## GitHub Configuration\n\nAll pull requests are merged by the [Mergify](https://mergify.com) merge queue, configured in `.mergify.yml`. Once a pull request is approved, or is opened by `daveshepherd`, and its checks pass, Mergify queues it, brings it up to date with the default branch, waits for the checks again and squash merges it. Draft pull requests and those labelled `do-not-merge` are not merged.\n\nThe repository must be configured as below so that nothing can be merged without going through the queue.\n\n### Mergify\n\nInstall the [Mergify GitHub App](https://github.com/apps/mergify) and give it access to this repository.\n\n### Pull request settings\n\nIn **Settings → General → Pull Requests**:\n* Allow squash merging only (untick merge commits and rebase merging), matching the queue's merge method.\n* Untick **Allow auto-merge**, because GitHub's own auto-merge merges outside the queue.\n* Tick **Automatically delete head branches**.\n\n### Actions settings\n\nIn **Settings → Actions → General**, set **Approval for running fork pull request workflows from contributors** to **Require approval for all external contributors**. A pull request from a fork runs its own copy of the workflows, so it can change how the required checks pass.\n\n### Code scanning\n\nCodeQL runs from `.github/workflows/codeql.yml`, which is managed by projen. In **Settings → Advanced Security**, leave CodeQL **Default setup** off, because it cannot run alongside this workflow. Under **Protection rules**, keep the **Check run failure threshold** at **High or higher** for security alerts and **Errors** for other alerts, as this decides whether the `CodeQL` check fails. Private repositories also need GitHub Code Security enabled there for code scanning results to be uploaded.\n\n### Branch ruleset\n\nIn **Settings → Rules → Rulesets**, create a branch ruleset with enforcement **Active** that targets the default branch, and set:\n* **Bypass list**: the **Mergify** app only, in **Exempt** mode. Do not add admins or other roles, as anyone on this list can merge without the queue.\n* **Restrict updates**: only bypass actors can update the branch, so pull requests cannot be merged from the GitHub UI or CLI and commits cannot be pushed directly.\n* **Restrict deletions** and **Block force pushes**.\n* **Require a pull request before merging**, with 0 required approvals, because Mergify requires approvals itself for authors other than `daveshepherd` and is exempt from this rule. Tick **Dismiss stale pull request approvals when new commits are pushed**, so that commits pushed after an approval need approving again before the queue merges them.\n* **Require status checks to pass**, listing the checks that `.mergify.yml` waits for: `build`, `package-js`, `package-python`. Leave **Require branches to be up to date before merging** unticked, as the queue already updates and retests each pull request.\n* **Require code scanning results**, with the tool **CodeQL**, security alerts set to **High or higher** and alerts set to **Errors**. Mergify is exempt from this rule, so `.mergify.yml` also waits for the `CodeQL` check instead.\n\nDo not enable GitHub's own **Require merge queue** rule, as it competes with Mergify.\n\nIf the queue is unavailable and a change has to be merged, add yourself to the bypass list temporarily and remove yourself afterwards.\n\n##
|
|
102
|
+
"markdown": "<!-- ~~ Generated by projen. To modify, edit .projenrc.ts and run \"npx projen\". -->\n\n# projen-modules\n\nA collection of custom projen modules, that can be used to bootstrap and maintain consistent project configuration, tooling, dependencies, and builds.\n\n## Getting Started\n\n```sh\nyarn install\nnpx projen build\n```\n\nThis will:\n* Install the dependencies\n* Apply any projen changes\n* Run tests\n* Package project locally\n\nAny files changed by projen should be committed to git.\n\nRunning the tests like this will update any snapshot files, this should be reviewed and committed to git.\n\n## Testing\n\nTypes of testing:\n* Snapshot - projen project outputs are stored as a snapshot in the corresponding `__snapshots__` directory. When the project changes then it is expected that these snapshots change too and should be reviewed committed alongside the project.\n* Unit tests - these assert on specific functionality of the project and should be written for any new functionality added.\n\n\n## Creating a New Project\n\n\n```\nnpx projen new {project} --from projen-modules\n```\n\nSome projects may have required fields that need to be specified as part of this command, review any errors for details what needs to be specified.\n\n### Project Types\n\n| Project type | Description |\n| ---------------------------------------------- | -------------------------- |\n| [cdk-typescript-app](API.md#cdktypescriptapp-) | A typescript CDK app |\n| [npm-package](API.md#npmpackage-) | A typescript npm package |\n| [python-package](API.md#pythonpackage-) | A python package |\n| [jsii-package](API.md#jsiiproject-) | A typescript JSII package |\n\n## Project Structure\n\nAll source is located in `src` and is grouped by:\n* `components` - these are common building blocks that can be used by projects to implement specific project functionality.\n* `projects` - these are projects that can be built from this project (see #something)\n* `utils` - these are helper functions that are often reused\n\n`test` contains tests, and mirrors the `src` directory structure. Within here there are `__snapshots__` which contain snapshots of project tests (see #section).\n\n## GitHub Configuration\n\nAll pull requests are merged by the [Mergify](https://mergify.com) merge queue, configured in `.mergify.yml`. Once a pull request is approved, or is opened by `daveshepherd`, and its checks pass, Mergify queues it, brings it up to date with the default branch, waits for the checks again and squash merges it. Draft pull requests and those labelled `do-not-merge` are not merged.\n\nThe repository must be configured as below so that nothing can be merged without going through the queue.\n\n### Mergify\n\nInstall the [Mergify GitHub App](https://github.com/apps/mergify) and give it access to this repository.\n\n### Pull request settings\n\nIn **Settings → General → Pull Requests**:\n* Allow squash merging only (untick merge commits and rebase merging), matching the queue's merge method.\n* Untick **Allow auto-merge**, because GitHub's own auto-merge merges outside the queue.\n* Tick **Automatically delete head branches**.\n\n### Actions settings\n\nIn **Settings → Actions → General**, set **Approval for running fork pull request workflows from contributors** to **Require approval for all external contributors**. A pull request from a fork runs its own copy of the workflows, so it can change how the required checks pass.\n\n### Code scanning\n\nCodeQL runs from `.github/workflows/codeql.yml`, which is managed by projen. In **Settings → Advanced Security**, leave CodeQL **Default setup** off, because it cannot run alongside this workflow. Under **Protection rules**, keep the **Check run failure threshold** at **High or higher** for security alerts and **Errors** for other alerts, as this decides whether the `CodeQL` check fails. Private repositories also need GitHub Code Security enabled there for code scanning results to be uploaded.\n\n### Branch ruleset\n\nIn **Settings → Rules → Rulesets**, create a branch ruleset with enforcement **Active** that targets the default branch, and set:\n* **Bypass list**: the **Mergify** app only, in **Exempt** mode. Do not add admins or other roles, as anyone on this list can merge without the queue.\n* **Restrict updates**: only bypass actors can update the branch, so pull requests cannot be merged from the GitHub UI or CLI and commits cannot be pushed directly.\n* **Restrict deletions** and **Block force pushes**.\n* **Require a pull request before merging**, with 0 required approvals, because Mergify requires approvals itself for authors other than `daveshepherd` and is exempt from this rule. Tick **Dismiss stale pull request approvals when new commits are pushed**, so that commits pushed after an approval need approving again before the queue merges them.\n* **Require status checks to pass**, listing the checks that `.mergify.yml` waits for: `build`, `package-js`, `package-python`. Leave **Require branches to be up to date before merging** unticked, as the queue already updates and retests each pull request.\n* **Require code scanning results**, with the tool **CodeQL**, security alerts set to **High or higher** and alerts set to **Errors**. Mergify is exempt from this rule, so `.mergify.yml` also waits for the `CodeQL` check instead.\n\nDo not enable GitHub's own **Require merge queue** rule, as it competes with Mergify.\n\nIf the queue is unavailable and a change has to be merged, add yourself to the bypass list temporarily and remove yourself afterwards.\n\n## Known Issues\n\n`cdk-typescript-app` defaults to Jest 30, which hoists `@sinonjs/fake-timers` 15 whose bundled types conflict with the `@types/sinon` used by `aws-sdk-client-mock`. Projects using `aws-sdk-client-mock` can set `compilerOptions.skipLibCheck` on the test tsconfig:\n\n```ts\nproject.tryFindObjectFile('test/tsconfig.json')?.addOverride('compilerOptions.skipLibCheck', true);\n```"
|
|
103
103
|
},
|
|
104
104
|
"repository": {
|
|
105
105
|
"type": "git",
|
|
@@ -116,6 +116,42 @@
|
|
|
116
116
|
}
|
|
117
117
|
},
|
|
118
118
|
"types": {
|
|
119
|
+
"projen-modules.AddSectionOptions": {
|
|
120
|
+
"assembly": "projen-modules",
|
|
121
|
+
"datatype": true,
|
|
122
|
+
"docs": {
|
|
123
|
+
"stability": "stable"
|
|
124
|
+
},
|
|
125
|
+
"fqn": "projen-modules.AddSectionOptions",
|
|
126
|
+
"kind": "interface",
|
|
127
|
+
"locationInModule": {
|
|
128
|
+
"filename": "src/components/readme/index.ts",
|
|
129
|
+
"line": 11
|
|
130
|
+
},
|
|
131
|
+
"name": "AddSectionOptions",
|
|
132
|
+
"properties": [
|
|
133
|
+
{
|
|
134
|
+
"abstract": true,
|
|
135
|
+
"docs": {
|
|
136
|
+
"default": "- `ReadmeOrder.DEFAULT`, or the existing order when replacing a section",
|
|
137
|
+
"remarks": "Sections with the\nsame order keep the order they were added in.",
|
|
138
|
+
"stability": "stable",
|
|
139
|
+
"summary": "Position of the section in the README, lowest first."
|
|
140
|
+
},
|
|
141
|
+
"immutable": true,
|
|
142
|
+
"locationInModule": {
|
|
143
|
+
"filename": "src/components/readme/index.ts",
|
|
144
|
+
"line": 18
|
|
145
|
+
},
|
|
146
|
+
"name": "order",
|
|
147
|
+
"optional": true,
|
|
148
|
+
"type": {
|
|
149
|
+
"primitive": "number"
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
],
|
|
153
|
+
"symbolId": "src/components/readme/index:AddSectionOptions"
|
|
154
|
+
},
|
|
119
155
|
"projen-modules.CdkTypeScriptApp": {
|
|
120
156
|
"assembly": "projen-modules",
|
|
121
157
|
"base": "projen.awscdk.AwsCdkTypeScriptApp",
|
|
@@ -134,7 +170,7 @@
|
|
|
134
170
|
},
|
|
135
171
|
"locationInModule": {
|
|
136
172
|
"filename": "src/projects/cdk-ts/index.ts",
|
|
137
|
-
"line":
|
|
173
|
+
"line": 62
|
|
138
174
|
},
|
|
139
175
|
"parameters": [
|
|
140
176
|
{
|
|
@@ -148,7 +184,7 @@
|
|
|
148
184
|
"kind": "class",
|
|
149
185
|
"locationInModule": {
|
|
150
186
|
"filename": "src/projects/cdk-ts/index.ts",
|
|
151
|
-
"line":
|
|
187
|
+
"line": 59
|
|
152
188
|
},
|
|
153
189
|
"name": "CdkTypeScriptApp",
|
|
154
190
|
"properties": [
|
|
@@ -158,7 +194,7 @@
|
|
|
158
194
|
},
|
|
159
195
|
"locationInModule": {
|
|
160
196
|
"filename": "src/projects/cdk-ts/index.ts",
|
|
161
|
-
"line":
|
|
197
|
+
"line": 60
|
|
162
198
|
},
|
|
163
199
|
"name": "readme",
|
|
164
200
|
"type": {
|
|
@@ -3771,7 +3807,7 @@
|
|
|
3771
3807
|
},
|
|
3772
3808
|
"locationInModule": {
|
|
3773
3809
|
"filename": "src/projects/jsii/index.ts",
|
|
3774
|
-
"line":
|
|
3810
|
+
"line": 43
|
|
3775
3811
|
},
|
|
3776
3812
|
"parameters": [
|
|
3777
3813
|
{
|
|
@@ -3785,7 +3821,7 @@
|
|
|
3785
3821
|
"kind": "class",
|
|
3786
3822
|
"locationInModule": {
|
|
3787
3823
|
"filename": "src/projects/jsii/index.ts",
|
|
3788
|
-
"line":
|
|
3824
|
+
"line": 40
|
|
3789
3825
|
},
|
|
3790
3826
|
"name": "JsiiProject",
|
|
3791
3827
|
"properties": [
|
|
@@ -3795,7 +3831,7 @@
|
|
|
3795
3831
|
},
|
|
3796
3832
|
"locationInModule": {
|
|
3797
3833
|
"filename": "src/projects/jsii/index.ts",
|
|
3798
|
-
"line":
|
|
3834
|
+
"line": 41
|
|
3799
3835
|
},
|
|
3800
3836
|
"name": "readme",
|
|
3801
3837
|
"type": {
|
|
@@ -7097,7 +7133,7 @@
|
|
|
7097
7133
|
},
|
|
7098
7134
|
"locationInModule": {
|
|
7099
7135
|
"filename": "src/projects/npm/index.ts",
|
|
7100
|
-
"line":
|
|
7136
|
+
"line": 42
|
|
7101
7137
|
},
|
|
7102
7138
|
"parameters": [
|
|
7103
7139
|
{
|
|
@@ -7111,7 +7147,7 @@
|
|
|
7111
7147
|
"kind": "class",
|
|
7112
7148
|
"locationInModule": {
|
|
7113
7149
|
"filename": "src/projects/npm/index.ts",
|
|
7114
|
-
"line":
|
|
7150
|
+
"line": 39
|
|
7115
7151
|
},
|
|
7116
7152
|
"name": "NpmPackage",
|
|
7117
7153
|
"properties": [
|
|
@@ -7121,7 +7157,7 @@
|
|
|
7121
7157
|
},
|
|
7122
7158
|
"locationInModule": {
|
|
7123
7159
|
"filename": "src/projects/npm/index.ts",
|
|
7124
|
-
"line":
|
|
7160
|
+
"line": 40
|
|
7125
7161
|
},
|
|
7126
7162
|
"name": "readme",
|
|
7127
7163
|
"type": {
|
|
@@ -10128,7 +10164,7 @@
|
|
|
10128
10164
|
},
|
|
10129
10165
|
"locationInModule": {
|
|
10130
10166
|
"filename": "src/projects/python/index.ts",
|
|
10131
|
-
"line":
|
|
10167
|
+
"line": 39
|
|
10132
10168
|
},
|
|
10133
10169
|
"parameters": [
|
|
10134
10170
|
{
|
|
@@ -10142,7 +10178,7 @@
|
|
|
10142
10178
|
"kind": "class",
|
|
10143
10179
|
"locationInModule": {
|
|
10144
10180
|
"filename": "src/projects/python/index.ts",
|
|
10145
|
-
"line":
|
|
10181
|
+
"line": 35
|
|
10146
10182
|
},
|
|
10147
10183
|
"name": "PythonPackage",
|
|
10148
10184
|
"properties": [
|
|
@@ -10153,7 +10189,7 @@
|
|
|
10153
10189
|
"immutable": true,
|
|
10154
10190
|
"locationInModule": {
|
|
10155
10191
|
"filename": "src/projects/python/index.ts",
|
|
10156
|
-
"line":
|
|
10192
|
+
"line": 36
|
|
10157
10193
|
},
|
|
10158
10194
|
"name": "autoMerge",
|
|
10159
10195
|
"optional": true,
|
|
@@ -10167,7 +10203,7 @@
|
|
|
10167
10203
|
},
|
|
10168
10204
|
"locationInModule": {
|
|
10169
10205
|
"filename": "src/projects/python/index.ts",
|
|
10170
|
-
"line":
|
|
10206
|
+
"line": 37
|
|
10171
10207
|
},
|
|
10172
10208
|
"name": "readme",
|
|
10173
10209
|
"type": {
|
|
@@ -11389,7 +11425,7 @@
|
|
|
11389
11425
|
},
|
|
11390
11426
|
"locationInModule": {
|
|
11391
11427
|
"filename": "src/components/readme/index.ts",
|
|
11392
|
-
"line":
|
|
11428
|
+
"line": 62
|
|
11393
11429
|
},
|
|
11394
11430
|
"parameters": [
|
|
11395
11431
|
{
|
|
@@ -11410,16 +11446,44 @@
|
|
|
11410
11446
|
"kind": "class",
|
|
11411
11447
|
"locationInModule": {
|
|
11412
11448
|
"filename": "src/components/readme/index.ts",
|
|
11413
|
-
"line":
|
|
11449
|
+
"line": 51
|
|
11414
11450
|
},
|
|
11415
11451
|
"methods": [
|
|
11416
11452
|
{
|
|
11417
11453
|
"docs": {
|
|
11418
|
-
"stability": "stable"
|
|
11454
|
+
"stability": "stable",
|
|
11455
|
+
"summary": "The README of a project, if it has one."
|
|
11456
|
+
},
|
|
11457
|
+
"locationInModule": {
|
|
11458
|
+
"filename": "src/components/readme/index.ts",
|
|
11459
|
+
"line": 55
|
|
11460
|
+
},
|
|
11461
|
+
"name": "of",
|
|
11462
|
+
"parameters": [
|
|
11463
|
+
{
|
|
11464
|
+
"name": "project",
|
|
11465
|
+
"type": {
|
|
11466
|
+
"fqn": "projen.Project"
|
|
11467
|
+
}
|
|
11468
|
+
}
|
|
11469
|
+
],
|
|
11470
|
+
"returns": {
|
|
11471
|
+
"optional": true,
|
|
11472
|
+
"type": {
|
|
11473
|
+
"fqn": "projen-modules.Readme"
|
|
11474
|
+
}
|
|
11475
|
+
},
|
|
11476
|
+
"static": true
|
|
11477
|
+
},
|
|
11478
|
+
{
|
|
11479
|
+
"docs": {
|
|
11480
|
+
"returns": "the section",
|
|
11481
|
+
"stability": "stable",
|
|
11482
|
+
"summary": "Adds a section, or replaces the section with the same title."
|
|
11419
11483
|
},
|
|
11420
11484
|
"locationInModule": {
|
|
11421
11485
|
"filename": "src/components/readme/index.ts",
|
|
11422
|
-
"line":
|
|
11486
|
+
"line": 86
|
|
11423
11487
|
},
|
|
11424
11488
|
"name": "addSection",
|
|
11425
11489
|
"parameters": [
|
|
@@ -11434,8 +11498,45 @@
|
|
|
11434
11498
|
"type": {
|
|
11435
11499
|
"primitive": "string"
|
|
11436
11500
|
}
|
|
11501
|
+
},
|
|
11502
|
+
{
|
|
11503
|
+
"name": "options",
|
|
11504
|
+
"optional": true,
|
|
11505
|
+
"type": {
|
|
11506
|
+
"fqn": "projen-modules.AddSectionOptions"
|
|
11507
|
+
}
|
|
11508
|
+
}
|
|
11509
|
+
],
|
|
11510
|
+
"returns": {
|
|
11511
|
+
"type": {
|
|
11512
|
+
"fqn": "projen-modules.Section"
|
|
11513
|
+
}
|
|
11514
|
+
}
|
|
11515
|
+
},
|
|
11516
|
+
{
|
|
11517
|
+
"docs": {
|
|
11518
|
+
"returns": "whether a section was removed",
|
|
11519
|
+
"stability": "stable",
|
|
11520
|
+
"summary": "Removes the section with the given title."
|
|
11521
|
+
},
|
|
11522
|
+
"locationInModule": {
|
|
11523
|
+
"filename": "src/components/readme/index.ts",
|
|
11524
|
+
"line": 109
|
|
11525
|
+
},
|
|
11526
|
+
"name": "removeSection",
|
|
11527
|
+
"parameters": [
|
|
11528
|
+
{
|
|
11529
|
+
"name": "title",
|
|
11530
|
+
"type": {
|
|
11531
|
+
"primitive": "string"
|
|
11532
|
+
}
|
|
11533
|
+
}
|
|
11534
|
+
],
|
|
11535
|
+
"returns": {
|
|
11536
|
+
"type": {
|
|
11537
|
+
"primitive": "boolean"
|
|
11437
11538
|
}
|
|
11438
|
-
|
|
11539
|
+
}
|
|
11439
11540
|
},
|
|
11440
11541
|
{
|
|
11441
11542
|
"docs": {
|
|
@@ -11444,7 +11545,7 @@
|
|
|
11444
11545
|
},
|
|
11445
11546
|
"locationInModule": {
|
|
11446
11547
|
"filename": "src/components/readme/index.ts",
|
|
11447
|
-
"line":
|
|
11548
|
+
"line": 126
|
|
11448
11549
|
},
|
|
11449
11550
|
"name": "synthesizeContent",
|
|
11450
11551
|
"overrides": "projen.FileBase",
|
|
@@ -11463,17 +11564,44 @@
|
|
|
11463
11564
|
"primitive": "string"
|
|
11464
11565
|
}
|
|
11465
11566
|
}
|
|
11567
|
+
},
|
|
11568
|
+
{
|
|
11569
|
+
"docs": {
|
|
11570
|
+
"stability": "stable",
|
|
11571
|
+
"summary": "The section with the given title, if there is one."
|
|
11572
|
+
},
|
|
11573
|
+
"locationInModule": {
|
|
11574
|
+
"filename": "src/components/readme/index.ts",
|
|
11575
|
+
"line": 121
|
|
11576
|
+
},
|
|
11577
|
+
"name": "tryFindSection",
|
|
11578
|
+
"parameters": [
|
|
11579
|
+
{
|
|
11580
|
+
"name": "title",
|
|
11581
|
+
"type": {
|
|
11582
|
+
"primitive": "string"
|
|
11583
|
+
}
|
|
11584
|
+
}
|
|
11585
|
+
],
|
|
11586
|
+
"returns": {
|
|
11587
|
+
"optional": true,
|
|
11588
|
+
"type": {
|
|
11589
|
+
"fqn": "projen-modules.Section"
|
|
11590
|
+
}
|
|
11591
|
+
}
|
|
11466
11592
|
}
|
|
11467
11593
|
],
|
|
11468
11594
|
"name": "Readme",
|
|
11469
11595
|
"properties": [
|
|
11470
11596
|
{
|
|
11471
11597
|
"docs": {
|
|
11472
|
-
"stability": "stable"
|
|
11598
|
+
"stability": "stable",
|
|
11599
|
+
"summary": "The sections, in the order they appear in the README."
|
|
11473
11600
|
},
|
|
11601
|
+
"immutable": true,
|
|
11474
11602
|
"locationInModule": {
|
|
11475
11603
|
"filename": "src/components/readme/index.ts",
|
|
11476
|
-
"line":
|
|
11604
|
+
"line": 77
|
|
11477
11605
|
},
|
|
11478
11606
|
"name": "sections",
|
|
11479
11607
|
"type": {
|
|
@@ -11491,7 +11619,7 @@
|
|
|
11491
11619
|
},
|
|
11492
11620
|
"locationInModule": {
|
|
11493
11621
|
"filename": "src/components/readme/index.ts",
|
|
11494
|
-
"line":
|
|
11622
|
+
"line": 59
|
|
11495
11623
|
},
|
|
11496
11624
|
"name": "description",
|
|
11497
11625
|
"optional": true,
|
|
@@ -11536,6 +11664,91 @@
|
|
|
11536
11664
|
],
|
|
11537
11665
|
"symbolId": "src/components/readme/index:ReadmeOptions"
|
|
11538
11666
|
},
|
|
11667
|
+
"projen-modules.ReadmeOrder": {
|
|
11668
|
+
"assembly": "projen-modules",
|
|
11669
|
+
"docs": {
|
|
11670
|
+
"stability": "stable",
|
|
11671
|
+
"summary": "Orders of the bands of sections in the README, leaving room for sections in between."
|
|
11672
|
+
},
|
|
11673
|
+
"fqn": "projen-modules.ReadmeOrder",
|
|
11674
|
+
"kind": "class",
|
|
11675
|
+
"locationInModule": {
|
|
11676
|
+
"filename": "src/components/readme/index.ts",
|
|
11677
|
+
"line": 25
|
|
11678
|
+
},
|
|
11679
|
+
"name": "ReadmeOrder",
|
|
11680
|
+
"properties": [
|
|
11681
|
+
{
|
|
11682
|
+
"const": true,
|
|
11683
|
+
"docs": {
|
|
11684
|
+
"stability": "stable",
|
|
11685
|
+
"summary": "Sections added without an order."
|
|
11686
|
+
},
|
|
11687
|
+
"immutable": true,
|
|
11688
|
+
"locationInModule": {
|
|
11689
|
+
"filename": "src/components/readme/index.ts",
|
|
11690
|
+
"line": 37
|
|
11691
|
+
},
|
|
11692
|
+
"name": "DEFAULT",
|
|
11693
|
+
"static": true,
|
|
11694
|
+
"type": {
|
|
11695
|
+
"primitive": "number"
|
|
11696
|
+
}
|
|
11697
|
+
},
|
|
11698
|
+
{
|
|
11699
|
+
"const": true,
|
|
11700
|
+
"docs": {
|
|
11701
|
+
"stability": "stable",
|
|
11702
|
+
"summary": "Sections a reader needs first, such as getting started."
|
|
11703
|
+
},
|
|
11704
|
+
"immutable": true,
|
|
11705
|
+
"locationInModule": {
|
|
11706
|
+
"filename": "src/components/readme/index.ts",
|
|
11707
|
+
"line": 29
|
|
11708
|
+
},
|
|
11709
|
+
"name": "INTRODUCTION",
|
|
11710
|
+
"static": true,
|
|
11711
|
+
"type": {
|
|
11712
|
+
"primitive": "number"
|
|
11713
|
+
}
|
|
11714
|
+
},
|
|
11715
|
+
{
|
|
11716
|
+
"const": true,
|
|
11717
|
+
"docs": {
|
|
11718
|
+
"stability": "stable",
|
|
11719
|
+
"summary": "Reference material, such as repository configuration and known issues."
|
|
11720
|
+
},
|
|
11721
|
+
"immutable": true,
|
|
11722
|
+
"locationInModule": {
|
|
11723
|
+
"filename": "src/components/readme/index.ts",
|
|
11724
|
+
"line": 41
|
|
11725
|
+
},
|
|
11726
|
+
"name": "REFERENCE",
|
|
11727
|
+
"static": true,
|
|
11728
|
+
"type": {
|
|
11729
|
+
"primitive": "number"
|
|
11730
|
+
}
|
|
11731
|
+
},
|
|
11732
|
+
{
|
|
11733
|
+
"const": true,
|
|
11734
|
+
"docs": {
|
|
11735
|
+
"stability": "stable",
|
|
11736
|
+
"summary": "How to use and operate the project."
|
|
11737
|
+
},
|
|
11738
|
+
"immutable": true,
|
|
11739
|
+
"locationInModule": {
|
|
11740
|
+
"filename": "src/components/readme/index.ts",
|
|
11741
|
+
"line": 33
|
|
11742
|
+
},
|
|
11743
|
+
"name": "USAGE",
|
|
11744
|
+
"static": true,
|
|
11745
|
+
"type": {
|
|
11746
|
+
"primitive": "number"
|
|
11747
|
+
}
|
|
11748
|
+
}
|
|
11749
|
+
],
|
|
11750
|
+
"symbolId": "src/components/readme/index:ReadmeOrder"
|
|
11751
|
+
},
|
|
11539
11752
|
"projen-modules.Section": {
|
|
11540
11753
|
"assembly": "projen-modules",
|
|
11541
11754
|
"docs": {
|
|
@@ -11601,6 +11814,6 @@
|
|
|
11601
11814
|
"symbolId": "src/components/readme/elements/section:Section"
|
|
11602
11815
|
}
|
|
11603
11816
|
},
|
|
11604
|
-
"version": "4.
|
|
11605
|
-
"fingerprint": "
|
|
11817
|
+
"version": "4.6.0",
|
|
11818
|
+
"fingerprint": "FPqrAwKcURWT1wMe1KftZZZlz1y+mQUCz0KxMFkGumg="
|
|
11606
11819
|
}
|
package/API.md
CHANGED
|
@@ -5275,7 +5275,9 @@ new Readme(project: Project, options?: ReadmeOptions)
|
|
|
5275
5275
|
| <code><a href="#projen-modules.Readme.projectCreation">projectCreation</a></code> | Called once, right after `synthesize()`, only when the project is created for the first time. |
|
|
5276
5276
|
| <code><a href="#projen-modules.Readme.synthesize">synthesize</a></code> | Writes the file to the project's output directory. |
|
|
5277
5277
|
| <code><a href="#projen-modules.Readme.diff">diff</a></code> | Returns a unified diff of the old and new file contents with context lines and hunk headers. |
|
|
5278
|
-
| <code><a href="#projen-modules.Readme.addSection">addSection</a></code> |
|
|
5278
|
+
| <code><a href="#projen-modules.Readme.addSection">addSection</a></code> | Adds a section, or replaces the section with the same title. |
|
|
5279
|
+
| <code><a href="#projen-modules.Readme.removeSection">removeSection</a></code> | Removes the section with the given title. |
|
|
5280
|
+
| <code><a href="#projen-modules.Readme.tryFindSection">tryFindSection</a></code> | The section with the given title, if there is one. |
|
|
5279
5281
|
|
|
5280
5282
|
---
|
|
5281
5283
|
|
|
@@ -5406,9 +5408,11 @@ Number of context lines around changes.
|
|
|
5406
5408
|
##### `addSection` <a name="addSection" id="projen-modules.Readme.addSection"></a>
|
|
5407
5409
|
|
|
5408
5410
|
```typescript
|
|
5409
|
-
public addSection(title: string, body: string):
|
|
5411
|
+
public addSection(title: string, body: string, options?: AddSectionOptions): Section
|
|
5410
5412
|
```
|
|
5411
5413
|
|
|
5414
|
+
Adds a section, or replaces the section with the same title.
|
|
5415
|
+
|
|
5412
5416
|
###### `title`<sup>Required</sup> <a name="title" id="projen-modules.Readme.addSection.parameter.title"></a>
|
|
5413
5417
|
|
|
5414
5418
|
- *Type:* string
|
|
@@ -5421,12 +5425,47 @@ public addSection(title: string, body: string): void
|
|
|
5421
5425
|
|
|
5422
5426
|
---
|
|
5423
5427
|
|
|
5428
|
+
###### `options`<sup>Optional</sup> <a name="options" id="projen-modules.Readme.addSection.parameter.options"></a>
|
|
5429
|
+
|
|
5430
|
+
- *Type:* <a href="#projen-modules.AddSectionOptions">AddSectionOptions</a>
|
|
5431
|
+
|
|
5432
|
+
---
|
|
5433
|
+
|
|
5434
|
+
##### `removeSection` <a name="removeSection" id="projen-modules.Readme.removeSection"></a>
|
|
5435
|
+
|
|
5436
|
+
```typescript
|
|
5437
|
+
public removeSection(title: string): boolean
|
|
5438
|
+
```
|
|
5439
|
+
|
|
5440
|
+
Removes the section with the given title.
|
|
5441
|
+
|
|
5442
|
+
###### `title`<sup>Required</sup> <a name="title" id="projen-modules.Readme.removeSection.parameter.title"></a>
|
|
5443
|
+
|
|
5444
|
+
- *Type:* string
|
|
5445
|
+
|
|
5446
|
+
---
|
|
5447
|
+
|
|
5448
|
+
##### `tryFindSection` <a name="tryFindSection" id="projen-modules.Readme.tryFindSection"></a>
|
|
5449
|
+
|
|
5450
|
+
```typescript
|
|
5451
|
+
public tryFindSection(title: string): Section
|
|
5452
|
+
```
|
|
5453
|
+
|
|
5454
|
+
The section with the given title, if there is one.
|
|
5455
|
+
|
|
5456
|
+
###### `title`<sup>Required</sup> <a name="title" id="projen-modules.Readme.tryFindSection.parameter.title"></a>
|
|
5457
|
+
|
|
5458
|
+
- *Type:* string
|
|
5459
|
+
|
|
5460
|
+
---
|
|
5461
|
+
|
|
5424
5462
|
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
5425
5463
|
|
|
5426
5464
|
| **Name** | **Description** |
|
|
5427
5465
|
| --- | --- |
|
|
5428
5466
|
| <code><a href="#projen-modules.Readme.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
5429
5467
|
| <code><a href="#projen-modules.Readme.isComponent">isComponent</a></code> | Test whether the given construct is a component. |
|
|
5468
|
+
| <code><a href="#projen-modules.Readme.of">of</a></code> | The README of a project, if it has one. |
|
|
5430
5469
|
|
|
5431
5470
|
---
|
|
5432
5471
|
|
|
@@ -5478,6 +5517,22 @@ Test whether the given construct is a component.
|
|
|
5478
5517
|
|
|
5479
5518
|
---
|
|
5480
5519
|
|
|
5520
|
+
##### `of` <a name="of" id="projen-modules.Readme.of"></a>
|
|
5521
|
+
|
|
5522
|
+
```typescript
|
|
5523
|
+
import { Readme } from 'projen-modules'
|
|
5524
|
+
|
|
5525
|
+
Readme.of(project: Project)
|
|
5526
|
+
```
|
|
5527
|
+
|
|
5528
|
+
The README of a project, if it has one.
|
|
5529
|
+
|
|
5530
|
+
###### `project`<sup>Required</sup> <a name="project" id="projen-modules.Readme.of.parameter.project"></a>
|
|
5531
|
+
|
|
5532
|
+
- *Type:* projen.Project
|
|
5533
|
+
|
|
5534
|
+
---
|
|
5535
|
+
|
|
5481
5536
|
#### Properties <a name="Properties" id="Properties"></a>
|
|
5482
5537
|
|
|
5483
5538
|
| **Name** | **Type** | **Description** |
|
|
@@ -5491,7 +5546,7 @@ Test whether the given construct is a component.
|
|
|
5491
5546
|
| <code><a href="#projen-modules.Readme.property.marker">marker</a></code> | <code>string</code> | The projen marker, used to identify files as projen-generated. |
|
|
5492
5547
|
| <code><a href="#projen-modules.Readme.property.executable">executable</a></code> | <code>boolean</code> | Indicates if the file should be marked as executable. |
|
|
5493
5548
|
| <code><a href="#projen-modules.Readme.property.readonly">readonly</a></code> | <code>boolean</code> | Indicates if the file should be read-only or read-write. |
|
|
5494
|
-
| <code><a href="#projen-modules.Readme.property.sections">sections</a></code> | <code><a href="#projen-modules.Section">Section</a>[]</code> |
|
|
5549
|
+
| <code><a href="#projen-modules.Readme.property.sections">sections</a></code> | <code><a href="#projen-modules.Section">Section</a>[]</code> | The sections, in the order they appear in the README. |
|
|
5495
5550
|
| <code><a href="#projen-modules.Readme.property.description">description</a></code> | <code>string</code> | *No description.* |
|
|
5496
5551
|
|
|
5497
5552
|
---
|
|
@@ -5616,6 +5671,8 @@ public readonly sections: Section[];
|
|
|
5616
5671
|
|
|
5617
5672
|
- *Type:* <a href="#projen-modules.Section">Section</a>[]
|
|
5618
5673
|
|
|
5674
|
+
The sections, in the order they appear in the README.
|
|
5675
|
+
|
|
5619
5676
|
---
|
|
5620
5677
|
|
|
5621
5678
|
##### `description`<sup>Optional</sup> <a name="description" id="projen-modules.Readme.property.description"></a>
|
|
@@ -5631,6 +5688,40 @@ public readonly description: string;
|
|
|
5631
5688
|
|
|
5632
5689
|
## Structs <a name="Structs" id="Structs"></a>
|
|
5633
5690
|
|
|
5691
|
+
### AddSectionOptions <a name="AddSectionOptions" id="projen-modules.AddSectionOptions"></a>
|
|
5692
|
+
|
|
5693
|
+
#### Initializer <a name="Initializer" id="projen-modules.AddSectionOptions.Initializer"></a>
|
|
5694
|
+
|
|
5695
|
+
```typescript
|
|
5696
|
+
import { AddSectionOptions } from 'projen-modules'
|
|
5697
|
+
|
|
5698
|
+
const addSectionOptions: AddSectionOptions = { ... }
|
|
5699
|
+
```
|
|
5700
|
+
|
|
5701
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
5702
|
+
|
|
5703
|
+
| **Name** | **Type** | **Description** |
|
|
5704
|
+
| --- | --- | --- |
|
|
5705
|
+
| <code><a href="#projen-modules.AddSectionOptions.property.order">order</a></code> | <code>number</code> | Position of the section in the README, lowest first. |
|
|
5706
|
+
|
|
5707
|
+
---
|
|
5708
|
+
|
|
5709
|
+
##### `order`<sup>Optional</sup> <a name="order" id="projen-modules.AddSectionOptions.property.order"></a>
|
|
5710
|
+
|
|
5711
|
+
```typescript
|
|
5712
|
+
public readonly order: number;
|
|
5713
|
+
```
|
|
5714
|
+
|
|
5715
|
+
- *Type:* number
|
|
5716
|
+
- *Default:* `ReadmeOrder.DEFAULT`, or the existing order when replacing a section
|
|
5717
|
+
|
|
5718
|
+
Position of the section in the README, lowest first.
|
|
5719
|
+
|
|
5720
|
+
Sections with the
|
|
5721
|
+
same order keep the order they were added in.
|
|
5722
|
+
|
|
5723
|
+
---
|
|
5724
|
+
|
|
5634
5725
|
### CdkTypeScriptAppOptions <a name="CdkTypeScriptAppOptions" id="projen-modules.CdkTypeScriptAppOptions"></a>
|
|
5635
5726
|
|
|
5636
5727
|
CdkTypeScriptAppOptions.
|
|
@@ -14566,6 +14657,72 @@ The description of the project.
|
|
|
14566
14657
|
|
|
14567
14658
|
## Classes <a name="Classes" id="Classes"></a>
|
|
14568
14659
|
|
|
14660
|
+
### ReadmeOrder <a name="ReadmeOrder" id="projen-modules.ReadmeOrder"></a>
|
|
14661
|
+
|
|
14662
|
+
Orders of the bands of sections in the README, leaving room for sections in between.
|
|
14663
|
+
|
|
14664
|
+
|
|
14665
|
+
|
|
14666
|
+
|
|
14667
|
+
#### Constants <a name="Constants" id="Constants"></a>
|
|
14668
|
+
|
|
14669
|
+
| **Name** | **Type** | **Description** |
|
|
14670
|
+
| --- | --- | --- |
|
|
14671
|
+
| <code><a href="#projen-modules.ReadmeOrder.property.DEFAULT">DEFAULT</a></code> | <code>number</code> | Sections added without an order. |
|
|
14672
|
+
| <code><a href="#projen-modules.ReadmeOrder.property.INTRODUCTION">INTRODUCTION</a></code> | <code>number</code> | Sections a reader needs first, such as getting started. |
|
|
14673
|
+
| <code><a href="#projen-modules.ReadmeOrder.property.REFERENCE">REFERENCE</a></code> | <code>number</code> | Reference material, such as repository configuration and known issues. |
|
|
14674
|
+
| <code><a href="#projen-modules.ReadmeOrder.property.USAGE">USAGE</a></code> | <code>number</code> | How to use and operate the project. |
|
|
14675
|
+
|
|
14676
|
+
---
|
|
14677
|
+
|
|
14678
|
+
##### `DEFAULT`<sup>Required</sup> <a name="DEFAULT" id="projen-modules.ReadmeOrder.property.DEFAULT"></a>
|
|
14679
|
+
|
|
14680
|
+
```typescript
|
|
14681
|
+
public readonly DEFAULT: number;
|
|
14682
|
+
```
|
|
14683
|
+
|
|
14684
|
+
- *Type:* number
|
|
14685
|
+
|
|
14686
|
+
Sections added without an order.
|
|
14687
|
+
|
|
14688
|
+
---
|
|
14689
|
+
|
|
14690
|
+
##### `INTRODUCTION`<sup>Required</sup> <a name="INTRODUCTION" id="projen-modules.ReadmeOrder.property.INTRODUCTION"></a>
|
|
14691
|
+
|
|
14692
|
+
```typescript
|
|
14693
|
+
public readonly INTRODUCTION: number;
|
|
14694
|
+
```
|
|
14695
|
+
|
|
14696
|
+
- *Type:* number
|
|
14697
|
+
|
|
14698
|
+
Sections a reader needs first, such as getting started.
|
|
14699
|
+
|
|
14700
|
+
---
|
|
14701
|
+
|
|
14702
|
+
##### `REFERENCE`<sup>Required</sup> <a name="REFERENCE" id="projen-modules.ReadmeOrder.property.REFERENCE"></a>
|
|
14703
|
+
|
|
14704
|
+
```typescript
|
|
14705
|
+
public readonly REFERENCE: number;
|
|
14706
|
+
```
|
|
14707
|
+
|
|
14708
|
+
- *Type:* number
|
|
14709
|
+
|
|
14710
|
+
Reference material, such as repository configuration and known issues.
|
|
14711
|
+
|
|
14712
|
+
---
|
|
14713
|
+
|
|
14714
|
+
##### `USAGE`<sup>Required</sup> <a name="USAGE" id="projen-modules.ReadmeOrder.property.USAGE"></a>
|
|
14715
|
+
|
|
14716
|
+
```typescript
|
|
14717
|
+
public readonly USAGE: number;
|
|
14718
|
+
```
|
|
14719
|
+
|
|
14720
|
+
- *Type:* number
|
|
14721
|
+
|
|
14722
|
+
How to use and operate the project.
|
|
14723
|
+
|
|
14724
|
+
---
|
|
14725
|
+
|
|
14569
14726
|
### Section <a name="Section" id="projen-modules.Section"></a>
|
|
14570
14727
|
|
|
14571
14728
|
#### Initializers <a name="Initializers" id="projen-modules.Section.Initializer"></a>
|