@cdktn/provider-generator 0.24.0-pre.9 → 0.24.0-pre.91

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 (124) hide show
  1. package/.spec.swcrc +22 -0
  2. package/LICENSE +355 -0
  3. package/README.md +1 -1
  4. package/build/__tests__/edge-provider-schema/builder.d.ts +9 -3
  5. package/build/__tests__/edge-provider-schema/builder.js +6 -3
  6. package/build/__tests__/edge-provider-schema/cli.js +8 -3
  7. package/build/__tests__/edge-provider-schema/index.js +119 -1
  8. package/build/__tests__/provider.test.js +4 -1
  9. package/build/get/__tests__/generator/ephemeral-resources.test.d.ts +2 -0
  10. package/build/get/__tests__/generator/ephemeral-resources.test.js +49 -0
  11. package/build/get/__tests__/generator/module-generator.test.js +12 -12
  12. package/build/get/__tests__/generator/provider-functions.test.d.ts +2 -0
  13. package/build/get/__tests__/generator/provider-functions.test.js +176 -0
  14. package/build/get/__tests__/generator/provider-source-matching.test.d.ts +2 -0
  15. package/build/get/__tests__/generator/provider-source-matching.test.js +45 -0
  16. package/build/get/__tests__/generator/provider.test.js +9 -1
  17. package/build/get/__tests__/generator/supported-stored-classes.test.d.ts +2 -0
  18. package/build/get/__tests__/generator/supported-stored-classes.test.js +137 -0
  19. package/build/get/__tests__/generator/types.test.js +44 -1
  20. package/build/get/__tests__/generator/write-only.test.d.ts +2 -0
  21. package/build/get/__tests__/generator/write-only.test.js +65 -0
  22. package/build/get/__tests__/target-versions.test.d.ts +2 -0
  23. package/build/get/__tests__/target-versions.test.js +171 -0
  24. package/build/get/constructs-maker.d.ts +8 -1
  25. package/build/get/constructs-maker.js +46 -10
  26. package/build/get/generator/emitter/attributes-emitter.d.ts +13 -2
  27. package/build/get/generator/emitter/attributes-emitter.js +71 -5
  28. package/build/get/generator/emitter/index.d.ts +1 -0
  29. package/build/get/generator/emitter/index.js +2 -1
  30. package/build/get/generator/emitter/provider-functions-emitter.d.ts +11 -0
  31. package/build/get/generator/emitter/provider-functions-emitter.js +94 -0
  32. package/build/get/generator/emitter/resource-emitter.d.ts +5 -1
  33. package/build/get/generator/emitter/resource-emitter.js +83 -7
  34. package/build/get/generator/emitter/struct-emitter.js +10 -10
  35. package/build/get/generator/models/attribute-model.d.ts +4 -0
  36. package/build/get/generator/models/attribute-model.js +50 -4
  37. package/build/get/generator/models/attribute-type-model.d.ts +24 -0
  38. package/build/get/generator/models/attribute-type-model.js +91 -5
  39. package/build/get/generator/models/index.d.ts +1 -0
  40. package/build/get/generator/models/index.js +2 -1
  41. package/build/get/generator/models/provider-function-model.d.ts +102 -0
  42. package/build/get/generator/models/provider-function-model.js +667 -0
  43. package/build/get/generator/models/resource-model.d.ts +3 -0
  44. package/build/get/generator/models/resource-model.js +13 -4
  45. package/build/get/generator/models/struct.d.ts +2 -0
  46. package/build/get/generator/models/struct.js +6 -2
  47. package/build/get/generator/models/supported-stored-classes.d.ts +5 -0
  48. package/build/get/generator/models/supported-stored-classes.js +86 -0
  49. package/build/get/generator/module-generator.js +3 -3
  50. package/build/get/generator/provider-generator.d.ts +2 -0
  51. package/build/get/generator/provider-generator.js +41 -6
  52. package/build/get/generator/resource-parser.js +3 -1
  53. package/jest.config.js +16 -9
  54. package/package.json +28 -27
  55. package/package.sh +1 -1
  56. package/src/__tests__/__snapshots__/edge-provider-schema.test.ts.snap +4 -0
  57. package/src/__tests__/__snapshots__/provider.test.ts.snap +2828 -2828
  58. package/src/__tests__/edge-provider-schema/builder.ts +201 -0
  59. package/src/__tests__/edge-provider-schema/cli.ts +51 -0
  60. package/src/__tests__/edge-provider-schema/index.ts +284 -0
  61. package/src/__tests__/edge-provider-schema.test.ts +24 -0
  62. package/src/__tests__/provider.test.ts +183 -0
  63. package/src/get/__tests__/constructs-maker.test.ts +118 -0
  64. package/src/get/__tests__/generator/__snapshots__/complex-computed-types.test.ts.snap +5 -5
  65. package/src/get/__tests__/generator/__snapshots__/ephemeral-resources.test.ts.snap +524 -0
  66. package/src/get/__tests__/generator/__snapshots__/export-sharding.test.ts.snap +3310 -3310
  67. package/src/get/__tests__/generator/__snapshots__/module-generator.test.ts.snap +355 -355
  68. package/src/get/__tests__/generator/__snapshots__/nested-types.test.ts.snap +8 -8
  69. package/src/get/__tests__/generator/__snapshots__/provider-functions.test.ts.snap +444 -0
  70. package/src/get/__tests__/generator/__snapshots__/provider.test.ts.snap +8 -8
  71. package/src/get/__tests__/generator/__snapshots__/resource-types.test.ts.snap +126 -126
  72. package/src/get/__tests__/generator/__snapshots__/skipped-attributes.test.ts.snap +17 -17
  73. package/src/get/__tests__/generator/__snapshots__/types.test.ts.snap +201 -52
  74. package/src/get/__tests__/generator/__snapshots__/write-only.test.ts.snap +262 -0
  75. package/src/get/__tests__/generator/complex-computed-types.test.ts +28 -0
  76. package/src/get/__tests__/generator/deep-nested-attributes.test.ts +56 -0
  77. package/src/get/__tests__/generator/description-escaping.test.ts +84 -0
  78. package/src/get/__tests__/generator/empty-provider-resources.test.ts +26 -0
  79. package/src/get/__tests__/generator/ephemeral-resources.test.ts +46 -0
  80. package/src/get/__tests__/generator/export-sharding.test.ts +169 -0
  81. package/src/get/__tests__/generator/fixtures/deeply-nested-collections.test.fixture.json +129 -0
  82. package/src/get/__tests__/generator/fixtures/ephemeral-resources.test.fixture.json +160 -0
  83. package/src/get/__tests__/generator/fixtures/provider-functions-collision.test.fixture.json +31 -0
  84. package/src/get/__tests__/generator/fixtures/provider-functions-synthetic.test.fixture.json +192 -0
  85. package/src/get/__tests__/generator/fixtures/provider-functions.test.fixture.json +170 -0
  86. package/src/get/__tests__/generator/fixtures/write-only.test.fixture.json +58 -0
  87. package/src/get/__tests__/generator/import-style.test.ts +129 -0
  88. package/src/get/__tests__/generator/module-generator.test.ts +528 -0
  89. package/src/get/__tests__/generator/nested-types.test.ts +54 -0
  90. package/src/get/__tests__/generator/provider-functions.test.ts +262 -0
  91. package/src/get/__tests__/generator/provider-source-matching.test.ts +84 -0
  92. package/src/get/__tests__/generator/provider.test.ts +59 -0
  93. package/src/get/__tests__/generator/resource-types.test.ts +118 -0
  94. package/src/get/__tests__/generator/skipped-attributes.test.ts +72 -0
  95. package/src/get/__tests__/generator/supported-stored-classes.test.ts +147 -0
  96. package/src/get/__tests__/generator/types.test.ts +686 -0
  97. package/src/get/__tests__/generator/versions-file.test.ts +72 -0
  98. package/src/get/__tests__/generator/write-only.test.ts +71 -0
  99. package/src/get/__tests__/target-versions.test.ts +206 -0
  100. package/src/get/__tests__/util.ts +75 -0
  101. package/src/get/constructs-maker.ts +885 -0
  102. package/src/get/generator/custom-defaults.ts +493 -0
  103. package/src/get/generator/emitter/attributes-emitter.ts +316 -0
  104. package/src/get/generator/emitter/index.ts +6 -0
  105. package/src/get/generator/emitter/provider-functions-emitter.ts +117 -0
  106. package/src/get/generator/emitter/resource-emitter.ts +330 -0
  107. package/src/get/generator/emitter/struct-emitter.ts +683 -0
  108. package/src/get/generator/loop-detection.ts +81 -0
  109. package/src/get/generator/models/attribute-model.ts +273 -0
  110. package/src/get/generator/models/attribute-type-model.ts +560 -0
  111. package/src/get/generator/models/index.ts +8 -0
  112. package/src/get/generator/models/provider-function-model.ts +872 -0
  113. package/src/get/generator/models/resource-model.ts +183 -0
  114. package/src/get/generator/models/scope.ts +54 -0
  115. package/src/get/generator/models/struct.ts +124 -0
  116. package/src/get/generator/models/supported-stored-classes.ts +88 -0
  117. package/src/get/generator/module-generator.ts +234 -0
  118. package/src/get/generator/provider-generator.ts +428 -0
  119. package/src/get/generator/resource-parser.ts +764 -0
  120. package/src/get/generator/sanitized-comments.ts +49 -0
  121. package/src/get/generator/skipped-attributes.ts +27 -0
  122. package/src/index.ts +40 -0
  123. package/src/util.ts +26 -0
  124. package/tsconfig.json +1 -2
