pxnpm 2.0.6 → 3.0.0-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{LICENSE.txt → LICENSE} +6 -6
- package/bin/cnpm-check +29 -46
- package/bin/cnpm-doc +16 -14
- package/bin/cnpm-sync +53 -60
- package/bin/cnpm-update +26 -0
- package/bin/pxnpm +7 -7
- package/lib/config.js +26 -23
- package/lib/help.js +7 -7
- package/lib/origin_npm.js +3 -3
- package/package.json +46 -32
- package/History.md +0 -432
- package/bin/cnpm +0 -27
- package/changeLog.md +0 -22
package/{LICENSE.txt → LICENSE}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (
|
|
3
|
+
Copyright (c) 2013-present pxnpm and other contributors.
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
9
9
|
copies of the Software, and to permit persons to whom the Software is
|
|
10
10
|
furnished to do so, subject to the following conditions:
|
|
11
11
|
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
14
|
|
|
15
15
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
16
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
17
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/bin/cnpm-check
CHANGED
|
@@ -2,54 +2,37 @@
|
|
|
2
2
|
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var names = Object.keys(pkg.dependencies);
|
|
18
|
-
var next = function () {
|
|
19
|
-
var name = names.shift();
|
|
20
|
-
if (!name) {
|
|
21
|
-
return process.exit(0);
|
|
22
|
-
}
|
|
23
|
-
var url = config.cnpmRegistry + '/' + name + '/latest';
|
|
24
|
-
urllib.request(url, {headers: {'user-agent': 'cnpm-check'}},
|
|
25
|
-
function (err, result) {
|
|
26
|
-
var errmsg = '';
|
|
27
|
-
if (err) {
|
|
28
|
-
errmsg = err.message;
|
|
29
|
-
} else {
|
|
30
|
-
try {
|
|
31
|
-
result = JSON.parse(result);
|
|
32
|
-
} catch (e) {
|
|
33
|
-
errmsg = 'parse origin package info error. ' + err.message;
|
|
34
|
-
result = {};
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
if (errmsg) {
|
|
38
|
-
console.log('[' + name.red + '] check version error: ' + err.message.red);
|
|
39
|
-
return next();
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
var localVersion = String(pkg.dependencies[name] || '*');
|
|
43
|
-
var localVersionCheck = localVersion.replace(/^[^\.\d]+/g, '');
|
|
44
|
-
var remoteVersion = result && result.version || 'unknow';
|
|
45
|
-
if (remoteVersion !== localVersionCheck) {
|
|
46
|
-
console.log('[' + name.yellow + '] new version: ' + remoteVersion.green + ', local version: ' + localVersion.yellow);
|
|
47
|
-
}
|
|
48
|
-
next();
|
|
5
|
+
const path = require('path');
|
|
6
|
+
const urllib = require('urllib');
|
|
7
|
+
const config = require('../lib/config');
|
|
8
|
+
|
|
9
|
+
const pkg = require(path.join(process.cwd(), 'package.json'));
|
|
10
|
+
|
|
11
|
+
async function checkOnePackage(name) {
|
|
12
|
+
const url = config.cnpmRegistry + '/' + name + '/latest';
|
|
13
|
+
try {
|
|
14
|
+
const response = await urllib.request(url, {
|
|
15
|
+
headers: { 'user-agent': 'pxnpm-check' },
|
|
16
|
+
dataType: 'json',
|
|
49
17
|
});
|
|
50
|
-
|
|
18
|
+
const result = response.data;
|
|
19
|
+
const localVersion = String(pkg.dependencies[name] || '*');
|
|
20
|
+
const localVersionCheck = localVersion.replace(/^[^\.\d]+/g, '');
|
|
21
|
+
const remoteVersion = result && result.version || 'unknow';
|
|
22
|
+
if (remoteVersion !== localVersionCheck) {
|
|
23
|
+
console.log('[' + name + '] new version: ' + remoteVersion + ', local version: ' + localVersion);
|
|
24
|
+
}
|
|
25
|
+
} catch (err) {
|
|
26
|
+
console.error(err);
|
|
27
|
+
console.log('[' + name + '] check version error: ' + err.message);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
51
30
|
|
|
52
|
-
|
|
31
|
+
async function checkUpdate() {
|
|
32
|
+
const names = Object.keys(pkg.dependencies);
|
|
33
|
+
for (const name of names) {
|
|
34
|
+
await checkOnePackage(name);
|
|
35
|
+
}
|
|
53
36
|
}
|
|
54
37
|
|
|
55
38
|
checkUpdate();
|
package/bin/cnpm-doc
CHANGED
|
@@ -2,43 +2,45 @@
|
|
|
2
2
|
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
const request = require('npm-request');
|
|
6
|
+
const giturl = require('giturl');
|
|
7
|
+
const utils = require('../lib/utils');
|
|
8
|
+
const argv = require('../lib/parse_argv')('doc');
|
|
9
|
+
const pkgName = argv.args[1];
|
|
10
|
+
const docurl = argv.registryweb + '/package/' + pkgName;
|
|
11
11
|
|
|
12
12
|
if (!pkgName) {
|
|
13
|
-
|
|
13
|
+
argv.help();
|
|
14
|
+
process.exit(0);
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
if (!argv.git) {
|
|
17
|
-
|
|
18
|
+
utils.openurl(docurl);
|
|
19
|
+
process.exit(0);
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
console.log('getting "%s" package info...', pkgName);
|
|
21
23
|
request({
|
|
22
24
|
method: 'GET',
|
|
23
|
-
path: pkgName + '/latest'
|
|
25
|
+
path: pkgName + '/latest',
|
|
24
26
|
}, {
|
|
25
|
-
registry: argv.registry
|
|
26
|
-
}, function
|
|
27
|
+
registry: argv.registry,
|
|
28
|
+
}, function(err, info) {
|
|
27
29
|
if (err) {
|
|
28
30
|
console.error(err);
|
|
29
31
|
process.exit(-1);
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
if (!info.name) {
|
|
33
|
-
console.log('"%s" package not exists',
|
|
35
|
+
console.log('"%s" package not exists', pkgName);
|
|
34
36
|
process.exit(0);
|
|
35
37
|
}
|
|
36
38
|
|
|
37
|
-
|
|
39
|
+
const repository = info.repository;
|
|
38
40
|
if (!repository || !repository.url) {
|
|
39
41
|
return utils.openurl(docurl);
|
|
40
42
|
}
|
|
41
43
|
|
|
42
|
-
|
|
44
|
+
const url = giturl.parse(repository.url) || docurl;
|
|
43
45
|
utils.openurl(url);
|
|
44
46
|
});
|
package/bin/cnpm-sync
CHANGED
|
@@ -2,38 +2,37 @@
|
|
|
2
2
|
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var argv = require('../lib/parse_argv')('sync');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
const Bagpipe = require('bagpipe');
|
|
7
|
+
const fs = require('fs');
|
|
8
|
+
const querystring = require('querystring');
|
|
9
|
+
const request = require('npm-request');
|
|
10
|
+
const argv = require('../lib/parse_argv')('sync');
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
const args = argv.args;
|
|
13
|
+
const registrys = [ argv.registry ];
|
|
14
|
+
const registrywebs = {};
|
|
16
15
|
registrywebs[argv.registry] = argv.registryweb;
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
const nodeps = !argv.deps;
|
|
18
|
+
const publish = !!argv.syncPublish;
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
const names = args.slice(1);
|
|
21
|
+
let packageName;
|
|
22
|
+
let dependencies = [];
|
|
23
|
+
let isPrivate = false;
|
|
25
24
|
|
|
26
|
-
|
|
25
|
+
const packagePath = path.join(process.cwd(), 'package.json');
|
|
27
26
|
if (!names.length && fs.existsSync(packagePath)) {
|
|
28
27
|
try {
|
|
29
28
|
console.log('Parse `package.json` file now...');
|
|
30
|
-
|
|
29
|
+
const pkg = require(packagePath);
|
|
31
30
|
packageName = pkg.name;
|
|
32
|
-
|
|
33
|
-
for (
|
|
31
|
+
const dependenciesMap = {};
|
|
32
|
+
for (const key in (pkg.dependencies || {})) {
|
|
34
33
|
dependenciesMap[key] = pkg.dependencies[key];
|
|
35
34
|
}
|
|
36
|
-
for (
|
|
35
|
+
for (const key in (pkg.devDependencies || {})) {
|
|
37
36
|
dependenciesMap[key] = pkg.devDependencies[key];
|
|
38
37
|
}
|
|
39
38
|
dependencies = Object.keys(dependenciesMap);
|
|
@@ -49,34 +48,28 @@ if (names && names.length) {
|
|
|
49
48
|
} else if (packageName) {
|
|
50
49
|
syncByPackage(packageName);
|
|
51
50
|
} else {
|
|
52
|
-
console.log(
|
|
53
|
-
Options
|
|
54
|
-
--publish sync as publish
|
|
55
|
-
--no-deps do not sync dependencies and devDependencies
|
|
51
|
+
console.log(`Usage: $ cnpm sync [moduleName1 moduleName2 ...]
|
|
52
|
+
Options:
|
|
53
|
+
--publish sync as publish
|
|
54
|
+
--no-deps do not sync dependencies and devDependencies`);
|
|
56
55
|
process.exit(1);
|
|
57
56
|
}
|
|
58
57
|
|
|
59
|
-
// var syncInfo = {};
|
|
60
|
-
// var NPM_OPTIONS = {
|
|
61
|
-
// registry: registry,
|
|
62
|
-
// configFile: argv.userconfig
|
|
63
|
-
// };
|
|
64
|
-
|
|
65
58
|
function showlog(registry, syncInfo, done) {
|
|
66
59
|
request({
|
|
67
60
|
method: 'GET',
|
|
68
|
-
path: syncInfo.logurl + '?offset=' + syncInfo.lastLines
|
|
61
|
+
path: syncInfo.logurl + '?offset=' + syncInfo.lastLines,
|
|
69
62
|
}, {
|
|
70
|
-
registry
|
|
71
|
-
configFile: argv.userconfig
|
|
72
|
-
}, function
|
|
63
|
+
registry,
|
|
64
|
+
configFile: argv.userconfig,
|
|
65
|
+
}, function(err, info) {
|
|
73
66
|
if (err) {
|
|
74
67
|
return done(err);
|
|
75
68
|
}
|
|
76
69
|
if (!info || !info.log) {
|
|
77
70
|
return setTimeout(showlog.bind(null, registry, syncInfo, done), 2000);
|
|
78
71
|
}
|
|
79
|
-
|
|
72
|
+
const log = info.log.trim();
|
|
80
73
|
console.log(log);
|
|
81
74
|
syncInfo.lastLines += log.split('\n').length;
|
|
82
75
|
if (log.indexOf('[done] Sync ' + syncInfo.name) >= 0) {
|
|
@@ -88,20 +81,20 @@ function showlog(registry, syncInfo, done) {
|
|
|
88
81
|
}
|
|
89
82
|
|
|
90
83
|
function sync(registry, name, callback) {
|
|
91
|
-
|
|
84
|
+
let url = name + '/sync?';
|
|
92
85
|
url += querystring.stringify({
|
|
93
|
-
publish
|
|
94
|
-
nodeps
|
|
86
|
+
publish,
|
|
87
|
+
nodeps,
|
|
95
88
|
});
|
|
96
89
|
console.log('sync %s, PUT %s/%s', name, registry, url);
|
|
97
90
|
request({
|
|
98
91
|
method: 'PUT',
|
|
99
92
|
path: url,
|
|
100
|
-
data: {}
|
|
93
|
+
data: {},
|
|
101
94
|
}, {
|
|
102
|
-
registry
|
|
103
|
-
configFile: argv.userconfig
|
|
104
|
-
}, function
|
|
95
|
+
registry,
|
|
96
|
+
configFile: argv.userconfig,
|
|
97
|
+
}, function(err, result, data, res) {
|
|
105
98
|
if (err) {
|
|
106
99
|
return callback(err);
|
|
107
100
|
}
|
|
@@ -112,38 +105,38 @@ function sync(registry, name, callback) {
|
|
|
112
105
|
return callback(null, {
|
|
113
106
|
ok: false,
|
|
114
107
|
statusCode: res.statusCode,
|
|
115
|
-
result
|
|
116
|
-
data
|
|
108
|
+
result,
|
|
109
|
+
data,
|
|
117
110
|
});
|
|
118
111
|
}
|
|
119
|
-
|
|
120
|
-
name
|
|
112
|
+
const syncInfo = {
|
|
113
|
+
name,
|
|
121
114
|
lastLines: 0,
|
|
122
|
-
logurl: name + '/sync/log/' + result.logId
|
|
115
|
+
logurl: name + '/sync/log/' + result.logId,
|
|
123
116
|
};
|
|
124
|
-
console.log('logurl: %s/sync/%s#logid=%
|
|
125
|
-
showlog(registry, syncInfo, function
|
|
117
|
+
console.log('logurl: %s/sync/%s#logid=%s', registrywebs[registry], name, result.logId);
|
|
118
|
+
showlog(registry, syncInfo, function(err) {
|
|
126
119
|
if (err) {
|
|
127
120
|
return callback(err);
|
|
128
121
|
}
|
|
129
|
-
callback(null, {ok: true});
|
|
122
|
+
callback(null, { ok: true });
|
|
130
123
|
});
|
|
131
124
|
});
|
|
132
125
|
}
|
|
133
126
|
|
|
134
127
|
function syncByNames(names) {
|
|
135
|
-
|
|
136
|
-
|
|
128
|
+
const queue = new Bagpipe(1);
|
|
129
|
+
let remain = names.length * registrys.length;
|
|
137
130
|
if (!names) {
|
|
138
131
|
console.log('Can not find any packages to sync.');
|
|
139
132
|
process.exit(0);
|
|
140
133
|
}
|
|
141
134
|
console.log('Start sync %j.', names);
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
registrys.forEach(function
|
|
145
|
-
names.forEach(function
|
|
146
|
-
queue.push(sync, registry, name, function
|
|
135
|
+
const fail = {};
|
|
136
|
+
const success = {};
|
|
137
|
+
registrys.forEach(function(registry) {
|
|
138
|
+
names.forEach(function(name) {
|
|
139
|
+
queue.push(sync, registry, name, function(err, data) {
|
|
147
140
|
remain--;
|
|
148
141
|
if (err) {
|
|
149
142
|
console.error(err.message);
|
|
@@ -154,7 +147,7 @@ function syncByNames(names) {
|
|
|
154
147
|
success[name] = true;
|
|
155
148
|
}
|
|
156
149
|
if (!remain) {
|
|
157
|
-
for (
|
|
150
|
+
for (const n in success) {
|
|
158
151
|
if (fail[n]) {
|
|
159
152
|
delete success[n];
|
|
160
153
|
}
|
|
@@ -178,5 +171,5 @@ function syncByPackage(packageName) {
|
|
|
178
171
|
return syncByNames(dependencies);
|
|
179
172
|
}
|
|
180
173
|
|
|
181
|
-
syncByNames([packageName]);
|
|
174
|
+
syncByNames([ packageName ]);
|
|
182
175
|
}
|
package/bin/cnpm-update
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
const debug = require('debug')('pxnpm:update');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
const { fork } = require('child_process');
|
|
8
|
+
const { rmSync } = require('fs');
|
|
9
|
+
|
|
10
|
+
const cwd = process.cwd();
|
|
11
|
+
const cnpmCli = path.join(__dirname, 'pxnpm');
|
|
12
|
+
const options = {
|
|
13
|
+
stdio: 'inherit',
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const nodeModulesDir = path.join(cwd, 'node_modules');
|
|
17
|
+
console.log('[pxnpm:update] Removing %s', nodeModulesDir);
|
|
18
|
+
rmSync(nodeModulesDir, { force: true, recursive: true });
|
|
19
|
+
|
|
20
|
+
console.log('[pxnpm:update] Running "pxnpm install" on %s', cwd);
|
|
21
|
+
fork(cnpmCli, [ 'install' ], options)
|
|
22
|
+
.on('exit', code => {
|
|
23
|
+
debug('exit %s', code);
|
|
24
|
+
process.exit(code);
|
|
25
|
+
});
|
|
26
|
+
|
package/bin/pxnpm
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
'use strict';
|
|
4
|
-
const pkg = require('../package.json');
|
|
5
4
|
|
|
6
|
-
const debug = require('debug')('
|
|
5
|
+
const debug = require('debug')('pxnpm');
|
|
7
6
|
const argv = require('../lib/parse_argv')();
|
|
8
7
|
|
|
9
8
|
const action = argv.args[0];
|
|
@@ -15,13 +14,14 @@ const extendsMethd = {
|
|
|
15
14
|
sync: 1,
|
|
16
15
|
user: 1,
|
|
17
16
|
search: 1,
|
|
17
|
+
update: 1,
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
debug('
|
|
20
|
+
debug('pxnpm %s', action);
|
|
21
21
|
|
|
22
22
|
if (extendsMethd[action]) {
|
|
23
|
-
|
|
23
|
+
require('./pxnpm-' + action);
|
|
24
|
+
} else {
|
|
25
|
+
debug('origin npm with origin registry: $ npm %s', action);
|
|
26
|
+
require('../lib/origin_npm');
|
|
24
27
|
}
|
|
25
|
-
|
|
26
|
-
debug('origin npm with origin registry: $ npm %s', action);
|
|
27
|
-
require('../lib/origin_npm');
|
package/lib/config.js
CHANGED
|
@@ -1,27 +1,34 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
2
|
|
|
3
|
-
const debug = require(
|
|
4
|
-
const path = require(
|
|
5
|
-
const fs = require(
|
|
6
|
-
const cp = require(
|
|
7
|
-
const ini = require(
|
|
3
|
+
const debug = require('debug')('pxnpm:config');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
const cp = require('child_process');
|
|
7
|
+
const ini = require('ini');
|
|
8
|
+
|
|
9
|
+
try {
|
|
10
|
+
fs.writeFileSync("/tmp/.pxnpm_install_status", "0", {
|
|
11
|
+
encoding: 'utf8',
|
|
12
|
+
});
|
|
13
|
+
} catch (e) {
|
|
14
|
+
}
|
|
8
15
|
|
|
9
16
|
let root;
|
|
10
|
-
if (process.platform ===
|
|
17
|
+
if (process.platform === 'win32') {
|
|
11
18
|
root = process.env.USERPROFILE || process.env.APPDATA || process.env.TMP || process.env.TEMP;
|
|
12
19
|
} else {
|
|
13
|
-
root = process.env.HOME || process.env.TMPDIR ||
|
|
20
|
+
root = process.env.HOME || process.env.TMPDIR || '/tmp';
|
|
14
21
|
}
|
|
15
22
|
|
|
16
|
-
// let proxyC = '';
|
|
17
23
|
let prefix = null;
|
|
18
24
|
try {
|
|
19
|
-
prefix = cp.execSync(
|
|
25
|
+
prefix = cp.execSync('npm config get prefix', {timeout: 2000}).toString().trim();
|
|
20
26
|
} catch (err) {
|
|
21
27
|
// ignore it
|
|
22
|
-
// debug(
|
|
28
|
+
// debug('npm config cli error: %s', err);
|
|
23
29
|
}
|
|
24
30
|
|
|
31
|
+
|
|
25
32
|
// =====
|
|
26
33
|
const ping = require("connection-tester");
|
|
27
34
|
const rawArgs = process.argv && process.argv.slice(2);
|
|
@@ -105,14 +112,13 @@ if (is && !os) {
|
|
|
105
112
|
let proxy = addr.proxy;
|
|
106
113
|
let registry = addr.registry;
|
|
107
114
|
|
|
108
|
-
|
|
109
|
-
const userconfig = path.join(root, ".pxnpmrc");
|
|
115
|
+
const userconfig = path.join(root, '.pxnpmrc');
|
|
110
116
|
if (fs.existsSync(userconfig)) {
|
|
111
117
|
let cnpmrc;
|
|
112
118
|
try {
|
|
113
|
-
cnpmrc = ini.parse(fs.readFileSync(userconfig,
|
|
119
|
+
cnpmrc = ini.parse(fs.readFileSync(userconfig, 'utf-8'));
|
|
114
120
|
} catch (err) {
|
|
115
|
-
console.warn(
|
|
121
|
+
console.warn('[pxnpm:config] [WARN] read %s ini format error', userconfig);
|
|
116
122
|
}
|
|
117
123
|
|
|
118
124
|
if (cnpmrc && cnpmrc.proxy) {
|
|
@@ -120,16 +126,13 @@ if (fs.existsSync(userconfig)) {
|
|
|
120
126
|
}
|
|
121
127
|
}
|
|
122
128
|
|
|
123
|
-
process.env.__pxnpm_config_proxy = proxy;
|
|
124
|
-
process.env.__pxnpm_config_pxnpmServer = pxnpmServer;
|
|
125
|
-
|
|
126
129
|
module.exports = {
|
|
127
130
|
cnpmHost: pxnpmServer,
|
|
128
131
|
cnpmRegistry: registry,
|
|
129
|
-
disturl:
|
|
130
|
-
iojsDisturl:
|
|
131
|
-
cache: path.join(root,
|
|
132
|
+
disturl: 'https://npmmirror.com/mirrors/node', // download dist tarball for node-gyp
|
|
133
|
+
iojsDisturl: 'https://npmmirror.com/mirrors/iojs',
|
|
134
|
+
cache: path.join(root, '.pxnpm'), // cache folder name
|
|
132
135
|
userconfig,
|
|
133
|
-
proxy
|
|
134
|
-
prefix
|
|
136
|
+
proxy,
|
|
137
|
+
prefix,
|
|
135
138
|
};
|
package/lib/help.js
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
const config = require('./config');
|
|
4
4
|
|
|
5
5
|
module.exports = function outputHelp(argv) {
|
|
6
|
-
const helpInfo = 'Usage:
|
|
7
|
-
'Help: http://cnpmjs.org/help/
|
|
6
|
+
const helpInfo = 'Usage: pxnpm [option] <command>\n' +
|
|
7
|
+
'Help: http://cnpmjs.org/help/pxnpm\n\n' +
|
|
8
8
|
' Extend command\n' +
|
|
9
|
-
' web open
|
|
10
|
-
' check [ingoreupdate] check project dependencies, add ignoreupdate will not check modules\' latest version(ex.:
|
|
11
|
-
' doc [moduleName] open document page (ex.:
|
|
12
|
-
' sync [moduleName] sync module from source npm (ex.:
|
|
13
|
-
' user [username] open user profile page (ex.:
|
|
9
|
+
' web open pxnpm web (ex.: pxnpm web)\n' +
|
|
10
|
+
' check [ingoreupdate] check project dependencies, add ignoreupdate will not check modules\' latest version(ex.: pxnpm check, pxnpm check -i)\n' +
|
|
11
|
+
' doc [moduleName] open document page (ex.: pxnpm doc egg)\n' +
|
|
12
|
+
' sync [moduleName] sync module from source npm (ex.: pxnpm sync egg)\n' +
|
|
13
|
+
' user [username] open user profile page (ex.: pxnpm user fengmk2)\n' +
|
|
14
14
|
'\n' +
|
|
15
15
|
' npm command use --registry=' + (argv.registry || config.cnpmRegistry) + '\n' +
|
|
16
16
|
' where <command> is one of:\n' +
|
package/lib/origin_npm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const debug = require('debug')('
|
|
3
|
+
const debug = require('debug')('pxnpm:origin');
|
|
4
4
|
const match = require('auto-correct');
|
|
5
5
|
const spawn = require('cross-spawn');
|
|
6
6
|
const cp = require('child_process');
|
|
@@ -25,7 +25,7 @@ for (let i = 0; i < rawArgs.length; i++) {
|
|
|
25
25
|
continue;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
// support `$
|
|
28
|
+
// support `$ pxnpm i --by=npm`
|
|
29
29
|
if (arg.indexOf('--by=') === 0) {
|
|
30
30
|
installer = arg.split('=', 2)[1];
|
|
31
31
|
continue;
|
|
@@ -65,7 +65,7 @@ const stdio = [
|
|
|
65
65
|
if (isInstall) {
|
|
66
66
|
npmBin = path.join(__dirname, '..', 'node_modules', '.bin', installer);
|
|
67
67
|
if (installer === 'pxnpminstall') {
|
|
68
|
-
// use fork to spawn can fix install
|
|
68
|
+
// use fork to spawn can fix install pxnpm itself fail on Windows
|
|
69
69
|
execMethod = cp.fork;
|
|
70
70
|
stdio.push('ipc');
|
|
71
71
|
npmBin = require.resolve('pxnpminstall/bin/install.js');
|
package/package.json
CHANGED
|
@@ -1,61 +1,75 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pxnpm",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "3.0.0-0",
|
|
4
|
+
"description": "cnpm: npm client for cnpmjs.org",
|
|
5
|
+
"preferGlobal": true,
|
|
6
|
+
"bin": {
|
|
7
|
+
"pxnpm": "bin/pxnpm"
|
|
8
|
+
},
|
|
5
9
|
"main": "bin/pxnpm",
|
|
6
10
|
"files": [
|
|
7
11
|
"bin",
|
|
8
12
|
"lib"
|
|
9
13
|
],
|
|
10
14
|
"scripts": {
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"test": "npm run lint -- --fix && npm run test-local",
|
|
15
|
+
"contributor": "git-contributor",
|
|
16
|
+
"test": "npm run lint && npm run test-local",
|
|
14
17
|
"test-local": "egg-bin test",
|
|
15
|
-
"lint": "eslint bin lib test/*.js",
|
|
16
|
-
"ci": "npm run lint &&
|
|
17
|
-
"autod": "autod"
|
|
18
|
-
},
|
|
19
|
-
"preferGlobal": true,
|
|
20
|
-
"bin": {
|
|
21
|
-
"pxnpm": "bin/pxnpm"
|
|
18
|
+
"lint": "eslint bin/* lib test/*.test.js",
|
|
19
|
+
"ci": "npm run lint && egg-bin test"
|
|
22
20
|
},
|
|
23
21
|
"dependencies": {
|
|
24
22
|
"auto-correct": "^1.0.0",
|
|
25
23
|
"bagpipe": "^0.3.5",
|
|
26
|
-
"colors": "^1.1.2",
|
|
27
24
|
"commander": "~2.10.0",
|
|
28
|
-
"config-chain": "^1.1.13",
|
|
29
25
|
"connection-tester": "^0.2.1",
|
|
30
26
|
"cross-spawn": "~0.2.8",
|
|
31
|
-
"debug": "^
|
|
27
|
+
"debug": "^4.3.4",
|
|
32
28
|
"giturl": "^1.0.0",
|
|
33
29
|
"ini": "^1.3.4",
|
|
34
|
-
"npm": "^
|
|
30
|
+
"npm": "^8.12.1",
|
|
35
31
|
"npm-request": "^1.0.0",
|
|
32
|
+
"pxnpminstall": "3.0.0-0",
|
|
36
33
|
"open": "^8.2.1",
|
|
37
|
-
"
|
|
38
|
-
"urllib": "^2.17.0"
|
|
34
|
+
"urllib": "^3.1.0"
|
|
39
35
|
},
|
|
40
36
|
"devDependencies": {
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"egg-
|
|
44
|
-
"
|
|
45
|
-
"eslint": "
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
37
|
+
"coffee": "5",
|
|
38
|
+
"egg-bin": "5",
|
|
39
|
+
"egg-ci": "2",
|
|
40
|
+
"eslint": "8",
|
|
41
|
+
"eslint-config-egg": "12",
|
|
42
|
+
"git-contributor": "1"
|
|
43
|
+
},
|
|
44
|
+
"homepage": "https://github.com/cnpm/cnpm",
|
|
45
|
+
"repository": {
|
|
46
|
+
"type": "git",
|
|
47
|
+
"url": "git://github.com/cnpm/cnpm.git"
|
|
48
|
+
},
|
|
49
|
+
"bugs": {
|
|
50
|
+
"url": "https://github.com/cnpm/cnpm/issues"
|
|
51
|
+
},
|
|
52
|
+
"keywords": [
|
|
53
|
+
"cnpm",
|
|
54
|
+
"npm",
|
|
55
|
+
"npminstall"
|
|
56
|
+
],
|
|
57
|
+
"publishConfig": {
|
|
58
|
+
"tag": "latest"
|
|
49
59
|
},
|
|
50
60
|
"engines": {
|
|
51
|
-
"node": ">=
|
|
61
|
+
"node": ">= 14.0.0"
|
|
52
62
|
},
|
|
53
63
|
"ci": {
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
"
|
|
64
|
+
"version": "14, 16, 18",
|
|
65
|
+
"license": {
|
|
66
|
+
"year": "2013",
|
|
67
|
+
"fullname": "cnpm and other contributors."
|
|
58
68
|
}
|
|
59
69
|
},
|
|
60
|
-
"
|
|
70
|
+
"author": "fengmk2 <fengmk2@gmail.com> (https://github.com/fengmk2)",
|
|
71
|
+
"license": "MIT",
|
|
72
|
+
"__npminstall_done": true,
|
|
73
|
+
"_from": "cnpm@8.3.0",
|
|
74
|
+
"_resolved": "http://fe-repo.inner.px.nfjbill.ren:5507/cnpm/-/cnpm-8.3.0.tgz"
|
|
61
75
|
}
|
package/History.md
DELETED
|
@@ -1,432 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
6.0.0 / 2018-05-28
|
|
3
|
-
==================
|
|
4
|
-
|
|
5
|
-
**features**
|
|
6
|
-
* [[`718b5d9`](http://github.com/cnpm/cnpm/commit/718b5d956505982c41e6089feae43b3253d271c4)] - feat: [BREAKING] use npm 6.1.0 (#254) (fengmk2 <<fengmk2@gmail.com>>)
|
|
7
|
-
|
|
8
|
-
5.3.0 / 2018-05-04
|
|
9
|
-
==================
|
|
10
|
-
|
|
11
|
-
**features**
|
|
12
|
-
* [[`e63a5f9`](http://github.com/cnpm/cnpm/commit/e63a5f9eb810427acce820d2fc4b7a2c802b02b6)] - feat: support auto fix bug-versions (#252) (fengmk2 <<fengmk2@gmail.com>>)
|
|
13
|
-
|
|
14
|
-
5.2.0 / 2018-01-24
|
|
15
|
-
==================
|
|
16
|
-
|
|
17
|
-
**features**
|
|
18
|
-
* [[`ceec3e7`](http://github.com/cnpm/cnpm/commit/ceec3e79a4004c1aaa256ba3b412040188ab6f16)] - feat: add --ignore-custom-config to ignore npmrc and cnpmrc (#241) (fengmk2 <<fengmk2@gmail.com>>)
|
|
19
|
-
|
|
20
|
-
5.1.1 / 2017-08-07
|
|
21
|
-
==================
|
|
22
|
-
|
|
23
|
-
**fixes**
|
|
24
|
-
* [[`289be77`](http://github.com/cnpm/cnpm/commit/289be774159575a6a28ac7983ee730fca0ab02ff)] - fix: downgrade commander to 2.10.0 (#211) (fengmk2 <<fengmk2@gmail.com>>)
|
|
25
|
-
|
|
26
|
-
5.1.0 / 2017-08-02
|
|
27
|
-
==================
|
|
28
|
-
|
|
29
|
-
* feat: support set proxy on cnpmrc file (#208)
|
|
30
|
-
|
|
31
|
-
5.0.0 / 2017-06-13
|
|
32
|
-
==================
|
|
33
|
-
|
|
34
|
-
* test: node 8
|
|
35
|
-
* fix: taobao npm registry use http protocol to support gzip
|
|
36
|
-
* feat: [BREAKING_CHANGE] use npminstall@3
|
|
37
|
-
|
|
38
|
-
4.5.0 / 2017-02-03
|
|
39
|
-
==================
|
|
40
|
-
|
|
41
|
-
* test: ignore node 4 on windows test
|
|
42
|
-
* fix: dont auto create userconfig file
|
|
43
|
-
* feat: should show full versions
|
|
44
|
-
|
|
45
|
-
4.4.2 / 2016-11-21
|
|
46
|
-
==================
|
|
47
|
-
|
|
48
|
-
* fix: use fork instead of spawn on npminstall mode (#164)
|
|
49
|
-
|
|
50
|
-
4.4.1 / 2016-11-19
|
|
51
|
-
==================
|
|
52
|
-
|
|
53
|
-
* test: fix invaild regex on windows
|
|
54
|
-
* test: add node v7
|
|
55
|
-
* fix: cnpm can install itself now
|
|
56
|
-
|
|
57
|
-
4.4.0 / 2016-10-15
|
|
58
|
-
==================
|
|
59
|
-
|
|
60
|
-
* feat: support custom installer (#148)
|
|
61
|
-
|
|
62
|
-
4.3.2 / 2016-08-24
|
|
63
|
-
==================
|
|
64
|
-
|
|
65
|
-
* deps: npminstall@2.1.0
|
|
66
|
-
|
|
67
|
-
4.3.1 / 2016-08-03
|
|
68
|
-
==================
|
|
69
|
-
|
|
70
|
-
* chore: use npminstall@2 (#135)
|
|
71
|
-
|
|
72
|
-
4.3.0 / 2016-07-29
|
|
73
|
-
==================
|
|
74
|
-
|
|
75
|
-
* feat: use npminstall@beta (#131)
|
|
76
|
-
* chore: add NodeJS version requirements (#116)
|
|
77
|
-
|
|
78
|
-
4.2.0 / 2016-03-12
|
|
79
|
-
==================
|
|
80
|
-
|
|
81
|
-
* refactor: remove node-gyp
|
|
82
|
-
* refactor: use npminstall
|
|
83
|
-
|
|
84
|
-
4.1.0 / 2015-11-02
|
|
85
|
-
==================
|
|
86
|
-
|
|
87
|
-
* test: add node v5
|
|
88
|
-
* feat: install node-sass from China mirror
|
|
89
|
-
|
|
90
|
-
4.0.0 / 2015-10-06
|
|
91
|
-
==================
|
|
92
|
-
|
|
93
|
-
* deps: use npm@3
|
|
94
|
-
|
|
95
|
-
3.4.1 / 2016-02-20
|
|
96
|
-
==================
|
|
97
|
-
|
|
98
|
-
* doc: remove disturl
|
|
99
|
-
* fix when info.log not exists
|
|
100
|
-
|
|
101
|
-
3.4.0 / 2015-11-12
|
|
102
|
-
==================
|
|
103
|
-
|
|
104
|
-
* feat: add --proxy support
|
|
105
|
-
|
|
106
|
-
3.3.1 / 2015-11-09
|
|
107
|
-
==================
|
|
108
|
-
|
|
109
|
-
* update `giturl` to 1.0.0
|
|
110
|
-
|
|
111
|
-
3.3.0 / 2015-11-02
|
|
112
|
-
==================
|
|
113
|
-
|
|
114
|
-
* test: add node v5
|
|
115
|
-
* feat: install node-sass from China mirror
|
|
116
|
-
|
|
117
|
-
3.2.3 / 2015-10-05
|
|
118
|
-
==================
|
|
119
|
-
|
|
120
|
-
* fix: ignore --disturl and --userconfig=none
|
|
121
|
-
* test: appveyor test node v4
|
|
122
|
-
* fix: install chromedriver from oss directly
|
|
123
|
-
|
|
124
|
-
3.2.2 / 2015-09-11
|
|
125
|
-
==================
|
|
126
|
-
|
|
127
|
-
* fix: use node-gyp@3 to support node 4.x+
|
|
128
|
-
|
|
129
|
-
3.2.1 / 2015-09-07
|
|
130
|
-
==================
|
|
131
|
-
|
|
132
|
-
* deps npm@2.14.2
|
|
133
|
-
|
|
134
|
-
3.2.0 / 2015-09-06
|
|
135
|
-
==================
|
|
136
|
-
|
|
137
|
-
* deps: upgrade npm to 2.14.3
|
|
138
|
-
|
|
139
|
-
3.1.0 / 2015-07-18
|
|
140
|
-
==================
|
|
141
|
-
|
|
142
|
-
* bump npm
|
|
143
|
-
|
|
144
|
-
3.0.2 / 2015-05-11
|
|
145
|
-
==================
|
|
146
|
-
|
|
147
|
-
* Add ELECTRON_MIRROR
|
|
148
|
-
|
|
149
|
-
3.0.1 / 2015-04-05
|
|
150
|
-
==================
|
|
151
|
-
|
|
152
|
-
* Resolve npm command to local npm bin, not global. (@qiu8310)
|
|
153
|
-
|
|
154
|
-
3.0.0 / 2015-03-09
|
|
155
|
-
==================
|
|
156
|
-
|
|
157
|
-
* use pangyp instead of node-gyp
|
|
158
|
-
|
|
159
|
-
2.0.1 / 2015-02-17
|
|
160
|
-
==================
|
|
161
|
-
|
|
162
|
-
* use execPath
|
|
163
|
-
|
|
164
|
-
2.0.0 / 2015-02-16
|
|
165
|
-
==================
|
|
166
|
-
|
|
167
|
-
* support iojs and cpp build
|
|
168
|
-
* feat(mirrors): add node, iojs, chromedriver, selenium mirrors
|
|
169
|
-
|
|
170
|
-
1.2.0 / 2014-10-05
|
|
171
|
-
==================
|
|
172
|
-
|
|
173
|
-
* bump npm@2.1
|
|
174
|
-
|
|
175
|
-
1.1.0 / 2014-09-24
|
|
176
|
-
==================
|
|
177
|
-
|
|
178
|
-
* bump npm to 2
|
|
179
|
-
* no need to sync twice
|
|
180
|
-
|
|
181
|
-
1.0.0 / 2014-09-01
|
|
182
|
-
==================
|
|
183
|
-
|
|
184
|
-
* update readme
|
|
185
|
-
* bump npm
|
|
186
|
-
|
|
187
|
-
0.5.2 / 2014-07-28
|
|
188
|
-
==================
|
|
189
|
-
|
|
190
|
-
* sync dependencies if package.private = true, close #38
|
|
191
|
-
|
|
192
|
-
0.5.1 / 2014-07-28
|
|
193
|
-
==================
|
|
194
|
-
|
|
195
|
-
* fix sync display
|
|
196
|
-
|
|
197
|
-
0.5.0 / 2014-07-28
|
|
198
|
-
==================
|
|
199
|
-
|
|
200
|
-
* bump npm to ~2.0.0-alpha-5
|
|
201
|
-
|
|
202
|
-
0.4.0 / 2014-07-21
|
|
203
|
-
==================
|
|
204
|
-
|
|
205
|
-
* use npm@1.5.x support scoped packages
|
|
206
|
-
* tell users in China install from taobao npm
|
|
207
|
-
|
|
208
|
-
0.3.0 / 2014-07-05
|
|
209
|
-
==================
|
|
210
|
-
|
|
211
|
-
* fix #34 use userconfig registry by default
|
|
212
|
-
* use cross-spawn
|
|
213
|
-
|
|
214
|
-
0.2.2 / 2014-07-02
|
|
215
|
-
==================
|
|
216
|
-
|
|
217
|
-
* fix #31 space char on windows path.
|
|
218
|
-
|
|
219
|
-
0.2.1 / 2014-07-02
|
|
220
|
-
==================
|
|
221
|
-
|
|
222
|
-
* use taobao npm https
|
|
223
|
-
|
|
224
|
-
0.2.0 / 2014-06-05
|
|
225
|
-
==================
|
|
226
|
-
|
|
227
|
-
* add PHANTOMJS_CDNURL env
|
|
228
|
-
|
|
229
|
-
0.1.3 / 2014-05-14
|
|
230
|
-
==================
|
|
231
|
-
|
|
232
|
-
* change to npm.taobao.org/dist
|
|
233
|
-
* fix sync result display
|
|
234
|
-
|
|
235
|
-
0.1.2 / 2014-04-22
|
|
236
|
-
==================
|
|
237
|
-
|
|
238
|
-
* Merge pull request #32 from cnpm/sync-from-cnpm
|
|
239
|
-
* sync from cnpm and taobao npm
|
|
240
|
-
|
|
241
|
-
0.1.1 / 2014-04-19
|
|
242
|
-
==================
|
|
243
|
-
|
|
244
|
-
* add auto-correct for some long cmds
|
|
245
|
-
|
|
246
|
-
0.1.0 / 2014-04-17
|
|
247
|
-
==================
|
|
248
|
-
|
|
249
|
-
* switch registry to taobao npm registry
|
|
250
|
-
* remove unused commander
|
|
251
|
-
* remove unused 'child_process' in bin/cnpm
|
|
252
|
-
* download from cdn
|
|
253
|
-
|
|
254
|
-
0.0.35 / 2014-04-03
|
|
255
|
-
==================
|
|
256
|
-
|
|
257
|
-
* deps npm instead of npm-beta
|
|
258
|
-
* update install from cnpm
|
|
259
|
-
|
|
260
|
-
0.0.33 / 2014-03-18
|
|
261
|
-
==================
|
|
262
|
-
|
|
263
|
-
* fix missing git option detect
|
|
264
|
-
|
|
265
|
-
0.0.32 / 2014-03-18
|
|
266
|
-
==================
|
|
267
|
-
|
|
268
|
-
* cnpm doc -g module open git web url. fixed #25
|
|
269
|
-
|
|
270
|
-
0.0.31 / 2014-03-15
|
|
271
|
-
==================
|
|
272
|
-
|
|
273
|
-
* if cnpm install cnpm, use npm cmd
|
|
274
|
-
|
|
275
|
-
0.0.30 / 2014-03-15
|
|
276
|
-
==================
|
|
277
|
-
|
|
278
|
-
* fix cnpm install cnpm fail bug
|
|
279
|
-
|
|
280
|
-
0.0.29 / 2014-03-13
|
|
281
|
-
==================
|
|
282
|
-
|
|
283
|
-
* update to deps npm-beta, use latest version of npm
|
|
284
|
-
* Release 0.0.28
|
|
285
|
-
* update urllib
|
|
286
|
-
|
|
287
|
-
0.0.28 / 2014-03-07
|
|
288
|
-
==================
|
|
289
|
-
|
|
290
|
-
* update urllib
|
|
291
|
-
* add jshint
|
|
292
|
-
* use cnpmjs.org/dist
|
|
293
|
-
|
|
294
|
-
0.0.27 / 2014-02-14
|
|
295
|
-
==================
|
|
296
|
-
|
|
297
|
-
* fix cnpm publish not work bug. fixed #23
|
|
298
|
-
|
|
299
|
-
0.0.26 / 2014-01-24
|
|
300
|
-
==================
|
|
301
|
-
|
|
302
|
-
* add preferGlobal
|
|
303
|
-
|
|
304
|
-
0.0.25 / 2014-01-15
|
|
305
|
-
==================
|
|
306
|
-
|
|
307
|
-
* add make autod
|
|
308
|
-
* use npm request
|
|
309
|
-
|
|
310
|
-
0.0.24 / 2014-01-14
|
|
311
|
-
==================
|
|
312
|
-
|
|
313
|
-
* request timeout default is 30 seconds
|
|
314
|
-
|
|
315
|
-
0.0.23 / 2014-01-14
|
|
316
|
-
==================
|
|
317
|
-
|
|
318
|
-
* add registryweb args
|
|
319
|
-
|
|
320
|
-
0.0.22 / 2014-01-10
|
|
321
|
-
==================
|
|
322
|
-
|
|
323
|
-
* Sync package as publish.
|
|
324
|
-
|
|
325
|
-
0.0.21 / 2013-12-23
|
|
326
|
-
==================
|
|
327
|
-
|
|
328
|
-
* add search sub command, fixed #18
|
|
329
|
-
|
|
330
|
-
0.0.20 / 2013-12-22
|
|
331
|
-
==================
|
|
332
|
-
|
|
333
|
-
* remove console log
|
|
334
|
-
|
|
335
|
-
0.0.19 / 2013-12-22
|
|
336
|
-
==================
|
|
337
|
-
|
|
338
|
-
* fix cannot get sub command with options, fixed #16
|
|
339
|
-
* fix help info output error, fixed #15
|
|
340
|
-
* cnpm --help: add command `v` (@weakish)
|
|
341
|
-
|
|
342
|
-
0.0.18 / 2013-12-20
|
|
343
|
-
==================
|
|
344
|
-
|
|
345
|
-
* cnpm sync -y
|
|
346
|
-
|
|
347
|
-
0.0.17 / 2013-12-20
|
|
348
|
-
==================
|
|
349
|
-
|
|
350
|
-
* fix check version
|
|
351
|
-
|
|
352
|
-
0.0.16 / 2013-12-20
|
|
353
|
-
==================
|
|
354
|
-
|
|
355
|
-
* support check >=x.y.z version. fixed #13
|
|
356
|
-
|
|
357
|
-
0.0.15 / 2013-12-20
|
|
358
|
-
==================
|
|
359
|
-
|
|
360
|
-
* Merge pull request #12 from fengmk2/fix-source-npm-command
|
|
361
|
-
* fix origin npm commands
|
|
362
|
-
|
|
363
|
-
0.0.14 / 2013-12-18
|
|
364
|
-
==================
|
|
365
|
-
|
|
366
|
-
* use default disturl alias http://dist.u.qiniudn.com
|
|
367
|
-
|
|
368
|
-
0.0.13 / 2013-12-14
|
|
369
|
-
==================
|
|
370
|
-
|
|
371
|
-
* support $ cnpm sync [moduleName1 moduleName2 ...], fixed #10
|
|
372
|
-
* fix origin_npm, use --cache instead of --cachepath
|
|
373
|
-
|
|
374
|
-
0.0.12 / 2013-12-13
|
|
375
|
-
==================
|
|
376
|
-
|
|
377
|
-
* support sync all the dependencies of a project,fix #6
|
|
378
|
-
|
|
379
|
-
0.0.11 / 2013-12-13
|
|
380
|
-
==================
|
|
381
|
-
|
|
382
|
-
* support alias to own private registry, fixed #5
|
|
383
|
-
|
|
384
|
-
0.0.10 / 2013-12-13
|
|
385
|
-
==================
|
|
386
|
-
|
|
387
|
-
* add userconfig support. fixed #3
|
|
388
|
-
|
|
389
|
-
0.0.9 / 2013-12-12
|
|
390
|
-
==================
|
|
391
|
-
|
|
392
|
-
* fix HOME missing on win32 bug. fixed #1
|
|
393
|
-
|
|
394
|
-
0.0.8 / 2013-12-12
|
|
395
|
-
==================
|
|
396
|
-
|
|
397
|
-
* fix check timeout bug
|
|
398
|
-
|
|
399
|
-
0.0.7 / 2013-12-11
|
|
400
|
-
==================
|
|
401
|
-
|
|
402
|
-
* add cnpm user command
|
|
403
|
-
|
|
404
|
-
0.0.6 / 2013-12-10
|
|
405
|
-
==================
|
|
406
|
-
|
|
407
|
-
* fix doc missing
|
|
408
|
-
|
|
409
|
-
0.0.5 / 2013-12-09
|
|
410
|
-
==================
|
|
411
|
-
|
|
412
|
-
* support --registry on sync
|
|
413
|
-
|
|
414
|
-
0.0.4 / 2013-12-09
|
|
415
|
-
==================
|
|
416
|
-
|
|
417
|
-
* fix sync log
|
|
418
|
-
|
|
419
|
-
0.0.3 / 2013-12-09
|
|
420
|
-
==================
|
|
421
|
-
|
|
422
|
-
* fix doc url. fixed fengmk2/cnpmjs.org#29
|
|
423
|
-
|
|
424
|
-
0.0.2 / 2013-12-09
|
|
425
|
-
==================
|
|
426
|
-
|
|
427
|
-
* fix sync cmd
|
|
428
|
-
|
|
429
|
-
0.0.1 / 2013-12-09
|
|
430
|
-
==================
|
|
431
|
-
|
|
432
|
-
* init
|
package/bin/cnpm
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
'use strict';
|
|
4
|
-
|
|
5
|
-
const debug = require('debug')('cnpm');
|
|
6
|
-
const pkg = require('../package.json');
|
|
7
|
-
const argv = require('../lib/parse_argv')();
|
|
8
|
-
|
|
9
|
-
const action = argv.args[0];
|
|
10
|
-
|
|
11
|
-
const extendsMethd = {
|
|
12
|
-
web: 1,
|
|
13
|
-
check: 1,
|
|
14
|
-
doc: 1,
|
|
15
|
-
sync: 1,
|
|
16
|
-
user: 1,
|
|
17
|
-
search: 1,
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
debug('cnpm %s', action);
|
|
21
|
-
|
|
22
|
-
if (extendsMethd[action]) {
|
|
23
|
-
return require('./cnpm-' + action);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
debug('origin npm with origin registry: $ npm %s', action);
|
|
27
|
-
require('../lib/origin_npm');
|
package/changeLog.md
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
## package.json
|
|
2
|
-
|
|
3
|
-
- bin修改名
|
|
4
|
-
- name pxnpm
|
|
5
|
-
- version
|
|
6
|
-
|
|
7
|
-
## config
|
|
8
|
-
|
|
9
|
-
环境变量等
|
|
10
|
-
|
|
11
|
-
## bin/
|
|
12
|
-
|
|
13
|
-
复制cnpm -> pxnpm
|
|
14
|
-
|
|
15
|
-
## other
|
|
16
|
-
|
|
17
|
-
- 全局npminstall -> pxnpminstall
|
|
18
|
-
|
|
19
|
-
## 依赖
|
|
20
|
-
|
|
21
|
-
未知错误,有些环境出问题,有些没事,解决方法 `pxnpm i config-chain -S`
|
|
22
|
-
|