{{$t('accessTokenPlaceholder')}}
\',p => { b64=Buffer.from(p.trim()).toString(\'base64\');console.log(b64);process.exit(); })"'
+ ]
+ },
+ {
+ subTitle: this.$t('ohpmCreditGuideSubTitle4', { 0: this.userName })
+ },
+ {
+ subTitle: this.$t('ohpmCreditGuideSubTitle5'),
+ codeList: [
+ `registry=${this.domain.ohpm}/${this.projectId}/${this.repoName}/`,
+ `publish_registry=${this.domain.ohpm}/${this.projectId}/${this.repoName}/`,
+ `//${this.domain.ohpm.split('//')[1]}/${this.projectId}/${this.repoName}/:_auth=Basic `
+ ]
+ }
+ ]
+ },
+ {
+ title: this.$t('push'),
+ optionType: 'push',
+ inputBoxList: [
+ {
+ key: 'dependInputValue1', // vux中存储的变量名
+ label: this.$t('filePath'), // 输入框左侧label文案
+ placeholder: this.$t('ohpmPushPlaceHolder'), // 输入框提示文案
+ methodFunctionName: 'SET_DEPEND_INPUT_VALUE1' // vuex中mutations中的方法名
+ }
+ ],
+ main: [
+ {
+ subTitle: this.$t('ohpmPushGuideSubTitle1'),
+ codeList: [
+ `ohpm publish ${this.dependInputValue1 || ''}`
+ ]
+ },
+ {
+ subTitle: this.$t('ohpmPushGuideSubTitle2'),
+ codeList: [`ohpm publish ${this.dependInputValue1 || ''} --publish_registry ${this.domain.ohpm}/${this.projectId}/${this.repoName}/`]
+ }
+ ]
+ },
+ {
+ title: this.$t('pull'),
+ optionType: 'pull',
+ inputBoxList: [
+ {
+ key: 'dependInputValue1', // vux中存储的变量名
+ label: this.$t('artifactName'), // 输入框左侧label文案
+ placeholder: this.$t('artifactNamePlaceholder'), // 输入框提示文案
+ methodFunctionName: 'SET_DEPEND_INPUT_VALUE1' // vuex中mutations中的方法名
+ },
+ {
+ key: 'dependInputValue2', // vux中存储的变量名
+ label: this.$t('artifactVersion'), // 输入框左侧label文案
+ placeholder: this.$t('npmVersionInputPlaceholder'), // 输入框提示文案
+ methodFunctionName: 'SET_DEPEND_INPUT_VALUE2' // vuex中mutations中的方法名
+ }
+ ],
+ main: [
+ {
+ subTitle: this.$t('npmDownloadGuideSubTitle1'),
+ codeList: [`ohpm install ${this.dependInputValue1 || this.packageName + '@' + this.versionLabel}${this.dependInputValue1 && this.dependInputValue2 ? '@' + this.dependInputValue2 : ''}`]
+ },
+ {
+ subTitle: this.$t('npmDownloadGuideSubTitle1'),
+ codeList: [`ohpm install ${this.dependInputValue1 || this.packageName + '@' + this.versionLabel}${this.dependInputValue1 && this.dependInputValue2 ? '@' + this.dependInputValue2 : ''} --registry ${this.domain.ohpm}/${this.projectId}/${this.repoName}`]
+ }
+ ]
+ }
+ ]
+ },
+ ohpmInstall () {
+ return [
+ {
+ main: [
+ {
+ subTitle: this.$t('npmDownloadGuideSubTitle1'),
+ codeList: [
+ `ohpm install ${this.packageName}@${this.versionLabel}`
+ ]
+ },
+ {
+ subTitle: this.$t('npmDownloadGuideSubTitle2'),
+ codeList: [
+ `ohpm install ${this.packageName}@${this.versionLabel} --registry ${this.domain.ohpm}/${this.projectId}/${this.repoName}/`
+ ]
+ }
+ ]
+ }
+ ]
+ },
articleGuide () {
return this[`${guideMap[this.repoType] || this.repoType}Guide`]
},
diff --git a/src/frontend/locale/repository/en-US.json b/src/frontend/locale/repository/en-US.json
index 290860f3d0..3e2ecbe829 100644
--- a/src/frontend/locale/repository/en-US.json
+++ b/src/frontend/locale/repository/en-US.json
@@ -903,5 +903,10 @@
"conanCreditGuideSubTitle2":"2、Execute the following command on the command line to configure artifact repository credentials(conan1.x)",
"conanRecipePlaceholder":"The format of RECIPE is /VERSION>@/CHANNEL>",
"conanPullGuideSubTitle":"Please execute the following command on the command line to pull(conan1.x):",
- "projectNoPermissionTip": "Request project {0} has no permission and has been switched"
+ "projectNoPermissionTip": "Request project {0} has no permission and has been switched",
+ "ohpmCreditGuideSubTitle4":"2.After copying {0}: to the command line window, press the Enter key.",
+ "ohpmCreditGuideSubTitle5":"3.Copy the encoded token and replace . Add the following configuration to the .ohpmrc file in the same directory as the oh-package.json5 file of the project. If there is no .ohpmrc file, create a new one.",
+ "ohpmPushPlaceHolder": "Please enter the full path of the har or tgz file to be released",
+ "ohpmPushGuideSubTitle1": "After setting the warehouse address, you can use the following command to push the product",
+ "ohpmPushGuideSubTitle2": "You can also push products by specifying publish_registry, as follows"
}
diff --git a/src/frontend/locale/repository/zh-CN.json b/src/frontend/locale/repository/zh-CN.json
index e24a91ed56..2803d7a4b7 100644
--- a/src/frontend/locale/repository/zh-CN.json
+++ b/src/frontend/locale/repository/zh-CN.json
@@ -906,5 +906,10 @@
"conanCreditGuideSubTitle2":"2、在命令行执行以下命令配置制品仓库凭据(conan1.x)",
"conanRecipePlaceholder":"RECIPE的格式为/VERSION>@/CHANNEL>",
"conanPullGuideSubTitle":"请在命令行执行以下命令进行拉取(conan1.x):",
- "projectNoPermissionTip": "请求项目{0}无权限,已切换"
+ "projectNoPermissionTip": "请求项目{0}无权限,已切换",
+ "ohpmCreditGuideSubTitle4":"2、复制{0}:至命令行窗口后,按下Enter键",
+ "ohpmCreditGuideSubTitle5":"3、复制编码后的token,替换,将下列配置添加到项目的 oh-package.json5 文件同一级目录下的 .ohpmrc 文件中,如没有 .ohpmrc 文件,请新建",
+ "ohpmPushPlaceHolder": "请输入待发布的har或tgz文件完整路径",
+ "ohpmPushGuideSubTitle1": "在设置仓库地址之后就可以使用如下命令去推送制品",
+ "ohpmPushGuideSubTitle2": "也可以通过指定publish_registry的方式去推送制品,如下命令"
}