@@ -32,7 +32,7 @@ This creates a directory with the plugin binaries, package.json and documentatio
3232type PackageJSON struct {
3333 SchemaVersion int `json:"schema_version"`
3434 Name string `json:"name"`
35- Type plugin.Type `json:"type "`
35+ Kind plugin.Kind `json:"kind "`
3636 Message string `json:"message"`
3737 Version string `json:"version"`
3838 Protocols []int `json:"protocols"`
@@ -200,12 +200,12 @@ func (*PluginServe) getModuleName(pluginDirectory string) (string, error) {
200200 return strings .TrimSpace (importPath ), nil
201201}
202202
203- func (s * PluginServe ) writePackageJSON (dir string , pluginType plugin.Type , pluginVersion , message string , targets []TargetBuild ) error {
203+ func (s * PluginServe ) writePackageJSON (dir string , pluginKind plugin.Kind , pluginVersion , message string , targets []TargetBuild ) error {
204204 packageJSON := PackageJSON {
205205 SchemaVersion : 1 ,
206206 Name : s .plugin .Name (),
207207 Message : message ,
208- Type : pluginType ,
208+ Kind : pluginKind ,
209209 Version : pluginVersion ,
210210 Protocols : s .versions ,
211211 SupportedTargets : targets ,
@@ -273,8 +273,8 @@ func (s *PluginServe) newCmdPluginPackage() *cobra.Command {
273273 Long : pluginPackageLong ,
274274 Args : cobra .ExactArgs (3 ),
275275 RunE : func (cmd * cobra.Command , args []string ) error {
276- pluginType := plugin .Type (args [0 ])
277- if err := pluginType .Validate (); err != nil {
276+ pluginKind := plugin .Kind (args [0 ])
277+ if err := pluginKind .Validate (); err != nil {
278278 return err
279279 }
280280 pluginVersion := args [1 ]
@@ -310,7 +310,7 @@ func (s *PluginServe) newCmdPluginPackage() *cobra.Command {
310310 }); err != nil {
311311 return err
312312 }
313- if pluginType == plugin .TypeSource {
313+ if pluginKind == plugin .KindSource {
314314 if err := s .writeTablesJSON (cmd .Context (), distPath ); err != nil {
315315 return err
316316 }
@@ -324,7 +324,7 @@ func (s *PluginServe) newCmdPluginPackage() *cobra.Command {
324324 }
325325 targets = append (targets , * targetBuild )
326326 }
327- if err := s .writePackageJSON (distPath , pluginType , pluginVersion , message , targets ); err != nil {
327+ if err := s .writePackageJSON (distPath , pluginKind , pluginVersion , message , targets ); err != nil {
328328 return fmt .Errorf ("failed to write manifest: %w" , err )
329329 }
330330 if err := s .copyDocs (distPath , docsPath ); err != nil {
0 commit comments