github.com/sapplications/sb@v0.0.0-20240116135441-1a13cafe3497/app.sb (about) 1 dl 2 3 apps: 4 sb 5 6 defines: 7 src github.com/sapplications/sb 8 srcLog github.com/hashicorp/go-hclog 9 pluginVersion 1 10 logDefault 0 11 logTrace 1 12 logDebug 2 13 logInfo 3 14 logWarn 4 15 logError 5 16 logOff 6 17 18 sb: 19 coder sgo 20 entry {src}/cmd.SmartBuilder 21 22 {src}/cmd.SmartBuilder: 23 Use "sb" 24 Short "Smart Builder (c)" 25 Long "Smart Builder is the next generation of building applications using independent bussiness components." 26 SilenceUsage true 27 CompletionOptions.DisableDefaultCmd true 28 . AddCommand([Creator]*github.com/spf13/cobra.Command) 29 . AddCommand([Generator]*github.com/spf13/cobra.Command) 30 . AddCommand([Coder]*github.com/spf13/cobra.Command) 31 . AddCommand([Builder]*github.com/spf13/cobra.Command) 32 . AddCommand([Cleaner]*github.com/spf13/cobra.Command) 33 . AddCommand([Runner]*github.com/spf13/cobra.Command) 34 . AddCommand([ModManager]*github.com/spf13/cobra.Command) 35 . AddCommand([AppsPrinter]*github.com/spf13/cobra.Command) 36 . AddCommand([VersionPrinter]*github.com/spf13/cobra.Command) 37 38 [ModManager]github.com/spf13/cobra.Command: 39 Use "mod" 40 Example " mod edit --name hello --dep Writer --resolver FileWriter - add/update 'Writer' dependency item to/in 'hello' item\n mod list --name hello - print 'hello' item data\n mod list --name hello --dep Writer - print 'Writer' dependency item data\n mod list --all - print all data" 41 Short "Manage modules" 42 Long "Manages application items and dependencies." 43 RunE .{src}/cmd.CmdManageMod(*{src}.SmartBuilder, *github.com/sapplications/dl.Formatter) 44 SilenceUsage true 45 . AddCommand([ModIniter]*github.com/spf13/cobra.Command) 46 . AddCommand([ModAdder]*github.com/spf13/cobra.Command) 47 . AddCommand([ModDeler]*github.com/spf13/cobra.Command) 48 49 [ModIniter]*github.com/spf13/cobra.Command: 50 Use "init" 51 Example " init go - generate a apps.sb module 52 Short "Add the apps item" 53 Long "Creates a apps.sb module and initialize it with the apps item. If the apps item is exist then do nothing." 54 RunE .{src}/cmd.CmdInitMod(*{src}.SmartBuilder) 55 56 [ModAdder]*github.com/spf13/cobra.Command: 57 Use "add" 58 Example " mod add hello - add 'hello' item\n mod add hello Writer ConsoleWriter - add 'Writer' dependency item to 'hello' item" 59 Short "Add item or dependency" 60 Long "Adds items or dependencies to the exsiting item." 61 RunE .{src}/cmd.CmdAddToMod(*{src}.SmartBuilder) 62 63 [ModDeler]*github.com/spf13/cobra.Command: 64 Use "del" 65 Example " mod del hello - delete 'hello' item with all dependencies\n mod del hello Writer - delete 'Writer' dependency item from 'hello' item" 66 Short "Delete item or dependency" 67 Long "Deletes items or dependencies from the exsiting item." 68 RunE .{src}/cmd.CmdDelFromMod(*{src}.SmartBuilder) 69 70 [Creator]github.com/spf13/cobra.Command: 71 Use "new [application]" 72 Example " create hello - create 'hello' application" 73 Short "Create new application" 74 Long "Creates an application by generating smart application unit (.sa file)." 75 RunE .{src}/cmd.CmdCreate(*{src}.SmartCreator) 76 SilenceUsage true 77 78 [Generator]github.com/spf13/cobra.Command: 79 Use "gen [application]" 80 Example " generate hello - generate 'hello' application" 81 Short "Generate smart units" 82 Long "Generates smart builder unit (.sb) using smart application unit." 83 RunE .{src}/cmd.CmdGen(*{src}.SmartGenerator) 84 SilenceUsage true 85 86 [Coder]github.com/spf13/cobra.Command: 87 Use "code [application]" 88 Example " code - generate sources to build the application\n code hello - generate sources for 'hello' application" 89 Short "Generate code" 90 Long "Generates code to build the application." 91 RunE .{src}/cmd.CmdCode(*{src}.SmartBuilder) 92 SilenceUsage true 93 94 [Builder]github.com/spf13/cobra.Command: 95 Use "build [application]" 96 Example " build - build the current application\n build hello - build 'hello' application" 97 Short "Build application" 98 Long "Builds an application using the generated items." 99 RunE .{src}/cmd.CmdBuild(*{src}.SmartBuilder) 100 SilenceUsage true 101 102 [Cleaner]github.com/spf13/cobra.Command: 103 Use "clean [application]" 104 Example " clean - remove files for the current application\n clean hello - remove files for 'hello' application" 105 Short "Remove generated files" 106 Long "Removes generated/compiled files." 107 RunE .{src}/cmd.CmdClean(*{src}.SmartBuilder) 108 SilenceUsage true 109 110 [Runner]github.com/spf13/cobra.Command: 111 Use "run [application]" 112 Example " run - run the current application\n run hello - run 'hello' application" 113 Short "Run application" 114 Long "Runs the application." 115 RunE .{src}/cmd.CmdRun(*{src}.SmartBuilder) 116 SilenceUsage true 117 118 [AppsPrinter]github.com/spf13/cobra.Command: 119 Use "list" 120 Short "Print all applications" 121 Long "Prints all available applications." 122 RunE .{src}/cmd.CmdList(*{src}.ModHelper) 123 SilenceUsage true 124 125 [VersionPrinter]github.com/spf13/cobra.Command: 126 Use "version" 127 Short "Print Smart Builder version" 128 Long "Prints the current Smart Builder version." 129 Run .{src}/cmd.CmdVersion(*{src}.SmartBuilder) 130 SilenceUsage true 131 132 {src}.SmartCreator: 133 ModManager *github.com/sapplications/dl.Manager { 134 Kind "sa" 135 } 136 Logger .{srcLog}.New([CreatorLogger]*{srcLog}.LoggerOptions) 137 138 {src}.SmartBuilder: 139 Builder *{src}/plugins.BuilderPlugin 140 ModManager *github.com/sapplications/dl.Manager { 141 Kind "sb" 142 } 143 PluginHandshake github.com/hashicorp/go-plugin.HandshakeConfig 144 Logger .{srcLog}.New([BuilderLogger]*{srcLog}.LoggerOptions) 145 146 {src}.ModHelper: 147 Manager *github.com/sapplications/dl.Manager { 148 Kind "sb" 149 } 150 151 [CreatorLogger]{srcLog}.LoggerOptions: 152 Name "sa" 153 Level {logTrace} 154 Output .{src}/cmd.OSStdout() 155 156 [BuilderLogger]{srcLog}.LoggerOptions: 157 Name "sb" 158 Level {logOff} 159 Output .{src}/cmd.OSStdout() 160 161 github.com/hashicorp/go-plugin.HandshakeConfig: 162 ProtocolVersion {pluginVersion} 163 MagicCookieKey "SMART_PLUGIN" 164 MagicCookieValue "sbuilder"