[codegen/nodejs/sdk] Minor fixes. (#4725)
- Only wrap field types in `pulumi.Input<>` in types that are part of the input SDK. - Ensure that READMEs have a trailing newline. Contributes to https://github.com/pulumi/pulumi-terraform-bridge/issues/179.
This commit is contained in:
parent
a8486520a3
commit
75c3ccf53d
|
@ -682,7 +682,8 @@ func visitObjectTypes(t schema.Type, visitor func(*schema.ObjectType), seen code
|
|||
}
|
||||
|
||||
func (mod *modContext) genType(w io.Writer, obj *schema.ObjectType, input bool, level int) {
|
||||
mod.genPlainType(w, tokenToName(obj.Token), obj.Comment, obj.Properties, input, !mod.details(obj).functionType, false, level)
|
||||
wrapInput := input && !mod.details(obj).functionType
|
||||
mod.genPlainType(w, tokenToName(obj.Token), obj.Comment, obj.Properties, input, wrapInput, false, level)
|
||||
}
|
||||
|
||||
func (mod *modContext) getTypeImports(t schema.Type, recurse bool, imports map[string]codegen.StringSet, seen codegen.Set) bool {
|
||||
|
@ -974,9 +975,9 @@ func (mod *modContext) gen(fs fs) error {
|
|||
}
|
||||
readme += mod.pkg.Attribution
|
||||
}
|
||||
if readme != "" && readme[len(readme)-1] != '\n' {
|
||||
readme += "\n"
|
||||
}
|
||||
}
|
||||
if readme != "" && readme[len(readme)-1] != '\n' {
|
||||
readme += "\n"
|
||||
}
|
||||
fs.add(path.Join(mod.mod, "README.md"), []byte(readme))
|
||||
|
||||
|
|
Loading…
Reference in a new issue