@@ -0,0 +1,129 @@
1
+ {
2
+ "format_version": "1.0",
3
+ "provider_schemas": {
4
+ "registry.terraform.io/hashicorp/test": {
5
+ "data_source_schemas": {
6
+ "deeply_nested_collections": {
7
+ "version": 0,
8
+ "block": {
9
+ "attributes": {
10
+ "map_map_list_string": {
11
+ "type": [
12
+ "map",
13
+ [
14
+ "map",
15
+ [
16
+ "list",
17
+ "string"
18
+ ]
19
+ ]
20
+ ],
21
+ "description": "map(map(list(string))) - unsupported triple nesting, reproduces open-constructs/cdk-terrain#11.",
22
+ "description_kind": "plain",
23
+ "computed": true
24
+ },
25
+ "list_map_map_string": {
26
+ "type": [
27
+ "list",
28
+ [
29
+ "map",
30
+ [
31
+ "map",
32
+ "string"
33
+ ]
34
+ ]
35
+ ],
36
+ "description": "list(map(map(string))) - unsupported triple nesting.",
37
+ "description_kind": "plain",
38
+ "computed": true
39
+ },
40
+ "set_map_list_number": {
41
+ "type": [
42
+ "set",
43
+ [
44
+ "map",
45
+ [
46
+ "list",
47
+ "number"
48
+ ]
49
+ ]
50
+ ],
51
+ "description": "set(map(list(number))) - unsupported triple nesting.",
52
+ "description_kind": "plain",
53
+ "computed": true
54
+ },
55
+ "map_list_string": {
56
+ "type": [
57
+ "map",
58
+ [
59
+ "list",
60
+ "string"
61
+ ]
62
+ ],
63
+ "description": "map(list(string)) - supported double nesting, must still emit cdktn.StringListMap.",
64
+ "description_kind": "plain",
65
+ "computed": true
66
+ },
67
+ "map_map_number": {
68
+ "type": [
69
+ "map",
70
+ [
71
+ "map",
72
+ "number"
73
+ ]
74
+ ],
75
+ "description": "map(map(number)) - now directly supported via cdktn.NumberMapMap.",
76
+ "description_kind": "plain",
77
+ "computed": true
78
+ },
79
+ "map_map_bool": {
80
+ "type": [
81
+ "map",
82
+ [
83
+ "map",
84
+ "bool"
85
+ ]
86
+ ],
87
+ "description": "map(map(bool)) - now directly supported via cdktn.BooleanMapMap.",
88
+ "description_kind": "plain",
89
+ "computed": true
90
+ },
91
+ "map_map_string": {
92
+ "type": [
93
+ "map",
94
+ [
95
+ "map",
96
+ "string"
97
+ ]
98
+ ],
99
+ "description": "map(map(string)) - pre-existing support via cdktn.StringMapMap, unchanged.",
100
+ "description_kind": "plain",
101
+ "computed": true
102
+ },
103
+ "map_map_map_list_string": {
104
+ "type": [
105
+ "map",
106
+ [
107
+ "map",
108
+ [
109
+ "map",
110
+ [
111
+ "list",
112
+ "string"
113
+ ]
114
+ ]
115
+ ]
116
+ ],
117
+ "description": "map(map(map(list(string)))) - unsupported quadruple nesting, collapses to cdktn.AnyMapMap.",
118
+ "description_kind": "plain",
119
+ "computed": true
120
+ }
121
+ },
122
+ "description": "Data source used to verify deeply nested collection attribute types are handled without generating references to non-existent cdktn classes.",
123
+ "description_kind": "plain"
124
+ }
125
+ }
126
+ }
127
+ }
128
+ }
129
+ }
@@ -0,0 +1,160 @@
1
+ {
2
+ "provider_schemas": {
3
+ "registry.terraform.io/hashicorp/random": {
4
+ "resource_schemas": {
5
+ "random_uuid": {
6
+ "version": 0,
7
+ "block": {
8
+ "attributes": {
9
+ "id": {
10
+ "type": "string",
11
+ "description": "The generated uuid presented in string format.",
12
+ "description_kind": "plain",
13
+ "computed": true
14
+ },
15
+ "keepers": {
16
+ "type": [
17
+ "map",
18
+ "string"
19
+ ],
20
+ "description": "Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider documentation](../index.html) for more information.",
21
+ "description_kind": "plain",
22
+ "optional": true
23
+ },
24
+ "result": {
25
+ "type": "string",
26
+ "description": "The generated uuid presented in string format.",
27
+ "description_kind": "plain",
28
+ "computed": true
29
+ }
30
+ },
31
+ "description": "The resource `random_uuid` generates a random uuid string that is intended to be used as a unique identifier for other resources.\n\nThis resource uses [hashicorp/go-uuid](https://github.com/hashicorp/go-uuid) to generate a UUID-formatted string for use with services needing a unique string identifier.",
32
+ "description_kind": "plain"
33
+ }
34
+ }
35
+ },
36
+ "ephemeral_resource_schemas": {
37
+ "random_bytes": {
38
+ "version": 0,
39
+ "block": {
40
+ "attributes": {
41
+ "base64": {
42
+ "type": "string",
43
+ "description": "The generated bytes presented in base64 string format.",
44
+ "description_kind": "plain",
45
+ "computed": true,
46
+ "sensitive": true
47
+ },
48
+ "hex": {
49
+ "type": "string",
50
+ "description": "The generated bytes presented in lowercase hexadecimal string format. The length of the encoded string is exactly twice the `length` parameter.",
51
+ "description_kind": "plain",
52
+ "computed": true,
53
+ "sensitive": true
54
+ },
55
+ "length": {
56
+ "type": "number",
57
+ "description": "The number of bytes requested. The minimum value for length is 1.",
58
+ "description_kind": "plain",
59
+ "required": true
60
+ }
61
+ },
62
+ "description": "-> If the managed resource doesn't have a write-only argument available for the secret (first introduced in Terraform 1.11), then the secret can only be created with the managed resource variant of [`random_bytes`](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/bytes).\n\nGenerates ephemeral random bytes using a cryptographic random number generator.\n\nThe primary use-case for generating ephemeral random bytes is to be used in combination with a write-only argument in a managed resource, which will avoid Terraform storing the secret value in the plan or state file.",
63
+ "description_kind": "plain"
64
+ }
65
+ },
66
+ "random_password": {
67
+ "version": 0,
68
+ "block": {
69
+ "attributes": {
70
+ "bcrypt_hash": {
71
+ "type": "string",
72
+ "description": "A bcrypt hash of the generated random string. **NOTE**: If the generated random string is greater than 72 bytes in length, `bcrypt_hash` will contain a hash of the first 72 bytes.",
73
+ "description_kind": "plain",
74
+ "computed": true,
75
+ "sensitive": true
76
+ },
77
+ "length": {
78
+ "type": "number",
79
+ "description": "The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`).",
80
+ "description_kind": "plain",
81
+ "required": true
82
+ },
83
+ "lower": {
84
+ "type": "bool",
85
+ "description": "Include lowercase alphabet characters in the result. Default value is `true`.",
86
+ "description_kind": "plain",
87
+ "optional": true,
88
+ "computed": true
89
+ },
90
+ "min_lower": {
91
+ "type": "number",
92
+ "description": "Minimum number of lowercase alphabet characters in the result. Default value is `0`.",
93
+ "description_kind": "plain",
94
+ "optional": true,
95
+ "computed": true
96
+ },
97
+ "min_numeric": {
98
+ "type": "number",
99
+ "description": "Minimum number of numeric characters in the result. Default value is `0`.",
100
+ "description_kind": "plain",
101
+ "optional": true,
102
+ "computed": true
103
+ },
104
+ "min_special": {
105
+ "type": "number",
106
+ "description": "Minimum number of special characters in the result. Default value is `0`.",
107
+ "description_kind": "plain",
108
+ "optional": true,
109
+ "computed": true
110
+ },
111
+ "min_upper": {
112
+ "type": "number",
113
+ "description": "Minimum number of uppercase alphabet characters in the result. Default value is `0`.",
114
+ "description_kind": "plain",
115
+ "optional": true,
116
+ "computed": true
117
+ },
118
+ "numeric": {
119
+ "type": "bool",
120
+ "description": "Include numeric characters in the result. Default value is `true`. If `numeric`, `upper`, `lower`, and `special` are all configured, at least one of them must be set to `true`.",
121
+ "description_kind": "plain",
122
+ "optional": true,
123
+ "computed": true
124
+ },
125
+ "override_special": {
126
+ "type": "string",
127
+ "description": "Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation.",
128
+ "description_kind": "plain",
129
+ "optional": true
130
+ },
131
+ "result": {
132
+ "type": "string",
133
+ "description": "The generated random string.",
134
+ "description_kind": "plain",
135
+ "computed": true,
136
+ "sensitive": true
137
+ },
138
+ "special": {
139
+ "type": "bool",
140
+ "description": "Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`.",
141
+ "description_kind": "plain",
142
+ "optional": true,
143
+ "computed": true
144
+ },
145
+ "upper": {
146
+ "type": "bool",
147
+ "description": "Include uppercase alphabet characters in the result. Default value is `true`.",
148
+ "description_kind": "plain",
149
+ "optional": true,
150
+ "computed": true
151
+ }
152
+ },
153
+ "description": "-> If the managed resource doesn't have a write-only argument available for the password (first introduced in Terraform 1.11), then the password can only be created with the managed resource variant of [`random_password`](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password).\n\nGenerates an ephemeral password string using a cryptographic random number generator.\n\nThe primary use-case for generating an ephemeral random password is to be used in combination with a write-only argument in a managed resource, which will avoid Terraform storing the password string in the plan or state file.",
154
+ "description_kind": "plain"
155
+ }
156
+ }
157
+ }
158
+ }
159
+ }
160
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "provider_schemas": {
3
+ "registry.terraform.io/hashicorp/example": {
4
+ "provider": {
5
+ "version": 0,
6
+ "block": {
7
+ "attributes": {
8
+ "functions": {
9
+ "type": "string",
10
+ "description": "A config attribute that happens to be named the same as the generated functions getter.",
11
+ "description_kind": "plain",
12
+ "optional": true
13
+ }
14
+ }
15
+ }
16
+ },
17
+ "functions": {
18
+ "greet": {
19
+ "description": "Greets the given name.",
20
+ "return_type": "string",
21
+ "parameters": [
22
+ {
23
+ "name": "name",
24
+ "type": "string"
25
+ }
26
+ ]
27
+ }
28
+ }
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,192 @@
1
+ {
2
+ "provider_schemas": {
3
+ "registry.terraform.io/hashicorp/example": {
4
+ "resource_schemas": {},
5
+ "functions": {
6
+ "join_strings": {
7
+ "description": "Joins the given strings together using the provided separator.",
8
+ "summary": "Join strings with a separator",
9
+ "return_type": "string",
10
+ "parameters": [{ "name": "separator", "type": "string" }],
11
+ "variadic_parameter": { "name": "values", "type": "string" }
12
+ },
13
+ "sum": {
14
+ "description": "Adds up a default starting value and any number of addends.",
15
+ "summary": "Sum numbers",
16
+ "return_type": "number",
17
+ "parameters": [{ "name": "default", "type": "number" }],
18
+ "variadic_parameter": { "name": "addends", "type": "number" }
19
+ },
20
+ "list_prefixed_names": {
21
+ "description": "Returns a list of names prefixed with the given prefix.",
22
+ "summary": "List prefixed names",
23
+ "return_type": ["list", "string"],
24
+ "parameters": [{ "name": "prefix", "type": "string" }]
25
+ },
26
+ "condition_if": {
27
+ "description": "Returns true_value if condition is true, otherwise returns false_value. The dynamic return type allows either branch to be a value of any type.",
28
+ "summary": "Dynamic conditional",
29
+ "return_type": "dynamic",
30
+ "parameters": [
31
+ { "name": "condition", "type": "bool" },
32
+ { "name": "true_value", "type": "dynamic" },
33
+ { "name": "false_value", "type": "dynamic" }
34
+ ]
35
+ },
36
+ "list_numbers": {
37
+ "description": "Returns a list of numbers counting up from 1 to the given count.",
38
+ "summary": "List numbers",
39
+ "return_type": ["list", "number"],
40
+ "parameters": [{ "name": "count", "type": "number" }]
41
+ },
42
+ "flag_set": {
43
+ "description": "Returns true if any flag in the given set of flags is true.",
44
+ "summary": "Any flag set",
45
+ "return_type": "bool",
46
+ "parameters": [{ "name": "flags", "type": ["set", "bool"] }]
47
+ },
48
+ "flags_for_seed": {
49
+ "description": "Returns a set of flags derived from the given seed - used to prove a set(bool) RETURN can be fed directly into another function's set(bool) PARAMETER (see flag_set above).",
50
+ "summary": "Flags for seed",
51
+ "return_type": ["set", "bool"],
52
+ "parameters": [{ "name": "seed", "type": "string" }]
53
+ },
54
+ "flags_ordered": {
55
+ "description": "Returns true if any flag in the given ordered list of flags is true.",
56
+ "summary": "Any flag set (ordered)",
57
+ "return_type": "bool",
58
+ "parameters": [{ "name": "flags", "type": ["list", "bool"] }]
59
+ },
60
+ "describe_configs": {
61
+ "description": "Renders the given list of config objects as a single string.",
62
+ "summary": "Describe configs",
63
+ "return_type": "string",
64
+ "parameters": [
65
+ {
66
+ "name": "configs",
67
+ "type": ["list", ["object", { "enabled": "bool" }]]
68
+ }
69
+ ]
70
+ },
71
+ "nested_list": {
72
+ "description": "Flattens a matrix (a list of lists of strings) into a single string.",
73
+ "summary": "Flatten a matrix",
74
+ "return_type": "string",
75
+ "parameters": [
76
+ { "name": "matrix", "type": ["list", ["list", "string"]] }
77
+ ]
78
+ },
79
+ "dedupe_name_groups": {
80
+ "description": "Deduplicates each group of names, returning a list of name sets.",
81
+ "summary": "Dedupe name groups",
82
+ "return_type": ["list", ["set", "string"]],
83
+ "parameters": [
84
+ { "name": "name_groups", "type": ["list", ["set", "string"]] }
85
+ ]
86
+ },
87
+ "unique_name_lists": {
88
+ "description": "Returns the distinct name lists among the given ones.",
89
+ "summary": "Unique name lists",
90
+ "return_type": ["set", ["list", "string"]],
91
+ "parameters": [
92
+ { "name": "name_lists", "type": ["set", ["list", "string"]] }
93
+ ]
94
+ },
95
+ "build_info": {
96
+ "description": "Returns an object describing the build that produced the given seed.",
97
+ "summary": "Build info",
98
+ "return_type": [
99
+ "object",
100
+ { "version": "string", "revision": "string" }
101
+ ],
102
+ "parameters": [{ "name": "seed", "type": "string" }]
103
+ },
104
+ "tag_map": {
105
+ "description": "Renders the given map of string tags as a single string.",
106
+ "summary": "Render tags",
107
+ "return_type": "string",
108
+ "parameters": [{ "name": "tags", "type": ["map", "string"] }]
109
+ },
110
+ "default_tags": {
111
+ "description": "Returns a default map of string tags derived from the given prefix - used to prove a map(string) RETURN can be fed directly into another function's map(string) PARAMETER (see tag_map above).",
112
+ "summary": "Default tags",
113
+ "return_type": ["map", "string"],
114
+ "parameters": [{ "name": "prefix", "type": "string" }]
115
+ },
116
+ "count_by_tag": {
117
+ "description": "Returns a map of counts keyed by tag for the given prefix.",
118
+ "summary": "Count by tag",
119
+ "return_type": ["map", "number"],
120
+ "parameters": [{ "name": "prefix", "type": "string" }]
121
+ },
122
+ "flags_by_tag": {
123
+ "description": "Returns a map of flags keyed by tag for the given prefix.",
124
+ "summary": "Flags by tag",
125
+ "return_type": ["map", "bool"],
126
+ "parameters": [{ "name": "prefix", "type": "string" }]
127
+ },
128
+ "configs_by_tag": {
129
+ "description": "Returns a map of config objects keyed by tag for the given prefix.",
130
+ "summary": "Configs by tag",
131
+ "return_type": ["map", ["object", { "enabled": "bool" }]],
132
+ "parameters": [{ "name": "prefix", "type": "string" }]
133
+ },
134
+ "config_map": {
135
+ "description": "Renders the given map of config objects as a single string.",
136
+ "summary": "Render configs",
137
+ "return_type": "string",
138
+ "parameters": [
139
+ {
140
+ "name": "configs",
141
+ "type": ["map", ["object", { "enabled": "bool" }]]
142
+ }
143
+ ]
144
+ },
145
+ "legacy_helper": {
146
+ "description": "A deprecated helper kept around for backwards compatibility.",
147
+ "summary": "Legacy helper",
148
+ "deprecation_message": "Use new_helper instead.",
149
+ "return_type": "string",
150
+ "parameters": [{ "name": "input", "type": "string" }]
151
+ },
152
+ "trailing_nullable": {
153
+ "description": "Greets the given name, optionally with a custom greeting.",
154
+ "summary": "Greet with an optional greeting",
155
+ "return_type": "string",
156
+ "parameters": [
157
+ { "name": "name", "type": "string" },
158
+ {
159
+ "name": "greeting",
160
+ "type": "string",
161
+ "is_nullable": true
162
+ }
163
+ ]
164
+ },
165
+ "mid_nullable": {
166
+ "description": "Joins a possibly-null prefix with a required suffix.",
167
+ "summary": "Join with a nullable prefix",
168
+ "return_type": "string",
169
+ "parameters": [
170
+ {
171
+ "name": "prefix",
172
+ "type": "string",
173
+ "is_nullable": true
174
+ },
175
+ { "name": "suffix", "type": "string" }
176
+ ]
177
+ },
178
+ "variadic_nullable": {
179
+ "description": "Joins a label with any number of possibly-null items.",
180
+ "summary": "Join with nullable items",
181
+ "return_type": "string",
182
+ "parameters": [{ "name": "label", "type": "string" }],
183
+ "variadic_parameter": {
184
+ "name": "items",
185
+ "type": "string",
186
+ "is_nullable": true
187
+ }
188
+ }
189
+ }
190
+ }
191
+ }
192
+ }