@cdktn/cli-core 0.23.2 → 0.23.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/LICENSE +355 -0
  2. package/build/lib/cdktf-stack.d.ts +6 -1
  3. package/build/lib/cdktf-stack.d.ts.map +1 -1
  4. package/build/lib/cdktf-stack.js +18 -1
  5. package/build/lib/dependencies/dependency-manager.js +2 -2
  6. package/build/lib/dependencies/package-manager.js +27 -13
  7. package/build/lib/init.d.ts +1 -1
  8. package/build/lib/init.d.ts.map +1 -1
  9. package/build/lib/init.js +22 -4
  10. package/build/lib/installed-binary-check.d.ts +12 -0
  11. package/build/lib/installed-binary-check.d.ts.map +1 -0
  12. package/build/lib/installed-binary-check.js +62 -0
  13. package/build/lib/models/deploy-machine.d.ts +10 -0
  14. package/build/lib/models/deploy-machine.d.ts.map +1 -1
  15. package/build/lib/models/deploy-machine.js +42 -7
  16. package/build/lib/models/terraform-cli.d.ts +0 -1
  17. package/build/lib/models/terraform-cli.d.ts.map +1 -1
  18. package/build/lib/models/terraform.d.ts +1 -0
  19. package/build/lib/models/terraform.d.ts.map +1 -1
  20. package/build/lib/models/terraform.js +1 -1
  21. package/build/lib/synth-stack.d.ts +0 -1
  22. package/build/lib/synth-stack.d.ts.map +1 -1
  23. package/build/lib/watch.d.ts +0 -1
  24. package/build/lib/watch.d.ts.map +1 -1
  25. package/package.json +20 -19
  26. package/templates/csharp/TestProgram.cs +1 -1
  27. package/templates/csharp/cdktf.json +4 -0
  28. package/templates/csharp/help +7 -7
  29. package/templates/go/cdktf.json +4 -0
  30. package/templates/go/help +1 -1
  31. package/templates/go/main_test.go +1 -1
  32. package/templates/java/cdktf.json +4 -0
  33. package/templates/java/gradlew +0 -0
  34. package/templates/java/help +2 -2
  35. package/templates/java/src/test/java/com/company/app/MainTest.java +1 -1
  36. package/templates/python/cdktf.json +4 -0
  37. package/templates/python/help +1 -1
  38. package/templates/python/main-test.py +1 -1
  39. package/templates/python-pip/cdktf.json +4 -0
  40. package/templates/python-pip/help +1 -1
  41. package/templates/python-pip/main-test.py +1 -1
  42. package/templates/typescript/__tests__/main-test.ts +1 -1
  43. package/templates/typescript/cdktf.json +4 -0
package/package.json CHANGED
@@ -1,16 +1,7 @@
1
1
  {
2
2
  "name": "@cdktn/cli-core",
3
- "version": "0.23.2",
3
+ "version": "0.23.4",
4
4
  "description": "CDK Terrain CLI Core, meant for internal use only",
5
- "scripts": {
6
- "build": "tsc",
7
- "watch": "tsc -w",
8
- "watch-preserve-output": "tsc -w --preserveWatchOutput",
9
- "test:update": "jest -u --maxWorkers=50%",
10
- "package": "./package.sh",
11
- "dist-clean": "rm -rf dist",
12
- "package:js": "./package.sh"
13
- },
14
5
  "main": "build/lib/index.js",
15
6
  "types": "build/lib/index.d.ts",
16
7
  "nx": {
@@ -38,12 +29,7 @@
38
29
  ],
39
30
  "license": "MPL-2.0",
40
31
  "dependencies": {
41
- "@cdktn/commons": "0.23.2",
42
- "@cdktn/hcl-tools": "0.23.2",
43
- "@cdktn/hcl2cdk": "0.23.2",
44
- "@cdktn/provider-schema": "0.23.2",
45
32
  "@sentry/node": "7.120.4",
46
- "cdktn": "0.23.2",
47
33
  "chalk": "4.1.2",
48
34
  "chokidar": "3.6.0",
49
35
  "ci-info": "3.9.0",
@@ -61,21 +47,36 @@
61
47
  "strip-ansi": "6.0.1",
62
48
  "xml-js": "1.6.11",
63
49
  "xstate": "4.38.3",
64
- "zod": "3.25.76"
50
+ "zod": "3.25.76",
51
+ "@cdktn/hcl-tools": "0.23.4",
52
+ "@cdktn/hcl2cdk": "0.23.4",
53
+ "@cdktn/commons": "0.23.4",
54
+ "cdktn": "0.23.4",
55
+ "@cdktn/provider-schema": "0.23.4"
65
56
  },
66
57
  "lint-staged": {
67
58
  "src/**/*.{ts,tsx}": "tsc-files ambient.d.ts --noEmit"
68
59
  },
69
60
  "devDependencies": {
70
- "@cdktn/provider-generator": "0.23.2",
71
61
  "@types/cross-spawn": "6.0.6",
72
62
  "@types/fs-extra": "8.1.5",
63
+ "@types/minimatch": "5.1.2",
73
64
  "@types/node": "20.19.1",
74
65
  "@types/node-fetch": "2.6.13",
75
66
  "@types/semver": "7.7.1",
76
67
  "nock": "13.5.6",
77
68
  "prettier": "2.8.8",
78
69
  "tsc-files": "1.1.4",
79
- "typescript": "5.4.5"
70
+ "typescript": "^5.0.0",
71
+ "@cdktn/provider-generator": "0.23.4"
72
+ },
73
+ "scripts": {
74
+ "build": "tsc",
75
+ "watch": "tsc -w",
76
+ "watch-preserve-output": "tsc -w --preserveWatchOutput",
77
+ "test:update": "jest -u --maxWorkers=50%",
78
+ "package": "./package.sh",
79
+ "dist-clean": "rm -rf dist",
80
+ "package:js": "./package.sh"
80
81
  }
81
- }
82
+ }
@@ -5,7 +5,7 @@ using System.Collections.Generic;
5
5
 
