[codegen/nodejs/sdk] Minor fixes.
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
@@ -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,10 +975,10 @@ func (mod *modContext) gen(fs fs) error {
}
readme += mod.pkg.Attribution
}
+ }
if readme != "" && readme[len(readme)-1] != '\n' {
readme += "\n"
}
- }
fs.add(path.Join(mod.mod, "README.md"), []byte(readme))
// Utilities, config
