@cdktn/hcl2cdk 0.22.0-pre.2
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/README.md +95 -0
- package/ambient.d.ts +14 -0
- package/jest.config.js +16 -0
- package/lib/__tests__/coerceType.test.d.ts +2 -0
- package/lib/__tests__/coerceType.test.js +165 -0
- package/lib/__tests__/expressionToTs.test.d.ts +6 -0
- package/lib/__tests__/expressionToTs.test.js +693 -0
- package/lib/__tests__/expressions.test.d.ts +4 -0
- package/lib/__tests__/expressions.test.js +415 -0
- package/lib/__tests__/findExpressionType.test.d.ts +6 -0
- package/lib/__tests__/findExpressionType.test.js +105 -0
- package/lib/__tests__/functions.test.d.ts +6 -0
- package/lib/__tests__/functions.test.js +605 -0
- package/lib/__tests__/generation.test.d.ts +6 -0
- package/lib/__tests__/generation.test.js +45 -0
- package/lib/__tests__/jsii-rosetta-workarounds.test.d.ts +2 -0
- package/lib/__tests__/jsii-rosetta-workarounds.test.js +86 -0
- package/lib/__tests__/partialCode.test.d.ts +6 -0
- package/lib/__tests__/partialCode.test.js +390 -0
- package/lib/__tests__/terraformSchema.test.d.ts +6 -0
- package/lib/__tests__/terraformSchema.test.js +105 -0
- package/lib/__tests__/testHelpers.d.ts +7 -0
- package/lib/__tests__/testHelpers.js +16 -0
- package/lib/coerceType.d.ts +7 -0
- package/lib/coerceType.js +240 -0
- package/lib/dynamic-blocks.d.ts +8 -0
- package/lib/dynamic-blocks.js +44 -0
- package/lib/expressions.d.ts +9 -0
- package/lib/expressions.js +634 -0
- package/lib/function-bindings/functions.d.ts +31 -0
- package/lib/function-bindings/functions.generated.d.ts +806 -0
- package/lib/function-bindings/functions.generated.js +1142 -0
- package/lib/function-bindings/functions.js +73 -0
- package/lib/generation.d.ts +26 -0
- package/lib/generation.js +676 -0
- package/lib/index.d.ts +136 -0
- package/lib/index.js +364 -0
- package/lib/iteration.d.ts +23 -0
- package/lib/iteration.js +87 -0
- package/lib/jsii-rosetta-workarounds.d.ts +5 -0
- package/lib/jsii-rosetta-workarounds.js +126 -0
- package/lib/partialCode.d.ts +11 -0
- package/lib/partialCode.js +116 -0
- package/lib/provider.d.ts +8 -0
- package/lib/provider.js +40 -0
- package/lib/references.d.ts +11 -0
- package/lib/references.js +141 -0
- package/lib/schema.d.ts +297 -0
- package/lib/schema.js +81 -0
- package/lib/telemetryAllowList.json +24 -0
- package/lib/terraformSchema.d.ts +6 -0
- package/lib/terraformSchema.js +136 -0
- package/lib/types.d.ts +50 -0
- package/lib/types.js +3 -0
- package/lib/utils.d.ts +6 -0
- package/lib/utils.js +25 -0
- package/lib/variables.d.ts +10 -0
- package/lib/variables.js +172 -0
- package/package.json +71 -0
- package/package.sh +9 -0
- package/tsconfig.json +42 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) HashiCorp, Inc.
|
|
3
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { AttributeType } from "@cdktn/commons";
|
|
6
|
+
type FunctionCall = any;
|
|
7
|
+
type FunctionMeta = {
|
|
8
|
+
name: string;
|
|
9
|
+
returnType: AttributeType;
|
|
10
|
+
parameters: {
|
|
11
|
+
type: AttributeType;
|
|
12
|
+
optional?: boolean;
|
|
13
|
+
variadic?: boolean;
|
|
14
|
+
}[];
|
|
15
|
+
/**
|
|
16
|
+
* Allows transforming the function call before it is handled. This is currently used to handle
|
|
17
|
+
* different APIs between TF supporting join(sep, listA, listB) and CDKTN only supporting join(sep, list)
|
|
18
|
+
* (as the alternative due to JSIIs lack of support for variadic parametes would be join(sep, lists) which
|
|
19
|
+
* would have a worse UX as most often just a single list is passed)
|
|
20
|
+
* In the case of join() the transformer will convert the function call to join(sep, concat(listA, listB))
|
|
21
|
+
* before handling it
|
|
22
|
+
*
|
|
23
|
+
* Caution: Beware of infinite recursion if the returned function call is to the same function that has this
|
|
24
|
+
* transformer. Return the same instance of the passed functionCall to break out of that recursion.
|
|
25
|
+
*/
|
|
26
|
+
transformer?: (functionCall: FunctionCall) => FunctionCall;
|
|
27
|
+
};
|
|
28
|
+
export declare const functionsMap: Record<string, FunctionMeta>;
|
|
29
|
+
export declare const tsFunctionsMap: Record<string, FunctionMeta>;
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=functions.d.ts.map
|