@verdaccio/cli 6.0.0-6-next.33 → 6.0.0-6-next.36

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/CHANGELOG.md CHANGED
@@ -1,5 +1,79 @@
1
1
  # @verdaccio/cli
2
2
 
3
+ ## 6.0.0-6-next.36
4
+
5
+ ### Patch Changes
6
+
7
+ - @verdaccio/core@6.0.0-6-next.6
8
+ - @verdaccio/logger@6.0.0-6-next.12
9
+ - @verdaccio/node-api@6.0.0-6-next.34
10
+
11
+ ## 6.0.0-6-next.35
12
+
13
+ ### Major Changes
14
+
15
+ - 292c0a37: feat!: replace deprecated request dependency by got
16
+
17
+ This is a big refactoring of the core, fetching dependencies, improve code, more tests and better stability. This is essential for the next release, will take some time but would allow modularize more the core.
18
+
19
+ ## Notes
20
+
21
+ - Remove deprecated `request` by other `got`, retry improved, custom Agent ( got does not include it built-in)
22
+ - Remove `async` dependency from storage (used by core) it was linked with proxy somehow safe to remove now
23
+ - Refactor with promises instead callback wherever is possible
24
+ - ~Document the API~
25
+ - Improve testing, integration tests
26
+ - Bugfix
27
+ - Clean up old validations
28
+ - Improve performance
29
+
30
+ ## 💥 Breaking changes
31
+
32
+ - Plugin API methods were callbacks based are returning promises, this will break current storage plugins, check documentation for upgrade.
33
+ - Write Tarball, Read Tarball methods parameters change, a new set of options like `AbortController` signals are being provided to the `addAbortSignal` can be internally used with Streams when a request is aborted. eg: `addAbortSignal(signal, fs.createReadStream(pathName));`
34
+ - `@verdaccio/streams` stream abort support is legacy is being deprecated removed
35
+ - Remove AWS and Google Cloud packages for future refactoring [#2574](https://github.com/verdaccio/verdaccio/pull/2574).
36
+
37
+ - a3a209b5: feat: migrate to pino.js 8
38
+
39
+ ### Minor Changes
40
+
41
+ - 00d1d2a1: chore: env variable for launch fastify
42
+
43
+ - Update fastify to major release `v4.3.0`
44
+ - Update CLI launcher
45
+
46
+ via CLI
47
+
48
+ ```
49
+ VERDACCIO_SERVER=fastify verdaccio
50
+ ```
51
+
52
+ with docker
53
+
54
+ ```
55
+ docker run -it --rm --name verdaccio \
56
+ -e "VERDACCIO_SERVER=8080" -p 8080:8080 \
57
+ -e "VERDACCIO_SERVER=fastify" \
58
+ verdaccio/verdaccio
59
+ ```
60
+
61
+ ### Patch Changes
62
+
63
+ - Updated dependencies [292c0a37]
64
+ - Updated dependencies [a3a209b5]
65
+ - Updated dependencies [00d1d2a1]
66
+ - @verdaccio/config@6.0.0-6-next.15
67
+ - @verdaccio/core@6.0.0-6-next.6
68
+ - @verdaccio/logger@6.0.0-6-next.12
69
+ - @verdaccio/node-api@6.0.0-6-next.33
70
+
71
+ ## 6.0.0-6-next.34
72
+
73
+ ### Patch Changes
74
+
75
+ - @verdaccio/node-api@6.0.0-6-next.32
76
+
3
77
  ## 6.0.0-6-next.33
4
78
 
5
79
  ### Patch Changes
@@ -7,7 +81,7 @@
7
81
  - Updated dependencies [d43894e8]
8
82
  - Updated dependencies [d08fe29d]
9
83
  - @verdaccio/config@6.0.0-6-next.14
10
- - @verdaccio/fastify-migration@6.0.0-6-next.23
84
+ - @verdaccio/server-fastify@6.0.0-6-next.23
11
85
  - @verdaccio/node-api@6.0.0-6-next.31
12
86
  - @verdaccio/core@6.0.0-6-next.5
13
87
  - @verdaccio/logger@6.0.0-6-next.11
@@ -53,20 +127,20 @@
53
127
  - @verdaccio/core@6.0.0-6-next.5
54
128
  - @verdaccio/logger@6.0.0-6-next.11
55
129
  - @verdaccio/node-api@6.0.0-6-next.30
56
- - @verdaccio/fastify-migration@6.0.0-6-next.22
130
+ - @verdaccio/server-fastify@6.0.0-6-next.22
57
131
 
58
132
  ## 6.0.0-6-next.30
59
133
 
60
134
  ### Patch Changes
61
135
 
62
- - @verdaccio/fastify-migration@6.0.0-6-next.21
136
+ - @verdaccio/server-fastify@6.0.0-6-next.21
63
137
  - @verdaccio/node-api@6.0.0-6-next.29
64
138
 
65
139
  ## 6.0.0-6-next.29
66
140
 
67
141
  ### Patch Changes
68
142
 
69
- - @verdaccio/fastify-migration@6.0.0-6-next.20
143
+ - @verdaccio/server-fastify@6.0.0-6-next.20
70
144
  - @verdaccio/node-api@6.0.0-6-next.28
71
145
 
72
146
  ## 6.0.0-6-next.28
@@ -75,7 +149,7 @@
75
149
 
76
150
  - Updated dependencies [b78f3525]
77
151
  - @verdaccio/logger@6.0.0-6-next.10
78
- - @verdaccio/fastify-migration@6.0.0-6-next.19
152
+ - @verdaccio/server-fastify@6.0.0-6-next.19
79
153
  - @verdaccio/node-api@6.0.0-6-next.27
80
154
 
81
155
  ## 6.0.0-6-next.27
@@ -85,7 +159,7 @@
85
159
  - Updated dependencies [730b5d8c]
86
160
  - @verdaccio/logger@6.0.0-6-next.9
87
161
  - @verdaccio/node-api@6.0.0-6-next.26
88
- - @verdaccio/fastify-migration@6.0.0-6-next.18
162
+ - @verdaccio/server-fastify@6.0.0-6-next.18
89
163
 
90
164
  ## 6.0.0-6-next.26
91
165
 
@@ -94,7 +168,7 @@
94
168
  - Updated dependencies [a828271d]
95
169
  - Updated dependencies [24b9be02]
96
170
  - Updated dependencies [e75c0a3b]
97
- - @verdaccio/fastify-migration@6.0.0-6-next.17
171
+ - @verdaccio/server-fastify@6.0.0-6-next.17
98
172
  - @verdaccio/core@6.0.0-6-next.4
99
173
  - @verdaccio/logger@6.0.0-6-next.8
100
174
  - @verdaccio/node-api@6.0.0-6-next.25
@@ -106,7 +180,7 @@
106
180
 
107
181
  - Updated dependencies [f86c31ed]
108
182
  - Updated dependencies [20c9e43e]
109
- - @verdaccio/fastify-migration@6.0.0-6-next.16
183
+ - @verdaccio/server-fastify@6.0.0-6-next.16
110
184
  - @verdaccio/config@6.0.0-6-next.11
111
185
  - @verdaccio/node-api@6.0.0-6-next.24
112
186
 
@@ -123,7 +197,7 @@
123
197
  - @verdaccio/logger@6.0.0-6-next.7
124
198
  - @verdaccio/node-api@6.0.0-6-next.23
125
199
  - @verdaccio/config@6.0.0-6-next.10
126
- - @verdaccio/fastify-migration@6.0.0-6-next.15
200
+ - @verdaccio/server-fastify@6.0.0-6-next.15
127
201
 
128
202
  ## 6.0.0-6-next.23
129
203
 
@@ -143,7 +217,7 @@
143
217
  - Updated dependencies [b702ea36]
144
218
  - Updated dependencies [154b2ecd]
145
219
  - @verdaccio/config@6.0.0-6-next.9
146
- - @verdaccio/fastify-migration@6.0.0-6-next.14
220
+ - @verdaccio/server-fastify@6.0.0-6-next.14
147
221
  - @verdaccio/logger@6.0.0-6-next.6
148
222
  - @verdaccio/node-api@6.0.0-6-next.22
149
223
 
@@ -153,7 +227,7 @@
153
227
 
154
228
  - Updated dependencies [2c594910]
155
229
  - @verdaccio/logger@6.0.0-6-next.5
156
- - @verdaccio/fastify-migration@6.0.0-6-next.13
230
+ - @verdaccio/server-fastify@6.0.0-6-next.13
157
231
  - @verdaccio/node-api@6.0.0-6-next.21
158
232
 
159
233
  ## 6.0.0-6-next.21
@@ -197,7 +271,7 @@
197
271
 
198
272
  - Updated dependencies [459b6fa7]
199
273
  - @verdaccio/config@6.0.0-6-next.8
200
- - @verdaccio/fastify-migration@6.0.0-6-next.12
274
+ - @verdaccio/server-fastify@6.0.0-6-next.12
201
275
  - @verdaccio/node-api@6.0.0-6-next.20
202
276
  - @verdaccio/logger@6.0.0-6-next.4
203
277
 
@@ -206,7 +280,7 @@
206
280
  ### Patch Changes
207
281
 
208
282
  - Updated dependencies [df0da3d6]
209
- - @verdaccio/fastify-migration@6.0.0-6-next.11
283
+ - @verdaccio/server-fastify@6.0.0-6-next.11
210
284
  - @verdaccio/node-api@6.0.0-6-next.19
211
285
 
212
286
  ## 6.0.0-6-next.19
@@ -230,7 +304,7 @@
230
304
  ### Patch Changes
231
305
 
232
306
  - Updated dependencies [55ee3fdd]
233
- - @verdaccio/fastify-migration@6.0.0-6-next.10
307
+ - @verdaccio/server-fastify@6.0.0-6-next.10
234
308
  - @verdaccio/config@6.0.0-6-next.7
235
309
  - @verdaccio/node-api@6.0.0-6-next.17
236
310
 
@@ -244,7 +318,7 @@
244
318
 
245
319
  ### Patch Changes
246
320
 
247
- - @verdaccio/fastify-migration@6.0.0-6-next.9
321
+ - @verdaccio/server-fastify@6.0.0-6-next.9
248
322
  - @verdaccio/logger@6.0.0-6-next.4
249
323
  - @verdaccio/node-api@6.0.0-6-next.15
250
324
 
@@ -252,7 +326,7 @@
252
326
 
253
327
  ### Patch Changes
254
328
 
255
- - @verdaccio/fastify-migration@6.0.0-6-next.9
329
+ - @verdaccio/server-fastify@6.0.0-6-next.9
256
330
  - @verdaccio/logger@6.0.0-6-next.4
257
331
  - @verdaccio/node-api@6.0.0-6-next.14
258
332
 
@@ -285,7 +359,7 @@
285
359
 
286
360
  - Updated dependencies [19d272d1]
287
361
  - @verdaccio/node-api@6.0.0-6-next.12
288
- - @verdaccio/fastify-migration@6.0.0-6-next.9
362
+ - @verdaccio/server-fastify@6.0.0-6-next.9
289
363
  - @verdaccio/logger@6.0.0-6-next.4
290
364
 
291
365
  ## 6.0.0-6-next.11
package/build/cli.js CHANGED
@@ -4,8 +4,6 @@ var _clipanion = require("clipanion");
4
4
 
5
5
  var _core = require("@verdaccio/core");
6
6
 
7
- var _FastifyServer = require("./commands/FastifyServer");
8
-
9
7
  var _info = require("./commands/info");
10
8
 
11
9
  var _init = require("./commands/init");
@@ -32,7 +30,6 @@ const cli = new _clipanion.Cli({
32
30
  cli.register(_info.InfoCommand);
33
31
  cli.register(_init.InitCommand);
34
32
  cli.register(_version.VersionCommand);
35
- cli.register(_FastifyServer.FastifyServer);
36
33
  cli.runExit(args, _clipanion.Cli.defaultContext);
37
34
  process.on('uncaughtException', function (err) {
38
35
  console.error( // eslint-disable-next-line max-len
package/build/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/cli.ts"],"names":["process","getuid","warningUtils","emit","Codes","VERWAR001","version","Error","MIN_NODE_VERSION","node","app","args","argv","cli","Cli","binaryLabel","binaryName","binaryVersion","require","register","InfoCommand","InitCommand","VersionCommand","FastifyServer","runExit","defaultContext","on","err","console","error","stack","exit"],"mappings":";;AAAA;;AAEA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AAEA,IAAIA,OAAO,CAACC,MAAR,IAAkBD,OAAO,CAACC,MAAR,OAAqB,CAA3C,EAA8C;AAC5CC,qBAAaC,IAAb,CAAkBD,mBAAaE,KAAb,CAAmBC,SAArC;AACD;;AAED,IAAI,CAAC,2BAAeL,OAAO,CAACM,OAAvB,CAAL,EAAsC;AACpC,QAAM,IAAIC,KAAJ,CACH,wCAAuCC,uBAAiB,qCAAoCR,OAAO,CAACM,OAAQ;AACjH,6CAFQ,CAAN;AAID;;AAED,MAAM,CAACG,IAAD,EAAOC,GAAP,EAAY,GAAGC,IAAf,IAAuBX,OAAO,CAACY,IAArC;AAEA,MAAMC,GAAG,GAAG,IAAIC,cAAJ,CAAQ;AAClBC,EAAAA,WAAW,EAAG,WADI;AAElBC,EAAAA,UAAU,EAAG,GAAEP,IAAK,IAAGC,GAAI,EAFT;AAGlBO,EAAAA,aAAa,EAAEC,OAAO,CAAC,iBAAD,CAAP,CAA2BZ;AAHxB,CAAR,CAAZ;AAMAO,GAAG,CAACM,QAAJ,CAAaC,iBAAb;AACAP,GAAG,CAACM,QAAJ,CAAaE,iBAAb;AACAR,GAAG,CAACM,QAAJ,CAAaG,uBAAb;AACAT,GAAG,CAACM,QAAJ,CAAaI,4BAAb;AACAV,GAAG,CAACW,OAAJ,CAAYb,IAAZ,EAAkBG,eAAIW,cAAtB;AAEAzB,OAAO,CAAC0B,EAAR,CAAW,mBAAX,EAAgC,UAAUC,GAAV,EAAe;AAC7CC,EAAAA,OAAO,CAACC,KAAR,EACE;AACC,+FAA4FF,GAAG,CAACG,KAAM,EAFzG;AAIA9B,EAAAA,OAAO,CAAC+B,IAAR,CAAa,CAAb;AACD,CAND","sourcesContent":["import { Cli } from 'clipanion';\n\nimport { warningUtils } from '@verdaccio/core';\n\nimport { FastifyServer } from './commands/FastifyServer';\nimport { InfoCommand } from './commands/info';\nimport { InitCommand } from './commands/init';\nimport { VersionCommand } from './commands/version';\nimport { MIN_NODE_VERSION, isVersionValid } from './utils';\n\nif (process.getuid && process.getuid() === 0) {\n warningUtils.emit(warningUtils.Codes.VERWAR001);\n}\n\nif (!isVersionValid(process.version)) {\n throw new Error(\n `Verdaccio requires at least Node.js v${MIN_NODE_VERSION} or higher and you have installed ${process.version}, \n please upgrade your Node.js distribution`\n );\n}\n\nconst [node, app, ...args] = process.argv;\n\nconst cli = new Cli({\n binaryLabel: `verdaccio`,\n binaryName: `${node} ${app}`,\n binaryVersion: require('../package.json').version,\n});\n\ncli.register(InfoCommand);\ncli.register(InitCommand);\ncli.register(VersionCommand);\ncli.register(FastifyServer);\ncli.runExit(args, Cli.defaultContext);\n\nprocess.on('uncaughtException', function (err) {\n console.error(\n // eslint-disable-next-line max-len\n `uncaught exception, please report (https://github.com/verdaccio/verdaccio/issues) this: \\n${err.stack}`\n );\n process.exit(1);\n});\n"],"file":"cli.js"}
1
+ {"version":3,"file":"cli.js","names":["process","getuid","warningUtils","emit","Codes","VERWAR001","isVersionValid","version","Error","MIN_NODE_VERSION","node","app","args","argv","cli","Cli","binaryLabel","binaryName","binaryVersion","require","register","InfoCommand","InitCommand","VersionCommand","runExit","defaultContext","on","err","console","error","stack","exit"],"sources":["../src/cli.ts"],"sourcesContent":["import { Cli } from 'clipanion';\n\nimport { warningUtils } from '@verdaccio/core';\n\nimport { InfoCommand } from './commands/info';\nimport { InitCommand } from './commands/init';\nimport { VersionCommand } from './commands/version';\nimport { MIN_NODE_VERSION, isVersionValid } from './utils';\n\nif (process.getuid && process.getuid() === 0) {\n warningUtils.emit(warningUtils.Codes.VERWAR001);\n}\n\nif (!isVersionValid(process.version)) {\n throw new Error(\n `Verdaccio requires at least Node.js v${MIN_NODE_VERSION} or higher and you have installed ${process.version}, \n please upgrade your Node.js distribution`\n );\n}\n\nconst [node, app, ...args] = process.argv;\n\nconst cli = new Cli({\n binaryLabel: `verdaccio`,\n binaryName: `${node} ${app}`,\n binaryVersion: require('../package.json').version,\n});\n\ncli.register(InfoCommand);\ncli.register(InitCommand);\ncli.register(VersionCommand);\ncli.runExit(args, Cli.defaultContext);\n\nprocess.on('uncaughtException', function (err) {\n console.error(\n // eslint-disable-next-line max-len\n `uncaught exception, please report (https://github.com/verdaccio/verdaccio/issues) this: \\n${err.stack}`\n );\n process.exit(1);\n});\n"],"mappings":";;AAAA;;AAEA;;AAEA;;AACA;;AACA;;AACA;;AAEA,IAAIA,OAAO,CAACC,MAAR,IAAkBD,OAAO,CAACC,MAAR,OAAqB,CAA3C,EAA8C;EAC5CC,kBAAA,CAAaC,IAAb,CAAkBD,kBAAA,CAAaE,KAAb,CAAmBC,SAArC;AACD;;AAED,IAAI,CAAC,IAAAC,qBAAA,EAAeN,OAAO,CAACO,OAAvB,CAAL,EAAsC;EACpC,MAAM,IAAIC,KAAJ,CACH,wCAAuCC,uBAAiB,qCAAoCT,OAAO,CAACO,OAAQ;AACjH,6CAFQ,CAAN;AAID;;AAED,MAAM,CAACG,IAAD,EAAOC,GAAP,EAAY,GAAGC,IAAf,IAAuBZ,OAAO,CAACa,IAArC;AAEA,MAAMC,GAAG,GAAG,IAAIC,cAAJ,CAAQ;EAClBC,WAAW,EAAG,WADI;EAElBC,UAAU,EAAG,GAAEP,IAAK,IAAGC,GAAI,EAFT;EAGlBO,aAAa,EAAEC,OAAO,CAAC,iBAAD,CAAP,CAA2BZ;AAHxB,CAAR,CAAZ;AAMAO,GAAG,CAACM,QAAJ,CAAaC,iBAAb;AACAP,GAAG,CAACM,QAAJ,CAAaE,iBAAb;AACAR,GAAG,CAACM,QAAJ,CAAaG,uBAAb;AACAT,GAAG,CAACU,OAAJ,CAAYZ,IAAZ,EAAkBG,cAAA,CAAIU,cAAtB;AAEAzB,OAAO,CAAC0B,EAAR,CAAW,mBAAX,EAAgC,UAAUC,GAAV,EAAe;EAC7CC,OAAO,CAACC,KAAR,EACE;EACC,6FAA4FF,GAAG,CAACG,KAAM,EAFzG;EAIA9B,OAAO,CAAC+B,IAAR,CAAa,CAAb;AACD,CAND"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/commands/info.ts"],"names":["InfoCommand","Command","paths","execute","context","stdout","write","data","envinfo","run","System","Binaries","Virtualization","Browsers","npmGlobalPackages","process","exit"],"mappings":";;;;;;;AAAA;;AACA;;;;AAEO,MAAMA,WAAN,SAA0BC,kBAA1B,CAAkC;AACpB,SAALC,KAAK,GAAG,CAAC,CAAE,QAAF,CAAD,EAAa,CAAE,IAAF,CAAb,CAAH;;AAEC,QAAPC,OAAO,GAAkB;AACpC,SAAKC,OAAL,CAAaC,MAAb,CAAoBC,KAApB,CAA0B,qBAA1B;AACA,UAAMC,IAAI,GAAG,MAAMC,iBAAQC,GAAR,CAAY;AAC7BC,MAAAA,MAAM,EAAE,CAAC,IAAD,EAAO,KAAP,CADqB;AAE7BC,MAAAA,QAAQ,EAAE,CAAC,MAAD,EAAS,MAAT,EAAiB,KAAjB,EAAwB,MAAxB,CAFmB;AAG7BC,MAAAA,cAAc,EAAE,CAAC,QAAD,CAHa;AAI7BC,MAAAA,QAAQ,EAAE,CAAC,QAAD,EAAW,MAAX,EAAmB,SAAnB,EAA8B,QAA9B,CAJmB;AAK7BC,MAAAA,iBAAiB,EAAE,CAAC,WAAD;AALU,KAAZ,CAAnB;AAQA,SAAKV,OAAL,CAAaC,MAAb,CAAoBC,KAApB,CAA0BC,IAA1B;AACAQ,IAAAA,OAAO,CAACC,IAAR,CAAa,CAAb;AACD;;AAfsC","sourcesContent":["import { Command } from 'clipanion';\nimport envinfo from 'envinfo';\n\nexport class InfoCommand extends Command {\n public static paths = [[`--info`], [`-i`]];\n\n public async execute(): Promise<void> {\n this.context.stdout.write('\\nEnvironment Info:');\n const data = await envinfo.run({\n System: ['OS', 'CPU'],\n Binaries: ['node', 'yarn', 'npm', 'pnpm'],\n Virtualization: ['Docker'],\n Browsers: ['Chrome', 'Edge', 'Firefox', 'Safari'],\n npmGlobalPackages: ['verdaccio'],\n });\n\n this.context.stdout.write(data);\n process.exit(0);\n }\n}\n"],"file":"info.js"}
1
+ {"version":3,"file":"info.js","names":["InfoCommand","Command","paths","execute","context","stdout","write","data","envinfo","run","System","Binaries","Virtualization","Browsers","npmGlobalPackages","process","exit"],"sources":["../../src/commands/info.ts"],"sourcesContent":["import { Command } from 'clipanion';\nimport envinfo from 'envinfo';\n\nexport class InfoCommand extends Command {\n public static paths = [[`--info`], [`-i`]];\n\n public async execute(): Promise<void> {\n this.context.stdout.write('\\nEnvironment Info:');\n const data = await envinfo.run({\n System: ['OS', 'CPU'],\n Binaries: ['node', 'yarn', 'npm', 'pnpm'],\n Virtualization: ['Docker'],\n Browsers: ['Chrome', 'Edge', 'Firefox', 'Safari'],\n npmGlobalPackages: ['verdaccio'],\n });\n\n this.context.stdout.write(data);\n process.exit(0);\n }\n}\n"],"mappings":";;;;;;;AAAA;;AACA;;;;AAEO,MAAMA,WAAN,SAA0BC,kBAA1B,CAAkC;EACpB,OAALC,KAAK,GAAG,CAAC,CAAE,QAAF,CAAD,EAAa,CAAE,IAAF,CAAb,CAAH;;EAEC,MAAPC,OAAO,GAAkB;IACpC,KAAKC,OAAL,CAAaC,MAAb,CAAoBC,KAApB,CAA0B,qBAA1B;IACA,MAAMC,IAAI,GAAG,MAAMC,gBAAA,CAAQC,GAAR,CAAY;MAC7BC,MAAM,EAAE,CAAC,IAAD,EAAO,KAAP,CADqB;MAE7BC,QAAQ,EAAE,CAAC,MAAD,EAAS,MAAT,EAAiB,KAAjB,EAAwB,MAAxB,CAFmB;MAG7BC,cAAc,EAAE,CAAC,QAAD,CAHa;MAI7BC,QAAQ,EAAE,CAAC,QAAD,EAAW,MAAX,EAAmB,SAAnB,EAA8B,QAA9B,CAJmB;MAK7BC,iBAAiB,EAAE,CAAC,WAAD;IALU,CAAZ,CAAnB;IAQA,KAAKV,OAAL,CAAaC,MAAb,CAAoBC,KAApB,CAA0BC,IAA1B;IACAQ,OAAO,CAACC,IAAR,CAAa,CAAb;EACD;;AAfsC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/commands/init.ts"],"names":["DEFAULT_PROCESS_NAME","InitCommand","Command","paths","Default","port","Option","String","description","usage","Usage","details","examples","config","initLogger","logConfig","logs","Error","log","err","execute","configPathLocation","configParsed","web","process","title","version","name","require","logger","info","console","error","exit"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AAEA;;AAGO,MAAMA,oBAA4B,GAAG,WAArC;;;AAEA,MAAMC,WAAN,SAA0BC,kBAA1B,CAAkC;AACpB,SAALC,KAAK,GAAG,CAACD,mBAAQE,OAAT,CAAH;AAEXC,EAAAA,IAAI,GAAGC,kBAAOC,MAAP,CAAc,uBAAd,EAAuC;AACpDC,IAAAA,WAAW,EAAE;AADuC,GAAvC,CAAH,CAH2B,CAOvC;;AACY,SAALC,KAAK,GAAGP,mBAAQQ,KAAR,CAAc;AAC3BF,IAAAA,WAAW,EAAG,mBADa;AAE3BG,IAAAA,OAAO,EAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAd+B;AAe3BC,IAAAA,QAAQ,EAAE,CACR,CAAE,gDAAF,EAAoD,WAApD,CADQ,EAER,CAAE,kCAAF,EAAsC,yBAAtC,CAFQ,EAGR,CACG,kFADH,EAEG,qDAFH,CAHQ;AAfiB,GAAd,CAAH;AAyBJC,EAAAA,MAAM,GAAGP,kBAAOC,MAAP,CAAc,aAAd,EAA6B;AAC5CC,IAAAA,WAAW,EAAE;AAD+B,GAA7B,CAAH;;AAINM,EAAAA,UAAU,CAACC,SAAD,EAA2B;AAC3C,QAAI;AACF;AACA,UAAIA,SAAS,CAACC,IAAd,EAAoB;AAClB,cAAMC,KAAK,CACT,iGADS,CAAX;AAGD;;AACD,yBAAMF,SAAS,CAACG,GAAhB;AACD,KARD,CAQE,OAAOC,GAAP,EAAiB;AACjB,YAAM,IAAIF,KAAJ,CAAUE,GAAV,CAAN;AACD;AACF;;AAEmB,QAAPC,OAAO,GAAG;AACrB,QAAI;AACF,YAAMC,kBAAkB,GAAG,4BAAe,KAAKR,MAApB,CAA3B;AACA,YAAMS,YAAY,GAAG,6BAAgBD,kBAAhB,CAArB;AACA,WAAKP,UAAL,CAAgBQ,YAAhB;AACA,YAAM;AAAEC,QAAAA;AAAF,UAAUD,YAAhB;AAEAE,MAAAA,OAAO,CAACC,KAAR,GAAgB,CAAAF,GAAG,SAAH,IAAAA,GAAG,WAAH,YAAAA,GAAG,CAAEE,KAAL,KAAczB,oBAA9B;;AAEA,YAAM;AAAE0B,QAAAA,OAAF;AAAWC,QAAAA;AAAX,UAAoBC,OAAO,CAAC,oBAAD,CAAjC;;AAEA,YAAM,yBAAWN,YAAX,EAAyB,KAAKjB,IAA9B,EAA8CqB,OAA9C,EAAuDC,IAAvD,CAAN;;AACAE,qBAAOC,IAAP,CAAY,gBAAZ;AACD,KAZD,CAYE,OAAOX,GAAP,EAAiB;AACjBY,MAAAA,OAAO,CAACC,KAAR,CAAcb,GAAd;AACAK,MAAAA,OAAO,CAACS,IAAR,CAAa,CAAb;AACD;AACF;;AApEsC","sourcesContent":["import { Command, Option } from 'clipanion';\n\nimport { findConfigFile, parseConfigFile } from '@verdaccio/config';\nimport { logger, setup } from '@verdaccio/logger';\nimport { LoggerConfigItem } from '@verdaccio/logger/src/logger';\nimport { initServer } from '@verdaccio/node-api';\nimport { ConfigRuntime } from '@verdaccio/types';\n\nexport const DEFAULT_PROCESS_NAME: string = 'verdaccio';\n\nexport class InitCommand extends Command {\n public static paths = [Command.Default];\n\n private port = Option.String('-l,-p,--listen,--port', {\n description: 'host:port number to listen on (default: localhost:4873)',\n });\n\n // eslint-disable-next-line\n static usage = Command.Usage({\n description: `launch the server`,\n details: `\n This start the registry in the default port.\n\n When used without arguments, it:\n\n - bootstrap the server at the port \\`4873\\`\n\n The optional arguments are:\n\n - \\`-l | --listen | -p | --port\\` to switch the default server port,\n - \\`-c | --config\\` to define a different configuration path location,\n\n `,\n examples: [\n [`Runs the server with the default configuration`, `verdaccio`],\n [`Runs the server in the port 5000`, `verdaccio --listen 5000`],\n [\n `Runs the server by using a different absolute location of the configuration file`,\n `verdaccio --config /home/user/verdaccio/config.yaml`,\n ],\n ],\n });\n\n private config = Option.String('-c,--config', {\n description: 'use this configuration file (default: ./config.yaml)',\n });\n\n private initLogger(logConfig: ConfigRuntime) {\n try {\n // @ts-expect-error\n if (logConfig.logs) {\n throw Error(\n 'the property config \"logs\" property is longer supported, rename to \"log\" and use object instead'\n );\n }\n setup(logConfig.log as LoggerConfigItem);\n } catch (err: any) {\n throw new Error(err);\n }\n }\n\n public async execute() {\n try {\n const configPathLocation = findConfigFile(this.config as string);\n const configParsed = parseConfigFile(configPathLocation);\n this.initLogger(configParsed);\n const { web } = configParsed;\n\n process.title = web?.title || DEFAULT_PROCESS_NAME;\n\n const { version, name } = require('../../package.json');\n\n await initServer(configParsed, this.port as string, version, name);\n logger.info('server started');\n } catch (err: any) {\n console.error(err);\n process.exit(1);\n }\n }\n}\n"],"file":"init.js"}
1
+ {"version":3,"file":"init.js","names":["DEFAULT_PROCESS_NAME","InitCommand","Command","paths","Default","port","Option","String","description","usage","Usage","details","examples","config","initLogger","logConfig","logs","Error","setup","log","err","execute","configPathLocation","findConfigFile","configParsed","parseConfigFile","web","process","title","version","name","require","initServer","logger","info","console","error","exit"],"sources":["../../src/commands/init.ts"],"sourcesContent":["import { Command, Option } from 'clipanion';\n\nimport { findConfigFile, parseConfigFile } from '@verdaccio/config';\nimport { logger, setup } from '@verdaccio/logger';\nimport { initServer } from '@verdaccio/node-api';\nimport { ConfigYaml, LoggerConfigItem } from '@verdaccio/types';\n\nexport const DEFAULT_PROCESS_NAME: string = 'verdaccio';\n\nexport class InitCommand extends Command {\n public static paths = [Command.Default];\n\n private port = Option.String('-l,-p,--listen,--port', {\n description: 'host:port number to listen on (default: localhost:4873)',\n });\n\n // eslint-disable-next-line\n static usage = Command.Usage({\n description: `launch the server`,\n details: `\n This start the registry in the default port.\n\n When used without arguments, it:\n\n - bootstrap the server at the port \\`4873\\`\n\n The optional arguments are:\n\n - \\`-l | --listen | -p | --port\\` to switch the default server port,\n - \\`-c | --config\\` to define a different configuration path location,\n\n `,\n examples: [\n [`Runs the server with the default configuration`, `verdaccio`],\n [`Runs the server in the port 5000`, `verdaccio --listen 5000`],\n [\n `Runs the server by using a different absolute location of the configuration file`,\n `verdaccio --config /home/user/verdaccio/config.yaml`,\n ],\n ],\n });\n\n private config = Option.String('-c,--config', {\n description: 'use this configuration file (default: ./config.yaml)',\n });\n\n private initLogger(logConfig: ConfigYaml) {\n try {\n // @ts-expect-error\n if (logConfig.logs) {\n throw Error(\n 'the property config \"logs\" property is longer supported, rename to \"log\" and use object instead'\n );\n }\n setup(logConfig.log as LoggerConfigItem);\n } catch (err: any) {\n throw new Error(err);\n }\n }\n\n public async execute() {\n try {\n const configPathLocation = findConfigFile(this.config as string);\n const configParsed = parseConfigFile(configPathLocation);\n this.initLogger(configParsed);\n const { web } = configParsed;\n\n process.title = web?.title || DEFAULT_PROCESS_NAME;\n\n const { version, name } = require('../../package.json');\n\n await initServer(configParsed, this.port as string, version, name);\n logger.info('server started');\n } catch (err: any) {\n console.error(err);\n process.exit(1);\n }\n }\n}\n"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AACA;;AAGO,MAAMA,oBAA4B,GAAG,WAArC;;;AAEA,MAAMC,WAAN,SAA0BC,kBAA1B,CAAkC;EACpB,OAALC,KAAK,GAAG,CAACD,kBAAA,CAAQE,OAAT,CAAH;EAEXC,IAAI,GAAGC,iBAAA,CAAOC,MAAP,CAAc,uBAAd,EAAuC;IACpDC,WAAW,EAAE;EADuC,CAAvC,CAAH,CAH2B,CAOvC;;EACY,OAALC,KAAK,GAAGP,kBAAA,CAAQQ,KAAR,CAAc;IAC3BF,WAAW,EAAG,mBADa;IAE3BG,OAAO,EAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAd+B;IAe3BC,QAAQ,EAAE,CACR,CAAE,gDAAF,EAAoD,WAApD,CADQ,EAER,CAAE,kCAAF,EAAsC,yBAAtC,CAFQ,EAGR,CACG,kFADH,EAEG,qDAFH,CAHQ;EAfiB,CAAd,CAAH;EAyBJC,MAAM,GAAGP,iBAAA,CAAOC,MAAP,CAAc,aAAd,EAA6B;IAC5CC,WAAW,EAAE;EAD+B,CAA7B,CAAH;;EAINM,UAAU,CAACC,SAAD,EAAwB;IACxC,IAAI;MACF;MACA,IAAIA,SAAS,CAACC,IAAd,EAAoB;QAClB,MAAMC,KAAK,CACT,iGADS,CAAX;MAGD;;MACD,IAAAC,aAAA,EAAMH,SAAS,CAACI,GAAhB;IACD,CARD,CAQE,OAAOC,GAAP,EAAiB;MACjB,MAAM,IAAIH,KAAJ,CAAUG,GAAV,CAAN;IACD;EACF;;EAEmB,MAAPC,OAAO,GAAG;IACrB,IAAI;MACF,MAAMC,kBAAkB,GAAG,IAAAC,sBAAA,EAAe,KAAKV,MAApB,CAA3B;MACA,MAAMW,YAAY,GAAG,IAAAC,uBAAA,EAAgBH,kBAAhB,CAArB;MACA,KAAKR,UAAL,CAAgBU,YAAhB;MACA,MAAM;QAAEE;MAAF,IAAUF,YAAhB;MAEAG,OAAO,CAACC,KAAR,GAAgB,CAAAF,GAAG,SAAH,IAAAA,GAAG,WAAH,YAAAA,GAAG,CAAEE,KAAL,KAAc5B,oBAA9B;;MAEA,MAAM;QAAE6B,OAAF;QAAWC;MAAX,IAAoBC,OAAO,CAAC,oBAAD,CAAjC;;MAEA,MAAM,IAAAC,mBAAA,EAAWR,YAAX,EAAyB,KAAKnB,IAA9B,EAA8CwB,OAA9C,EAAuDC,IAAvD,CAAN;;MACAG,cAAA,CAAOC,IAAP,CAAY,gBAAZ;IACD,CAZD,CAYE,OAAOd,GAAP,EAAiB;MACjBe,OAAO,CAACC,KAAR,CAAchB,GAAd;MACAO,OAAO,CAACU,IAAR,CAAa,CAAb;IACD;EACF;;AApEsC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/commands/version.ts"],"names":["VersionCommand","Command","paths","execute","version","require","context","stdout","write","process","exit"],"mappings":";;;;;;;AACA;;AADA;AAGO,MAAMA,cAAN,SAA6BC,kBAA7B,CAAqC;AAC9B,SAALC,KAAK,GAAG,CAAC,CAAE,WAAF,CAAD,EAAgB,CAAE,IAAF,CAAhB,CAAH;;AAEC,QAAPC,OAAO,GAAG;AACd,UAAMC,OAAO,GAAGC,OAAO,CAAC,oBAAD,CAAP,CAA8BD,OAA9C;;AACA,SAAKE,OAAL,CAAaC,MAAb,CAAoBC,KAApB,CAA2B,IAAGJ,OAAQ,EAAtC;AACAK,IAAAA,OAAO,CAACC,IAAR,CAAa,CAAb;AACD;;AAPyC","sourcesContent":["/* eslint-disable @typescript-eslint/explicit-member-accessibility */\nimport { Command } from 'clipanion';\n\nexport class VersionCommand extends Command {\n static paths = [[`--version`], [`-v`]];\n\n async execute() {\n const version = require('../../package.json').version;\n this.context.stdout.write(`v${version}`);\n process.exit(0);\n }\n}\n"],"file":"version.js"}
1
+ {"version":3,"file":"version.js","names":["VersionCommand","Command","paths","execute","version","require","context","stdout","write","process","exit"],"sources":["../../src/commands/version.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-member-accessibility */\nimport { Command } from 'clipanion';\n\nexport class VersionCommand extends Command {\n static paths = [[`--version`], [`-v`]];\n\n async execute() {\n const version = require('../../package.json').version;\n this.context.stdout.write(`v${version}`);\n process.exit(0);\n }\n}\n"],"mappings":";;;;;;;AACA;;AADA;AAGO,MAAMA,cAAN,SAA6BC,kBAA7B,CAAqC;EAC9B,OAALC,KAAK,GAAG,CAAC,CAAE,WAAF,CAAD,EAAgB,CAAE,IAAF,CAAhB,CAAH;;EAEC,MAAPC,OAAO,GAAG;IACd,MAAMC,OAAO,GAAGC,OAAO,CAAC,oBAAD,CAAP,CAA8BD,OAA9C;;IACA,KAAKE,OAAL,CAAaC,MAAb,CAAoBC,KAApB,CAA2B,IAAGJ,OAAQ,EAAtC;IACAK,OAAO,CAACC,IAAR,CAAa,CAAb;EACD;;AAPyC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":["require"],"mappings":";;AAAAA,OAAO,CAAC,OAAD,CAAP","sourcesContent":["require('./cli');\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":["require"],"sources":["../src/index.ts"],"sourcesContent":["require('./cli');\n"],"mappings":";;AAAAA,OAAO,CAAC,OAAD,CAAP"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils.ts"],"names":["MIN_NODE_VERSION","isVersionValid","processVersion","version","slice","semver","satisfies"],"mappings":";;;;;;;;AAAA;;;;AAEO,MAAMA,gBAAgB,GAAG,QAAzB;;;AAEA,SAASC,cAAT,CAAwBC,cAAxB,EAAwC;AAC7C,QAAMC,OAAO,GAAGD,cAAc,CAACE,KAAf,CAAqB,CAArB,CAAhB;AACA,SAAOC,gBAAOC,SAAP,CAAiBH,OAAjB,EAA2B,KAAIH,gBAAiB,EAAhD,CAAP;AACD","sourcesContent":["import semver from 'semver';\n\nexport const MIN_NODE_VERSION = '14.0.0';\n\nexport function isVersionValid(processVersion) {\n const version = processVersion.slice(1);\n return semver.satisfies(version, `>=${MIN_NODE_VERSION}`);\n}\n"],"file":"utils.js"}
1
+ {"version":3,"file":"utils.js","names":["MIN_NODE_VERSION","isVersionValid","processVersion","version","slice","semver","satisfies"],"sources":["../src/utils.ts"],"sourcesContent":["import semver from 'semver';\n\nexport const MIN_NODE_VERSION = '14.0.0';\n\nexport function isVersionValid(processVersion) {\n const version = processVersion.slice(1);\n return semver.satisfies(version, `>=${MIN_NODE_VERSION}`);\n}\n"],"mappings":";;;;;;;;AAAA;;;;AAEO,MAAMA,gBAAgB,GAAG,QAAzB;;;AAEA,SAASC,cAAT,CAAwBC,cAAxB,EAAwC;EAC7C,MAAMC,OAAO,GAAGD,cAAc,CAACE,KAAf,CAAqB,CAArB,CAAhB;EACA,OAAOC,eAAA,CAAOC,SAAP,CAAiBH,OAAjB,EAA2B,KAAIH,gBAAiB,EAAhD,CAAP;AACD"}
package/jest.config.js CHANGED
@@ -1 +1,10 @@
1
- module.exports = require('../../jest/config');
1
+ const config = require('../../jest/config');
2
+
3
+ module.exports = Object.assign({}, config, {
4
+ coverageThreshold: {
5
+ global: {
6
+ // FIXME: increase to 90
7
+ lines: 4,
8
+ },
9
+ },
10
+ });
package/package.json CHANGED
@@ -1,64 +1,64 @@
1
1
  {
2
- "name": "@verdaccio/cli",
3
- "version": "6.0.0-6-next.33",
4
- "author": {
5
- "name": "Juan Picado",
6
- "email": "juanpicado19@gmail.com"
7
- },
8
- "bin": {
9
- "verdaccio": "./bin/verdaccio",
10
- "verdaccio-cli": "./bin/verdaccio"
11
- },
12
- "repository": {
13
- "type": "https",
14
- "url": "https://github.com/verdaccio/verdaccio"
15
- },
16
- "homepage": "https://verdaccio.org",
17
- "keywords": [
18
- "private",
19
- "package",
20
- "repository",
21
- "registry",
22
- "enterprise",
23
- "modules",
24
- "proxy",
25
- "server",
26
- "verdaccio"
27
- ],
28
- "engines": {
29
- "node": ">=14",
30
- "npm": ">=6"
31
- },
32
- "description": "verdaccio CLI",
33
- "license": "MIT",
34
- "main": "./build/index.js",
35
- "types": "build/index.d.ts",
36
- "dependencies": {
37
- "@verdaccio/core": "6.0.0-6-next.5",
38
- "@verdaccio/config": "6.0.0-6-next.14",
39
- "@verdaccio/logger": "6.0.0-6-next.11",
40
- "@verdaccio/node-api": "6.0.0-6-next.31",
41
- "@verdaccio/fastify-migration": "6.0.0-6-next.23",
42
- "clipanion": "3.1.0",
43
- "envinfo": "7.8.1",
44
- "kleur": "3.0.3",
45
- "semver": "7.3.5"
46
- },
47
- "devDependencies": {
48
- "ts-node": "10.4.0"
49
- },
50
- "funding": {
51
- "type": "opencollective",
52
- "url": "https://opencollective.com/verdaccio"
53
- },
54
- "scripts": {
55
- "clean": "rimraf ./build",
56
- "test": "cross-env NODE_ENV=test BABEL_ENV=test jest",
57
- "type-check": "tsc --noEmit -p tsconfig.build.json",
58
- "build:types": "tsc --emitDeclarationOnly -p tsconfig.build.json",
59
- "build:js": "babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
60
- "watch": "pnpm build:js --F --watch",
61
- "build": "pnpm run build:js && pnpm run build:types",
62
- "start": "ts-node src/index.ts"
63
- }
64
- }
2
+ "name": "@verdaccio/cli",
3
+ "version": "6.0.0-6-next.36",
4
+ "author": {
5
+ "name": "Juan Picado",
6
+ "email": "juanpicado19@gmail.com"
7
+ },
8
+ "bin": {
9
+ "verdaccio": "./bin/verdaccio",
10
+ "verdaccio-cli": "./bin/verdaccio"
11
+ },
12
+ "repository": {
13
+ "type": "https",
14
+ "url": "https://github.com/verdaccio/verdaccio"
15
+ },
16
+ "homepage": "https://verdaccio.org",
17
+ "keywords": [
18
+ "private",
19
+ "package",
20
+ "repository",
21
+ "registry",
22
+ "enterprise",
23
+ "modules",
24
+ "proxy",
25
+ "server",
26
+ "verdaccio"
27
+ ],
28
+ "engines": {
29
+ "node": ">=14",
30
+ "npm": ">=6"
31
+ },
32
+ "description": "verdaccio CLI",
33
+ "license": "MIT",
34
+ "main": "./build/index.js",
35
+ "types": "build/index.d.ts",
36
+ "dependencies": {
37
+ "@verdaccio/core": "6.0.0-6-next.6",
38
+ "@verdaccio/config": "6.0.0-6-next.15",
39
+ "@verdaccio/logger": "6.0.0-6-next.12",
40
+ "@verdaccio/node-api": "6.0.0-6-next.34",
41
+ "clipanion": "3.1.0",
42
+ "envinfo": "7.8.1",
43
+ "kleur": "3.0.3",
44
+ "semver": "7.3.7"
45
+ },
46
+ "devDependencies": {
47
+ "ts-node": "10.9.1"
48
+ },
49
+ "funding": {
50
+ "type": "opencollective",
51
+ "url": "https://opencollective.com/verdaccio"
52
+ },
53
+ "scripts": {
54
+ "clean": "rimraf ./build",
55
+ "test": "jest",
56
+ "type-check": "tsc --noEmit -p tsconfig.build.json",
57
+ "build:types": "tsc --emitDeclarationOnly -p tsconfig.build.json",
58
+ "build:js": "babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
59
+ "watch": "pnpm build:js --F --watch",
60
+ "build": "pnpm run build:js && pnpm run build:types",
61
+ "start": "ts-node src/index.ts"
62
+ },
63
+ "readme": "# @verdaccio/cli\n\n[![backers](https://opencollective.com/verdaccio/tiers/backer/badge.svg?label=Backer&color=brightgreen)](https://opencollective.com/verdaccio)\n[![stackshare](https://img.shields.io/badge/Follow%20on-StackShare-blue.svg?logo=stackshare&style=flat)](https://stackshare.io/verdaccio)\n[![MIT](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/verdaccio/verdaccio/blob/master/LICENSE)\n[![Crowdin](https://d322cqt584bo4o.cloudfront.net/verdaccio/localized.svg)](https://crowdin.com/project/verdaccio)\n[![TODOs](https://badgen.net/https/api.tickgit.com/badgen/github.com/verdaccio/verdaccio)](https://www.tickgit.com/browse?repo=github.com/verdaccio/verdaccio)\n\n[![Twitter followers](https://img.shields.io/twitter/follow/verdaccio_npm.svg?style=social&label=Follow)](https://twitter.com/verdaccio_npm)\n[![Github](https://img.shields.io/github/stars/verdaccio/verdaccio.svg?style=social&label=Stars)](https://github.com/verdaccio/verdaccio/stargazers)\n\n## Donations\n\nVerdaccio is run by **volunteers**; nobody is working full-time on it. If you find this project to be useful and would like to support its development, consider making a donation - **your logo might end up in this readme.** 😉\n\n**[Donate](https://opencollective.com/verdaccio)** 💵👍🏻 starting from _\\$1/month_ or just one single contribution.\n\n## Report a vulnerability\n\nIf you want to report a security vulnerability, please follow the steps which we have defined for you in our [security policy](https://github.com/verdaccio/verdaccio/security/policy).\n\n## Open Collective Sponsors\n\nSupport this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/verdaccio#sponsor)]\n\n[![sponsor](https://opencollective.com/verdaccio/sponsor/0/avatar.svg)](https://opencollective.com/verdaccio/sponsor/0/website)\n[![sponsor](https://opencollective.com/verdaccio/sponsor/1/avatar.svg)](https://opencollective.com/verdaccio/sponsor/1/website)\n[![sponsor](https://opencollective.com/verdaccio/sponsor/2/avatar.svg)](https://opencollective.com/verdaccio/sponsor/2/website)\n[![sponsor](https://opencollective.com/verdaccio/sponsor/3/avatar.svg)](https://opencollective.com/verdaccio/sponsor/3/website)\n[![sponsor](https://opencollective.com/verdaccio/sponsor/4/avatar.svg)](https://opencollective.com/verdaccio/sponsor/4/website)\n[![sponsor](https://opencollective.com/verdaccio/sponsor/5/avatar.svg)](https://opencollective.com/verdaccio/sponsor/5/website)\n[![sponsor](https://opencollective.com/verdaccio/sponsor/6/avatar.svg)](https://opencollective.com/verdaccio/sponsor/6/website)\n[![sponsor](https://opencollective.com/verdaccio/sponsor/7/avatar.svg)](https://opencollective.com/verdaccio/sponsor/7/website)\n[![sponsor](https://opencollective.com/verdaccio/sponsor/8/avatar.svg)](https://opencollective.com/verdaccio/sponsor/8/website)\n[![sponsor](https://opencollective.com/verdaccio/sponsor/9/avatar.svg)](https://opencollective.com/verdaccio/sponsor/9/website)\n\n## Open Collective Backers\n\nThank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/verdaccio#backer)]\n\n[![backers](https://opencollective.com/verdaccio/backers.svg?width=890)](https://opencollective.com/verdaccio#backers)\n\n## Special Thanks\n\nThanks to the following companies to help us to achieve our goals providing free open source licenses.\n\n[![jetbrain](assets/thanks/jetbrains/logo.png)](https://www.jetbrains.com/)\n[![crowdin](assets/thanks/crowdin/logo.png)](https://crowdin.com/)\n[![balsamiq](assets/thanks/balsamiq/logo.jpg)](https://balsamiq.com/)\n\n## Contributors\n\nThis project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].\n\n[![contributors](https://opencollective.com/verdaccio/contributors.svg?width=890&button=true)](../../graphs/contributors)\n\n### FAQ / Contact / Troubleshoot\n\nIf you have any issue you can try the following options, do no desist to ask or check our issues database, perhaps someone has asked already what you are looking for.\n\n- [Blog](https://verdaccio.org/blog/)\n- [Donations](https://opencollective.com/verdaccio)\n- [Reporting an issue](https://github.com/verdaccio/verdaccio/blob/master/CONTRIBUTING.md#reporting-a-bug)\n- [Running discussions](https://github.com/verdaccio/verdaccio/issues?q=is%3Aissue+is%3Aopen+label%3Adiscuss)\n- [Chat](http://chat.verdaccio.org/)\n- [Logos](https://verdaccio.org/docs/en/logo)\n- [Docker Examples](https://github.com/verdaccio/docker-examples)\n- [FAQ](https://github.com/verdaccio/verdaccio/issues?utf8=%E2%9C%93&q=is%3Aissue%20label%3Aquestion%20)\n\n### License\n\nVerdaccio is [MIT licensed](https://github.com/verdaccio/verdaccio/blob/master/LICENSE)\n\nThe Verdaccio documentation and logos (excluding /thanks, e.g., .md, .png, .sketch) files within the /assets folder) is\n[Creative Commons licensed](https://github.com/verdaccio/verdaccio/blob/master/LICENSE-docs).\n"
64
+ }
package/src/cli.ts CHANGED
@@ -2,7 +2,6 @@ import { Cli } from 'clipanion';
2
2
 
3
3
  import { warningUtils } from '@verdaccio/core';
4
4
 
5
- import { FastifyServer } from './commands/FastifyServer';
6
5
  import { InfoCommand } from './commands/info';
7
6
  import { InitCommand } from './commands/init';
8
7
  import { VersionCommand } from './commands/version';
@@ -30,7 +29,6 @@ const cli = new Cli({
30
29
  cli.register(InfoCommand);
31
30
  cli.register(InitCommand);
32
31
  cli.register(VersionCommand);
33
- cli.register(FastifyServer);
34
32
  cli.runExit(args, Cli.defaultContext);
35
33
 
36
34
  process.on('uncaughtException', function (err) {
@@ -2,9 +2,8 @@ import { Command, Option } from 'clipanion';
2
2
 
3
3
  import { findConfigFile, parseConfigFile } from '@verdaccio/config';
4
4
  import { logger, setup } from '@verdaccio/logger';
5
- import { LoggerConfigItem } from '@verdaccio/logger/src/logger';
6
5
  import { initServer } from '@verdaccio/node-api';
7
- import { ConfigRuntime } from '@verdaccio/types';
6
+ import { ConfigYaml, LoggerConfigItem } from '@verdaccio/types';
8
7
 
9
8
  export const DEFAULT_PROCESS_NAME: string = 'verdaccio';
10
9
 
@@ -45,7 +44,7 @@ export class InitCommand extends Command {
45
44
  description: 'use this configuration file (default: ./config.yaml)',
46
45
  });
47
46
 
48
- private initLogger(logConfig: ConfigRuntime) {
47
+ private initLogger(logConfig: ConfigYaml) {
49
48
  try {
50
49
  // @ts-expect-error
51
50
  if (logConfig.logs) {
@@ -1,16 +0,0 @@
1
- import { Command } from 'clipanion';
2
- export declare const DEFAULT_PROCESS_NAME: string;
3
- /**
4
- * This command is intended to run the server with Fastify
5
- * as a migration step.
6
- * More info: https://github.com/verdaccio/verdaccio/discussions/2155
7
- * To try out.
8
- * pnpm debug:fastify
9
- */
10
- export declare class FastifyServer extends Command {
11
- static paths: string[][];
12
- private port;
13
- private config;
14
- private initLogger;
15
- execute(): Promise<void>;
16
- }
@@ -1,77 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.FastifyServer = exports.DEFAULT_PROCESS_NAME = void 0;
7
-
8
- var _clipanion = require("clipanion");
9
-
10
- var _config = require("@verdaccio/config");
11
-
12
- var _fastifyMigration = _interopRequireDefault(require("@verdaccio/fastify-migration"));
13
-
14
- var _logger = require("@verdaccio/logger");
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
- const DEFAULT_PROCESS_NAME = 'verdaccio';
19
- /**
20
- * This command is intended to run the server with Fastify
21
- * as a migration step.
22
- * More info: https://github.com/verdaccio/verdaccio/discussions/2155
23
- * To try out.
24
- * pnpm debug:fastify
25
- */
26
-
27
- exports.DEFAULT_PROCESS_NAME = DEFAULT_PROCESS_NAME;
28
-
29
- class FastifyServer extends _clipanion.Command {
30
- static paths = [['fastify-server']];
31
- port = _clipanion.Option.String('-l,-p,--listen,--port', {
32
- description: 'host:port number to listen on (default: localhost:4873)'
33
- });
34
- config = _clipanion.Option.String('-c,--config', {
35
- description: 'use this configuration file (default: ./config.yaml)'
36
- });
37
-
38
- initLogger(logConfig) {
39
- try {
40
- if (logConfig.log) {
41
- throw Error('logger as array not longer supported');
42
- } // FUTURE: remove fallback when is ready
43
-
44
-
45
- (0, _logger.setup)(logConfig.log);
46
- } catch (err) {
47
- throw new Error(err);
48
- }
49
- }
50
-
51
- async execute() {
52
- try {
53
- const configPathLocation = (0, _config.findConfigFile)(this.config);
54
- const configParsed = (0, _config.parseConfigFile)(configPathLocation);
55
- const {
56
- web
57
- } = configParsed;
58
- this.initLogger(configParsed);
59
- process.title = (web === null || web === void 0 ? void 0 : web.title) || DEFAULT_PROCESS_NAME; // FIXME: need a way to get version of the package.
60
- // const { version, name } = require('../../package.json');
61
-
62
- const ser = await (0, _fastifyMigration.default)({
63
- logger: _logger.logger,
64
- config: configParsed
65
- }); // FIXME: harcoded, this would need to come from the configuration and the --listen flag.
66
-
67
- await ser.listen(process.env.PORT || 4873);
68
- } catch (err) {
69
- console.error(err);
70
- process.exit(1);
71
- }
72
- }
73
-
74
- }
75
-
76
- exports.FastifyServer = FastifyServer;
77
- //# sourceMappingURL=FastifyServer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/commands/FastifyServer.ts"],"names":["DEFAULT_PROCESS_NAME","FastifyServer","Command","paths","port","Option","String","description","config","initLogger","logConfig","log","Error","err","execute","configPathLocation","configParsed","web","process","title","ser","logger","listen","env","PORT","console","error","exit"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AACA;;;;AAGO,MAAMA,oBAA4B,GAAG,WAArC;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;;;;AACO,MAAMC,aAAN,SAA4BC,kBAA5B,CAAoC;AACtB,SAALC,KAAK,GAAG,CAAC,CAAC,gBAAD,CAAD,CAAH;AAEXC,EAAAA,IAAI,GAAGC,kBAAOC,MAAP,CAAc,uBAAd,EAAuC;AACpDC,IAAAA,WAAW,EAAE;AADuC,GAAvC,CAAH;AAIJC,EAAAA,MAAM,GAAGH,kBAAOC,MAAP,CAAc,aAAd,EAA6B;AAC5CC,IAAAA,WAAW,EAAE;AAD+B,GAA7B,CAAH;;AAINE,EAAAA,UAAU,CAACC,SAAD,EAA2B;AAC3C,QAAI;AACF,UAAIA,SAAS,CAACC,GAAd,EAAmB;AACjB,cAAMC,KAAK,CAAC,sCAAD,CAAX;AACD,OAHC,CAIF;;;AACA,yBAAMF,SAAS,CAACC,GAAhB;AACD,KAND,CAME,OAAOE,GAAP,EAAiB;AACjB,YAAM,IAAID,KAAJ,CAAUC,GAAV,CAAN;AACD;AACF;;AAEmB,QAAPC,OAAO,GAAG;AACrB,QAAI;AACF,YAAMC,kBAAkB,GAAG,4BAAe,KAAKP,MAApB,CAA3B;AACA,YAAMQ,YAAY,GAAG,6BAAgBD,kBAAhB,CAArB;AACA,YAAM;AAAEE,QAAAA;AAAF,UAAUD,YAAhB;AACA,WAAKP,UAAL,CAAgBO,YAAhB;AAEAE,MAAAA,OAAO,CAACC,KAAR,GAAgB,CAAAF,GAAG,SAAH,IAAAA,GAAG,WAAH,YAAAA,GAAG,CAAEE,KAAL,KAAcnB,oBAA9B,CANE,CAOF;AACA;;AACA,YAAMoB,GAAG,GAAG,MAAM,+BAAO;AAAEC,QAAAA,MAAM,EAANA,cAAF;AAAUb,QAAAA,MAAM,EAAEQ;AAAlB,OAAP,CAAlB,CATE,CAUF;;AACA,YAAMI,GAAG,CAACE,MAAJ,CAAWJ,OAAO,CAACK,GAAR,CAAYC,IAAZ,IAAoB,IAA/B,CAAN;AACD,KAZD,CAYE,OAAOX,GAAP,EAAiB;AACjBY,MAAAA,OAAO,CAACC,KAAR,CAAcb,GAAd;AACAK,MAAAA,OAAO,CAACS,IAAR,CAAa,CAAb;AACD;AACF;;AAxCwC","sourcesContent":["import { Command, Option } from 'clipanion';\n\nimport { findConfigFile, parseConfigFile } from '@verdaccio/config';\nimport server from '@verdaccio/fastify-migration';\nimport { logger, setup } from '@verdaccio/logger';\nimport { ConfigRuntime } from '@verdaccio/types';\n\nexport const DEFAULT_PROCESS_NAME: string = 'verdaccio';\n\n/**\n * This command is intended to run the server with Fastify\n * as a migration step.\n * More info: https://github.com/verdaccio/verdaccio/discussions/2155\n * To try out.\n * pnpm debug:fastify\n */\nexport class FastifyServer extends Command {\n public static paths = [['fastify-server']];\n\n private port = Option.String('-l,-p,--listen,--port', {\n description: 'host:port number to listen on (default: localhost:4873)',\n });\n\n private config = Option.String('-c,--config', {\n description: 'use this configuration file (default: ./config.yaml)',\n });\n\n private initLogger(logConfig: ConfigRuntime) {\n try {\n if (logConfig.log) {\n throw Error('logger as array not longer supported');\n }\n // FUTURE: remove fallback when is ready\n setup(logConfig.log);\n } catch (err: any) {\n throw new Error(err);\n }\n }\n\n public async execute() {\n try {\n const configPathLocation = findConfigFile(this.config as string);\n const configParsed = parseConfigFile(configPathLocation);\n const { web } = configParsed;\n this.initLogger(configParsed);\n\n process.title = web?.title || DEFAULT_PROCESS_NAME;\n // FIXME: need a way to get version of the package.\n // const { version, name } = require('../../package.json');\n const ser = await server({ logger, config: configParsed });\n // FIXME: harcoded, this would need to come from the configuration and the --listen flag.\n await ser.listen(process.env.PORT || 4873);\n } catch (err: any) {\n console.error(err);\n process.exit(1);\n }\n }\n}\n"],"file":"FastifyServer.js"}
@@ -1,58 +0,0 @@
1
- import { Command, Option } from 'clipanion';
2
-
3
- import { findConfigFile, parseConfigFile } from '@verdaccio/config';
4
- import server from '@verdaccio/fastify-migration';
5
- import { logger, setup } from '@verdaccio/logger';
6
- import { ConfigRuntime } from '@verdaccio/types';
7
-
8
- export const DEFAULT_PROCESS_NAME: string = 'verdaccio';
9
-
10
- /**
11
- * This command is intended to run the server with Fastify
12
- * as a migration step.
13
- * More info: https://github.com/verdaccio/verdaccio/discussions/2155
14
- * To try out.
15
- * pnpm debug:fastify
16
- */
17
- export class FastifyServer extends Command {
18
- public static paths = [['fastify-server']];
19
-
20
- private port = Option.String('-l,-p,--listen,--port', {
21
- description: 'host:port number to listen on (default: localhost:4873)',
22
- });
23
-
24
- private config = Option.String('-c,--config', {
25
- description: 'use this configuration file (default: ./config.yaml)',
26
- });
27
-
28
- private initLogger(logConfig: ConfigRuntime) {
29
- try {
30
- if (logConfig.log) {
31
- throw Error('logger as array not longer supported');
32
- }
33
- // FUTURE: remove fallback when is ready
34
- setup(logConfig.log);
35
- } catch (err: any) {
36
- throw new Error(err);
37
- }
38
- }
39
-
40
- public async execute() {
41
- try {
42
- const configPathLocation = findConfigFile(this.config as string);
43
- const configParsed = parseConfigFile(configPathLocation);
44
- const { web } = configParsed;
45
- this.initLogger(configParsed);
46
-
47
- process.title = web?.title || DEFAULT_PROCESS_NAME;
48
- // FIXME: need a way to get version of the package.
49
- // const { version, name } = require('../../package.json');
50
- const ser = await server({ logger, config: configParsed });
51
- // FIXME: harcoded, this would need to come from the configuration and the --listen flag.
52
- await ser.listen(process.env.PORT || 4873);
53
- } catch (err: any) {
54
- console.error(err);
55
- process.exit(1);
56
- }
57
- }
58
- }