Skip to content

Commit 3af1615

Browse files
committed
update types
1 parent 179a219 commit 3af1615

File tree

2 files changed

+21
-30
lines changed

2 files changed

+21
-30
lines changed

src/client/Preview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export const Preview: FC = () => {
9696
$setError(errors);
9797

9898
if (output.diags.length === 0) {
99-
$setParameters(output.output?.Parameters ?? []);
99+
$setParameters(output.output?.parameters ?? []);
100100
}
101101
}
102102
} catch (e) {

src/gen/types.ts

Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
// Code generated by 'guts'. DO NOT EDIT.
22

3-
// From terraform/block.go
4-
export interface Block {
5-
}
6-
73
// From types/diagnostics.go
84
export interface DiagnosticExtra {
95
code: string;
@@ -42,12 +38,10 @@ export interface NullHCLString {
4238
// From apitypes/apitypes.go
4339
export type OptionType = "bool" | "list(string)" | "number" | "string";
4440

45-
// From preview/preview.go
41+
// From apitypes/apitypes.go
4642
export interface Output {
47-
ModuleOutput: Value;
48-
Parameters: Parameter[];
49-
WorkspaceTags: TagBlocks;
50-
Files: Record<string, File | null> | null;
43+
parameters: ParameterWithSource[];
44+
files: Record<string, File | null> | null;
5145
}
5246

5347
// From types/parameter.go
@@ -104,6 +98,11 @@ export interface ParameterValidation {
10498
validation_monotonic: string | null;
10599
}
106100

101+
// From apitypes/apitypes.go
102+
export interface ParameterWithSource extends Parameter {
103+
type_range: Range;
104+
}
105+
107106
// From apitypes/apitypes.go
108107
export interface ParserLog {
109108
time: string;
@@ -114,33 +113,25 @@ export interface ParserLog {
114113
err: string;
115114
}
116115

116+
// From hcl/pos.go
117+
export interface Pos {
118+
Line: number;
119+
Column: number;
120+
Byte: number;
121+
}
122+
117123
// From apitypes/apitypes.go
118124
export interface PreviewOutput {
119125
output: Output | null;
120126
diags: Diagnostics;
121127
parser_logs?: ParserLog[];
122128
}
123129

124-
// From types/tags.go
125-
export interface Tag {
126-
Key: NullHCLString;
127-
Value: NullHCLString;
128-
}
129-
130-
// From types/tags.go
131-
export interface TagBlock {
132-
Tags: Tags;
133-
Block: Block | null;
134-
}
135-
136-
// From types/tags.go
137-
export type TagBlocks = TagBlock[];
138-
139-
// From types/tags.go
140-
export type Tags = Tag[];
141-
142-
// From cty/value.go
143-
export interface Value {
130+
// From hcl/pos.go
131+
export interface Range {
132+
Filename: string;
133+
Start: Pos;
134+
End: Pos;
144135
}
145136

146137

0 commit comments

Comments
 (0)