Add Script.declareVersion() and emit Versions type map in generated script contents
#1932
+141
−6