@cdktn/provider-generator 0.24.0-pre.3 → 0.24.0-pre.30
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/.spec.swcrc +22 -0
- package/build/get/__tests__/generator/import-style.test.d.ts +2 -0
- package/build/get/__tests__/generator/import-style.test.js +101 -0
- package/build/get/__tests__/generator/module-generator.test.js +12 -12
- package/build/get/constructs-maker.d.ts +5 -1
- package/build/get/constructs-maker.js +5 -2
- package/build/get/generator/emitter/struct-emitter.d.ts +2 -1
- package/build/get/generator/emitter/struct-emitter.js +14 -11
- package/build/get/generator/module-generator.js +3 -3
- package/build/get/generator/provider-generator.d.ts +9 -1
- package/build/get/generator/provider-generator.js +9 -6
- package/eslint.config.mjs +13 -0
- package/jest.config.js +16 -9
- package/package.json +8 -9
- package/src/__tests__/__snapshots__/edge-provider-schema.test.ts.snap +8 -8
- package/src/__tests__/__snapshots__/provider.test.ts.snap +2951 -2951
- package/src/get/__tests__/generator/__snapshots__/complex-computed-types.test.ts.snap +5 -5
- package/src/get/__tests__/generator/__snapshots__/export-sharding.test.ts.snap +3310 -3310
- package/src/get/__tests__/generator/__snapshots__/module-generator.test.ts.snap +355 -355
- package/src/get/__tests__/generator/__snapshots__/nested-types.test.ts.snap +8 -8
- package/src/get/__tests__/generator/__snapshots__/provider.test.ts.snap +8 -8
- package/src/get/__tests__/generator/__snapshots__/resource-types.test.ts.snap +126 -126
- package/src/get/__tests__/generator/__snapshots__/skipped-attributes.test.ts.snap +17 -17
- package/src/get/__tests__/generator/__snapshots__/types.test.ts.snap +65 -65
|
@@ -36,7 +36,7 @@ export interface DataAwsQuicksightAnalysisPermissions {
|
|
|
36
36
|
export function dataAwsQuicksightAnalysisPermissionsToTerraform(struct?: DataAwsQuicksightAnalysisPermissions): any {
|
|
37
37
|
if (!cdktn.canInspect(struct) || cdktn.Tokenization.isResolvable(struct)) { return struct; }
|
|
38
38
|
if (cdktn.isComplexElement(struct)) {
|
|
39
|
-
throw new Error("A complex element was used as configuration, this is not supported: https://
|
|
39
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdktn.io/docs/concepts/resources#references");
|
|
40
40
|
}
|
|
41
41
|
return {
|
|
42
42
|
}
|
|
@@ -46,7 +46,7 @@ export function dataAwsQuicksightAnalysisPermissionsToTerraform(struct?: DataAws
|
|
|
46
46
|
export function dataAwsQuicksightAnalysisPermissionsToHclTerraform(struct?: DataAwsQuicksightAnalysisPermissions): any {
|
|
47
47
|
if (!cdktn.canInspect(struct) || cdktn.Tokenization.isResolvable(struct)) { return struct; }
|
|
48
48
|
if (cdktn.isComplexElement(struct)) {
|
|
49
|
-
throw new Error("A complex element was used as configuration, this is not supported: https://
|
|
49
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdktn.io/docs/concepts/resources#references");
|
|
50
50
|
}
|
|
51
51
|
const attrs = {
|
|
52
52
|
};
|
|
@@ -100,7 +100,7 @@ export class DataAwsQuicksightAnalysisPermissionsList extends cdktn.ComplexList
|
|
|
100
100
|
* @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
|
|
101
101
|
*/
|
|
102
102
|
constructor(terraformResource: cdktn.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean) {
|
|
103
|
-
super(terraformResource, terraformAttribute, wrapsSet)
|
|
103
|
+
super(terraformResource, terraformAttribute, wrapsSet);
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
/**
|
|
@@ -405,7 +405,7 @@ export interface QuicksightTemplatePermissions {
|
|
|
405
405
|
export function quicksightTemplatePermissionsToTerraform(struct?: QuicksightTemplatePermissions | cdktn.IResolvable): any {
|
|
406
406
|
if (!cdktn.canInspect(struct) || cdktn.Tokenization.isResolvable(struct)) { return struct; }
|
|
407
407
|
if (cdktn.isComplexElement(struct)) {
|
|
408
|
-
throw new Error("A complex element was used as configuration, this is not supported: https://
|
|
408
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdktn.io/docs/concepts/resources#references");
|
|
409
409
|
}
|
|
410
410
|
return {
|
|
411
411
|
actions: cdktn.listMapper(cdktn.stringToTerraform, false)(struct!.actions),
|
|
@@ -417,7 +417,7 @@ export function quicksightTemplatePermissionsToTerraform(struct?: QuicksightTemp
|
|
|
417
417
|
export function quicksightTemplatePermissionsToHclTerraform(struct?: QuicksightTemplatePermissions | cdktn.IResolvable): any {
|
|
418
418
|
if (!cdktn.canInspect(struct) || cdktn.Tokenization.isResolvable(struct)) { return struct; }
|
|
419
419
|
if (cdktn.isComplexElement(struct)) {
|
|
420
|
-
throw new Error("A complex element was used as configuration, this is not supported: https://
|
|
420
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdktn.io/docs/concepts/resources#references");
|
|
421
421
|
}
|
|
422
422
|
const attrs = {
|
|
423
423
|
actions: {
|
|
@@ -524,7 +524,7 @@ export class QuicksightTemplatePermissionsList extends cdktn.ComplexList {
|
|
|
524
524
|
* @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
|
|
525
525
|
*/
|
|
526
526
|
constructor(terraformResource: cdktn.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean) {
|
|
527
|
-
super(terraformResource, terraformAttribute, wrapsSet)
|
|
527
|
+
super(terraformResource, terraformAttribute, wrapsSet);
|
|
528
528
|
}
|
|
529
529
|
|
|
530
530
|
/**
|
|
@@ -548,7 +548,7 @@ export interface QuicksightTemplateSourceEntitySourceAnalysisDataSetReferences {
|
|
|
548
548
|
export function quicksightTemplateSourceEntitySourceAnalysisDataSetReferencesToTerraform(struct?: QuicksightTemplateSourceEntitySourceAnalysisDataSetReferences | cdktn.IResolvable): any {
|
|
549
549
|
if (!cdktn.canInspect(struct) || cdktn.Tokenization.isResolvable(struct)) { return struct; }
|
|
550
550
|
if (cdktn.isComplexElement(struct)) {
|
|
551
|
-
throw new Error("A complex element was used as configuration, this is not supported: https://
|
|
551
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdktn.io/docs/concepts/resources#references");
|
|
552
552
|
}
|
|
553
553
|
return {
|
|
554
554
|
data_set_arn: cdktn.stringToTerraform(struct!.dataSetArn),
|
|
@@ -560,7 +560,7 @@ export function quicksightTemplateSourceEntitySourceAnalysisDataSetReferencesToT
|
|
|
560
560
|
export function quicksightTemplateSourceEntitySourceAnalysisDataSetReferencesToHclTerraform(struct?: QuicksightTemplateSourceEntitySourceAnalysisDataSetReferences | cdktn.IResolvable): any {
|
|
561
561
|
if (!cdktn.canInspect(struct) || cdktn.Tokenization.isResolvable(struct)) { return struct; }
|
|
562
562
|
if (cdktn.isComplexElement(struct)) {
|
|
563
|
-
throw new Error("A complex element was used as configuration, this is not supported: https://
|
|
563
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdktn.io/docs/concepts/resources#references");
|
|
564
564
|
}
|
|
565
565
|
const attrs = {
|
|
566
566
|
data_set_arn: {
|
|
@@ -667,7 +667,7 @@ export class QuicksightTemplateSourceEntitySourceAnalysisDataSetReferencesList e
|
|
|
667
667
|
* @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
|
|
668
668
|
*/
|
|
669
669
|
constructor(terraformResource: cdktn.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean) {
|
|
670
|
-
super(terraformResource, terraformAttribute, wrapsSet)
|
|
670
|
+
super(terraformResource, terraformAttribute, wrapsSet);
|
|
671
671
|
}
|
|
672
672
|
|
|
673
673
|
/**
|
|
@@ -693,7 +693,7 @@ export interface QuicksightTemplateSourceEntitySourceAnalysis {
|
|
|
693
693
|
export function quicksightTemplateSourceEntitySourceAnalysisToTerraform(struct?: QuicksightTemplateSourceEntitySourceAnalysisOutputReference | QuicksightTemplateSourceEntitySourceAnalysis): any {
|
|
694
694
|
if (!cdktn.canInspect(struct) || cdktn.Tokenization.isResolvable(struct)) { return struct; }
|
|
695
695
|
if (cdktn.isComplexElement(struct)) {
|
|
696
|
-
throw new Error("A complex element was used as configuration, this is not supported: https://
|
|
696
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdktn.io/docs/concepts/resources#references");
|
|
697
697
|
}
|
|
698
698
|
return {
|
|
699
699
|
arn: cdktn.stringToTerraform(struct!.arn),
|
|
@@ -705,7 +705,7 @@ export function quicksightTemplateSourceEntitySourceAnalysisToTerraform(struct?:
|
|
|
705
705
|
export function quicksightTemplateSourceEntitySourceAnalysisToHclTerraform(struct?: QuicksightTemplateSourceEntitySourceAnalysisOutputReference | QuicksightTemplateSourceEntitySourceAnalysis): any {
|
|
706
706
|
if (!cdktn.canInspect(struct) || cdktn.Tokenization.isResolvable(struct)) { return struct; }
|
|
707
707
|
if (cdktn.isComplexElement(struct)) {
|
|
708
|
-
throw new Error("A complex element was used as configuration, this is not supported: https://
|
|
708
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdktn.io/docs/concepts/resources#references");
|
|
709
709
|
}
|
|
710
710
|
const attrs = {
|
|
711
711
|
arn: {
|
|
@@ -800,7 +800,7 @@ export interface QuicksightTemplateSourceEntitySourceTemplate {
|
|
|
800
800
|
export function quicksightTemplateSourceEntitySourceTemplateToTerraform(struct?: QuicksightTemplateSourceEntitySourceTemplateOutputReference | QuicksightTemplateSourceEntitySourceTemplate): any {
|
|
801
801
|
if (!cdktn.canInspect(struct) || cdktn.Tokenization.isResolvable(struct)) { return struct; }
|
|
802
802
|
if (cdktn.isComplexElement(struct)) {
|
|
803
|
-
throw new Error("A complex element was used as configuration, this is not supported: https://
|
|
803
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdktn.io/docs/concepts/resources#references");
|
|
804
804
|
}
|
|
805
805
|
return {
|
|
806
806
|
arn: cdktn.stringToTerraform(struct!.arn),
|
|
@@ -811,7 +811,7 @@ export function quicksightTemplateSourceEntitySourceTemplateToTerraform(struct?:
|
|
|
811
811
|
export function quicksightTemplateSourceEntitySourceTemplateToHclTerraform(struct?: QuicksightTemplateSourceEntitySourceTemplateOutputReference | QuicksightTemplateSourceEntitySourceTemplate): any {
|
|
812
812
|
if (!cdktn.canInspect(struct) || cdktn.Tokenization.isResolvable(struct)) { return struct; }
|
|
813
813
|
if (cdktn.isComplexElement(struct)) {
|
|
814
|
-
throw new Error("A complex element was used as configuration, this is not supported: https://
|
|
814
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdktn.io/docs/concepts/resources#references");
|
|
815
815
|
}
|
|
816
816
|
const attrs = {
|
|
817
817
|
arn: {
|
|
@@ -889,7 +889,7 @@ export interface QuicksightTemplateSourceEntity {
|
|
|
889
889
|
export function quicksightTemplateSourceEntityToTerraform(struct?: QuicksightTemplateSourceEntityOutputReference | QuicksightTemplateSourceEntity): any {
|
|
890
890
|
if (!cdktn.canInspect(struct) || cdktn.Tokenization.isResolvable(struct)) { return struct; }
|
|
891
891
|
if (cdktn.isComplexElement(struct)) {
|
|
892
|
-
throw new Error("A complex element was used as configuration, this is not supported: https://
|
|
892
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdktn.io/docs/concepts/resources#references");
|
|
893
893
|
}
|
|
894
894
|
return {
|
|
895
895
|
source_analysis: quicksightTemplateSourceEntitySourceAnalysisToTerraform(struct!.sourceAnalysis),
|
|
@@ -901,7 +901,7 @@ export function quicksightTemplateSourceEntityToTerraform(struct?: QuicksightTem
|
|
|
901
901
|
export function quicksightTemplateSourceEntityToHclTerraform(struct?: QuicksightTemplateSourceEntityOutputReference | QuicksightTemplateSourceEntity): any {
|
|
902
902
|
if (!cdktn.canInspect(struct) || cdktn.Tokenization.isResolvable(struct)) { return struct; }
|
|
903
903
|
if (cdktn.isComplexElement(struct)) {
|
|
904
|
-
throw new Error("A complex element was used as configuration, this is not supported: https://
|
|
904
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdktn.io/docs/concepts/resources#references");
|
|
905
905
|
}
|
|
906
906
|
const attrs = {
|
|
907
907
|
source_analysis: {
|
|
@@ -1010,7 +1010,7 @@ export interface QuicksightTemplateTimeouts {
|
|
|
1010
1010
|
export function quicksightTemplateTimeoutsToTerraform(struct?: QuicksightTemplateTimeouts | cdktn.IResolvable): any {
|
|
1011
1011
|
if (!cdktn.canInspect(struct) || cdktn.Tokenization.isResolvable(struct)) { return struct; }
|
|
1012
1012
|
if (cdktn.isComplexElement(struct)) {
|
|
1013
|
-
throw new Error("A complex element was used as configuration, this is not supported: https://
|
|
1013
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdktn.io/docs/concepts/resources#references");
|
|
1014
1014
|
}
|
|
1015
1015
|
return {
|
|
1016
1016
|
create: cdktn.stringToTerraform(struct!.create),
|
|
@@ -1023,7 +1023,7 @@ export function quicksightTemplateTimeoutsToTerraform(struct?: QuicksightTemplat
|
|
|
1023
1023
|
export function quicksightTemplateTimeoutsToHclTerraform(struct?: QuicksightTemplateTimeouts | cdktn.IResolvable): any {
|
|
1024
1024
|
if (!cdktn.canInspect(struct) || cdktn.Tokenization.isResolvable(struct)) { return struct; }
|
|
1025
1025
|
if (cdktn.isComplexElement(struct)) {
|
|
1026
|
-
throw new Error("A complex element was used as configuration, this is not supported: https://
|
|
1026
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdktn.io/docs/concepts/resources#references");
|
|
1027
1027
|
}
|
|
1028
1028
|
const attrs = {
|
|
1029
1029
|
create: {
|