6
6
  namespace MyCompany.MyApp{
7
7
  // The tests below are example tests, you can find more information at
8
- // https://cdk.tf/testing
8
+ // https://cdktn.io/docs/test/unit-tests
9
9
  public class TestProgram{
10
10
 
11
11
  [Fact]
@@ -3,6 +3,10 @@
3
3
  "app": "dotnet run -p MyTerraformStack.csproj",
4
4
  "projectId": "{{projectId}}",
5
5
  "sendCrashReports": "{{sendCrashReports}}",
6
+ "targetVersions": {
7
+ "terraform": ">=1.5.7",
8
+ "opentofu": ">=1.6.0"
9
+ },
6
10
  "terraformProviders": [],
7
11
  "terraformModules": [],
8
12
  "context": {
@@ -27,15 +27,15 @@ Use Providers:
27
27
 
28
28
  cdktn provider add "aws@~>3.0" null kreuzwerker/docker
29
29
 
30
- You can find all prebuilt providers on nuget: https://www.nuget.org/packages?q=HashiCorp.Cdktf.Providers
30
+ You can find all prebuilt providers on nuget: https://www.nuget.org/packages?q=Io.Cdktn.Providers
31
31
  You can also install these providers directly through dotnet:
32
32
 
33
- dotnet add package HashiCorp.Cdktf.Providers.Aws
34
- dotnet add package HashiCorp.Cdktf.Providers.Google
35
- dotnet add package HashiCorp.Cdktf.Providers.Azurerm
36
- dotnet add package HashiCorp.Cdktf.Providers.Docker
37
- dotnet add package HashiCorp.Cdktf.Providers.Github
38
- dotnet add package HashiCorp.Cdktf.Providers.Null
33
+ dotnet add package Io.Cdktn.Providers.Aws
34
+ dotnet add package Io.Cdktn.Providers.Google
35
+ dotnet add package Io.Cdktn.Providers.Azurerm
36
+ dotnet add package Io.Cdktn.Providers.Docker
37
+ dotnet add package Io.Cdktn.Providers.Github
38
+ dotnet add package Io.Cdktn.Providers.Null
39
39
 
40
40
  You can also build any module or provider locally. Learn more: https://cdktn.io/docs/concepts/providers
41
41
 
@@ -4,6 +4,10 @@
4
4
  "codeMakerOutput": "generated",
5
5
  "projectId": "{{projectId}}",
6
6
  "sendCrashReports": "{{sendCrashReports}}",
7
+ "targetVersions": {
8
+ "terraform": ">=1.5.7",
9
+ "opentofu": ">=1.6.0"
10
+ },
7
11
  "terraformProviders": [],
8
12
  "terraformModules": [],
9
13
  "context": {
package/templates/go/help CHANGED
@@ -29,4 +29,4 @@ Use Providers:
29
29
 
30
30
  Learn more: https://cdktn.io/docs/concepts/providers
31
31
 
32
- ========================================================================================================
32
+ ========================================================================================================
@@ -7,7 +7,7 @@ import (
7
7
  )
8
8
 
9
9
  // The tests below are example tests, you can find more information at
10
- // https://cdk.tf/testing
10
+ // https://cdktn.io/docs/test/unit-tests
11
11
 
12
12
  /*
13
13
  var stack = NewMyApplicationsAbstraction(cdktn.Testing_App(nil), "stack")
@@ -4,6 +4,10 @@
4
4
  "projectId": "{{projectId}}",
5
5
  "sendCrashReports": "{{sendCrashReports}}",
6
6
  "codeMakerOutput": "imports",
7
+ "targetVersions": {
8
+ "terraform": ">=1.5.7",
9
+ "opentofu": ">=1.6.0"
10
+ },
7
11
  "terraformProviders": [],
8
12
  "terraformModules": [],
9
13
  "context": {
File without changes
@@ -27,9 +27,9 @@ Use Providers:
27
27
 
28
28
  cdktn provider add "aws@~>3.0" null kreuzwerker/docker
29
29
 
30
- All prebuilt providers are available on Maven Central: https://mvnrepository.com/artifact/com.hashicorp
30
+ All prebuilt providers are available on Maven Central: https://mvnrepository.com/artifact/io.cdktn
31
31
  You can also add these providers directly to your pom.xml file.
32
32
 
33
33
  You can also build any module or provider locally. Learn more: https://cdktn.io/docs/concepts/providers
34
34
 
35
- ========================================================================================================
35
+ ========================================================================================================
@@ -3,7 +3,7 @@ import org.junit.jupiter.api.Test;
3
3
  import static org.junit.jupiter.api.Assertions.assertTrue;
4
4
 
5
5
  // The tests below are example tests, you can find more information at
6
- // https://cdk.tf/testing
6
+ // https://cdktn.io/docs/test/unit-tests
7
7
  public class MainTest {
8
8
 
9
9
  @Test
@@ -3,6 +3,10 @@
3
3
  "app": "pipenv run python main.py",
4
4
  "projectId": "{{projectId}}",
5
5
  "sendCrashReports": "{{sendCrashReports}}",
6
+ "targetVersions": {
7
+ "terraform": ">=1.5.7",
8
+ "opentofu": ">=1.6.0"
9
+ },
6
10
  "terraformProviders": [],
7
11
  "terraformModules": [],
8
12
  "codeMakerOutput": "imports",
@@ -39,4 +39,4 @@ Use Providers:
39
39
 
40
40
  You can also build any module or provider locally. Learn more: https://cdktn.io/docs/concepts/providers
41
41
 
42
- ========================================================================================================
42
+ ========================================================================================================
@@ -2,7 +2,7 @@ import pytest
2
2
  from cdktn import Testing
3
3
 
4
4
  # The tests below are example tests, you can find more information at
5
- # https://cdk.tf/testing
5
+ # https://cdktn.io/docs/test/unit-tests
6
6
 
7
7
 
8
8
  class TestMain:
@@ -3,6 +3,10 @@
3
3
  "app": "python3 ./main.py",
4
4
  "projectId": "{{projectId}}",
5
5
  "sendCrashReports": "{{sendCrashReports}}",
6
+ "targetVersions": {
7
+ "terraform": ">=1.5.7",
8
+ "opentofu": ">=1.6.0"
9
+ },
6
10
  "terraformProviders": [],
7
11
  "terraformModules": [],
8
12
  "codeMakerOutput": "imports",
@@ -32,4 +32,4 @@ Use Providers:
32
32
 
33
33
  You can also build any module or provider locally. Learn more: https://cdktn.io/docs/concepts/providers
34
34
 
35
- ========================================================================================================
35
+ ========================================================================================================
@@ -2,7 +2,7 @@ import pytest
2
2
  from cdktn import Testing, TerraformStack
3
3
 
4
4
  # The tests below are example tests, you can find more information at
5
- # https://cdk.tf/testing
5
+ # https://cdktn.io/docs/test/unit-tests
6
6
 
7
7
 
8
8
  class TestMain:
@@ -5,7 +5,7 @@ import "cdktn/lib/testing/adapters/jest"; // Load types for expect matchers
5
5
 
6
6
  describe("My CDKTN Application", () => {
7
7
  // The tests below are example tests, you can find more information at
8
- // https://cdk.tf/testing
8
+ // https://cdktn.io/docs/test/unit-tests
9
9
  it.todo("should be tested");
10
10
 
11
11
  // // All Unit tests test the synthesised terraform code, it does not create real-world resources
@@ -3,6 +3,10 @@
3
3
  "app": "npx ts-node main.ts",
4
4
  "projectId": "{{projectId}}",
5
5
  "sendCrashReports": "{{sendCrashReports}}",
6
+ "targetVersions": {
7
+ "terraform": ">=1.5.7",
8
+ "opentofu": ">=1.6.0"
9
+ },
6
10
  "terraformProviders": [],
7
11
  "terraformModules": [],
8
12
  "context": {