From ac039cfcb83b03c6ce2eda5053955a150c683dc2 Mon Sep 17 00:00:00 2001 From: Peter Cools Date: Sun, 29 Jul 2018 18:30:08 +0200 Subject: [PATCH 1/4] feat: adds option to set scope in webui instructions header If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header e.g. npm set @coolsp:registry http://localhost:4873. Added as webui.scope option in .yaml. > Note: in .yaml, escape @ with \\@. See also feature request #593. --- conf/default.yaml | 1 + conf/docker.yaml | 1 + conf/full.yaml | 6 +++++- src/api/web/index.js | 3 ++- src/webui/components/Header/index.js | 7 ++++--- src/webui/template/index.html | 1 + tools/webpack.dev.config.babel.js | 1 + tools/webpack.prod.config.babel.js | 1 + website/translated_docs/ar/web.md | 4 +++- website/translated_docs/de/web.md | 4 +++- website/translated_docs/es-ES/web.md | 4 +++- website/translated_docs/fr/web.md | 4 +++- website/translated_docs/ja/web.md | 4 +++- website/translated_docs/pt-BR/web.md | 4 +++- website/translated_docs/ur-IN/web.md | 4 +++- website/translated_docs/ur-PK/web.md | 4 +++- website/translated_docs/zh-HK/web.md | 4 +++- website/translated_docs/zh-Hans/web.md | 4 +++- website/translated_docs/zh-Hant/web.md | 4 +++- website/versioned_docs/version-3.3.0/web.md | 2 ++ 20 files changed, 51 insertions(+), 16 deletions(-) diff --git a/conf/default.yaml b/conf/default.yaml index 75f639944..8e3bb14f6 100644 --- a/conf/default.yaml +++ b/conf/default.yaml @@ -13,6 +13,7 @@ plugins: ./plugins web: # WebUI is enabled as default, if you want disable it, just uncomment this line + #enable: false title: Verdaccio auth: diff --git a/conf/docker.yaml b/conf/docker.yaml index eb703725b..22f947f69 100644 --- a/conf/docker.yaml +++ b/conf/docker.yaml @@ -17,6 +17,7 @@ plugins: /verdaccio/plugins web: # WebUI is enabled as default, if you want disable it, just uncomment this line + #enable: false title: Verdaccio auth: diff --git a/conf/full.yaml b/conf/full.yaml index 42b6b36d9..a1cac48a9 100644 --- a/conf/full.yaml +++ b/conf/full.yaml @@ -9,7 +9,11 @@ web: title: Verdaccio - # logo: logo.png + #logo: logo.png + + # If you're using this registry for a specific module scope, + # specify that scope to set it in the webui instructions header (note: escape @ with \\@) + #scope: \@myscope auth: htpasswd: diff --git a/src/api/web/index.js b/src/api/web/index.js index cc37b5ca4..1124ecb56 100644 --- a/src/api/web/index.js +++ b/src/api/web/index.js @@ -43,7 +43,8 @@ module.exports = function(config, auth, storage) { const base = Utils.combineBaseUrl(Utils.getWebProtocol(req), req.get('host'), config.url_prefix); let webPage = template .replace(/ToReplaceByVerdaccio/g, base) - .replace(/ToReplaceByTitle/g, _.get(config, 'web.title') ? config.web.title : WEB_TITLE); + .replace(/ToReplaceByTitle/g, _.get(config, 'web.title') ? config.web.title : WEB_TITLE) + .replace(/ToReplaceByScope/g, _.get(config, 'web.scope') ? config.web.scope : ''); res.setHeader('Content-Type', 'text/html'); diff --git a/src/webui/components/Header/index.js b/src/webui/components/Header/index.js index 9bcdcabcd..2c45f9b5b 100644 --- a/src/webui/components/Header/index.js +++ b/src/webui/components/Header/index.js @@ -21,8 +21,9 @@ export default class Header extends React.Component { username: '', password: '', logo: '', - loginError: null - } + loginError: null, + scope: (window.VERDACCIO_SCOPE) ? `${window.VERDACCIO_SCOPE}:` : '' + }; constructor(props) { super(props); @@ -158,7 +159,7 @@ export default class Header extends React.Component {
- npm set registry { registryURL } + npm set { this.state.scope }registry { registryURL }
npm adduser --registry { registryURL }
diff --git a/src/webui/template/index.html b/src/webui/template/index.html index 0a51e0a0d..8c603a972 100644 --- a/src/webui/template/index.html +++ b/src/webui/template/index.html @@ -7,6 +7,7 @@ diff --git a/tools/webpack.dev.config.babel.js b/tools/webpack.dev.config.babel.js index a435214b2..6c59a55f9 100644 --- a/tools/webpack.dev.config.babel.js +++ b/tools/webpack.dev.config.babel.js @@ -35,6 +35,7 @@ export default { }), new HTMLWebpackPlugin({ title: 'Verdaccio', + scope: '', filename: 'index.html', verdaccioURL: '//localhost:4873', template: `${env.SRC_ROOT}/webui/template/index.html`, diff --git a/tools/webpack.prod.config.babel.js b/tools/webpack.prod.config.babel.js index ae41b5eaa..79fdb8748 100644 --- a/tools/webpack.prod.config.babel.js +++ b/tools/webpack.prod.config.babel.js @@ -45,6 +45,7 @@ const prodConf = { }), new HTMLWebpackPlugin({ title: 'ToReplaceByTitle', + scope: 'ToReplaceByScope', filename: 'index.html', favicon: `${env.SRC_ROOT}/webui/template/favicon.ico`, verdaccioURL: 'ToReplaceByVerdaccio', diff --git a/website/translated_docs/ar/web.md b/website/translated_docs/ar/web.md index a9aa6a9ec..ed49a0f0f 100644 --- a/website/translated_docs/ar/web.md +++ b/website/translated_docs/ar/web.md @@ -13,6 +13,7 @@ web: enable: true title: Verdaccio logo: logo.png + scope: ``` ### Configuration @@ -21,4 +22,5 @@ web: | -------- | ------- | -------- | ------------------------------ | ------- | ---------------------------------- | | enable | boolean | No | true/false | all | allow to display the web interface | | title | string | No | $authenticated | all | HTML head title description | -| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | \ No newline at end of file +| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | +| scope | string | No | \\@myscopy | all | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header (note: escape @ with \\@) | diff --git a/website/translated_docs/de/web.md b/website/translated_docs/de/web.md index a9aa6a9ec..ed49a0f0f 100644 --- a/website/translated_docs/de/web.md +++ b/website/translated_docs/de/web.md @@ -13,6 +13,7 @@ web: enable: true title: Verdaccio logo: logo.png + scope: ``` ### Configuration @@ -21,4 +22,5 @@ web: | -------- | ------- | -------- | ------------------------------ | ------- | ---------------------------------- | | enable | boolean | No | true/false | all | allow to display the web interface | | title | string | No | $authenticated | all | HTML head title description | -| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | \ No newline at end of file +| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | +| scope | string | No | \\@myscopy | all | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header (note: escape @ with \\@) | diff --git a/website/translated_docs/es-ES/web.md b/website/translated_docs/es-ES/web.md index f3478e224..ebe53e8ac 100644 --- a/website/translated_docs/es-ES/web.md +++ b/website/translated_docs/es-ES/web.md @@ -13,6 +13,7 @@ web: enable: true title: Verdaccio logo: logo.png + scope: ``` All access restrictions defined to [protect your packages](protect-your-dependencies.md) will also apply to the Web Interface. @@ -23,4 +24,5 @@ All access restrictions defined to [protect your packages](protect-your-dependen | --------- | ------- | --------- | ------------------------------ | ------- | ------------------------------------ | | enable | boolean | No | true/false | all | habilita la interfaz web | | title | string | No | Verdaccio | all | El título de la interfaz web | -| logo | string | No | http://my.logo.domain/logo.png | all | el URI donde el logo esta localizado | \ No newline at end of file +| logo | string | No | http://my.logo.domain/logo.png | all | el URI donde el logo esta localizado | +| scope | string | No | \\@myscopy | all | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header (note: escape @ with \\@) | diff --git a/website/translated_docs/fr/web.md b/website/translated_docs/fr/web.md index a9aa6a9ec..ed49a0f0f 100644 --- a/website/translated_docs/fr/web.md +++ b/website/translated_docs/fr/web.md @@ -13,6 +13,7 @@ web: enable: true title: Verdaccio logo: logo.png + scope: ``` ### Configuration @@ -21,4 +22,5 @@ web: | -------- | ------- | -------- | ------------------------------ | ------- | ---------------------------------- | | enable | boolean | No | true/false | all | allow to display the web interface | | title | string | No | $authenticated | all | HTML head title description | -| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | \ No newline at end of file +| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | +| scope | string | No | \\@myscopy | all | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header (note: escape @ with \\@) | diff --git a/website/translated_docs/ja/web.md b/website/translated_docs/ja/web.md index a9aa6a9ec..ed49a0f0f 100644 --- a/website/translated_docs/ja/web.md +++ b/website/translated_docs/ja/web.md @@ -13,6 +13,7 @@ web: enable: true title: Verdaccio logo: logo.png + scope: ``` ### Configuration @@ -21,4 +22,5 @@ web: | -------- | ------- | -------- | ------------------------------ | ------- | ---------------------------------- | | enable | boolean | No | true/false | all | allow to display the web interface | | title | string | No | $authenticated | all | HTML head title description | -| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | \ No newline at end of file +| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | +| scope | string | No | \\@myscopy | all | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header (note: escape @ with \\@) | diff --git a/website/translated_docs/pt-BR/web.md b/website/translated_docs/pt-BR/web.md index 445cb67b9..a3c2bb5af 100644 --- a/website/translated_docs/pt-BR/web.md +++ b/website/translated_docs/pt-BR/web.md @@ -13,6 +13,7 @@ web: enable: true title: Verdaccio logo: logo.png + scope: ``` All access restrictions defined to [protect your packages](protect-your-dependencies.md) will also apply to the Web Interface. @@ -23,4 +24,5 @@ All access restrictions defined to [protect your packages](protect-your-dependen | ------ | ------- | ----------- | ------------------------------ | ------- | --------------------------- | | enable | boolean | Não | true/false | all | habilitar a interface web | | title | string | Não | Verdaccio | all | Título da página web | -| logo | string | Não | http://my.logo.domain/logo.png | all | URI onde o logo se encontra | \ No newline at end of file +| logo | string | Não | http://my.logo.domain/logo.png | all | URI onde o logo se encontra | +| scope | string | Não | \\@myscopy | all | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header (note: escape @ with \\@) | diff --git a/website/translated_docs/ur-IN/web.md b/website/translated_docs/ur-IN/web.md index a9aa6a9ec..ed49a0f0f 100644 --- a/website/translated_docs/ur-IN/web.md +++ b/website/translated_docs/ur-IN/web.md @@ -13,6 +13,7 @@ web: enable: true title: Verdaccio logo: logo.png + scope: ``` ### Configuration @@ -21,4 +22,5 @@ web: | -------- | ------- | -------- | ------------------------------ | ------- | ---------------------------------- | | enable | boolean | No | true/false | all | allow to display the web interface | | title | string | No | $authenticated | all | HTML head title description | -| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | \ No newline at end of file +| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | +| scope | string | No | \\@myscopy | all | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header (note: escape @ with \\@) | diff --git a/website/translated_docs/ur-PK/web.md b/website/translated_docs/ur-PK/web.md index a9aa6a9ec..ed49a0f0f 100644 --- a/website/translated_docs/ur-PK/web.md +++ b/website/translated_docs/ur-PK/web.md @@ -13,6 +13,7 @@ web: enable: true title: Verdaccio logo: logo.png + scope: ``` ### Configuration @@ -21,4 +22,5 @@ web: | -------- | ------- | -------- | ------------------------------ | ------- | ---------------------------------- | | enable | boolean | No | true/false | all | allow to display the web interface | | title | string | No | $authenticated | all | HTML head title description | -| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | \ No newline at end of file +| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | +| scope | string | No | \\@myscopy | all | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header (note: escape @ with \\@) | diff --git a/website/translated_docs/zh-HK/web.md b/website/translated_docs/zh-HK/web.md index a9aa6a9ec..ed49a0f0f 100644 --- a/website/translated_docs/zh-HK/web.md +++ b/website/translated_docs/zh-HK/web.md @@ -13,6 +13,7 @@ web: enable: true title: Verdaccio logo: logo.png + scope: ``` ### Configuration @@ -21,4 +22,5 @@ web: | -------- | ------- | -------- | ------------------------------ | ------- | ---------------------------------- | | enable | boolean | No | true/false | all | allow to display the web interface | | title | string | No | $authenticated | all | HTML head title description | -| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | \ No newline at end of file +| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | +| scope | string | No | \\@myscopy | all | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header (note: escape @ with \\@) | diff --git a/website/translated_docs/zh-Hans/web.md b/website/translated_docs/zh-Hans/web.md index 50ff010d1..2c705760f 100644 --- a/website/translated_docs/zh-Hans/web.md +++ b/website/translated_docs/zh-Hans/web.md @@ -13,6 +13,7 @@ web: enable: true title: Verdaccio logo: logo.png + scope: ``` 所有访问限制定义为[保护包](protect-your-dependencies.md),它也将应用于网页界面。 @@ -23,4 +24,5 @@ web: | ------ | ------- | -- | ------------------------------ | --- | ----------- | | enable | boolean | No | true/false | all | 允许显示网页界面 | | title | string | No | Verdaccio | all | HTML 页眉标题说明 | -| logo | string | No | http://my.logo.domain/logo.png | all | logo 位于的URI | \ No newline at end of file +| logo | string | No | http://my.logo.domain/logo.png | all | logo 位于的URI | +| scope | string | No | \\@myscopy | all | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header (note: escape @ with \\@) | diff --git a/website/translated_docs/zh-Hant/web.md b/website/translated_docs/zh-Hant/web.md index a9aa6a9ec..ed49a0f0f 100644 --- a/website/translated_docs/zh-Hant/web.md +++ b/website/translated_docs/zh-Hant/web.md @@ -13,6 +13,7 @@ web: enable: true title: Verdaccio logo: logo.png + scope: ``` ### Configuration @@ -21,4 +22,5 @@ web: | -------- | ------- | -------- | ------------------------------ | ------- | ---------------------------------- | | enable | boolean | No | true/false | all | allow to display the web interface | | title | string | No | $authenticated | all | HTML head title description | -| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | \ No newline at end of file +| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | +| scope | string | No | \\@myscopy | all | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header (note: escape @ with \\@) | diff --git a/website/versioned_docs/version-3.3.0/web.md b/website/versioned_docs/version-3.3.0/web.md index 6de482fca..1ddda0097 100644 --- a/website/versioned_docs/version-3.3.0/web.md +++ b/website/versioned_docs/version-3.3.0/web.md @@ -13,6 +13,7 @@ web: enable: true title: Verdaccio logo: logo.png + scope: ``` All access restrictions defined to [protect your packages](protect-your-dependencies.md) will also apply to the Web Interface. @@ -24,3 +25,4 @@ Property | Type | Required | Example | Support | Description enable | boolean | No | true/false | all | allow to display the web interface title | string | No | Verdaccio | all | HTML head title description logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located +scope | string | No | \\@myscopy | all | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header (note: escape @ with \\@) From 7c3a617d79da07c5a01ce488d50d7a4bcf832190 Mon Sep 17 00:00:00 2001 From: Peter Cools Date: Sun, 29 Jul 2018 19:11:43 +0200 Subject: [PATCH 2/4] feat: adds option to set scope in webui instructions header If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header e.g. npm set @coolsp:registry http://localhost:4873. Added as webui.scope option in .yaml. > Note: in .yaml, escape @ with \\@. See also feature request #593. Update unit test for added scope --- test/unit/webui/components/header.spec.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/unit/webui/components/header.spec.js b/test/unit/webui/components/header.spec.js index 161ba70af..bcb22e8a1 100644 --- a/test/unit/webui/components/header.spec.js +++ b/test/unit/webui/components/header.spec.js @@ -28,6 +28,7 @@ describe('
component shallow', () => { username: '', password: '', logo: '', + scope: '', loginError: null }; const HeaderWrapper = wrapper.find(Header).dive(); @@ -137,4 +138,4 @@ describe('
snapshot test', () => { ); expect(wrapper.html()).toMatchSnapshot(); }); -}); \ No newline at end of file +}); From 507a3c7a7d9289cf234f233c0aca463624564d09 Mon Sep 17 00:00:00 2001 From: Peter Cools Date: Mon, 30 Jul 2018 21:11:36 +0200 Subject: [PATCH 3/4] feat: adds option to set scope in webui instructions header If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header e.g. npm set @coolsp:registry http://localhost:4873. Added as webui.scope option in .yaml. > Note: in .yaml, escape @ with \\@. See also feature request #593. Removed changes to website/translated_docs and website/versioned_docs And update docs/web.md and config.md --- docs/config.md | 1 + docs/web.md | 2 ++ website/translated_docs/ar/web.md | 4 +--- website/translated_docs/de/web.md | 4 +--- website/translated_docs/es-ES/web.md | 4 +--- website/translated_docs/fr/web.md | 4 +--- website/translated_docs/ja/web.md | 4 +--- website/translated_docs/pt-BR/web.md | 4 +--- website/translated_docs/ur-IN/web.md | 4 +--- website/translated_docs/ur-PK/web.md | 4 +--- website/translated_docs/zh-HK/web.md | 4 +--- website/translated_docs/zh-Hans/web.md | 4 +--- website/translated_docs/zh-Hant/web.md | 4 +--- website/versioned_docs/version-3.3.0/web.md | 2 -- 14 files changed, 14 insertions(+), 35 deletions(-) diff --git a/docs/config.md b/docs/config.md index b12f32fad..666e24559 100644 --- a/docs/config.md +++ b/docs/config.md @@ -70,6 +70,7 @@ web: enable: true title: Verdaccio logo: logo.png + scope: ``` ### Uplinks diff --git a/docs/web.md b/docs/web.md index 9334547e4..f26f0354b 100644 --- a/docs/web.md +++ b/docs/web.md @@ -12,6 +12,7 @@ web: enable: true title: Verdaccio logo: logo.png + scope: ``` All access restrictions defined to [protect your packages](protect-your-dependencies.md) will also apply to the Web Interface. @@ -23,3 +24,4 @@ Property | Type | Required | Example | Support | Description enable | boolean | No | true/false | all | allow to display the web interface title | string | No | Verdaccio | all | HTML head title description logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located +scope | string | No | \\@myscopy | all | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header (note: escape @ with \\@) diff --git a/website/translated_docs/ar/web.md b/website/translated_docs/ar/web.md index ed49a0f0f..a9aa6a9ec 100644 --- a/website/translated_docs/ar/web.md +++ b/website/translated_docs/ar/web.md @@ -13,7 +13,6 @@ web: enable: true title: Verdaccio logo: logo.png - scope: ``` ### Configuration @@ -22,5 +21,4 @@ web: | -------- | ------- | -------- | ------------------------------ | ------- | ---------------------------------- | | enable | boolean | No | true/false | all | allow to display the web interface | | title | string | No | $authenticated | all | HTML head title description | -| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | -| scope | string | No | \\@myscopy | all | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header (note: escape @ with \\@) | +| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | \ No newline at end of file diff --git a/website/translated_docs/de/web.md b/website/translated_docs/de/web.md index ed49a0f0f..a9aa6a9ec 100644 --- a/website/translated_docs/de/web.md +++ b/website/translated_docs/de/web.md @@ -13,7 +13,6 @@ web: enable: true title: Verdaccio logo: logo.png - scope: ``` ### Configuration @@ -22,5 +21,4 @@ web: | -------- | ------- | -------- | ------------------------------ | ------- | ---------------------------------- | | enable | boolean | No | true/false | all | allow to display the web interface | | title | string | No | $authenticated | all | HTML head title description | -| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | -| scope | string | No | \\@myscopy | all | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header (note: escape @ with \\@) | +| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | \ No newline at end of file diff --git a/website/translated_docs/es-ES/web.md b/website/translated_docs/es-ES/web.md index ebe53e8ac..f3478e224 100644 --- a/website/translated_docs/es-ES/web.md +++ b/website/translated_docs/es-ES/web.md @@ -13,7 +13,6 @@ web: enable: true title: Verdaccio logo: logo.png - scope: ``` All access restrictions defined to [protect your packages](protect-your-dependencies.md) will also apply to the Web Interface. @@ -24,5 +23,4 @@ All access restrictions defined to [protect your packages](protect-your-dependen | --------- | ------- | --------- | ------------------------------ | ------- | ------------------------------------ | | enable | boolean | No | true/false | all | habilita la interfaz web | | title | string | No | Verdaccio | all | El título de la interfaz web | -| logo | string | No | http://my.logo.domain/logo.png | all | el URI donde el logo esta localizado | -| scope | string | No | \\@myscopy | all | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header (note: escape @ with \\@) | +| logo | string | No | http://my.logo.domain/logo.png | all | el URI donde el logo esta localizado | \ No newline at end of file diff --git a/website/translated_docs/fr/web.md b/website/translated_docs/fr/web.md index ed49a0f0f..a9aa6a9ec 100644 --- a/website/translated_docs/fr/web.md +++ b/website/translated_docs/fr/web.md @@ -13,7 +13,6 @@ web: enable: true title: Verdaccio logo: logo.png - scope: ``` ### Configuration @@ -22,5 +21,4 @@ web: | -------- | ------- | -------- | ------------------------------ | ------- | ---------------------------------- | | enable | boolean | No | true/false | all | allow to display the web interface | | title | string | No | $authenticated | all | HTML head title description | -| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | -| scope | string | No | \\@myscopy | all | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header (note: escape @ with \\@) | +| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | \ No newline at end of file diff --git a/website/translated_docs/ja/web.md b/website/translated_docs/ja/web.md index ed49a0f0f..a9aa6a9ec 100644 --- a/website/translated_docs/ja/web.md +++ b/website/translated_docs/ja/web.md @@ -13,7 +13,6 @@ web: enable: true title: Verdaccio logo: logo.png - scope: ``` ### Configuration @@ -22,5 +21,4 @@ web: | -------- | ------- | -------- | ------------------------------ | ------- | ---------------------------------- | | enable | boolean | No | true/false | all | allow to display the web interface | | title | string | No | $authenticated | all | HTML head title description | -| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | -| scope | string | No | \\@myscopy | all | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header (note: escape @ with \\@) | +| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | \ No newline at end of file diff --git a/website/translated_docs/pt-BR/web.md b/website/translated_docs/pt-BR/web.md index a3c2bb5af..445cb67b9 100644 --- a/website/translated_docs/pt-BR/web.md +++ b/website/translated_docs/pt-BR/web.md @@ -13,7 +13,6 @@ web: enable: true title: Verdaccio logo: logo.png - scope: ``` All access restrictions defined to [protect your packages](protect-your-dependencies.md) will also apply to the Web Interface. @@ -24,5 +23,4 @@ All access restrictions defined to [protect your packages](protect-your-dependen | ------ | ------- | ----------- | ------------------------------ | ------- | --------------------------- | | enable | boolean | Não | true/false | all | habilitar a interface web | | title | string | Não | Verdaccio | all | Título da página web | -| logo | string | Não | http://my.logo.domain/logo.png | all | URI onde o logo se encontra | -| scope | string | Não | \\@myscopy | all | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header (note: escape @ with \\@) | +| logo | string | Não | http://my.logo.domain/logo.png | all | URI onde o logo se encontra | \ No newline at end of file diff --git a/website/translated_docs/ur-IN/web.md b/website/translated_docs/ur-IN/web.md index ed49a0f0f..a9aa6a9ec 100644 --- a/website/translated_docs/ur-IN/web.md +++ b/website/translated_docs/ur-IN/web.md @@ -13,7 +13,6 @@ web: enable: true title: Verdaccio logo: logo.png - scope: ``` ### Configuration @@ -22,5 +21,4 @@ web: | -------- | ------- | -------- | ------------------------------ | ------- | ---------------------------------- | | enable | boolean | No | true/false | all | allow to display the web interface | | title | string | No | $authenticated | all | HTML head title description | -| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | -| scope | string | No | \\@myscopy | all | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header (note: escape @ with \\@) | +| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | \ No newline at end of file diff --git a/website/translated_docs/ur-PK/web.md b/website/translated_docs/ur-PK/web.md index ed49a0f0f..a9aa6a9ec 100644 --- a/website/translated_docs/ur-PK/web.md +++ b/website/translated_docs/ur-PK/web.md @@ -13,7 +13,6 @@ web: enable: true title: Verdaccio logo: logo.png - scope: ``` ### Configuration @@ -22,5 +21,4 @@ web: | -------- | ------- | -------- | ------------------------------ | ------- | ---------------------------------- | | enable | boolean | No | true/false | all | allow to display the web interface | | title | string | No | $authenticated | all | HTML head title description | -| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | -| scope | string | No | \\@myscopy | all | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header (note: escape @ with \\@) | +| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | \ No newline at end of file diff --git a/website/translated_docs/zh-HK/web.md b/website/translated_docs/zh-HK/web.md index ed49a0f0f..a9aa6a9ec 100644 --- a/website/translated_docs/zh-HK/web.md +++ b/website/translated_docs/zh-HK/web.md @@ -13,7 +13,6 @@ web: enable: true title: Verdaccio logo: logo.png - scope: ``` ### Configuration @@ -22,5 +21,4 @@ web: | -------- | ------- | -------- | ------------------------------ | ------- | ---------------------------------- | | enable | boolean | No | true/false | all | allow to display the web interface | | title | string | No | $authenticated | all | HTML head title description | -| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | -| scope | string | No | \\@myscopy | all | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header (note: escape @ with \\@) | +| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | \ No newline at end of file diff --git a/website/translated_docs/zh-Hans/web.md b/website/translated_docs/zh-Hans/web.md index 2c705760f..50ff010d1 100644 --- a/website/translated_docs/zh-Hans/web.md +++ b/website/translated_docs/zh-Hans/web.md @@ -13,7 +13,6 @@ web: enable: true title: Verdaccio logo: logo.png - scope: ``` 所有访问限制定义为[保护包](protect-your-dependencies.md),它也将应用于网页界面。 @@ -24,5 +23,4 @@ web: | ------ | ------- | -- | ------------------------------ | --- | ----------- | | enable | boolean | No | true/false | all | 允许显示网页界面 | | title | string | No | Verdaccio | all | HTML 页眉标题说明 | -| logo | string | No | http://my.logo.domain/logo.png | all | logo 位于的URI | -| scope | string | No | \\@myscopy | all | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header (note: escape @ with \\@) | +| logo | string | No | http://my.logo.domain/logo.png | all | logo 位于的URI | \ No newline at end of file diff --git a/website/translated_docs/zh-Hant/web.md b/website/translated_docs/zh-Hant/web.md index ed49a0f0f..a9aa6a9ec 100644 --- a/website/translated_docs/zh-Hant/web.md +++ b/website/translated_docs/zh-Hant/web.md @@ -13,7 +13,6 @@ web: enable: true title: Verdaccio logo: logo.png - scope: ``` ### Configuration @@ -22,5 +21,4 @@ web: | -------- | ------- | -------- | ------------------------------ | ------- | ---------------------------------- | | enable | boolean | No | true/false | all | allow to display the web interface | | title | string | No | $authenticated | all | HTML head title description | -| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | -| scope | string | No | \\@myscopy | all | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header (note: escape @ with \\@) | +| logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located | \ No newline at end of file diff --git a/website/versioned_docs/version-3.3.0/web.md b/website/versioned_docs/version-3.3.0/web.md index 1ddda0097..6de482fca 100644 --- a/website/versioned_docs/version-3.3.0/web.md +++ b/website/versioned_docs/version-3.3.0/web.md @@ -13,7 +13,6 @@ web: enable: true title: Verdaccio logo: logo.png - scope: ``` All access restrictions defined to [protect your packages](protect-your-dependencies.md) will also apply to the Web Interface. @@ -25,4 +24,3 @@ Property | Type | Required | Example | Support | Description enable | boolean | No | true/false | all | allow to display the web interface title | string | No | Verdaccio | all | HTML head title description logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located -scope | string | No | \\@myscopy | all | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header (note: escape @ with \\@) From f9e9383688c3ffd5fbb6e71e2334b5a641a1e888 Mon Sep 17 00:00:00 2001 From: Peter Cools Date: Tue, 31 Jul 2018 10:58:43 +0200 Subject: [PATCH 4/4] feat: adds option to set scope in webui instructions header If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header e.g. npm set @coolsp:registry http://localhost:4873. Added as webui.scope option in .yaml. > Note: in .yaml, escape @ with \\@. See also feature request #593. Corrected typo myscopy --> myscope --- conf/full.yaml | 2 +- docs/web.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/full.yaml b/conf/full.yaml index a1cac48a9..9a2e3d3cf 100644 --- a/conf/full.yaml +++ b/conf/full.yaml @@ -12,7 +12,7 @@ web: #logo: logo.png # If you're using this registry for a specific module scope, - # specify that scope to set it in the webui instructions header (note: escape @ with \\@) + # specify that scope to set it in the webui instructions header (note: escape @ with \@) #scope: \@myscope auth: diff --git a/docs/web.md b/docs/web.md index f26f0354b..e49ea80f3 100644 --- a/docs/web.md +++ b/docs/web.md @@ -24,4 +24,4 @@ Property | Type | Required | Example | Support | Description enable | boolean | No | true/false | all | allow to display the web interface title | string | No | Verdaccio | all | HTML head title description logo | string | No | http://my.logo.domain/logo.png | all | a URI where logo is located -scope | string | No | \\@myscopy | all | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header (note: escape @ with \\@) +scope | string | No | \\@myscope | all | If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header (note: escape @ with \\@)