Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 4 additions & 2 deletions cmd/mxlint/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func main() {
raw, _ := cmd.Flags().GetBool("raw")
mode, _ := cmd.Flags().GetString("mode")
verbose, _ := cmd.Flags().GetBool("verbose")
appstore, _ := cmd.Flags().GetBool("appstore")

log := logrus.New()
if verbose {
Expand All @@ -36,14 +37,15 @@ func main() {
}

mpr.SetLogger(log)
mpr.ExportModel(inputDirectory, outputDirectory, raw, mode)
mpr.ExportModel(inputDirectory, outputDirectory, raw, mode, appstore)
},
}

cmdExportModel.Flags().StringP("input", "i", ".", "Path to directory or mpr file to export. If it's a directory, all mpr files will be exported")
cmdExportModel.Flags().StringP("output", "o", "modelsource", "Path to directory to write the yaml files. If it doesn't exist, it will be created")
cmdExportModel.Flags().StringP("mode", "m", "basic", "Export mode. Valid options: basic, advanced")
cmdExportModel.Flags().Bool("raw", false, "If set, the output yaml will include all attributes as they are in the model. Otherwise, only the relevant attributes are included. You should never need this. Only useful when you are developing new functionalities for this tool.")
cmdExportModel.Flags().Bool("appstore", false, "If set, appstore modules will be included in the output")
cmdExportModel.Flags().Bool("verbose", false, "Turn on for debug logs")
rootCmd.AddCommand(cmdExportModel)

Expand Down Expand Up @@ -115,7 +117,7 @@ func main() {
log.Infof("Output directory: %s", outputDirectory)
log.Infof("Rules directory: %s", rulesDirectory)
log.Infof("Mode: %s", mode)
mpr.ExportModel(inputDirectory, outputDirectory, false, mode)
mpr.ExportModel(inputDirectory, outputDirectory, false, mode, false)
err := lint.EvalAll(rulesDirectory, outputDirectory, "", "")
if err != nil {
log.Warningf("Lint failed: %s", err)
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module github.com/cinaq/mendix-cli
go 1.22.0

require (
github.com/Varjelus/dirsync v0.0.0-20161105165804-51d44bc3b5fb
github.com/ghodss/yaml v1.0.0
github.com/glebarez/go-sqlite v1.22.0
github.com/open-policy-agent/opa v0.62.1
Expand All @@ -15,6 +16,7 @@ require (

require (
github.com/OneOfOne/xxhash v1.2.8 // indirect
github.com/Varjelus/kopsa v0.0.0-20151003065653-33789fe1970a // indirect
github.com/agnivade/levenshtein v1.1.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8=
github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q=
github.com/Varjelus/dirsync v0.0.0-20161105165804-51d44bc3b5fb h1:uDEw72N0Bu4jz4Zanq7+zMplGNd26mGYehgaAKNxdNI=
github.com/Varjelus/dirsync v0.0.0-20161105165804-51d44bc3b5fb/go.mod h1:s2r4vPgOSlp+g+SpTNclqYDxKqfaExmkBR6YxRLuoo4=
github.com/Varjelus/kopsa v0.0.0-20151003065653-33789fe1970a h1:ChPWtF2nL9L0+tgUa31T3ZguZHdPBe6Sd7NDS1E9Hbg=
github.com/Varjelus/kopsa v0.0.0-20151003065653-33789fe1970a/go.mod h1:7r++ofdTSM2ahUuJUErQNYLbfqfircMx/qDQQulZJ40=
github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8=
github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo=
github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q=
Expand Down
208 changes: 0 additions & 208 deletions modelsource/Administration/DomainModels$DomainModel.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions modelsource/Administration/Projects$ModuleSettings.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions modelsource/Administration/Security$ModuleSecurity.yaml

This file was deleted.

Loading