mushroom-cli
v1.2.3
Published
Mushroom CLI
Readme
Mushroom CLI
Init
Init a mushroom json file
npx mushroom-cli init json ./api/SampleProject.json [silent]Init a DotNet Core project which pre-install Mushroom Server
npx mushroom-cli init netcore [projectName]Configure
Add the mushroom json file into mushroom-config.json
npx mushroom-cli config add ./api/yourProjectName.jsonConfig gen docs api
npx mushroom-cli config gen projectName docs ./wwwroot/docs.html [alias aliasName] [features file,auth,mail,driver] [roles Admin,User-Contributor]Config gen database docs
npx mushroom-cli config gen projectName "db-docs" ./wwwroot/db-docs.html [alias aliasName] [features file,auth,mail]Config gen javascript driver
npx mushroom-cli config gen projectName "js-driver" ./src/api/mushroom.api.js [alias aliasName] [roles Admin,User-Contributor] [tarball tarballName]Config gen typescript driver
npx mushroom-cli config gen projectName "ts-driver" ./src/api/mushroom.api.ts [alias aliasName] [roles Admin,User-Contributor]Config gen entities for Mushroom project in CSharp and using MongoDb
npx mushroom-cli config gen projectName "c#-mongo" ./API/Generated.cs [alias aliasName]Config gen entities for CSharp project which calls Mushroom API
npx mushroom-cli config gen projectName "c#-driver" ./API/Generated.cs [roles Admin,User-Contributor] [alias aliasName] [access-modifier public] [features file,auth,mail]Genarate
Generate docs api (html format)
npx mushroom-cli gen projectName[@aliasName] docs [v1] [tmp]Generate database docs (html format)
npx mushroom-cli gen projectName[@aliasName] "db-docs" [tmp]Generate npm package (tarball file)
npx mushroom-cli gen projectName[@aliasName] "js-driver-tarball"Generate javascript driver
npx mushroom-cli gen projectName[@aliasName] "js-driver"Generate typescript driver
npx mushroom-cli gen projectName[@aliasName] "ts-driver"Generate entities for Mushroom project in CSharp and using MongoDb
npx mushroom-cli gen projectName[@aliasName] "c#-mongo"Generate entities for CSharp project which calls Mushroom API
npx mushroom-cli gen projectName[@aliasName] "c#-driver"Merge
npx mushroom-cli merge output-path.jsonUpdate
Update ts code (configuration was stored in mushroom-config.json file)
npx mushroom-cli update "ts-code"Update ts code (simple call)
npx mushroom-cli update "ts-code" file-path.ts remote-ts-code-urlOther
Disable checking for update:
npx mushroom-cli parameters --no-check-updateVersion
1.2.3
Improvement
- gen ts-driver: separate
importandimport typewhen import mushroomjs
1.2.2
New features:
- gen ts-driver, js-driver: adding binaryResponse to
_raw_http_method_actions
1.2.1
Improvement/Changes:
- gen docs: fix bugs
- gen c#-mongo: fix signature for RegisterCustomViewMethod method
- init netcore:
- change: show warning message when replacing content in unexisting file (instead of throwing error)
1.2.0
New features:
- Support merge command
- Support type for View result
- gen ts-driver: Support offline mode
- init netcore: Support some new set-functions:
ToLowerCase,ToUpperCase,Trim,Replace,New-RandomNumber,New-RandomString - gen docs: New gen docs engine v1.2 - deal with very big api docs
- support minify
- allow user to add and change API root url
- add
JavascriptParamModel,JavascriptRequestBodyModel,JavascriptResultModeltab in code snippets of custom methods - add docs for
inlinemode of download file and zip file(s),allowSmallerSizefor thumb - support links for Roles and Code Snippets
- add docs for response body of custom methods
- allow collapse object fields
- add validation of fields in custom methods and parameters in views
Improvement/Changes:
- init netcore
- Operating fail if unknown command or set-function found
- gen c#-mongo
- support System.Text.Json on resources
- generate resource classes with
partial
- gen c#-driver
- Generate resource classes with
partial
- Generate resource classes with
- gen ts-driver
- export type for object fields
- generate type for custom methods of action
- generate description for fields, entities
- generate type for getCountAsync declaration
- gen docs
- add default-value information of fields
- Improve documentation generation: view, custom action.
- filter role list
- format cURL to easy to copy and paste to Postman
- lighten font on MacOS
- donot use css and js files of bootstrap and jquery in CDN, copy file locally to enable to view offline
- curl of custom method is missing header X-HTTP-Method-Override
- Correct generate query string and request body at HTTP and cURL tabs in code snippets of custom methods
- Correct generate param and body at Javascript tab in code snippets of custom methods
- Correct generate JavascriptModel in code snippets
- improve copy function
- display the description of entities
Fixed bugs:
- gen docs
- Generate wrong required field for view parameter
- doesn't exclude fields of object in an array
- gen ts-driver
- add null value for nullable field type
1.1.1
Improvement:
mushroom-cli update tsCodecan read the configuration in mushroom-config.json file
1.1.0
Support MushroomServer 0.2.25.4 or later
Support mushroomjs 1.1.0 or later
