Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/publish.js')
-rw-r--r--lib/publish.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/publish.js b/lib/publish.js
index 1cf59f01a..eed04cf2f 100644
--- a/lib/publish.js
+++ b/lib/publish.js
@@ -3,7 +3,7 @@ module.exports = publish
var npm = require("./npm.js")
, registry = require("./utils/npm-registry-client/index.js")
- , log = require("./utils/log.js")
+ , log = require("npmlog")
, tar = require("./utils/tar.js")
, sha = require("./utils/sha.js")
, path = require("path")
@@ -29,7 +29,7 @@ function publish (args, isRetry, cb) {
if (args.length === 0) args = ["."]
if (args.length !== 1) return cb(publish.usage)
- log.verbose(args, "publish")
+ log.verbose("publish", args)
var arg = args[0]
// if it's a local folder, then run the prepublish there, first.
readJson(path.resolve(arg, "package.json"), function (er, data) {
@@ -46,7 +46,7 @@ function publish (args, isRetry, cb) {
function cacheAddPublish (arg, didPre, isRetry, cb) {
npm.commands.cache.add(arg, function (er, data) {
if (er) return cb(er)
- log.silly(data, "publish")
+ log.silly("publish", data)
var cachedir = path.resolve( npm.cache
, data.name
, data.version
@@ -66,7 +66,7 @@ function publish_ (arg, data, isRetry, cachedir, cb) {
// check for publishConfig hash
if (data.publishConfig) {
Object.keys(data.publishConfig).forEach(function (k) {
- log.info(k + "=" + data.publishConfig[k], "publishConfig")
+ log.info("publishConfig", k + "=" + data.publishConfig[k])
npm.config.set(k, data.publishConfig[k])
})
}
@@ -101,13 +101,13 @@ function preBuild (data, bd, cb) {
, tb = path.resolve(cf, "package-"+bd+".tgz")
, sourceBall = path.resolve(cf, "package.tgz")
- log.verbose("about to cache unpack")
- log.verbose(sourceBall, "the tarball")
+ log.verbose("preBuild", "about to cache unpack")
+ log.verbose("preBuild", "tarball = %s", sourceBall)
npm.commands.install(pb, sourceBall, function (er) {
- log.info(data._id, "prebuild done")
+ log.info("preBuild", "done", data._id)
// build failure just means that we can't prebuild
if (er) {
- log.warn(er.message, "prebuild failed "+bd)
+ log.warn("preBuild", "failed (continuing without prebuild)", bd, er)
return cb()
}
// now strip the preinstall/install scripts
@@ -154,7 +154,7 @@ function regPublish (data, prebuilt, isRetry, arg, cachedir, cb) {
registry.publish(data, prebuilt, readme, function (er) {
if (er && er.errno === npm.EPUBLISHCONFLICT
&& npm.config.get("force") && !isRetry) {
- log.warn("Forced publish over "+data._id, "publish")
+ log.warn("publish", "Forced publish over "+data._id)
return npm.commands.unpublish([data._id], function (er) {
// ignore errors. Use the force. Reach out with your feelings.
publish([arg], true, cb)