pxnpm 2.0.3 → 2.0.6-beta.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/History.md ADDED
@@ -0,0 +1,432 @@
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/LICENSE.txt CHANGED
File without changes
package/README.md CHANGED
@@ -1,62 +1,67 @@
1
- pxnpm
2
- =======
1
+ # 普迅电力-FE-私库
3
2
 
4
- ## Requirements
5
-
6
- | | Minimum | Recommended |
7
- |--------|---------|-------------|
8
- | NodeJS | 4.0.0 | stable |
9
-
10
- ## Install
3
+ ## 使用
11
4
 
12
5
  ```bash
13
- $ npm install pxnpm -g
6
+ $ npm install -g pxnpm // 外网
7
+
8
+ $ npm install -g pxnpm --registry=http://10.120.20.50:5507 // 内网
14
9
  ```
15
10
 
16
- If you're in China, maybe you should install it from our [China mirror](https://npm.taobao.org):
11
+ ### 安装依赖
17
12
 
18
13
  ```bash
19
- $ npm install pxnpm -g --registry=https://r.npm.taobao.org
14
+ $ pxnpm install [name]
20
15
  ```
21
16
 
22
- ## Usage
17
+ ### 注册用户
23
18
 
24
- Support all commands just like `npm`.
19
+ ```bash
20
+ $ pxnpm adduser
21
+ ```
25
22
 
26
- ### Sync packages from `npm`
23
+ ### 登录 / 登出
27
24
 
28
25
  ```bash
29
- $ pxnpm sync [moduleName]
26
+ $ pxnpm login
27
+ $ pxnpm logout
28
+
30
29
  ```
31
30
 
32
- ### Open package document or git web url
31
+ ### 创建新项目
32
+
33
+ package.json中name格式需要符合 `@团队名称/项目名` 原则,例如: `@yfzx/xxx, @zrui/query-table`
33
34
 
34
35
  ```bash
35
- $ pxnpm doc [name]
36
- $ pxnpm doc -g [name] # open git web url directly
36
+ pxnpm init
37
+
37
38
  ```
38
39
 
39
- ## Build your own private registry npm cli
40
+ ### 更新版本号
41
+
42
+ 发布前运行,例如`pxnpm version patch`
40
43
 
41
44
  ```bash
42
- $ npm install pxnpm -g
45
+ pxnpm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease [--preid=<prerelease-id>] | from-git]
43
46
 
44
- # then alias it
45
- $ alias mynpm='pxnpm --registry=http://registry.npm.example.com \
46
- --registryweb=http://npm.example.com \
47
- --userconfig=$HOME/.mynpmrc'
48
47
  ```
49
48
 
50
- ## Install with original npm cli
49
+ - major: 主版本号
50
+ - premajor: 预备主版本
51
+ - minor: 次版本号
52
+ - preminor: 预备次版本
53
+ - patch: 修订号
54
+ - prepatch: 预备修订版
55
+ - prerelease: 预发布版本
56
+
57
+ ### 发布
51
58
 
