registry.html 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. <html><head>
  2. <title>registry</title>
  3. <style>
  4. body {
  5. background-color: #ffffff;
  6. color: #24292e;
  7. margin: 0;
  8. line-height: 1.5;
  9. font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  10. }
  11. #rainbar {
  12. height: 10px;
  13. background-image: linear-gradient(139deg, #fb8817, #ff4b01, #c12127, #e02aff);
  14. }
  15. a {
  16. text-decoration: none;
  17. color: #0366d6;
  18. }
  19. a:hover {
  20. text-decoration: underline;
  21. }
  22. pre {
  23. margin: 1em 0px;
  24. padding: 1em;
  25. border: solid 1px #e1e4e8;
  26. border-radius: 6px;
  27. display: block;
  28. overflow: auto;
  29. white-space: pre;
  30. background-color: #f6f8fa;
  31. color: #393a34;
  32. }
  33. code {
  34. font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;
  35. font-size: 85%;
  36. padding: 0.2em 0.4em;
  37. background-color: #f6f8fa;
  38. color: #393a34;
  39. }
  40. pre > code {
  41. padding: 0;
  42. background-color: inherit;
  43. color: inherit;
  44. }
  45. h1, h2, h3 {
  46. font-weight: 600;
  47. }
  48. #logobar {
  49. background-color: #333333;
  50. margin: 0 auto;
  51. padding: 1em 4em;
  52. }
  53. #logobar .logo {
  54. float: left;
  55. }
  56. #logobar .title {
  57. font-weight: 600;
  58. color: #dddddd;
  59. float: left;
  60. margin: 5px 0 0 1em;
  61. }
  62. #logobar:after {
  63. content: "";
  64. display: block;
  65. clear: both;
  66. }
  67. #content {
  68. margin: 0 auto;
  69. padding: 0 4em;
  70. }
  71. #table_of_contents > h2 {
  72. font-size: 1.17em;
  73. }
  74. #table_of_contents ul:first-child {
  75. border: solid 1px #e1e4e8;
  76. border-radius: 6px;
  77. padding: 1em;
  78. background-color: #f6f8fa;
  79. color: #393a34;
  80. }
  81. #table_of_contents ul {
  82. list-style-type: none;
  83. padding-left: 1.5em;
  84. }
  85. #table_of_contents li {
  86. font-size: 0.9em;
  87. }
  88. #table_of_contents li a {
  89. color: #000000;
  90. }
  91. header.title {
  92. border-bottom: solid 1px #e1e4e8;
  93. }
  94. header.title > h1 {
  95. margin-bottom: 0.25em;
  96. }
  97. header.title > .description {
  98. display: block;
  99. margin-bottom: 0.5em;
  100. line-height: 1;
  101. }
  102. footer#edit {
  103. border-top: solid 1px #e1e4e8;
  104. margin: 3em 0 4em 0;
  105. padding-top: 2em;
  106. }
  107. </style>
  108. </head>
  109. <body>
  110. <div id="banner">
  111. <div id="rainbar"></div>
  112. <div id="logobar">
  113. <svg class="logo" role="img" height="32" width="32" viewBox="0 0 700 700">
  114. <polygon fill="#cb0000" points="0,700 700,700 700,0 0,0"></polygon>
  115. <polygon fill="#ffffff" points="150,550 350,550 350,250 450,250 450,550 550,550 550,150 150,150"></polygon>
  116. </svg>
  117. <div class="title">
  118. npm command-line interface
  119. </div>
  120. </div>
  121. </div>
  122. <section id="content">
  123. <header class="title">
  124. <h1 id="registry">registry</h1>
  125. <span class="description">The JavaScript Package Registry</span>
  126. </header>
  127. <section id="table_of_contents">
  128. <h2 id="table-of-contents">Table of contents</h2>
  129. <div id="_table_of_contents"><ul><li><a href="#description">Description</a></li><li><a href="#does-npm-send-any-information-about-me-back-to-the-registry">Does npm send any information about me back to the registry?</a></li><li><a href="#how-can-i-prevent-my-package-from-being-published-in-the-official-registry">How can I prevent my package from being published in the official registry?</a></li><li><a href="#where-can-i-find-my-own--others-published-packages">Where can I find my own, &amp; other’s, published packages?</a></li><li><a href="#see-also">See also</a></li></ul></div>
  130. </section>
  131. <div id="_content"><h3 id="description">Description</h3>
  132. <p>To resolve packages by name and version, npm talks to a registry website
  133. that implements the CommonJS Package Registry specification for reading
  134. package info.</p>
  135. <p>npm is configured to use the <strong>npm public registry</strong> at
  136. <a href="https://registry.npmjs.org">https://registry.npmjs.org</a> by default. Use of the npm public registry is
  137. subject to terms of use available at <a href="https://docs.npmjs.com/policies/terms">https://docs.npmjs.com/policies/terms</a>.</p>
  138. <p>You can configure npm to use any compatible registry you like, and even run
  139. your own registry. Use of someone else’s registry may be governed by their
  140. terms of use.</p>
  141. <p>npm’s package registry implementation supports several
  142. write APIs as well, to allow for publishing packages and managing user
  143. account information.</p>
  144. <p>The npm public registry is powered by a CouchDB database,
  145. of which there is a public mirror at <a href="https://skimdb.npmjs.com/registry">https://skimdb.npmjs.com/registry</a>.</p>
  146. <p>The registry URL used is determined by the scope of the package (see
  147. <a href="../using-npm/scope.html"><code>scope</code></a>. If no scope is specified, the default registry is used, which is
  148. supplied by the <code>registry</code> config parameter. See <a href="../commands/npm-config.html"><code>npm config</code></a>,
  149. <a href="../configuring-npm/npmrc.html"><code>npmrc</code></a>, and <a href="../using-npm/config.html"><code>config</code></a> for more on managing npm’s configuration.</p>
  150. <p>When the default registry is used in a package-lock or shrinkwrap is has the
  151. special meaning of “the currently configured registry”. If you create a lock
  152. file while using the default registry you can switch to another registry and
  153. npm will install packages from the new registry, but if you create a lock
  154. file while using a custom registry packages will be installed from that
  155. registry even after you change to another registry.</p>
  156. <h3 id="does-npm-send-any-information-about-me-back-to-the-registry">Does npm send any information about me back to the registry?</h3>
  157. <p>Yes.</p>
  158. <p>When making requests of the registry npm adds two headers with information
  159. about your environment:</p>
  160. <ul>
  161. <li><code>Npm-Scope</code> – If your project is scoped, this header will contain its
  162. scope. In the future npm hopes to build registry features that use this
  163. information to allow you to customize your experience for your
  164. organization.</li>
  165. <li><code>Npm-In-CI</code> – Set to “true” if npm believes this install is running in a
  166. continuous integration environment, “false” otherwise. This is detected by
  167. looking for the following environment variables: <code>CI</code>, <code>TDDIUM</code>,
  168. <code>JENKINS_URL</code>, <code>bamboo.buildKey</code>. If you’d like to learn more you may find
  169. the <a href="https://github.com/npm/npm-registry-client/pull/129">original PR</a>
  170. interesting.
  171. This is used to gather better metrics on how npm is used by humans, versus
  172. build farms.</li>
  173. </ul>
  174. <p>The npm registry does not try to correlate the information in these headers
  175. with any authenticated accounts that may be used in the same requests.</p>
  176. <h3 id="how-can-i-prevent-my-package-from-being-published-in-the-official-registry">How can I prevent my package from being published in the official registry?</h3>
  177. <p>Set <code>"private": true</code> in your <code>package.json</code> to prevent it from being
  178. published at all, or
  179. <code>"publishConfig":{"registry":"http://my-internal-registry.local"}</code>
  180. to force it to be published only to your internal/private registry.</p>
  181. <p>See <a href="../configuring-npm/package-json.html"><code>package.json</code></a> for more info on what goes in the package.json file.</p>
  182. <h3 id="where-can-i-find-my-own--others-published-packages">Where can I find my own, &amp; other’s, published packages?</h3>
  183. <p><a href="https://www.npmjs.com/">https://www.npmjs.com/</a></p>
  184. <h3 id="see-also">See also</h3>
  185. <ul>
  186. <li><a href="../commands/npm-config.html">npm config</a></li>
  187. <li><a href="../using-npm/config.html">config</a></li>
  188. <li><a href="../configuring-npm/npmrc.html">npmrc</a></li>
  189. <li><a href="../using-npm/developers.html">npm developers</a></li>
  190. </ul>
  191. </div>
  192. <footer id="edit">
  193. <a href="https://github.com/npm/cli/edit/latest/docs/content/using-npm/registry.md">
  194. <svg role="img" viewBox="0 0 16 16" width="16" height="16" fill="currentcolor" style="vertical-align: text-bottom; margin-right: 0.3em;">
  195. <path fill-rule="evenodd" d="M11.013 1.427a1.75 1.75 0 012.474 0l1.086 1.086a1.75 1.75 0 010 2.474l-8.61 8.61c-.21.21-.47.364-.756.445l-3.251.93a.75.75 0 01-.927-.928l.929-3.25a1.75 1.75 0 01.445-.758l8.61-8.61zm1.414 1.06a.25.25 0 00-.354 0L10.811 3.75l1.439 1.44 1.263-1.263a.25.25 0 000-.354l-1.086-1.086zM11.189 6.25L9.75 4.81l-6.286 6.287a.25.25 0 00-.064.108l-.558 1.953 1.953-.558a.249.249 0 00.108-.064l6.286-6.286z"></path>
  196. </svg>
  197. Edit this page on GitHub
  198. </a>
  199. </footer>
  200. </section>
  201. </body></html>