credmkt-cli
Support for market place page where in any kind of feature like report/app/noderedflow can be published. User can visit market place download the Package and install.
Installation
Prerequisites
Online Mode
Offline Mode
- Extract credmkt-cli.zip.
- Place the extracted
credmkt-cli
folder to somewhere safe on your disk.
- Run
npm link --force
inside credmkt-cli/
folder.
- Test installation by typing following command:
$ credmktcli --help
Commands
credmktcli setup
Run this command in the credence/
folder.
This command creates a new directory named custom-packages/
in the credence/
Folder.
Usage
$ credmktcli setup
Folder structure before running the command [dev environment]
credence/
├── visualizer-dashpages/
├── pages/
├── apps/
└── microservices/
Folder structure after running the command [dev environment]
credence/
├── custom-packages/
├── visualizer-dashpages/
├── apps/
├── pages/
└── microservices/
credmktcli package:init
Run this command in package repository must be a git repo.
This command helps in setting up a new package by creating a package.json
file in the specified directory. It prompts the user to enter various details about the package such as name, version, description, author and keywords and writes these details into a newly created package.json
file.
Usage
$ credmktcli package:init
Folder structure after running the command
<Package repo>/
└── package.json
credmktcli package:add
This command is used to add a new visualizer dashboard or pagebuilder page to an existing package in a Git repository.
This command checks if the current directory is a Git repository and contains a package.json file. It then prompts the user to choose whether to add a visualizer dashboard or pagebuilder page to the package. If a visualizer dashboard already exists in the package, the user is asked whether they want to overwrite it.
This command is not for reports
Usage
$ credmktcli package:add
Folder structure before running the command
<Package repo>/
└── package.json
Folder structure after running the command
└── <Package repo>/
├── visualizer-dashboard/
│ └── <Added dashboard>/
│ └── files
├── pages/
│ └── <Added pages/
│ └── files
└── package.json
credmktcli package:publish
This command is used to update the version of a package, commit and push changes to the Git repository, and create a ZIP archive of the package.
Usage
$ credmktcli package:publish
Folder structure
└── <Package repo>/
├── visualizer-dashboard/
│ └── <Added dashboard>/
│ └── files
├── pages/
│ └── <Added pages/
│ └── files
└── package.json
credmktcli package:apply
This command is used to extract and install a package from a specified ZIP file. This command handles extracting the package, optionally overwriting existing directories, and setting up the package correctly.
Usage
$ credmktcli package:apply
Folder structure before running the command [production environment]
└── credence/
├── custom-packages/
├── visualizer-dashpages/
├── apps/
├── microservices/
└── pages/
Folder structure after running the command [production environment]
credence/
├── custom-packages/
│ └── <Installed Package>/
│ ├── visualizer-dashboard/
│ │ └── <different dashboards>
| ├──pages/
| | └──<different pages>
│ └── package.json
├── visualizer-dashpages/
│ └── dash/
│ └── <different dashboards>
├── pages/
| └──<different pages>
├── apps
└── microservices
credmktcli package:update
This command applies multiple packages in version order from the updates/packages/
folder. It discovers all package ZIP files in the updates/packages/
subfolder, sorts them by semantic version, and applies them sequentially with comprehensive error handling and recovery.
Run this command in the credence/
folder.
Usage
$ credmktcli package:update
Required folder structure
credence/
└── updates/
└── packages/
├── mypackage-1.0.0.zip
├── mypackage-1.1.0.zip
├── anotherpackage-2.0.0.zip
└── anotherpackage-2.1.0.zip
Package naming convention
All package ZIP files must follow the naming pattern: <package-name>-<version>.zip
Examples of valid names:
dashboard-reports-1.0.0.zip
user-analytics-2.1.3.zip
custom-widgets-1.5.0.zip
How it works
- Discovery: Scans
updates/packages/
folder for ZIP files
- Validation: Validates package names against naming convention
- Sorting: Groups packages by name and sorts by semantic version (oldest to newest)
- Confirmation: Shows the application order and asks for user confirmation
- Sequential Application: Applies packages one by one with failure recovery
- Reporting: Provides detailed summary with success/failure counts
Error handling
- Failed packages create
.failed
files with error details
- Processing continues even if individual packages fail
- Final summary shows all results
Folder structure before running the command [production environment]
└── credence/
├── custom-packages/
├── updates/
│ └── packages/
│ ├── package-a-1.0.0.zip
│ ├── package-a-1.1.0.zip
│ └── package-b-2.0.0.zip
├── visualizer-dashpages/
├── apps/
├── microservices/
└── pages/
Folder structure after running the command [production environment]
credence/
├── custom-packages/
│ ├── package-a-1.1.0/
│ │ ├── visualizer-dashboard/
│ │ │ └── <dashboards>
│ │ ├── pages/
│ │ │ └── <pages>
│ │ └── cred_package.json
│ └── package-b-2.0.0/
│ ├── reports/
│ │ └── <reports>
│ └── cred_package.json
├── updates/
│ └── packages/
│ ├── package-a-1.0.0.zip
│ ├── package-a-1.1.0.zip
│ ├── package-b-2.0.0.zip
│ └── package-a-1.0.0.failed (if failed)
├── visualizer-dashpages/
│ └── dash/
│ └── <applied dashboards>
├── pages/
│ └── <applied pages>
├── apps
└── microservices
How to add and publish report package
Run credmktcli setup (one time only) command
Run credmktcli package:init command
First export your report using Export
button from Report Manager view.
Extract zip and copy/paste .rptdesign and .json file in you package git repository inside reports/
folder.
Package git repository structure:
.
└── <Package git repository>/
├── .git/
├── reports/
│ ├── <some report>.rptdesign
│ └── <some report>.json
└── package.json
Run credmktcli package:publish command to push changes. It will also create -.zip file
Use this zip in credmktcli package:apply command