52
- pxnpm using [npminstall](https://github.com/pxnpm/npminstall) by default.
53
- If you don't like symlink mode for `node_modules`, you can change the installer to original npm.
54
- But you will lose the fastest install speed.
59
+ 项目根目录运行
55
60
 
56
61
  ```bash
57
- $ pxnpm i --by=npm react-native
62
+ $ pxnpm publish
58
63
  ```
59
64
 
60
- ## License
65
+ ### 其他命令
61
66
 
62
- [MIT](LICENSE.txt)
67
+ 支持所有其他npm命令
package/bin/pxnpm CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  'use strict';
4
+ const pkg = require('../package.json');
4
5
 
5
6
  const debug = require('debug')('cnpm');
6
- const pkg = require('../package.json');
7
7
  const argv = require('../lib/parse_argv')();
8
8
 
9
9
  const action = argv.args[0];
package/changeLog.md ADDED
@@ -0,0 +1,22 @@
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
+
package/lib/config.js CHANGED
@@ -1,27 +1,29 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- const debug = require('debug')('cnpm:config');
4
- const path = require('path');
5
- const fs = require('fs');
6
- const cp = require('child_process');
7
- const ini = require('ini');
8
- const ping = require('connection-tester');
3
+ const debug = require("debug")("cnpm:config");
4
+ const path = require("path");
5
+ const fs = require("fs");
6
+ const cp = require("child_process");
7
+ const ini = require("ini");
9
8
 
10
9
  let root;
11
- if (process.platform === 'win32') {
10
+ if (process.platform === "win32") {
12
11
  root = process.env.USERPROFILE || process.env.APPDATA || process.env.TMP || process.env.TEMP;
13
12
  } else {
14
- root = process.env.HOME || process.env.TMPDIR || '/tmp';
13
+ root = process.env.HOME || process.env.TMPDIR || "/tmp";
15
14
  }
16
15
 
16
+ let proxyC = '';
17
17
  let prefix = null;
18
18
  try {
19
- prefix = cp.execSync('npm config get prefix').toString().trim();
19
+ prefix = cp.execSync("npm config get prefix").toString().trim();
20
20
  } catch (err) {
21
21
  // ignore it
22
- debug('npm config cli error: %s', err);
22
+ debug("npm config cli error: %s", err);
23
23
  }
24
24
 
25
+ // =====
26
+ const ping = require("connection-tester");
25
27
  const rawArgs = process.argv && process.argv.slice(2);
26
28
  const rawAction = rawArgs && rawArgs[0];
27
29
  const isPublish = rawAction === "login" || rawAction === "publish";
@@ -29,49 +31,44 @@ const isPublish = rawAction === "login" || rawAction === "publish";
29
31
  process.env.outerAddr = JSON.stringify({
30
32
  inner: {
31
33
  proxy: {
32
- protocol: 'http:',
33
- host: 'fe-repo.inner.px.nfjbill.ren',
34
- port: 8080,
34
+ protocol: "http:",
35
+ host: "fe-repo.inner.px.nfjbill.ren",
36
+ port: 8080
35
37
  },
36
38
  registry: {
37
- protocol: 'http:',
38
- host: 'fe-repo.inner.px.nfjbill.ren',
39
- port: isPublish ? 5508 : 5507,
40
- },
39
+ protocol: "http:",
40
+ host: "fe-repo.inner.px.nfjbill.ren",
41
+ port: isPublish ? 5508 : 5507
42
+ }
41
43
  },
42
44
  outer: {
43
45
  proxy: {
44
- protocol: 'http:',
45
- host: 'npm.taobao.org',
46
- port: 80,
46
+ protocol: "http:",
47
+ host: "npm.taobao.org",
48
+ port: 80
47
49
  },
48
- // registry: {
49
- // protocol: 'https:',
50
- // host: 'pips.xt.nfjbill.ren',
51
- // port: isPublish ? 8905 : 38083,
52
- // },
53
50
  registry: {
54
- protocol: 'http:',
55
- host: '39.105.197.205',
56
- port: isPublish ? 8905 : 38082,
57
- },
51
+ protocol: "http:",
52
+ host: "pip.xt.nfjbill.ren",
53
+ port: isPublish ? 8905 : 38082
54
+ }
58
55
  },
59
56
  io: {
60
57
  proxy: {
61
- protocol: 'http:',
62
- host: 'r.pxnpm.nfjbill.ren',
63
- port: 8080,
58
+ protocol: "http:",
59
+ host: "r.pxnpm.nfjbill.ren",
60
+ port: 8080
64
61
  },
65
62
  registry: {
66
- protocol: 'http:',
67
- host: 'registry.pxnpm.nfjbill.ren',
68
- port: isPublish ? 5508 : 5507,
69
- },
63
+ protocol: "http:",
64
+ host: "registry.pxnpm.nfjbill.ren",
65
+ port: isPublish ? 5508 : 5507
66
+ }
70
67
  },
71
68
  // yk3 内部端口
72
69
  lp: {
73
- addr: 'http://127.0.0.1:38020',
74
- },
70
+ addr: "http://127.0.0.1:38020"
71
+ }
75
72
  });
76
73
 
77
74
  const outerAddr = JSON.parse(process.env.outerAddr);
