MCPcopy Index your code
hub / github.com/nodejs/node / #setStatus

Method #setStatus

deps/npm/lib/commands/access.js:168–178  ·  view source on GitHub ↗
(pkg, status)

Source from the content-addressed store, hash-verified

166 }
167
168 async #setStatus (pkg, status) {
169 // only scoped packages can have their access changed
170 const pkgName = await this.#getPackage(pkg, true)
171 if (status === 'private') {
172 status = 'restricted'
173 }
174 await otplease(this.npm, this.npm.flatOptions, (opts) => {
175 return libnpmaccess.setAccess(pkgName, status, opts)
176 })
177 return this.#getStatus(pkgName)
178 }
179
180 async #getPackage (name, requireScope) {
181 if (!name) {

Callers 1

#setMethod · 0.95

Calls 3

#getPackageMethod · 0.95
#getStatusMethod · 0.95
otpleaseFunction · 0.85

Tested by

no test coverage detected