projen-cdktf-hybrid-construct 0.3.1 → 0.3.3
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/.copywrite.hcl +22 -0
- package/.gitattributes +3 -2
- package/.jsii +40 -39
- package/.prettierignore +1 -1
- package/.projenrc.ts +74 -15
- package/API.md +594 -20
- package/LICENSE +355 -19
- package/lib/defaults.d.ts +6 -0
- package/lib/defaults.js +7 -1
- package/lib/hybrid-module.d.ts +4 -0
- package/lib/hybrid-module.js +8 -4
- package/lib/index.d.ts +4 -0
- package/lib/index.js +11 -3
- package/lib/publishing.d.ts +13 -9
- package/lib/publishing.js +6 -2
- package/lib/terraform-module.d.ts +4 -0
- package/lib/terraform-module.js +7 -3
- package/node_modules/tslib/README.md +1 -1
- package/node_modules/tslib/SECURITY.md +41 -0
- package/node_modules/tslib/modules/index.d.ts +37 -0
- package/node_modules/tslib/modules/index.js +13 -0
- package/node_modules/tslib/package.json +12 -3
- package/node_modules/tslib/tslib.d.ts +55 -0
- package/node_modules/tslib/tslib.es6.js +125 -3
- package/node_modules/tslib/tslib.es6.mjs +370 -0
- package/node_modules/tslib/tslib.js +107 -3
- package/package.json +24 -26
- package/projenrc/auto-approve.ts +62 -0
- package/projenrc/automerge.ts +55 -0
- package/projenrc/customized-license.ts +24 -0
package/.copywrite.hcl
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
schema_version = 1
|
2
|
+
|
3
|
+
project {
|
4
|
+
license = "MPL-2.0"
|
5
|
+
copyright_year = 2022
|
6
|
+
|
7
|
+
# (OPTIONAL) A list of globs that should not have copyright/license headers.
|
8
|
+
# Supports doublestar glob patterns for more flexibility in defining which
|
9
|
+
# files or folders should be ignored
|
10
|
+
header_ignore = [
|
11
|
+
# "vendors/**",
|
12
|
+
# "**autogen**",
|
13
|
+
"**/node_modules/**",
|
14
|
+
"**/.mergify.yml",
|
15
|
+
"**/.github/workflows/*.yml",
|
16
|
+
"**/coverage/**",
|
17
|
+
"**/test-reports/**",
|
18
|
+
"**/dist/**",
|
19
|
+
"examples/**", # this probably should have the headers, but I'm tired of fighting Projen
|
20
|
+
"test/helper.ts",
|
21
|
+
]
|
22
|
+
}
|
package/.gitattributes
CHANGED
@@ -1,17 +1,18 @@
|
|
1
|
-
# ~~ Generated by projen. To modify, edit .projenrc.
|
1
|
+
# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen".
|
2
2
|
|
3
3
|
*.snap linguist-generated
|
4
4
|
/.eslintrc.json linguist-generated
|
5
5
|
/.gitattributes linguist-generated
|
6
6
|
/.github/pull_request_template.md linguist-generated
|
7
7
|
/.github/workflows/auto-approve.yml linguist-generated
|
8
|
+
/.github/workflows/automerge.yml linguist-generated
|
8
9
|
/.github/workflows/build.yml linguist-generated
|
9
10
|
/.github/workflows/pull-request-lint.yml linguist-generated
|
10
11
|
/.github/workflows/release.yml linguist-generated
|
11
12
|
/.github/workflows/upgrade-main.yml linguist-generated
|
12
13
|
/.gitignore linguist-generated
|
13
|
-
/.mergify.yml linguist-generated
|
14
14
|
/.npmignore linguist-generated
|
15
|
+
/.npmrc linguist-generated
|
15
16
|
/.prettierignore linguist-generated
|
16
17
|
/.prettierrc.json linguist-generated
|
17
18
|
/.projen/** linguist-generated
|
package/.jsii
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
{
|
2
2
|
"author": {
|
3
|
-
"
|
4
|
-
"
|
3
|
+
"name": "HashiCorp",
|
4
|
+
"organization": true,
|
5
5
|
"roles": [
|
6
6
|
"author"
|
7
|
-
]
|
7
|
+
],
|
8
|
+
"url": "https://hashicorp.com"
|
8
9
|
},
|
9
10
|
"bundled": {
|
10
11
|
"change-case": "^4.1.2"
|
11
12
|
},
|
12
13
|
"dependencies": {
|
13
|
-
"projen": ">= 0.
|
14
|
+
"projen": ">= 0.72.18"
|
14
15
|
},
|
15
16
|
"dependencyClosure": {
|
16
17
|
"projen": {
|
@@ -57,9 +58,9 @@
|
|
57
58
|
"docs": {
|
58
59
|
"stability": "stable"
|
59
60
|
},
|
60
|
-
"homepage": "https://github.com/
|
61
|
-
"jsiiVersion": "1.
|
62
|
-
"license": "
|
61
|
+
"homepage": "https://github.com/cdktf/projen-cdktf-hybrid-construct.git",
|
62
|
+
"jsiiVersion": "5.1.11 (build 1dfe48d)",
|
63
|
+
"license": "MPL-2.0",
|
63
64
|
"metadata": {
|
64
65
|
"jsii": {
|
65
66
|
"pacmak": {
|
@@ -74,7 +75,7 @@
|
|
74
75
|
},
|
75
76
|
"repository": {
|
76
77
|
"type": "git",
|
77
|
-
"url": "https://github.com/
|
78
|
+
"url": "https://github.com/cdktf/projen-cdktf-hybrid-construct.git"
|
78
79
|
},
|
79
80
|
"schema": "jsii/0.10.0",
|
80
81
|
"targets": {
|
@@ -93,7 +94,7 @@
|
|
93
94
|
"kind": "interface",
|
94
95
|
"locationInModule": {
|
95
96
|
"filename": "src/hybrid-module.ts",
|
96
|
-
"line":
|
97
|
+
"line": 11
|
97
98
|
},
|
98
99
|
"name": "ConstructExamplesOption",
|
99
100
|
"properties": [
|
@@ -105,7 +106,7 @@
|
|
105
106
|
"immutable": true,
|
106
107
|
"locationInModule": {
|
107
108
|
"filename": "src/hybrid-module.ts",
|
108
|
-
"line":
|
109
|
+
"line": 13
|
109
110
|
},
|
110
111
|
"name": "enabled",
|
111
112
|
"type": {
|
@@ -120,7 +121,7 @@
|
|
120
121
|
"immutable": true,
|
121
122
|
"locationInModule": {
|
122
123
|
"filename": "src/hybrid-module.ts",
|
123
|
-
"line":
|
124
|
+
"line": 15
|
124
125
|
},
|
125
126
|
"name": "folder",
|
126
127
|
"optional": true,
|
@@ -148,7 +149,7 @@
|
|
148
149
|
},
|
149
150
|
"locationInModule": {
|
150
151
|
"filename": "src/hybrid-module.ts",
|
151
|
-
"line":
|
152
|
+
"line": 171
|
152
153
|
},
|
153
154
|
"parameters": [
|
154
155
|
{
|
@@ -162,7 +163,7 @@
|
|
162
163
|
"kind": "class",
|
163
164
|
"locationInModule": {
|
164
165
|
"filename": "src/hybrid-module.ts",
|
165
|
-
"line":
|
166
|
+
"line": 170
|
166
167
|
},
|
167
168
|
"name": "HybridModule",
|
168
169
|
"symbolId": "src/hybrid-module:HybridModule"
|
@@ -180,7 +181,7 @@
|
|
180
181
|
"kind": "interface",
|
181
182
|
"locationInModule": {
|
182
183
|
"filename": "src/hybrid-module.ts",
|
183
|
-
"line":
|
184
|
+
"line": 29
|
184
185
|
},
|
185
186
|
"name": "HybridModuleOptions",
|
186
187
|
"properties": [
|
@@ -197,7 +198,7 @@
|
|
197
198
|
"immutable": true,
|
198
199
|
"locationInModule": {
|
199
200
|
"filename": "src/hybrid-module.ts",
|
200
|
-
"line":
|
201
|
+
"line": 35
|
201
202
|
},
|
202
203
|
"name": "cdktfVersion",
|
203
204
|
"optional": true,
|
@@ -218,7 +219,7 @@
|
|
218
219
|
"immutable": true,
|
219
220
|
"locationInModule": {
|
220
221
|
"filename": "src/hybrid-module.ts",
|
221
|
-
"line":
|
222
|
+
"line": 55
|
222
223
|
},
|
223
224
|
"name": "constructExamples",
|
224
225
|
"optional": true,
|
@@ -236,7 +237,7 @@
|
|
236
237
|
"immutable": true,
|
237
238
|
"locationInModule": {
|
238
239
|
"filename": "src/hybrid-module.ts",
|
239
|
-
"line":
|
240
|
+
"line": 41
|
240
241
|
},
|
241
242
|
"name": "constructVersion",
|
242
243
|
"optional": true,
|
@@ -253,7 +254,7 @@
|
|
253
254
|
"immutable": true,
|
254
255
|
"locationInModule": {
|
255
256
|
"filename": "src/hybrid-module.ts",
|
256
|
-
"line":
|
257
|
+
"line": 62
|
257
258
|
},
|
258
259
|
"name": "projectId",
|
259
260
|
"optional": true,
|
@@ -270,7 +271,7 @@
|
|
270
271
|
"immutable": true,
|
271
272
|
"locationInModule": {
|
272
273
|
"filename": "src/hybrid-module.ts",
|
273
|
-
"line":
|
274
|
+
"line": 67
|
274
275
|
},
|
275
276
|
"name": "runPlan",
|
276
277
|
"optional": true,
|
@@ -291,7 +292,7 @@
|
|
291
292
|
"immutable": true,
|
292
293
|
"locationInModule": {
|
293
294
|
"filename": "src/hybrid-module.ts",
|
294
|
-
"line":
|
295
|
+
"line": 48
|
295
296
|
},
|
296
297
|
"name": "terraformExamples",
|
297
298
|
"optional": true,
|
@@ -312,7 +313,7 @@
|
|
312
313
|
"kind": "interface",
|
313
314
|
"locationInModule": {
|
314
315
|
"filename": "src/hybrid-module.ts",
|
315
|
-
"line":
|
316
|
+
"line": 18
|
316
317
|
},
|
317
318
|
"name": "TerraformExamplesOption",
|
318
319
|
"properties": [
|
@@ -324,7 +325,7 @@
|
|
324
325
|
"immutable": true,
|
325
326
|
"locationInModule": {
|
326
327
|
"filename": "src/hybrid-module.ts",
|
327
|
-
"line":
|
328
|
+
"line": 20
|
328
329
|
},
|
329
330
|
"name": "enabled",
|
330
331
|
"type": {
|
@@ -339,7 +340,7 @@
|
|
339
340
|
"immutable": true,
|
340
341
|
"locationInModule": {
|
341
342
|
"filename": "src/hybrid-module.ts",
|
342
|
-
"line":
|
343
|
+
"line": 26
|
343
344
|
},
|
344
345
|
"name": "exampleCode",
|
345
346
|
"optional": true,
|
@@ -355,7 +356,7 @@
|
|
355
356
|
"immutable": true,
|
356
357
|
"locationInModule": {
|
357
358
|
"filename": "src/hybrid-module.ts",
|
358
|
-
"line":
|
359
|
+
"line": 22
|
359
360
|
},
|
360
361
|
"name": "folder",
|
361
362
|
"optional": true,
|
@@ -371,7 +372,7 @@
|
|
371
372
|
"immutable": true,
|
372
373
|
"locationInModule": {
|
373
374
|
"filename": "src/hybrid-module.ts",
|
374
|
-
"line":
|
375
|
+
"line": 24
|
375
376
|
},
|
376
377
|
"name": "providerConfig",
|
377
378
|
"optional": true,
|
@@ -399,7 +400,7 @@
|
|
399
400
|
},
|
400
401
|
"locationInModule": {
|
401
402
|
"filename": "src/terraform-module.ts",
|
402
|
-
"line":
|
403
|
+
"line": 55
|
403
404
|
},
|
404
405
|
"parameters": [
|
405
406
|
{
|
@@ -413,7 +414,7 @@
|
|
413
414
|
"kind": "class",
|
414
415
|
"locationInModule": {
|
415
416
|
"filename": "src/terraform-module.ts",
|
416
|
-
"line":
|
417
|
+
"line": 54
|
417
418
|
},
|
418
419
|
"name": "TerraformModule",
|
419
420
|
"symbolId": "src/terraform-module:TerraformModule"
|
@@ -431,7 +432,7 @@
|
|
431
432
|
"kind": "interface",
|
432
433
|
"locationInModule": {
|
433
434
|
"filename": "src/terraform-module.ts",
|
434
|
-
"line":
|
435
|
+
"line": 20
|
435
436
|
},
|
436
437
|
"name": "TerraformModuleOptions",
|
437
438
|
"properties": [
|
@@ -447,7 +448,7 @@
|
|
447
448
|
"immutable": true,
|
448
449
|
"locationInModule": {
|
449
450
|
"filename": "src/terraform-module.ts",
|
450
|
-
"line":
|
451
|
+
"line": 43
|
451
452
|
},
|
452
453
|
"name": "terraformModules",
|
453
454
|
"type": {
|
@@ -472,7 +473,7 @@
|
|
472
473
|
"immutable": true,
|
473
474
|
"locationInModule": {
|
474
475
|
"filename": "src/terraform-module.ts",
|
475
|
-
"line":
|
476
|
+
"line": 26
|
476
477
|
},
|
477
478
|
"name": "cdktfVersion",
|
478
479
|
"optional": true,
|
@@ -490,7 +491,7 @@
|
|
490
491
|
"immutable": true,
|
491
492
|
"locationInModule": {
|
492
493
|
"filename": "src/terraform-module.ts",
|
493
|
-
"line":
|
494
|
+
"line": 32
|
494
495
|
},
|
495
496
|
"name": "constructVersion",
|
496
497
|
"optional": true,
|
@@ -506,7 +507,7 @@
|
|
506
507
|
"immutable": true,
|
507
508
|
"locationInModule": {
|
508
509
|
"filename": "src/terraform-module.ts",
|
509
|
-
"line":
|
510
|
+
"line": 46
|
510
511
|
},
|
511
512
|
"name": "projectId",
|
512
513
|
"optional": true,
|
@@ -523,7 +524,7 @@
|
|
523
524
|
"immutable": true,
|
524
525
|
"locationInModule": {
|
525
526
|
"filename": "src/terraform-module.ts",
|
526
|
-
"line":
|
527
|
+
"line": 37
|
527
528
|
},
|
528
529
|
"name": "terraformProviders",
|
529
530
|
"optional": true,
|
@@ -549,7 +550,7 @@
|
|
549
550
|
"kind": "interface",
|
550
551
|
"locationInModule": {
|
551
552
|
"filename": "src/terraform-module.ts",
|
552
|
-
"line":
|
553
|
+
"line": 11
|
553
554
|
},
|
554
555
|
"name": "TerraformVersionConstraint",
|
555
556
|
"properties": [
|
@@ -561,7 +562,7 @@
|
|
561
562
|
"immutable": true,
|
562
563
|
"locationInModule": {
|
563
564
|
"filename": "src/terraform-module.ts",
|
564
|
-
"line":
|
565
|
+
"line": 13
|
565
566
|
},
|
566
567
|
"name": "name",
|
567
568
|
"type": {
|
@@ -576,7 +577,7 @@
|
|
576
577
|
"immutable": true,
|
577
578
|
"locationInModule": {
|
578
579
|
"filename": "src/terraform-module.ts",
|
579
|
-
"line":
|
580
|
+
"line": 15
|
580
581
|
},
|
581
582
|
"name": "source",
|
582
583
|
"type": {
|
@@ -591,7 +592,7 @@
|
|
591
592
|
"immutable": true,
|
592
593
|
"locationInModule": {
|
593
594
|
"filename": "src/terraform-module.ts",
|
594
|
-
"line":
|
595
|
+
"line": 17
|
595
596
|
},
|
596
597
|
"name": "version",
|
597
598
|
"type": {
|
@@ -602,6 +603,6 @@
|
|
602
603
|
"symbolId": "src/terraform-module:TerraformVersionConstraint"
|
603
604
|
}
|
604
605
|
},
|
605
|
-
"version": "0.3.
|
606
|
-
"fingerprint": "
|
606
|
+
"version": "0.3.3",
|
607
|
+
"fingerprint": "cy4yWPaPy4Kq4VzFFOeNhUPtwSEtmeJdCgcdeClKU+I="
|
607
608
|
}
|
package/.prettierignore
CHANGED
@@ -1 +1 @@
|
|
1
|
-
# ~~ Generated by projen. To modify, edit .projenrc.
|
1
|
+
# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen".
|
package/.projenrc.ts
CHANGED
@@ -1,47 +1,78 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) HashiCorp, Inc.
|
3
|
+
* SPDX-License-Identifier: MPL-2.0
|
4
|
+
*/
|
5
|
+
|
1
6
|
import { JsiiProject } from "projen/lib/cdk";
|
2
|
-
import { NpmAccess } from "projen/lib/javascript";
|
7
|
+
import { NpmAccess, UpgradeDependenciesSchedule } from "projen/lib/javascript";
|
8
|
+
import { AutoApprove } from "./projenrc/auto-approve";
|
9
|
+
import { Automerge } from "./projenrc/automerge";
|
10
|
+
import { CustomizedLicense } from "./projenrc/customized-license";
|
3
11
|
|
4
12
|
const name = "projen-cdktf-hybrid-construct";
|
13
|
+
|
14
|
+
const githubActionPinnedVersions = {
|
15
|
+
"actions/checkout": "c85c95e3d7251135ab7dc9ce3241c5835cc595a9", // v3.5.3
|
16
|
+
"actions/download-artifact": "9bc31d5ccc31df68ecc42ccf4149144866c47d8a", // v3.0.2
|
17
|
+
"actions/setup-node": "64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c", // v3.6.0
|
18
|
+
"actions/upload-artifact": "0b7f8abb1508181956e8e162db84b466c27e18ce", // v3.1.2
|
19
|
+
"amannn/action-semantic-pull-request":
|
20
|
+
"c3cd5d1ea3580753008872425915e343e351ab54", // v5.2.0
|
21
|
+
"peter-evans/create-pull-request": "284f54f989303d2699d373481a0cfa13ad5a6666", // v5.0.1
|
22
|
+
};
|
23
|
+
|
5
24
|
const project = new JsiiProject({
|
6
25
|
defaultReleaseBranch: "main",
|
7
26
|
name,
|
8
|
-
repositoryUrl: `https://github.com/
|
9
|
-
author: "
|
10
|
-
authorAddress: "
|
27
|
+
repositoryUrl: `https://github.com/cdktf/${name}.git`,
|
28
|
+
author: "HashiCorp",
|
29
|
+
authorAddress: "https://hashicorp.com",
|
30
|
+
authorOrganization: true,
|
11
31
|
packageName: name,
|
12
32
|
prettier: true,
|
13
33
|
projenrcTs: true,
|
14
34
|
description:
|
15
35
|
"Projen template for CDKTF Constructs that should also be used as Terraform Modules.",
|
16
|
-
|
17
|
-
copyrightOwner: "Daniel Schmidt",
|
18
|
-
|
36
|
+
licensed: false,
|
19
37
|
release: true,
|
20
38
|
releaseToNpm: true,
|
21
39
|
npmAccess: NpmAccess.PUBLIC,
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
40
|
+
mergify: false,
|
41
|
+
depsUpgradeOptions: {
|
42
|
+
workflowOptions: {
|
43
|
+
labels: ["auto-approve", "automerge", "dependencies"],
|
44
|
+
schedule: UpgradeDependenciesSchedule.WEEKLY,
|
45
|
+
},
|
26
46
|
},
|
27
47
|
gitignore: [".idea/"],
|
48
|
+
workflowGitIdentity: {
|
49
|
+
name: "team-tf-cdk",
|
50
|
+
email: "github-team-tf-cdk@hashicorp.com",
|
51
|
+
},
|
52
|
+
jsiiVersion: "^5.1.0",
|
28
53
|
});
|
29
54
|
project.tsconfig?.exclude?.push("src/exampleCode/**");
|
30
55
|
project.tsconfig?.exclude?.push("example/**");
|
31
56
|
project.tsconfig?.exclude?.push("examples/**");
|
32
57
|
|
33
|
-
project.addPeerDeps("projen@>= 0.
|
58
|
+
project.addPeerDeps("projen@>= 0.72.18");
|
34
59
|
project.addBundledDeps("change-case");
|
35
60
|
project.addDevDeps(
|
36
61
|
"fs-extra",
|
37
62
|
"glob",
|
38
|
-
"projen
|
63
|
+
"projen@^0.72.18",
|
39
64
|
"@types/fs-extra",
|
40
65
|
"@types/glob",
|
41
66
|
"@types/change-case",
|
42
|
-
"ts-node@10.9.1"
|
67
|
+
"ts-node@10.9.1",
|
68
|
+
"jsii-docgen@^9.0.0",
|
69
|
+
"comment-json"
|
43
70
|
);
|
44
71
|
|
72
|
+
new CustomizedLicense(project);
|
73
|
+
new AutoApprove(project);
|
74
|
+
new Automerge(project);
|
75
|
+
|
45
76
|
project.addPackageIgnore("examples");
|
46
77
|
|
47
78
|
project.addTask("buildExample", {
|
@@ -51,11 +82,39 @@ project.addTask("buildExample:hybrid", {
|
|
51
82
|
exec: "git clean -dfx . && rm -rf lib modules src terraform construct-examples && yarn && yarn projen && yarn && yarn build",
|
52
83
|
cwd: "./examples/hybrid-module",
|
53
84
|
});
|
54
|
-
|
55
85
|
project.addTask("buildExample:terraform", {
|
56
86
|
exec: "git clean -dfx . && rm -rf lib modules src terraform construct-examples && yarn && yarn projen && yarn && yarn build",
|
57
87
|
cwd: "./examples/terraform-module",
|
58
88
|
});
|
59
89
|
|
90
|
+
project.addTask("upgrade:hybrid", {
|
91
|
+
exec: "yarn projen upgrade",
|
92
|
+
cwd: "./examples/hybrid-module",
|
93
|
+
});
|
94
|
+
project.addTask("upgrade:terraform", {
|
95
|
+
exec: "yarn projen upgrade",
|
96
|
+
cwd: "./examples/terraform-module",
|
97
|
+
});
|
98
|
+
project.removeTask("post-upgrade");
|
99
|
+
project.addTask("post-upgrade", {
|
100
|
+
description: "Runs after upgrading dependencies",
|
101
|
+
exec: "yarn projen upgrade:hybrid && yarn projen upgrade:terraform",
|
102
|
+
});
|
103
|
+
|
60
104
|
project.testTask.exec("yarn buildExample");
|
105
|
+
|
106
|
+
// Run copywrite tool to add copyright headers to all files
|
107
|
+
project.buildWorkflow?.addPostBuildSteps(
|
108
|
+
{
|
109
|
+
name: "Setup Copywrite tool",
|
110
|
+
uses: "hashicorp/setup-copywrite@867a1a2a064a0626db322392806428f7dc59cb3e", // v1.1.2
|
111
|
+
},
|
112
|
+
{ name: "Add headers using Copywrite tool", run: "copywrite headers" }
|
113
|
+
);
|
114
|
+
|
115
|
+
// Use pinned versions of github actions
|
116
|
+
Object.entries(githubActionPinnedVersions).forEach(([action, sha]) => {
|
117
|
+
project.github?.actions.set(action, `${action}@${sha}`);
|
118
|
+
});
|
119
|
+
|
61
120
|
project.synth();
|