@@ -79,11 +76,11 @@ const outerAddr = JSON.parse(process.env.outerAddr);
79
76
  const getAddr = function(type) {
80
77
  return {
81
78
  proxy: `${outerAddr[type].proxy.protocol}//${outerAddr[type].proxy.host}:${outerAddr[type].proxy.port}`,
82
- registry: `${outerAddr[type].registry.protocol}//${outerAddr[type].registry.host}:${outerAddr[type].registry.port}`,
79
+ registry: `${outerAddr[type].registry.protocol}//${outerAddr[type].registry.host}:${outerAddr[type].registry.port}`
83
80
  };
84
81
  };
85
82
 
86
- let addr = getAddr('io');
83
+ let addr = getAddr("io");
87
84
  let pxnpmServer = `http://${outerAddr.io.registry.host}`;
88
85
  const timeout = 3000;
89
86
  const { success: is } = ping.test(outerAddr.inner.proxy.host, outerAddr.inner.proxy.port, timeout); // registry
@@ -92,28 +89,30 @@ const { success: os } = ping.test(outerAddr.outer.proxy.host, outerAddr.outer.pr
92
89
  if (!is && !os) {
93
90
  // consola.fatal('没有发现安装源,请调通网络,或重新尝试安装');
94
91
  // process.exit(0);
95
- addr = getAddr('outer');
92
+ addr = getAddr("outer");
96
93
  }
97
94
 
98
95
  if (!is && os) {
99
96
  // consola.warn('您正在使用协同模式安装,如果安装失败,请多尝试几次,或联系管理员');
100
- addr = getAddr('outer');
97
+ addr = getAddr("outer");
101
98
  }
102
99
 
103
100
  if (is && !os) {
104
- addr = getAddr('inner');
101
+ addr = getAddr("inner");
102
+ proxyC = 'http://rdc-lan-ningfj.inner.px.nfjbill.ren:1088'
105
103
  }
106
104
 
107
105
  let proxy = addr.proxy;
108
106
  let registry = addr.registry;
109
107
 
110
- const userconfig = path.join(root, '.pxnpmrc');
108
+ // ====
109
+ const userconfig = path.join(root, ".pxnpmrc");
111
110
  if (fs.existsSync(userconfig)) {
112
111
  let cnpmrc;
113
112
  try {
114
- cnpmrc = ini.parse(fs.readFileSync(userconfig, 'utf-8'));
113
+ cnpmrc = ini.parse(fs.readFileSync(userconfig, "utf-8"));
115
114
  } catch (err) {
116
- console.warn('[cnpm:config] [WARN] read %s ini format error', userconfig);
115
+ console.warn("[cnpm:config] [WARN] read %s ini format error", userconfig);
117
116
  }
118
117
 
119
118
  if (cnpmrc && cnpmrc.proxy) {
@@ -125,21 +124,12 @@ process.env.__pxnpm_config_proxy = proxy;
125
124
  process.env.__pxnpm_config_pxnpmServer = pxnpmServer;
126
125
 
127
126
  module.exports = {
128
- // cnpmHost: 'https://npm.taobao.org',
129
- // cnpmRegistry: 'http://cln.grsg.aly.px.nfjbill.xyz:38020/',
130
- // disturl: 'https://npm.taobao.org/mirrors/node', // download dist tarball for node-gyp
131
- // iojsDisturl: 'https://npm.taobao.org/mirrors/iojs',
132
- // cache: path.join(root, '.cnpm'), // cache folder name
133
- // userconfig,
134
- // proxy,
135
- // prefix,
136
-
137
127
  cnpmHost: pxnpmServer,
138
128
  cnpmRegistry: registry,
139
129
  disturl: `${proxy}/mirrors/node`, // download dist tarball for node-gyp
140
- iojsDisturl: `${proxy}/mirrors/iojs`,
141
- cache: path.join(root, '.pxnpm'), // cache folder name
130
+ iojsDisturl: `${proxy}/mirrors/node`,
131
+ cache: path.join(root, ".pxnpm"), // cache folder name
142
132
  userconfig,
143
- proxy: '',
144
- prefix,
133
+ proxy: proxyC,
134
+ prefix
145
135
  };
package/lib/parse_argv.js CHANGED
@@ -19,7 +19,7 @@ module.exports = cmd => {
19
19
  .option('-c, --cache [cache]', 'cache folder, default is ' + config.cache)
20
20
  .option('-u, --userconfig [userconfig]', 'userconfig file, default is ' + config.userconfig)
21
21
  .option('-y, --yes', 'yes all confirm')
22
- .option('--ignore-custom-config', 'ignore custom .pxnpmrc')
22
+ .option('--ignore-custom-config', 'ignore custom .cnpmrc')
23
23
  .option('--proxy [proxy]', 'set a http proxy, no default');
24
24
  }
25
25
 
package/package.json CHANGED
@@ -1,28 +1,30 @@
1
1
  {
2
- "author": {
3
- "name": "fengmk2",
4
- "email": "fengmk2@gmail.com",
5
- "url": "https://fengmk2.com"
2
+ "name": "pxnpm",
3
+ "version": "2.0.6-beta.0",
4
+ "description": "pxnpm use cnpm engine",
5
+ "main": "bin/pxnpm",
6
+ "files": [
7
+ "bin",
8
+ "lib"
9
+ ],
10
+ "scripts": {
11
+ "pub:beta": "npm version prerelease --preid=beta && npm publish --tag beta",
12
+ "test": "npm run lint -- --fix && npm run test-local",
13
+ "test-local": "egg-bin test",
14
+ "lint": "eslint bin lib test/*.js",
15
+ "ci": "npm run lint && npm run test",
16
+ "autod": "autod"
6
17
  },
18
+ "preferGlobal": true,
7
19
  "bin": {
8
20
  "pxnpm": "bin/pxnpm"
9
21
  },
10
- "bugs": {
11
- "url": "https://github.com/cnpm/cnpm/issues"
12
- },
13
- "bundleDependencies": false,
14
- "ci": {
15
- "version": "6, 8, 10, 12",
16
- "command": {
17
- "travis": "ci",
18
- "appveyor": "ci"
19
- }
20
- },
21
22
  "dependencies": {
22
23
  "auto-correct": "^1.0.0",
23
24
  "bagpipe": "^0.3.5",
24
25
  "colors": "^1.1.2",
25
26
  "commander": "~2.10.0",
27
+ "config-chain": "^1.1.13",
26
28
  "connection-tester": "^0.2.1",
27
29
  "cross-spawn": "~0.2.8",
28
30
  "debug": "^2.2.0",
@@ -30,12 +32,10 @@
30
32
  "ini": "^1.3.4",
31
33
  "npm": "^6.13.4",
32
34
  "npm-request": "^1.0.0",
33
- "open": "^0.0.5",
34
- "pxnpminstall": "^1.0.5",
35
+ "open": "^8.2.1",
36
+ "pxnpminstall": "2.0.0",
35
37
  "urllib": "^2.17.0"
36
38
  },
37
- "deprecated": false,
38
- "description": "cnpm: npm client for cnpmjs.org",
39
39
  "devDependencies": {
40
40
  "autod": "^2.7.1",
41
41
  "coffee": "^3.3.0",
@@ -47,36 +47,14 @@
47
47
  "rimraf": "^2.5.4"
48
48
  },
49
49
  "engines": {
50
- "node": ">= 6.0.0"
50
+ "node": ">= 10.0.0"
51
51
  },
52
- "files": [
53
- "bin",
54
- "lib"
55
- ],
56
- "homepage": "https://github.com/cnpm/cnpm",
57
- "keywords": [
58
- "cnpm",
59
- "npm",
60
- "npminstall"
61
- ],
62
- "license": "MIT",
63
- "main": "bin/cnpm",
64
- "name": "pxnpm",
65
- "preferGlobal": true,
66
- "publishConfig": {
67
- "tag": "latest"
68
- },
69
- "repository": {
70
- "type": "git",
71
- "url": "git://github.com/cnpm/cnpm.git"
72
- },
73
- "scripts": {
74
- "autod": "autod",
75
- "ci": "npm run lint && npm run test",
76
- "lint": "eslint bin lib test/*.js",
77
- "test": "npm run lint -- --fix && npm run test-local",
78
- "test-local": "egg-bin test",
79
- "pub:beta": "npm version prerelease --preid=beta && npm publish --tag beta"
52
+ "ci": {
53
+ "type": "github",
54
+ "version": "10, 12, 14, 16",
55
+ "os": {
56
+ "github": "linux, windows, macos"
57
+ }
80
58
  },
81
- "version": "2.0.3"
59
+ "license": "MIT"
82
60
  }