Queries details of a third-party library.
This command is used to display details of a specified package and output the result in standard mode by calling a cloud query API.
You can append the --registry <registry> parameter to the ohpm info command to specify a repository address. If the repository address is not specified, the repository address is obtained from the configuration by default.
You can append the --ft <number> or --fetch_timeout <number> parameter to the ohpm info command to set the operation timeout. If the parameter is not set, the default timeout is 60000 ms.
If no parameter is appended to the ohpm info command, or the --strict_ssl or --strict_ssl true parameter is appended, HTTPS certificate verification is enabled.
In ohpm 26.0.0.630 and later versions, to disable verification, append --no-strict_ssl (recommended) or --strict_ssl false to the command.
This parameter takes effect when field is set to versions. You can configure the --pageNum <number> parameter after field. The value ranges from 1 to 10000. It indicates the target page number when versions are displayed as a paginated list, and can be used together with pageSize.
This parameter takes effect when field is set to versions. You can configure the --pageSize <number> parameter after field. The value ranges from 1 to 500. It indicates the number of versions displayed per page when versions are presented as a paginated list, and can be used together with pageNum.
In ohpm 6.0.2.636 and later versions, you can append the --debug parameter to the command to set the log level to debug for execution of the current command. This configuration takes effect only on the current command line and does not alter the log level configured in the .ohpmrc file. If this parameter is not set, the log_level setting in the .ohpmrc file is applied.
In ohpm 6.0.2.636 and later versions, you can append the --log_level <string> parameter to the ohpm info command to specify the log level (info, debug, warn, or error) for execution of the current command. If this parameter is not set, the log_level setting in the .ohpmrc file is applied.
registry, fetch_timeout, and strict_ssl configurations take effect only during the execution of the ohpm info command. They will not modify project-level or user-level configuration files.
Since ohpm 6.21.0, you can use field to view metadata attributes of third-party libraries. The attributes are as follows:
Command:
ohpm info @ohos/lottie --registry https://ohpm.openharmony.cn/ohpm
Output:
➜ ohpm info @ohos/lottie --registry https://ohpm.openharmony.cn/ohpm @ohos/lottie@2.0.10-rc.1 | MIT | deps: none | versions: 15 lottie is an animation library for OpenHarmony, designed to work with animations exported from Adobe After Effects in JSON format through the use of Bodymovin. keywords: OpenHarmony, HarmonyOS, Lottie dist .tarball: https://repo.harmonyos.com/ohpm/@ohos/lottie/-/lottie-2.0.10-rc.1.har .integrity: sha512-fjdc1qJeEax+4/wA1eHdjvtLBOFxRGeU4J2F9Q1b+yRYjmZnzL6GCA241Ku5iyzG5j2RUZi6tyBa0rpyQnjhPg== dist-tags: latest: 2.0.10-rc.1 published 15 hours ago by ohos_tpc
Command:
ohpm info @ohos/imageknife --registry https://ohpm.openharmony.cn/ohpm/ keywords
Output:
OpenHarmony, ImageKnife, glide, HarmonyOS
Command:
ohpm info @ohos/lottie --registry https://ohpm.openharmony.cn/ohpm versions --pageNum 1 --pageSize 500
Output:
current page num: 1, total pages: 88 2.0.0 2.0.1 2.0.10 2.0.10-rc.0 2.0.10-rc.1 2.0.10-rc.2 2.0.10-rc.3 2.0.10-rc.4 2.0.11 2.0.11-rc.0 2.0.11-rc.1 2.0.11-rc.2 2.0.11-rc.3 2.0.11-rc.4 2.0.11-rc.5 2.0.11-rc.6 2.0.11-rc.7 ......