@hallcor/pulumi-projen-project-types 0.0.20 ā 0.0.22
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 +17 -71
- package/API.md +1 -43
- package/README.md +270 -1
- package/lib/PythonComponentOptions.d.ts +1 -8
- package/lib/PythonComponentOptions.js +1 -1
- package/lib/TagReleaseOptions.d.ts +0 -7
- package/lib/TagReleaseOptions.js +1 -1
- package/lib/python.js +15 -9
- package/lib/release.js +17 -15
- package/lib/typescript-base.js +1 -1
- package/lib/typescript-options/component-options.d.ts +0 -7
- package/lib/typescript-options/component-options.js +1 -1
- package/lib/typescript.js +2 -3
- package/package.json +1 -1
package/.jsii
CHANGED
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
},
|
|
94
94
|
"name": "@hallcor/pulumi-projen-project-types",
|
|
95
95
|
"readme": {
|
|
96
|
-
"markdown": "#
|
|
96
|
+
"markdown": "# Pulumi Projen Project Types\n\nCollection of [Projen](https://github.com/projen/projen) project types for use\nwith [Pulumi](https://www.pulumi.com/)\n\n## Getting Started\n\n_projen_ doesn't need to be installed. You will be using\n[npx](https://docs.npmjs.com/cli/v7/commands/npx) to run _projen_ which takes\ncare of all required setup steps.\n\nTo create a new project, run the following command and follow the instructions:\n\n```console\n$ mkdir my-project\n$ cd my-project\n$ npx projen new --from @hallcor/pulumi-projen-project-types PROJECT-TYPE\nš¤ Synthesizing project...\n...\n```\n\nOnce your project is created, you can configure your project by editing\n`.projenrc.ts` or `.projenrc.py` and re-running `npx projen` to synthesize again.\n\n> The files generated by _projen_ are considered an \"implementation detail\" and\n> _projen_ protects them from being manually edited (most files are marked\n> read-only, and an \"anti tamper\" check is configured in the CI build workflow\n> to ensure that files are not updated during build).\n\n## Projen commands\n\nFor the TypeScript based projects the project commands can be viewed an run\nusing the package manager (e.g. `yarn build`, `yarn package`, etc). For\nnon-TypeScript based projects (i.e. Python) you can use projen to view and run\nproject commands.\n\nProjen is built around a standard build process for all projects. Each project\nwill have these standard [tasks](https://projen.io/docs/concepts/tasks).\n\n1. `default`: The \"default\" task that executes projen and synthesizes the project\n2. `pre-compile`: Task that runs prior to `compile`\n3. `compile`: Compiles the project (e.g. `tsc --build` for TypeScript projects)\n4. `post-compile`: Task that runs after `compile`\n5. `test`: Task that runs the project tests\n6. `package`: Task that runs steps to package the project for publishing\n\nThere is also a standard `build` task the chains the above 6 tasks in order.\n\nThere is a great [tasks guide] where you can find more information on adding new\ntasks, editing existing tasks, etc.\n\n**List available commands**\n\n```console\n$ npx projen --help\nprojen [command]\n\nCommands:\n projen new [PROJECT-TYPE-NAME] [OPTIONS] Creates a new projen project\n\n For a complete list of the available options for a specific project type, run:\n projen new [PROJECT-TYPE-NAME] --help\n projen build Full release build\n projen bump Bumps version based on latest git tag and generates a changelog entry\n projen clobber hard resets to HEAD of origin and cleans the local repo\n projen compile Only compile\n projen default Synthesize project files\n projen dist\n projen eject Remove projen from the project\n projen install Install and upgrade dependencies\n projen package Creates the distribution package\n projen post-compile Runs after successful compilation\n projen pre-compile Prepare the project for compilation\n projen publish:git Prepends the release changelog onto the project changelog, creates a release commit, and tags the release\n projen release Prepare a release from \"main\" branch\n projen test Run tests\n projen unbump Restores version to 0.0.0\n projen completion generate completion script\n\nOptions:\n --post Run post-synthesis steps such as installing dependencies. Use --no-post to skip [boolean] [default: true]\n -w, --watch Keep running and resynthesize when projenrc changes [boolean] [default: false]\n --debug Debug logs [boolean] [default: false]\n --rc path to .projenrc.js file [deprecated] [string] [default: \"/Users/chall/personal/pulumi-lambda-builders/.projenrc.js\"]\n --help Show help [boolean]\n --version Show version number\n\n```\n\n**Run a specific command**\n\n```console\n$ npx projen build\n```\n\n**Inspect a specific command**\n\n```console\n$ npx projen build -i\ndescription: Full release build\n- default\n description: Synthesize project files\n - exec: python .projenrc.py\n- pre-compile\n description: Prepare the project for compilation\n- compile\n description: Only compile\n- post-compile\n description: Runs after successful compilation\n- test\n description: Run tests\n - exec: npm ci\n - exec: pytest\n- package\n description: Creates the distribution package\n - dist\n - exec: mkdir -p dist\n - exec: cp version.json dist/\n - exec: git checkout version.json\n```\n\n## Project types\n\nCurrently supported project types\n\n- `PythonComponent`: Creates a Pulumi Python Component project\n- `TypeScriptComponent`: Creates a Pulumi TypeScript Component project\n\n### Pulumi Python Component\n\n```console\n$ mkdir my-python-component\n$ cd my-python-component\n$ npx projen new --from @hallcor/pulumi-projen-project-types python_component\n```\n\n\n#### Example\n\n```python\nfrom hallcor.pulumi_projen_project_types import PythonComponent\n\nproject = PythonComponent(\n author_email=\"43035978+corymhall@users.noreply.github.com\",\n author_name=\"corymhall\",\n module_name=\"pulumi_lambda_builders\",\n component_name=\"lambda-builders\",\n name=\"pulumi-lambda-builders\",\n version=\"0.1.0\",\n deps=[\n \"aws_lambda_builders\",\n ],\n dev_deps=[\n \"pyfakefs\",\n \"numpy\",\n \"hallcor.pulumi-projen-project-types\",\n ],\n)\n\nproject.synth()\n```\n\n#### Configuration Options\n\n- [componentName](https://github.com/corymhall/pulumi-projen-project-types/blob/main/API.md#componentnameoptional-)\nBy default the `name` of the of the Pulumi component will be taken from the\nproject `name`. This can be overridden by using the `componentName` property.\n\nFor a full list of input properties supported see the [Input Property Reference](https://github.com/corymhall/pulumi-projen-project-types/blob/main/API.md#typescriptprojectprops-)\n\n- [pulumi_python_options](https://github.com/corymhall/pulumi-projen-project-types/blob/main/API.md#pulumipythonoptionsoptional-)\nThis can be used to override some of the default Pulumi options. For example you\ncan specify a specific version of `pulumi` to use.\n\n```python\n\nproject = PythonComponent(\n ...,\n pulumi_python_options=PulumiPythonOptions(\n pulumi_version=\">=3.153 <4.0\" # this is the default value\n ),\n)\n```\n\nFor publishing related options see the [publishing section](#publishing)\n\n### Pulumi TypeScript Component\n\n```console\n$ mkdir my-python-component\n$ cd my-python-component\n$ npx projen new --from @hallcor/pulumi-projen-project-types type_script_component\n```\n\n#### Example\n\n- TODO\n\n#### Configuration Options\n\n- TODO\n\n## Publishing\n\nThe Pulumi Component project types also setup publishing workflows to publish\ngit tags and GitHub releases. By default these will\n\n> [!IMPORTANT]\n> The publishing workflows rely on [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version)\n> which means your commits must follow [Conventional Commits](https://conventionalcommits.org/)\n\n- Create an annotated tag on push to the `main` branch\n- Create a GitHub release for the tag when the tag is created\n\n### Release Trigger\n\nBy default the project will publish a new tag on every commit to the `main`\nbranch. This can be configured via the `releaseTrigger` option.\n\n- `scheduled`: Run the release workflow on a schedule\n- `manual`: Creates a publish task which can be run locally to publish a tag\n- `continuous`: Run the release workflow on every commit to the `main` branch\n\n**On a schedule**\n\n```ts\nnew TypeScriptComponent({\n ...,\n releaseTrigger: ReleaseTrigger.scheduled({ schedule: '0 0 * * 2' }), // run every tuesday\n});\n```\n\n**Manual**\n\n```ts\nnew TypeScriptComponent({\n ...,\n releaseTrigger: ReleaseTrigger.manual(),\n});\n```\n\n### GitHub Credentials\n\nFor the release workflow to create tags, specific credentials are needed.\nBy default it expects a GitHub secret variable named `PROJEN_GITHUB_TOKEN` with\n`read/write` access to `contents`. A separate token from the builtin `${{ secrets.GITHUB_TOKEN }}`\nis needed in order to trigger the downstream `release-github` workflow.\n\nThis can be customized using the `projenCredentials` option.\n\n**From a different secret**\n\n```ts\nnew TypeScriptComponent({\n ...,\n projenCredentials: GithubCredentials.fromPersonalAccessToken({ secret: 'MY_GITHUB_TOKEN' }),\n});\n```\n\n**From a GitHub app**\n```ts\nnew TypeScriptComponent({\n ...,\n projenCredentials: GithubCredentials.fromApp({\n privateKeySecret: 'MY_GITHUB_APP_PRIVATE_KEY',\n appIdSecret: 'MY_GITHUB_APP_ID',\n }),\n});\n```\n\n"
|
|
97
97
|
},
|
|
98
98
|
"repository": {
|
|
99
99
|
"type": "git",
|
|
@@ -1341,14 +1341,14 @@
|
|
|
1341
1341
|
{
|
|
1342
1342
|
"abstract": true,
|
|
1343
1343
|
"docs": {
|
|
1344
|
-
"default": "the `
|
|
1344
|
+
"default": "the project `name`",
|
|
1345
1345
|
"stability": "stable",
|
|
1346
1346
|
"summary": "The name of the pulumi component."
|
|
1347
1347
|
},
|
|
1348
1348
|
"immutable": true,
|
|
1349
1349
|
"locationInModule": {
|
|
1350
1350
|
"filename": "src/PythonComponentOptions.ts",
|
|
1351
|
-
"line":
|
|
1351
|
+
"line": 359
|
|
1352
1352
|
},
|
|
1353
1353
|
"name": "componentName",
|
|
1354
1354
|
"optional": true,
|
|
@@ -1466,24 +1466,6 @@
|
|
|
1466
1466
|
"fqn": "projen.github.GitHubOptions"
|
|
1467
1467
|
}
|
|
1468
1468
|
},
|
|
1469
|
-
{
|
|
1470
|
-
"abstract": true,
|
|
1471
|
-
"docs": {
|
|
1472
|
-
"default": "${{ secrets.GITHUB_TOKEN }}",
|
|
1473
|
-
"stability": "stable",
|
|
1474
|
-
"summary": "The GitHub Token to use when pushing the tag commit Note: if you use the default `${{ secrets.GITHUB_TOKEN }}` then the Push/Tag will not trigger any other workflows."
|
|
1475
|
-
},
|
|
1476
|
-
"immutable": true,
|
|
1477
|
-
"locationInModule": {
|
|
1478
|
-
"filename": "src/PythonComponentOptions.ts",
|
|
1479
|
-
"line": 353
|
|
1480
|
-
},
|
|
1481
|
-
"name": "githubReleaseToken",
|
|
1482
|
-
"optional": true,
|
|
1483
|
-
"type": {
|
|
1484
|
-
"primitive": "string"
|
|
1485
|
-
}
|
|
1486
|
-
},
|
|
1487
1469
|
{
|
|
1488
1470
|
"abstract": true,
|
|
1489
1471
|
"docs": {
|
|
@@ -1494,7 +1476,7 @@
|
|
|
1494
1476
|
"immutable": true,
|
|
1495
1477
|
"locationInModule": {
|
|
1496
1478
|
"filename": "src/PythonComponentOptions.ts",
|
|
1497
|
-
"line":
|
|
1479
|
+
"line": 353
|
|
1498
1480
|
},
|
|
1499
1481
|
"name": "gitIdentity",
|
|
1500
1482
|
"optional": true,
|
|
@@ -1928,7 +1910,7 @@
|
|
|
1928
1910
|
"immutable": true,
|
|
1929
1911
|
"locationInModule": {
|
|
1930
1912
|
"filename": "src/PythonComponentOptions.ts",
|
|
1931
|
-
"line":
|
|
1913
|
+
"line": 354
|
|
1932
1914
|
},
|
|
1933
1915
|
"name": "pulumiPythonOptions",
|
|
1934
1916
|
"optional": true,
|
|
@@ -2021,7 +2003,7 @@
|
|
|
2021
2003
|
"immutable": true,
|
|
2022
2004
|
"locationInModule": {
|
|
2023
2005
|
"filename": "src/PythonComponentOptions.ts",
|
|
2024
|
-
"line":
|
|
2006
|
+
"line": 365
|
|
2025
2007
|
},
|
|
2026
2008
|
"name": "releaseTrigger",
|
|
2027
2009
|
"optional": true,
|
|
@@ -2196,7 +2178,7 @@
|
|
|
2196
2178
|
},
|
|
2197
2179
|
"locationInModule": {
|
|
2198
2180
|
"filename": "src/release.ts",
|
|
2199
|
-
"line":
|
|
2181
|
+
"line": 12
|
|
2200
2182
|
},
|
|
2201
2183
|
"parameters": [
|
|
2202
2184
|
{
|
|
@@ -2216,7 +2198,7 @@
|
|
|
2216
2198
|
"kind": "class",
|
|
2217
2199
|
"locationInModule": {
|
|
2218
2200
|
"filename": "src/release.ts",
|
|
2219
|
-
"line":
|
|
2201
|
+
"line": 11
|
|
2220
2202
|
},
|
|
2221
2203
|
"name": "ReleaseWorkflow",
|
|
2222
2204
|
"symbolId": "src/release:ReleaseWorkflow"
|
|
@@ -2234,7 +2216,7 @@
|
|
|
2234
2216
|
},
|
|
2235
2217
|
"locationInModule": {
|
|
2236
2218
|
"filename": "src/release.ts",
|
|
2237
|
-
"line":
|
|
2219
|
+
"line": 76
|
|
2238
2220
|
},
|
|
2239
2221
|
"parameters": [
|
|
2240
2222
|
{
|
|
@@ -2254,7 +2236,7 @@
|
|
|
2254
2236
|
"kind": "class",
|
|
2255
2237
|
"locationInModule": {
|
|
2256
2238
|
"filename": "src/release.ts",
|
|
2257
|
-
"line":
|
|
2239
|
+
"line": 73
|
|
2258
2240
|
},
|
|
2259
2241
|
"name": "TagRelease",
|
|
2260
2242
|
"properties": [
|
|
@@ -2265,7 +2247,7 @@
|
|
|
2265
2247
|
"immutable": true,
|
|
2266
2248
|
"locationInModule": {
|
|
2267
2249
|
"filename": "src/release.ts",
|
|
2268
|
-
"line":
|
|
2250
|
+
"line": 75
|
|
2269
2251
|
},
|
|
2270
2252
|
"name": "publishTask",
|
|
2271
2253
|
"type": {
|
|
@@ -2279,7 +2261,7 @@
|
|
|
2279
2261
|
"immutable": true,
|
|
2280
2262
|
"locationInModule": {
|
|
2281
2263
|
"filename": "src/release.ts",
|
|
2282
|
-
"line":
|
|
2264
|
+
"line": 74
|
|
2283
2265
|
},
|
|
2284
2266
|
"name": "trigger",
|
|
2285
2267
|
"type": {
|
|
@@ -2408,24 +2390,6 @@
|
|
|
2408
2390
|
"primitive": "boolean"
|
|
2409
2391
|
}
|
|
2410
2392
|
},
|
|
2411
|
-
{
|
|
2412
|
-
"abstract": true,
|
|
2413
|
-
"docs": {
|
|
2414
|
-
"default": "${{ secrets.GITHUB_TOKEN }}",
|
|
2415
|
-
"stability": "stable",
|
|
2416
|
-
"summary": "The GitHub Token to use when pushing the tag commit Note: if you use the default `${{ secrets.GITHUB_TOKEN }}` then the Push/Tag will not trigger any other workflows."
|
|
2417
|
-
},
|
|
2418
|
-
"immutable": true,
|
|
2419
|
-
"locationInModule": {
|
|
2420
|
-
"filename": "src/TagReleaseOptions.ts",
|
|
2421
|
-
"line": 251
|
|
2422
|
-
},
|
|
2423
|
-
"name": "githubReleaseToken",
|
|
2424
|
-
"optional": true,
|
|
2425
|
-
"type": {
|
|
2426
|
-
"primitive": "string"
|
|
2427
|
-
}
|
|
2428
|
-
},
|
|
2429
2393
|
{
|
|
2430
2394
|
"abstract": true,
|
|
2431
2395
|
"docs": {
|
|
@@ -2436,7 +2400,7 @@
|
|
|
2436
2400
|
"immutable": true,
|
|
2437
2401
|
"locationInModule": {
|
|
2438
2402
|
"filename": "src/TagReleaseOptions.ts",
|
|
2439
|
-
"line":
|
|
2403
|
+
"line": 251
|
|
2440
2404
|
},
|
|
2441
2405
|
"name": "gitIdentity",
|
|
2442
2406
|
"optional": true,
|
|
@@ -3511,7 +3475,7 @@
|
|
|
3511
3475
|
"immutable": true,
|
|
3512
3476
|
"locationInModule": {
|
|
3513
3477
|
"filename": "src/typescript-options/component-options.ts",
|
|
3514
|
-
"line":
|
|
3478
|
+
"line": 907
|
|
3515
3479
|
},
|
|
3516
3480
|
"name": "componentName",
|
|
3517
3481
|
"optional": true,
|
|
@@ -3884,24 +3848,6 @@
|
|
|
3884
3848
|
"fqn": "projen.github.GitHubOptions"
|
|
3885
3849
|
}
|
|
3886
3850
|
},
|
|
3887
|
-
{
|
|
3888
|
-
"abstract": true,
|
|
3889
|
-
"docs": {
|
|
3890
|
-
"default": "${{ secrets.GITHUB_TOKEN }}",
|
|
3891
|
-
"stability": "stable",
|
|
3892
|
-
"summary": "The GitHub Token to use when pushing the tag commit Note: if you use the default `${{ secrets.GITHUB_TOKEN }}` then the Push/Tag will not trigger any other workflows."
|
|
3893
|
-
},
|
|
3894
|
-
"immutable": true,
|
|
3895
|
-
"locationInModule": {
|
|
3896
|
-
"filename": "src/typescript-options/component-options.ts",
|
|
3897
|
-
"line": 902
|
|
3898
|
-
},
|
|
3899
|
-
"name": "githubReleaseToken",
|
|
3900
|
-
"optional": true,
|
|
3901
|
-
"type": {
|
|
3902
|
-
"primitive": "string"
|
|
3903
|
-
}
|
|
3904
|
-
},
|
|
3905
3851
|
{
|
|
3906
3852
|
"abstract": true,
|
|
3907
3853
|
"docs": {
|
|
@@ -3912,7 +3858,7 @@
|
|
|
3912
3858
|
"immutable": true,
|
|
3913
3859
|
"locationInModule": {
|
|
3914
3860
|
"filename": "src/typescript-options/component-options.ts",
|
|
3915
|
-
"line":
|
|
3861
|
+
"line": 902
|
|
3916
3862
|
},
|
|
3917
3863
|
"name": "gitIdentity",
|
|
3918
3864
|
"optional": true,
|
|
@@ -8081,6 +8027,6 @@
|
|
|
8081
8027
|
"symbolId": "src/typescript-options/project-props:TypeScriptProjectProps"
|
|
8082
8028
|
}
|
|
8083
8029
|
},
|
|
8084
|
-
"version": "0.0.
|
|
8085
|
-
"fingerprint": "
|
|
8030
|
+
"version": "0.0.22",
|
|
8031
|
+
"fingerprint": "EWciccWo8h1J9jXQcvUn0FIVvdNZmW1doCQ51xEHUnY="
|
|
8086
8032
|
}
|
package/API.md
CHANGED
|
@@ -5169,7 +5169,6 @@ const pythonComponentOptions: PythonComponentOptions = { ... }
|
|
|
5169
5169
|
| <code><a href="#@hallcor/pulumi-projen-project-types.PythonComponentOptions.property.devContainer">devContainer</a></code> | <code>boolean</code> | Add a VSCode development environment (used for GitHub Codespaces). |
|
|
5170
5170
|
| <code><a href="#@hallcor/pulumi-projen-project-types.PythonComponentOptions.property.devDeps">devDeps</a></code> | <code>string[]</code> | List of dev dependencies for this project. Dependencies use the format: `<module>@<semver>`. |
|
|
5171
5171
|
| <code><a href="#@hallcor/pulumi-projen-project-types.PythonComponentOptions.property.githubOptions">githubOptions</a></code> | <code>projen.github.GitHubOptions</code> | Options for GitHub integration. |
|
|
5172
|
-
| <code><a href="#@hallcor/pulumi-projen-project-types.PythonComponentOptions.property.githubReleaseToken">githubReleaseToken</a></code> | <code>string</code> | The GitHub Token to use when pushing the tag commit Note: if you use the default `${{ secrets.GITHUB_TOKEN }}` then the Push/Tag will not trigger any other workflows. |
|
|
5173
5172
|
| <code><a href="#@hallcor/pulumi-projen-project-types.PythonComponentOptions.property.gitIdentity">gitIdentity</a></code> | <code>projen.github.GitIdentity</code> | The git identity to use when pushing the release commit and tag Note: if you use the default github-actions user then the Push/Tag will not trigger any other workflows. |
|
|
5174
5173
|
| <code><a href="#@hallcor/pulumi-projen-project-types.PythonComponentOptions.property.gitIgnoreOptions">gitIgnoreOptions</a></code> | <code>projen.IgnoreFileOptions</code> | Configuration options for .gitignore file. |
|
|
5175
5174
|
| <code><a href="#@hallcor/pulumi-projen-project-types.PythonComponentOptions.property.gitOptions">gitOptions</a></code> | <code>projen.GitOptions</code> | Configuration options for git. |
|
|
@@ -5368,7 +5367,7 @@ public readonly componentName: string;
|
|
|
5368
5367
|
```
|
|
5369
5368
|
|
|
5370
5369
|
- *Type:* string
|
|
5371
|
-
- *Default:* the `
|
|
5370
|
+
- *Default:* the project `name`
|
|
5372
5371
|
|
|
5373
5372
|
The name of the pulumi component.
|
|
5374
5373
|
|
|
@@ -5442,19 +5441,6 @@ Options for GitHub integration.
|
|
|
5442
5441
|
|
|
5443
5442
|
---
|
|
5444
5443
|
|
|
5445
|
-
##### `githubReleaseToken`<sup>Optional</sup> <a name="githubReleaseToken" id="@hallcor/pulumi-projen-project-types.PythonComponentOptions.property.githubReleaseToken"></a>
|
|
5446
|
-
|
|
5447
|
-
```typescript
|
|
5448
|
-
public readonly githubReleaseToken: string;
|
|
5449
|
-
```
|
|
5450
|
-
|
|
5451
|
-
- *Type:* string
|
|
5452
|
-
- *Default:* ${{ secrets.GITHUB_TOKEN }}
|
|
5453
|
-
|
|
5454
|
-
The GitHub Token to use when pushing the tag commit Note: if you use the default `${{ secrets.GITHUB_TOKEN }}` then the Push/Tag will not trigger any other workflows.
|
|
5455
|
-
|
|
5456
|
-
---
|
|
5457
|
-
|
|
5458
5444
|
##### `gitIdentity`<sup>Optional</sup> <a name="gitIdentity" id="@hallcor/pulumi-projen-project-types.PythonComponentOptions.property.gitIdentity"></a>
|
|
5459
5445
|
|
|
5460
5446
|
```typescript
|
|
@@ -5996,7 +5982,6 @@ const tagReleaseOptions: TagReleaseOptions = { ... }
|
|
|
5996
5982
|
| <code><a href="#@hallcor/pulumi-projen-project-types.TagReleaseOptions.property.versionFile">versionFile</a></code> | <code>string</code> | A name of a .json file to set the `version` field in after a bump. |
|
|
5997
5983
|
| <code><a href="#@hallcor/pulumi-projen-project-types.TagReleaseOptions.property.bumpPackage">bumpPackage</a></code> | <code>string</code> | The `commit-and-tag-version` compatible package used to bump the package version, as a dependency string. |
|
|
5998
5984
|
| <code><a href="#@hallcor/pulumi-projen-project-types.TagReleaseOptions.property.githubRelease">githubRelease</a></code> | <code>boolean</code> | Create a GitHub release for each release. |
|
|
5999
|
-
| <code><a href="#@hallcor/pulumi-projen-project-types.TagReleaseOptions.property.githubReleaseToken">githubReleaseToken</a></code> | <code>string</code> | The GitHub Token to use when pushing the tag commit Note: if you use the default `${{ secrets.GITHUB_TOKEN }}` then the Push/Tag will not trigger any other workflows. |
|
|
6000
5985
|
| <code><a href="#@hallcor/pulumi-projen-project-types.TagReleaseOptions.property.gitIdentity">gitIdentity</a></code> | <code>projen.github.GitIdentity</code> | The git identity to use when pushing the release commit and tag Note: if you use the default github-actions user then the Push/Tag will not trigger any other workflows. |
|
|
6001
5986
|
| <code><a href="#@hallcor/pulumi-projen-project-types.TagReleaseOptions.property.jsiiReleaseVersion">jsiiReleaseVersion</a></code> | <code>string</code> | Version requirement of `publib` which is used to publish modules to npm. |
|
|
6002
5987
|
| <code><a href="#@hallcor/pulumi-projen-project-types.TagReleaseOptions.property.majorVersion">majorVersion</a></code> | <code>number</code> | Major version to release from the default branch. |
|
|
@@ -6112,19 +6097,6 @@ Create a GitHub release for each release.
|
|
|
6112
6097
|
|
|
6113
6098
|
---
|
|
6114
6099
|
|
|
6115
|
-
##### `githubReleaseToken`<sup>Optional</sup> <a name="githubReleaseToken" id="@hallcor/pulumi-projen-project-types.TagReleaseOptions.property.githubReleaseToken"></a>
|
|
6116
|
-
|
|
6117
|
-
```typescript
|
|
6118
|
-
public readonly githubReleaseToken: string;
|
|
6119
|
-
```
|
|
6120
|
-
|
|
6121
|
-
- *Type:* string
|
|
6122
|
-
- *Default:* ${{ secrets.GITHUB_TOKEN }}
|
|
6123
|
-
|
|
6124
|
-
The GitHub Token to use when pushing the tag commit Note: if you use the default `${{ secrets.GITHUB_TOKEN }}` then the Push/Tag will not trigger any other workflows.
|
|
6125
|
-
|
|
6126
|
-
---
|
|
6127
|
-
|
|
6128
6100
|
##### `gitIdentity`<sup>Optional</sup> <a name="gitIdentity" id="@hallcor/pulumi-projen-project-types.TagReleaseOptions.property.gitIdentity"></a>
|
|
6129
6101
|
|
|
6130
6102
|
```typescript
|
|
@@ -6581,7 +6553,6 @@ const typeScriptComponentOptions: TypeScriptComponentOptions = { ... }
|
|
|
6581
6553
|
| <code><a href="#@hallcor/pulumi-projen-project-types.TypeScriptComponentOptions.property.eslint">eslint</a></code> | <code>boolean</code> | Setup eslint. |
|
|
6582
6554
|
| <code><a href="#@hallcor/pulumi-projen-project-types.TypeScriptComponentOptions.property.eslintOptions">eslintOptions</a></code> | <code><a href="#@hallcor/pulumi-projen-project-types.EslintOptions">EslintOptions</a></code> | Eslint options. |
|
|
6583
6555
|
| <code><a href="#@hallcor/pulumi-projen-project-types.TypeScriptComponentOptions.property.githubOptions">githubOptions</a></code> | <code>projen.github.GitHubOptions</code> | Options for GitHub integration. |
|
|
6584
|
-
| <code><a href="#@hallcor/pulumi-projen-project-types.TypeScriptComponentOptions.property.githubReleaseToken">githubReleaseToken</a></code> | <code>string</code> | The GitHub Token to use when pushing the tag commit Note: if you use the default `${{ secrets.GITHUB_TOKEN }}` then the Push/Tag will not trigger any other workflows. |
|
|
6585
6556
|
| <code><a href="#@hallcor/pulumi-projen-project-types.TypeScriptComponentOptions.property.gitIdentity">gitIdentity</a></code> | <code>projen.github.GitIdentity</code> | The git identity to use when pushing the release commit and tag Note: if you use the default github-actions user then the Push/Tag will not trigger any other workflows. |
|
|
6586
6557
|
| <code><a href="#@hallcor/pulumi-projen-project-types.TypeScriptComponentOptions.property.gitignore">gitignore</a></code> | <code>string[]</code> | Additional entries to .gitignore. |
|
|
6587
6558
|
| <code><a href="#@hallcor/pulumi-projen-project-types.TypeScriptComponentOptions.property.gitIgnoreOptions">gitIgnoreOptions</a></code> | <code>projen.IgnoreFileOptions</code> | Configuration options for .gitignore file. |
|
|
@@ -7338,19 +7309,6 @@ Options for GitHub integration.
|
|
|
7338
7309
|
|
|
7339
7310
|
---
|
|
7340
7311
|
|
|
7341
|
-
##### `githubReleaseToken`<sup>Optional</sup> <a name="githubReleaseToken" id="@hallcor/pulumi-projen-project-types.TypeScriptComponentOptions.property.githubReleaseToken"></a>
|
|
7342
|
-
|
|
7343
|
-
```typescript
|
|
7344
|
-
public readonly githubReleaseToken: string;
|
|
7345
|
-
```
|
|
7346
|
-
|
|
7347
|
-
- *Type:* string
|
|
7348
|
-
- *Default:* ${{ secrets.GITHUB_TOKEN }}
|
|
7349
|
-
|
|
7350
|
-
The GitHub Token to use when pushing the tag commit Note: if you use the default `${{ secrets.GITHUB_TOKEN }}` then the Push/Tag will not trigger any other workflows.
|
|
7351
|
-
|
|
7352
|
-
---
|
|
7353
|
-
|
|
7354
7312
|
##### `gitIdentity`<sup>Optional</sup> <a name="gitIdentity" id="@hallcor/pulumi-projen-project-types.TypeScriptComponentOptions.property.gitIdentity"></a>
|
|
7355
7313
|
|
|
7356
7314
|
```typescript
|
package/README.md
CHANGED
|
@@ -1 +1,270 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Pulumi Projen Project Types
|
|
2
|
+
|
|
3
|
+
Collection of [Projen](https://github.com/projen/projen) project types for use
|
|
4
|
+
with [Pulumi](https://www.pulumi.com/)
|
|
5
|
+
|
|
6
|
+
## Getting Started
|
|
7
|
+
|
|
8
|
+
_projen_ doesn't need to be installed. You will be using
|
|
9
|
+
[npx](https://docs.npmjs.com/cli/v7/commands/npx) to run _projen_ which takes
|
|
10
|
+
care of all required setup steps.
|
|
11
|
+
|
|
12
|
+
To create a new project, run the following command and follow the instructions:
|
|
13
|
+
|
|
14
|
+
```console
|
|
15
|
+
$ mkdir my-project
|
|
16
|
+
$ cd my-project
|
|
17
|
+
$ npx projen new --from @hallcor/pulumi-projen-project-types PROJECT-TYPE
|
|
18
|
+
š¤ Synthesizing project...
|
|
19
|
+
...
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Once your project is created, you can configure your project by editing
|
|
23
|
+
`.projenrc.ts` or `.projenrc.py` and re-running `npx projen` to synthesize again.
|
|
24
|
+
|
|
25
|
+
> The files generated by _projen_ are considered an "implementation detail" and
|
|
26
|
+
> _projen_ protects them from being manually edited (most files are marked
|
|
27
|
+
> read-only, and an "anti tamper" check is configured in the CI build workflow
|
|
28
|
+
> to ensure that files are not updated during build).
|
|
29
|
+
|
|
30
|
+
## Projen commands
|
|
31
|
+
|
|
32
|
+
For the TypeScript based projects the project commands can be viewed an run
|
|
33
|
+
using the package manager (e.g. `yarn build`, `yarn package`, etc). For
|
|
34
|
+
non-TypeScript based projects (i.e. Python) you can use projen to view and run
|
|
35
|
+
project commands.
|
|
36
|
+
|
|
37
|
+
Projen is built around a standard build process for all projects. Each project
|
|
38
|
+
will have these standard [tasks](https://projen.io/docs/concepts/tasks).
|
|
39
|
+
|
|
40
|
+
1. `default`: The "default" task that executes projen and synthesizes the project
|
|
41
|
+
2. `pre-compile`: Task that runs prior to `compile`
|
|
42
|
+
3. `compile`: Compiles the project (e.g. `tsc --build` for TypeScript projects)
|
|
43
|
+
4. `post-compile`: Task that runs after `compile`
|
|
44
|
+
5. `test`: Task that runs the project tests
|
|
45
|
+
6. `package`: Task that runs steps to package the project for publishing
|
|
46
|
+
|
|
47
|
+
There is also a standard `build` task the chains the above 6 tasks in order.
|
|
48
|
+
|
|
49
|
+
There is a great [tasks guide] where you can find more information on adding new
|
|
50
|
+
tasks, editing existing tasks, etc.
|
|
51
|
+
|
|
52
|
+
**List available commands**
|
|
53
|
+
|
|
54
|
+
```console
|
|
55
|
+
$ npx projen --help
|
|
56
|
+
projen [command]
|
|
57
|
+
|
|
58
|
+
Commands:
|
|
59
|
+
projen new [PROJECT-TYPE-NAME] [OPTIONS] Creates a new projen project
|
|
60
|
+
|
|
61
|
+
For a complete list of the available options for a specific project type, run:
|
|
62
|
+
projen new [PROJECT-TYPE-NAME] --help
|
|
63
|
+
projen build Full release build
|
|
64
|
+
projen bump Bumps version based on latest git tag and generates a changelog entry
|
|
65
|
+
projen clobber hard resets to HEAD of origin and cleans the local repo
|
|
66
|
+
projen compile Only compile
|
|
67
|
+
projen default Synthesize project files
|
|
68
|
+
projen dist
|
|
69
|
+
projen eject Remove projen from the project
|
|
70
|
+
projen install Install and upgrade dependencies
|
|
71
|
+
projen package Creates the distribution package
|
|
72
|
+
projen post-compile Runs after successful compilation
|
|
73
|
+
projen pre-compile Prepare the project for compilation
|
|
74
|
+
projen publish:git Prepends the release changelog onto the project changelog, creates a release commit, and tags the release
|
|
75
|
+
projen release Prepare a release from "main" branch
|
|
76
|
+
projen test Run tests
|
|
77
|
+
projen unbump Restores version to 0.0.0
|
|
78
|
+
projen completion generate completion script
|
|
79
|
+
|
|
80
|
+
Options:
|
|
81
|
+
--post Run post-synthesis steps such as installing dependencies. Use --no-post to skip [boolean] [default: true]
|
|
82
|
+
-w, --watch Keep running and resynthesize when projenrc changes [boolean] [default: false]
|
|
83
|
+
--debug Debug logs [boolean] [default: false]
|
|
84
|
+
--rc path to .projenrc.js file [deprecated] [string] [default: "/Users/chall/personal/pulumi-lambda-builders/.projenrc.js"]
|
|
85
|
+
--help Show help [boolean]
|
|
86
|
+
--version Show version number
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Run a specific command**
|
|
91
|
+
|
|
92
|
+
```console
|
|
93
|
+
$ npx projen build
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Inspect a specific command**
|
|
97
|
+
|
|
98
|
+
```console
|
|
99
|
+
$ npx projen build -i
|
|
100
|
+
description: Full release build
|
|
101
|
+
- default
|
|
102
|
+
description: Synthesize project files
|
|
103
|
+
- exec: python .projenrc.py
|
|
104
|
+
- pre-compile
|
|
105
|
+
description: Prepare the project for compilation
|
|
106
|
+
- compile
|
|
107
|
+
description: Only compile
|
|
108
|
+
- post-compile
|
|
109
|
+
description: Runs after successful compilation
|
|
110
|
+
- test
|
|
111
|
+
description: Run tests
|
|
112
|
+
- exec: npm ci
|
|
113
|
+
- exec: pytest
|
|
114
|
+
- package
|
|
115
|
+
description: Creates the distribution package
|
|
116
|
+
- dist
|
|
117
|
+
- exec: mkdir -p dist
|
|
118
|
+
- exec: cp version.json dist/
|
|
119
|
+
- exec: git checkout version.json
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Project types
|
|
123
|
+
|
|
124
|
+
Currently supported project types
|
|
125
|
+
|
|
126
|
+
- `PythonComponent`: Creates a Pulumi Python Component project
|
|
127
|
+
- `TypeScriptComponent`: Creates a Pulumi TypeScript Component project
|
|
128
|
+
|
|
129
|
+
### Pulumi Python Component
|
|
130
|
+
|
|
131
|
+
```console
|
|
132
|
+
$ mkdir my-python-component
|
|
133
|
+
$ cd my-python-component
|
|
134
|
+
$ npx projen new --from @hallcor/pulumi-projen-project-types python_component
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
#### Example
|
|
139
|
+
|
|
140
|
+
```python
|
|
141
|
+
from hallcor.pulumi_projen_project_types import PythonComponent
|
|
142
|
+
|
|
143
|
+
project = PythonComponent(
|
|
144
|
+
author_email="43035978+corymhall@users.noreply.github.com",
|
|
145
|
+
author_name="corymhall",
|
|
146
|
+
module_name="pulumi_lambda_builders",
|
|
147
|
+
component_name="lambda-builders",
|
|
148
|
+
name="pulumi-lambda-builders",
|
|
149
|
+
version="0.1.0",
|
|
150
|
+
deps=[
|
|
151
|
+
"aws_lambda_builders",
|
|
152
|
+
],
|
|
153
|
+
dev_deps=[
|
|
154
|
+
"pyfakefs",
|
|
155
|
+
"numpy",
|
|
156
|
+
"hallcor.pulumi-projen-project-types",
|
|
157
|
+
],
|
|
158
|
+
)
|
|
159
|
+
|
|
160
|
+
project.synth()
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
#### Configuration Options
|
|
164
|
+
|
|
165
|
+
- [componentName](https://github.com/corymhall/pulumi-projen-project-types/blob/main/API.md#componentnameoptional-)
|
|
166
|
+
By default the `name` of the of the Pulumi component will be taken from the
|
|
167
|
+
project `name`. This can be overridden by using the `componentName` property.
|
|
168
|
+
|
|
169
|
+
For a full list of input properties supported see the [Input Property Reference](https://github.com/corymhall/pulumi-projen-project-types/blob/main/API.md#typescriptprojectprops-)
|
|
170
|
+
|
|
171
|
+
- [pulumi_python_options](https://github.com/corymhall/pulumi-projen-project-types/blob/main/API.md#pulumipythonoptionsoptional-)
|
|
172
|
+
This can be used to override some of the default Pulumi options. For example you
|
|
173
|
+
can specify a specific version of `pulumi` to use.
|
|
174
|
+
|
|
175
|
+
```python
|
|
176
|
+
|
|
177
|
+
project = PythonComponent(
|
|
178
|
+
...,
|
|
179
|
+
pulumi_python_options=PulumiPythonOptions(
|
|
180
|
+
pulumi_version=">=3.153 <4.0" # this is the default value
|
|
181
|
+
),
|
|
182
|
+
)
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
For publishing related options see the [publishing section](#publishing)
|
|
186
|
+
|
|
187
|
+
### Pulumi TypeScript Component
|
|
188
|
+
|
|
189
|
+
```console
|
|
190
|
+
$ mkdir my-python-component
|
|
191
|
+
$ cd my-python-component
|
|
192
|
+
$ npx projen new --from @hallcor/pulumi-projen-project-types type_script_component
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
#### Example
|
|
196
|
+
|
|
197
|
+
- TODO
|
|
198
|
+
|
|
199
|
+
#### Configuration Options
|
|
200
|
+
|
|
201
|
+
- TODO
|
|
202
|
+
|
|
203
|
+
## Publishing
|
|
204
|
+
|
|
205
|
+
The Pulumi Component project types also setup publishing workflows to publish
|
|
206
|
+
git tags and GitHub releases. By default these will
|
|
207
|
+
|
|
208
|
+
> [!IMPORTANT]
|
|
209
|
+
> The publishing workflows rely on [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version)
|
|
210
|
+
> which means your commits must follow [Conventional Commits](https://conventionalcommits.org/)
|
|
211
|
+
|
|
212
|
+
- Create an annotated tag on push to the `main` branch
|
|
213
|
+
- Create a GitHub release for the tag when the tag is created
|
|
214
|
+
|
|
215
|
+
### Release Trigger
|
|
216
|
+
|
|
217
|
+
By default the project will publish a new tag on every commit to the `main`
|
|
218
|
+
branch. This can be configured via the `releaseTrigger` option.
|
|
219
|
+
|
|
220
|
+
- `scheduled`: Run the release workflow on a schedule
|
|
221
|
+
- `manual`: Creates a publish task which can be run locally to publish a tag
|
|
222
|
+
- `continuous`: Run the release workflow on every commit to the `main` branch
|
|
223
|
+
|
|
224
|
+
**On a schedule**
|
|
225
|
+
|
|
226
|
+
```ts
|
|
227
|
+
new TypeScriptComponent({
|
|
228
|
+
...,
|
|
229
|
+
releaseTrigger: ReleaseTrigger.scheduled({ schedule: '0 0 * * 2' }), // run every tuesday
|
|
230
|
+
});
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
**Manual**
|
|
234
|
+
|
|
235
|
+
```ts
|
|
236
|
+
new TypeScriptComponent({
|
|
237
|
+
...,
|
|
238
|
+
releaseTrigger: ReleaseTrigger.manual(),
|
|
239
|
+
});
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### GitHub Credentials
|
|
243
|
+
|
|
244
|
+
For the release workflow to create tags, specific credentials are needed.
|
|
245
|
+
By default it expects a GitHub secret variable named `PROJEN_GITHUB_TOKEN` with
|
|
246
|
+
`read/write` access to `contents`. A separate token from the builtin `${{ secrets.GITHUB_TOKEN }}`
|
|
247
|
+
is needed in order to trigger the downstream `release-github` workflow.
|
|
248
|
+
|
|
249
|
+
This can be customized using the `projenCredentials` option.
|
|
250
|
+
|
|
251
|
+
**From a different secret**
|
|
252
|
+
|
|
253
|
+
```ts
|
|
254
|
+
new TypeScriptComponent({
|
|
255
|
+
...,
|
|
256
|
+
projenCredentials: GithubCredentials.fromPersonalAccessToken({ secret: 'MY_GITHUB_TOKEN' }),
|
|
257
|
+
});
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
**From a GitHub app**
|
|
261
|
+
```ts
|
|
262
|
+
new TypeScriptComponent({
|
|
263
|
+
...,
|
|
264
|
+
projenCredentials: GithubCredentials.fromApp({
|
|
265
|
+
privateKeySecret: 'MY_GITHUB_APP_PRIVATE_KEY',
|
|
266
|
+
appIdSecret: 'MY_GITHUB_APP_ID',
|
|
267
|
+
}),
|
|
268
|
+
});
|
|
269
|
+
```
|
|
270
|
+
|
|
@@ -342,13 +342,6 @@ export interface PythonComponentOptions {
|
|
|
342
342
|
* @featured true
|
|
343
343
|
*/
|
|
344
344
|
readonly name: string;
|
|
345
|
-
/**
|
|
346
|
-
* The GitHub Token to use when pushing the tag commit
|
|
347
|
-
* Note: if you use the default `${{ secrets.GITHUB_TOKEN }}` then the
|
|
348
|
-
* Push/Tag will not trigger any other workflows
|
|
349
|
-
* @default ${{ secrets.GITHUB_TOKEN }}
|
|
350
|
-
*/
|
|
351
|
-
readonly githubReleaseToken?: string;
|
|
352
345
|
/**
|
|
353
346
|
* The git identity to use when pushing the release commit and tag
|
|
354
347
|
* Note: if you use the default github-actions user then the
|
|
@@ -359,7 +352,7 @@ export interface PythonComponentOptions {
|
|
|
359
352
|
readonly pulumiPythonOptions?: PulumiPythonOptions;
|
|
360
353
|
/**
|
|
361
354
|
* The name of the pulumi component
|
|
362
|
-
* @default the `
|
|
355
|
+
* @default the project `name`
|
|
363
356
|
*/
|
|
364
357
|
readonly componentName?: string;
|
|
365
358
|
/**
|