@verdaccio/cli 6.0.0-6-next.75 → 7.0.0-next-7.7

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,379 @@
1
1
  # @verdaccio/cli
2
2
 
3
+ ## 7.0.0-next-7.7
4
+
5
+ ### Patch Changes
6
+
7
+ - @verdaccio/core@7.0.0-next-7.7
8
+ - @verdaccio/config@7.0.0-next-7.7
9
+ - @verdaccio/node-api@7.0.0-next-7.7
10
+ - @verdaccio/logger@7.0.0-next-7.7
11
+
12
+ ## 7.0.0-next.6
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies [4d96324]
17
+ - @verdaccio/config@7.0.0-next.6
18
+ - @verdaccio/node-api@7.0.0-next.6
19
+ - @verdaccio/core@7.0.0-next.6
20
+ - @verdaccio/logger@7.0.0-next.6
21
+
22
+ ## 7.0.0-next.5
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies [f047cc8]
27
+ - @verdaccio/core@7.0.0-next.5
28
+ - @verdaccio/config@7.0.0-next.5
29
+ - @verdaccio/node-api@7.0.0-next.5
30
+ - @verdaccio/logger@7.0.0-next.5
31
+
32
+ ## 7.0.0-next.4
33
+
34
+ ### Patch Changes
35
+
36
+ - @verdaccio/node-api@7.0.0-next.4
37
+ - @verdaccio/core@7.0.0-next.4
38
+ - @verdaccio/config@7.0.0-next.4
39
+ - @verdaccio/logger@7.0.0-next.4
40
+
41
+ ## 7.0.0-next.3
42
+
43
+ ### Major Changes
44
+
45
+ - e7ebccb61: update major dependencies, remove old nodejs support
46
+
47
+ ### Patch Changes
48
+
49
+ - Updated dependencies [daceb6d87]
50
+ - Updated dependencies [e7ebccb61]
51
+ - @verdaccio/config@7.0.0-next.3
52
+ - @verdaccio/core@7.0.0-next.3
53
+ - @verdaccio/logger@7.0.0-next.3
54
+ - @verdaccio/node-api@7.0.0-next.3
55
+
56
+ ## 7.0.0-next.2
57
+
58
+ ### Patch Changes
59
+
60
+ - @verdaccio/core@7.0.0-next.2
61
+ - @verdaccio/config@7.0.0-next.2
62
+ - @verdaccio/node-api@7.0.0-next.2
63
+ - @verdaccio/logger@7.0.0-next.2
64
+
65
+ ## 7.0.0-next.1
66
+
67
+ ### Patch Changes
68
+
69
+ - @verdaccio/core@7.0.0-next.1
70
+ - @verdaccio/config@7.0.0-next.1
71
+ - @verdaccio/node-api@7.0.0-next.1
72
+ - @verdaccio/logger@7.0.0-next.1
73
+
74
+ ## 7.0.0-next.0
75
+
76
+ ### Major Changes
77
+
78
+ - feat!: bump to v7
79
+
80
+ ### Patch Changes
81
+
82
+ - Updated dependencies
83
+ - @verdaccio/config@7.0.0-next.0
84
+ - @verdaccio/core@7.0.0-next.0
85
+ - @verdaccio/logger@7.0.0-next.0
86
+ - @verdaccio/node-api@7.0.0-next.0
87
+
88
+ ## 6.0.0
89
+
90
+ ### Major Changes
91
+
92
+ - 292c0a37f: feat!: replace deprecated request dependency by got
93
+
94
+ 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.
95
+
96
+ ## Notes
97
+
98
+ - Remove deprecated `request` by other `got`, retry improved, custom Agent ( got does not include it built-in)
99
+ - Remove `async` dependency from storage (used by core) it was linked with proxy somehow safe to remove now
100
+ - Refactor with promises instead callback wherever is possible
101
+ - ~Document the API~
102
+ - Improve testing, integration tests
103
+ - Bugfix
104
+ - Clean up old validations
105
+ - Improve performance
106
+
107
+ ## 💥 Breaking changes
108
+
109
+ - Plugin API methods were callbacks based are returning promises, this will break current storage plugins, check documentation for upgrade.
110
+ - 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));`
111
+ - `@verdaccio/streams` stream abort support is legacy is being deprecated removed
112
+ - Remove AWS and Google Cloud packages for future refactoring [#2574](https://github.com/verdaccio/verdaccio/pull/2574).
113
+
114
+ - a3a209b5e: feat: migrate to pino.js 8
115
+ - 459b6fa72: refactor: search v1 endpoint and local-database
116
+
117
+ - refactor search `api v1` endpoint, improve performance
118
+ - remove usage of `async` dependency https://github.com/verdaccio/verdaccio/issues/1225
119
+ - refactor method storage class
120
+ - create new module `core` to reduce the ammount of modules with utilities
121
+ - use `undici` instead `node-fetch`
122
+ - use `fastify` instead `express` for functional test
123
+
124
+ ### Breaking changes
125
+
126
+ - plugin storage API changes
127
+ - remove old search endpoint (return 404)
128
+ - filter local private packages at plugin level
129
+
130
+ The storage api changes for methods `get`, `add`, `remove` as promise base. The `search` methods also changes and recieves a `query` object that contains all query params from the client.
131
+
132
+ ```ts
133
+ export interface IPluginStorage<T> extends IPlugin {
134
+ add(name: string): Promise<void>;
135
+ remove(name: string): Promise<void>;
136
+ get(): Promise<any>;
137
+ init(): Promise<void>;
138
+ getSecret(): Promise<string>;
139
+ setSecret(secret: string): Promise<any>;
140
+ getPackageStorage(packageInfo: string): IPackageStorage;
141
+ search(query: searchUtils.SearchQuery): Promise<searchUtils.SearchItem[]>;
142
+ saveToken(token: Token): Promise<any>;
143
+ deleteToken(user: string, tokenKey: string): Promise<any>;
144
+ readTokens(filter: TokenFilter): Promise<Token[]>;
145
+ }
146
+ ```
147
+
148
+ - 794af76c5: Remove Node 12 support
149
+
150
+ - We need move to the new `undici` and does not support Node.js 12
151
+
152
+ - 10aeb4f13: feat!: experiments config renamed to flags
153
+
154
+ - The `experiments` configuration is renamed to `flags`. The functionality is exactly the same.
155
+
156
+ ```js
157
+ flags: token: false;
158
+ search: false;
159
+ ```
160
+
161
+ - The `self_path` property from the config file is being removed in favor of `config_file` full path.
162
+ - Refactor `config` module, better types and utilities
163
+
164
+ - e367c3f1e: - Replace signature handler for legacy tokens by removing deprecated crypto.createDecipher by createCipheriv
165
+
166
+ - Introduce environment variables for legacy tokens
167
+
168
+ ### Code Improvements
169
+
170
+ - Add debug library for improve developer experience
171
+
172
+ ### Breaking change
173
+
174
+ - The new signature invalidates all previous tokens generated by Verdaccio 4 or previous versions.
175
+ - The secret key must have 32 characters long.
176
+
177
+ ### New environment variables
178
+
179
+ - `VERDACCIO_LEGACY_ALGORITHM`: Allows to define the specific algorithm for the token signature which by default is `aes-256-ctr`
180
+ - `VERDACCIO_LEGACY_ENCRYPTION_KEY`: By default, the token stores in the database, but using this variable allows to get it from memory
181
+
182
+ - 2e3b9552c: feat: node 14 as minimum for running cli
183
+ - 5becf3f25: feat: use clipanion over commander
184
+ - 82cb0f2bf: feat!: config.logs throw an error, logging config not longer accept array or logs property
185
+
186
+ ### 💥 Breaking change
187
+
188
+ This is valid
189
+
190
+ ```yaml
191
+ log: { type: stdout, format: pretty, level: http }
192
+ ```
193
+
194
+ This is invalid
195
+
196
+ ```yaml
197
+ logs: { type: stdout, format: pretty, level: http }
198
+ ```
199
+
200
+ or
201
+
202
+ ```yaml
203
+ logs:
204
+ - [{ type: stdout, format: pretty, level: http }]
205
+ ```
206
+
207
+ - 8f43bf17d: feat: node api new structure based on promise
208
+
209
+ ```js
210
+ import { runServer } from "@verdaccio/node-api";
211
+ // or
212
+ import { runServer } from "verdaccio";
213
+
214
+ const app = await runServer(); // default configuration
215
+ const app = await runServer("./config/config.yaml");
216
+ const app = await runServer({ configuration });
217
+ app.listen(4000, (event) => {
218
+ // do something
219
+ });
220
+ ```
221
+
222
+ ### Breaking Change
223
+
224
+ If you are using the node-api, the new structure is Promise based and less arguments.
225
+
226
+ ### Minor Changes
227
+
228
+ - 974cd8c19: fix: startup messages improved and logs support on types
229
+ - 631abe1ac: feat: refactor logger
230
+ - 00d1d2a17: chore: env variable for launch fastify
231
+
232
+ - Update fastify to major release `v4.3.0`
233
+ - Update CLI launcher
234
+
235
+ via CLI
236
+
237
+ ```
238
+ VERDACCIO_SERVER=fastify verdaccio
239
+ ```
240
+
241
+ with docker
242
+
243
+ ```
244
+ docker run -it --rm --name verdaccio \
245
+ -e "VERDACCIO_SERVER=8080" -p 8080:8080 \
246
+ -e "VERDACCIO_SERVER=fastify" \
247
+ verdaccio/verdaccio
248
+ ```
249
+
250
+ - 55ee3fdd9: [Fastify] Add ping endpoint
251
+ - b61f762d6: feat: add server rate limit protection to all request
252
+
253
+ To modify custom values, use the server settings property.
254
+
255
+ ```markdown
256
+ server:
257
+
258
+ ## https://www.npmjs.com/package/express-rate-limit#configuration-options
259
+
260
+ rateLimit:
261
+ windowMs: 1000
262
+ max: 10000
263
+ ```
264
+
265
+ The values are intended to be high, if you want to improve security of your server consider
266
+ using different values.
267
+
268
+ - 154b2ecd3: refactor: remove @verdaccio/commons-api in favor @verdaccio/core and remove duplications
269
+ - aa763baec: feat: add typescript project references settings
270
+
271
+ Reading https://ebaytech.berlin/optimizing-multi-package-apps-with-typescript-project-references-d5c57a3b4440 I realized I can use project references to solve the issue to pre-compile modules on develop mode.
272
+
273
+ It allows to navigate (IDE) trough the packages without need compile the packages.
274
+
275
+ Add two `tsconfig`, one using the previous existing configuration that is able to produce declaration files (`tsconfig.build`) and a new one `tsconfig` which is enables [_projects references_](https://www.typescriptlang.org/docs/handbook/project-references.html).
276
+
277
+ - d5eacc218: feat: improve cli loggin on start up
278
+ - 6c1eb021b: feat: use warning codes for deprecation warnings
279
+
280
+ ### Patch Changes
281
+
282
+ - d78c8b515: chore: improve error logger message
283
+ - 351aeeaa8: fix(deps): @verdaccio/utils should be a prod dep of local-storage
284
+ - 19d272d10: fix: restore logger on init
285
+
286
+ Enable logger after parse configuration and log the very first step on startup phase.
287
+
288
+ ```bash
289
+ warn --- experiments are enabled, it is recommended do not use experiments in production comment out this section to disable it
290
+ info --- support for experiment [token] is disabled
291
+ info --- support for experiment [search] is disabled
292
+ (node:50831) Warning: config.logs is deprecated, rename configuration to "config.log"
293
+ (Use `node --trace-warnings ...` to show where the warning was created)
294
+ info --- http address http://localhost:4873/
295
+ info --- version: 6.0.0-6-next.11
296
+ info --- server started
297
+ ```
298
+
299
+ - a610ef26b: chore: add release step to private regisry on merge changeset pr
300
+ - 020ede43f: fix: version with breakline
301
+ - 34f0f1101: Enable prerelease mode with **changesets**
302
+ - 68ea21214: ESLint Warnings Fixed
303
+
304
+ Related to issue #1461
305
+
306
+ - max-len: most of the sensible max-len errors are fixed
307
+ - no-unused-vars: most of these types of errors are fixed by deleting not needed declarations
308
+ - @typescript-eslint/no-unused-vars: same as above
309
+
310
+ - b849128de: fix: handle upload scoped tarball
311
+ - Updated dependencies [292c0a37f]
312
+ - Updated dependencies [974cd8c19]
313
+ - Updated dependencies [ef88da3b4]
314
+ - Updated dependencies [43f32687c]
315
+ - Updated dependencies [679c19c1b]
316
+ - Updated dependencies [a3a209b5e]
317
+ - Updated dependencies [459b6fa72]
318
+ - Updated dependencies [9fc2e7961]
319
+ - Updated dependencies [24b9be020]
320
+ - Updated dependencies [794af76c5]
321
+ - Updated dependencies [e75c0a3b9]
322
+ - Updated dependencies [351aeeaa8]
323
+ - Updated dependencies [10aeb4f13]
324
+ - Updated dependencies [631abe1ac]
325
+ - Updated dependencies [9718e0330]
326
+ - Updated dependencies [1b217fd34]
327
+ - Updated dependencies [e367c3f1e]
328
+ - Updated dependencies [a1da11308]
329
+ - Updated dependencies [d167f92e1]
330
+ - Updated dependencies [00d1d2a17]
331
+ - Updated dependencies [19d272d10]
332
+ - Updated dependencies [1810ed0d8]
333
+ - Updated dependencies [a610ef26b]
334
+ - Updated dependencies [ddb6a2239]
335
+ - Updated dependencies [b61f762d6]
336
+ - Updated dependencies [d43894e8f]
337
+ - Updated dependencies [154b2ecd3]
338
+ - Updated dependencies [aa763baec]
339
+ - Updated dependencies [d5eacc218]
340
+ - Updated dependencies [378e907d5]
341
+ - Updated dependencies [16e38df8a]
342
+ - Updated dependencies [34f0f1101]
343
+ - Updated dependencies [df0da3d69]
344
+ - Updated dependencies [82cb0f2bf]
345
+ - Updated dependencies [dc571aabd]
346
+ - Updated dependencies [b78f35257]
347
+ - Updated dependencies [f859d2b1a]
348
+ - Updated dependencies [2c594910d]
349
+ - Updated dependencies [6c1eb021b]
350
+ - Updated dependencies [62c24b632]
351
+ - Updated dependencies [0a6412ca9]
352
+ - Updated dependencies [d08fe29d9]
353
+ - Updated dependencies [5167bb528]
354
+ - Updated dependencies [65f88b826]
355
+ - Updated dependencies [b3e8438f6]
356
+ - Updated dependencies [c9d1af0e5]
357
+ - Updated dependencies [730b5d8cc]
358
+ - Updated dependencies [4b29d715b]
359
+ - Updated dependencies [68ea21214]
360
+ - Updated dependencies [8f43bf17d]
361
+ - Updated dependencies [45c03819e]
362
+ - Updated dependencies [b849128de]
363
+ - @verdaccio/config@6.0.0
364
+ - @verdaccio/core@6.0.0
365
+ - @verdaccio/logger@6.0.0
366
+ - @verdaccio/node-api@6.0.0
367
+
368
+ ## 6.0.0-6-next.76
369
+
370
+ ### Patch Changes
371
+
372
+ - @verdaccio/node-api@6.0.0-6-next.76
373
+ - @verdaccio/core@6.0.0-6-next.76
374
+ - @verdaccio/config@6.0.0-6-next.76
375
+ - @verdaccio/logger@6.0.0-6-next.44
376
+
3
377
  ## 6.0.0-6-next.75
4
378
 
5
379
  ### Patch Changes
@@ -684,14 +1058,14 @@
684
1058
  - 5c5057fc: feat: node api new structure based on promise
685
1059
 
686
1060
  ```js
687
- import { runServer } from '@verdaccio/node-api';
1061
+ import { runServer } from "@verdaccio/node-api";
688
1062
  // or
689
- import { runServer } from 'verdaccio';
1063
+ import { runServer } from "verdaccio";
690
1064
 
691
1065
  const app = await runServer(); // default configuration
692
- const app = await runServer('./config/config.yaml');
1066
+ const app = await runServer("./config/config.yaml");
693
1067
  const app = await runServer({ configuration });
694
- app.listen(4000, event => {
1068
+ app.listen(4000, (event) => {
695
1069
  // do something
696
1070
  });
697
1071
  ```
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2021 Verdaccio contributors
3
+ Copyright (c) 2024 Verdaccio 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,8 +9,7 @@ var _config = require("@verdaccio/config");
9
9
  var _core = require("@verdaccio/core");
10
10
  var _logger = require("@verdaccio/logger");
11
11
  var _nodeApi = require("@verdaccio/node-api");
12
- const DEFAULT_PROCESS_NAME = 'verdaccio';
13
- exports.DEFAULT_PROCESS_NAME = DEFAULT_PROCESS_NAME;
12
+ const DEFAULT_PROCESS_NAME = exports.DEFAULT_PROCESS_NAME = 'verdaccio';
14
13
  class InitCommand extends _clipanion.Command {
15
14
  static paths = [_clipanion.Command.Default];
16
15
  port = _clipanion.Option.String('-l,-p,--listen,--port', {
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","names":["_clipanion","require","_config","_core","_logger","_nodeApi","DEFAULT_PROCESS_NAME","exports","InitCommand","Command","paths","Default","port","Option","String","description","usage","Usage","details","examples","config","initLogger","logConfig","logs","log","warningUtils","emit","Codes","VERWAR002","setup","execute","configPathLocation","findConfigFile","configParsed","parseConfigFile","web","process","title","version","name","initServer","logger","info","err","console","error","exit"],"sources":["../../src/commands/init.ts"],"sourcesContent":["import { Command, Option } from 'clipanion';\n\nimport { findConfigFile, parseConfigFile } from '@verdaccio/config';\nimport { warningUtils } from '@verdaccio/core';\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 if (logConfig.logs) {\n logConfig.log = logConfig.logs;\n warningUtils.emit(warningUtils.Codes.VERWAR002);\n }\n setup(logConfig.log as LoggerConfigItem);\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,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAGO,MAAMK,oBAA4B,GAAG,WAAW;AAACC,OAAA,CAAAD,oBAAA,GAAAA,oBAAA;AAEjD,MAAME,WAAW,SAASC,kBAAO,CAAC;EACvC,OAAcC,KAAK,GAAG,CAACD,kBAAO,CAACE,OAAO,CAAC;EAE/BC,IAAI,GAAGC,iBAAM,CAACC,MAAM,CAAC,uBAAuB,EAAE;IACpDC,WAAW,EAAE;EACf,CAAC,CAAC;;EAEF;EACA,OAAOC,KAAK,GAAGP,kBAAO,CAACQ,KAAK,CAAC;IAC3BF,WAAW,EAAG,mBAAkB;IAChCG,OAAO,EAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;IACDC,QAAQ,EAAE,CACR,CAAE,gDAA+C,EAAG,WAAU,CAAC,EAC/D,CAAE,kCAAiC,EAAG,yBAAwB,CAAC,EAC/D,CACG,kFAAiF,EACjF,qDAAoD,CACtD;EAEL,CAAC,CAAC;EAEMC,MAAM,GAAGP,iBAAM,CAACC,MAAM,CAAC,aAAa,EAAE;IAC5CC,WAAW,EAAE;EACf,CAAC,CAAC;EAEMM,UAAUA,CAACC,SAAqB,EAAE;IACxC,IAAIA,SAAS,CAACC,IAAI,EAAE;MAClBD,SAAS,CAACE,GAAG,GAAGF,SAAS,CAACC,IAAI;MAC9BE,kBAAY,CAACC,IAAI,CAACD,kBAAY,CAACE,KAAK,CAACC,SAAS,CAAC;IACjD;IACA,IAAAC,aAAK,EAACP,SAAS,CAACE,GAAuB,CAAC;EAC1C;EAEA,MAAaM,OAAOA,CAAA,EAAG;IACrB,IAAI;MACF,MAAMC,kBAAkB,GAAG,IAAAC,sBAAc,EAAC,IAAI,CAACZ,MAAgB,CAAC;MAChE,MAAMa,YAAY,GAAG,IAAAC,uBAAe,EAACH,kBAAkB,CAAC;MACxD,IAAI,CAACV,UAAU,CAACY,YAAY,CAAC;MAC7B,MAAM;QAAEE;MAAI,CAAC,GAAGF,YAAY;MAE5BG,OAAO,CAACC,KAAK,GAAG,CAAAF,GAAG,aAAHA,GAAG,uBAAHA,GAAG,CAAEE,KAAK,KAAI/B,oBAAoB;MAElD,MAAM;QAAEgC,OAAO;QAAEC;MAAK,CAAC,GAAGtC,OAAO,CAAC,oBAAoB,CAAC;MAEvD,MAAM,IAAAuC,mBAAU,EAACP,YAAY,EAAE,IAAI,CAACrB,IAAI,EAAY0B,OAAO,EAAEC,IAAI,CAAC;MAClEE,cAAM,CAACC,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC,CAAC,OAAOC,GAAQ,EAAE;MACjBC,OAAO,CAACC,KAAK,CAACF,GAAG,CAAC;MAClBP,OAAO,CAACU,IAAI,CAAC,CAAC,CAAC;IACjB;EACF;AACF;AAACvC,OAAA,CAAAC,WAAA,GAAAA,WAAA"}
1
+ {"version":3,"file":"init.js","names":["_clipanion","require","_config","_core","_logger","_nodeApi","DEFAULT_PROCESS_NAME","exports","InitCommand","Command","paths","Default","port","Option","String","description","usage","Usage","details","examples","config","initLogger","logConfig","logs","log","warningUtils","emit","Codes","VERWAR002","setup","execute","configPathLocation","findConfigFile","configParsed","parseConfigFile","web","process","title","version","name","initServer","logger","info","err","console","error","exit"],"sources":["../../src/commands/init.ts"],"sourcesContent":["import { Command, Option } from 'clipanion';\n\nimport { findConfigFile, parseConfigFile } from '@verdaccio/config';\nimport { warningUtils } from '@verdaccio/core';\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 if (logConfig.logs) {\n logConfig.log = logConfig.logs;\n warningUtils.emit(warningUtils.Codes.VERWAR002);\n }\n setup(logConfig.log as LoggerConfigItem);\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,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAGO,MAAMK,oBAA4B,GAAAC,OAAA,CAAAD,oBAAA,GAAG,WAAW;AAEhD,MAAME,WAAW,SAASC,kBAAO,CAAC;EACvC,OAAcC,KAAK,GAAG,CAACD,kBAAO,CAACE,OAAO,CAAC;EAE/BC,IAAI,GAAGC,iBAAM,CAACC,MAAM,CAAC,uBAAuB,EAAE;IACpDC,WAAW,EAAE;EACf,CAAC,CAAC;;EAEF;EACA,OAAOC,KAAK,GAAGP,kBAAO,CAACQ,KAAK,CAAC;IAC3BF,WAAW,EAAG,mBAAkB;IAChCG,OAAO,EAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;IACDC,QAAQ,EAAE,CACR,CAAE,gDAA+C,EAAG,WAAU,CAAC,EAC/D,CAAE,kCAAiC,EAAG,yBAAwB,CAAC,EAC/D,CACG,kFAAiF,EACjF,qDAAoD,CACtD;EAEL,CAAC,CAAC;EAEMC,MAAM,GAAGP,iBAAM,CAACC,MAAM,CAAC,aAAa,EAAE;IAC5CC,WAAW,EAAE;EACf,CAAC,CAAC;EAEMM,UAAUA,CAACC,SAAqB,EAAE;IACxC,IAAIA,SAAS,CAACC,IAAI,EAAE;MAClBD,SAAS,CAACE,GAAG,GAAGF,SAAS,CAACC,IAAI;MAC9BE,kBAAY,CAACC,IAAI,CAACD,kBAAY,CAACE,KAAK,CAACC,SAAS,CAAC;IACjD;IACA,IAAAC,aAAK,EAACP,SAAS,CAACE,GAAuB,CAAC;EAC1C;EAEA,MAAaM,OAAOA,CAAA,EAAG;IACrB,IAAI;MACF,MAAMC,kBAAkB,GAAG,IAAAC,sBAAc,EAAC,IAAI,CAACZ,MAAgB,CAAC;MAChE,MAAMa,YAAY,GAAG,IAAAC,uBAAe,EAACH,kBAAkB,CAAC;MACxD,IAAI,CAACV,UAAU,CAACY,YAAY,CAAC;MAC7B,MAAM;QAAEE;MAAI,CAAC,GAAGF,YAAY;MAE5BG,OAAO,CAACC,KAAK,GAAG,CAAAF,GAAG,aAAHA,GAAG,uBAAHA,GAAG,CAAEE,KAAK,KAAI/B,oBAAoB;MAElD,MAAM;QAAEgC,OAAO;QAAEC;MAAK,CAAC,GAAGtC,OAAO,CAAC,oBAAoB,CAAC;MAEvD,MAAM,IAAAuC,mBAAU,EAACP,YAAY,EAAE,IAAI,CAACrB,IAAI,EAAY0B,OAAO,EAAEC,IAAI,CAAC;MAClEE,cAAM,CAACC,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC,CAAC,OAAOC,GAAQ,EAAE;MACjBC,OAAO,CAACC,KAAK,CAACF,GAAG,CAAC;MAClBP,OAAO,CAACU,IAAI,CAAC,CAAC,CAAC;IACjB;EACF;AACF;AAACvC,OAAA,CAAAC,WAAA,GAAAA,WAAA"}
package/build/utils.js CHANGED
@@ -7,8 +7,7 @@ exports.MIN_NODE_VERSION = void 0;
7
7
  exports.isVersionValid = isVersionValid;
8
8
  var _semver = _interopRequireDefault(require("semver"));
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
- const MIN_NODE_VERSION = '14.0.0';
11
- exports.MIN_NODE_VERSION = MIN_NODE_VERSION;
10
+ const MIN_NODE_VERSION = exports.MIN_NODE_VERSION = '14.0.0';
12
11
  function isVersionValid(processVersion) {
13
12
  const version = processVersion.slice(1);
14
13
  return _semver.default.satisfies(version, `>=${MIN_NODE_VERSION}`);
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["_semver","_interopRequireDefault","require","obj","__esModule","default","MIN_NODE_VERSION","exports","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,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA4B,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAErB,MAAMG,gBAAgB,GAAG,QAAQ;AAACC,OAAA,CAAAD,gBAAA,GAAAA,gBAAA;AAElC,SAASE,cAAcA,CAACC,cAAc,EAAE;EAC7C,MAAMC,OAAO,GAAGD,cAAc,CAACE,KAAK,CAAC,CAAC,CAAC;EACvC,OAAOC,eAAM,CAACC,SAAS,CAACH,OAAO,EAAG,KAAIJ,gBAAiB,EAAC,CAAC;AAC3D"}
1
+ {"version":3,"file":"utils.js","names":["_semver","_interopRequireDefault","require","obj","__esModule","default","MIN_NODE_VERSION","exports","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,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA4B,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAErB,MAAMG,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG,QAAQ;AAEjC,SAASE,cAAcA,CAACC,cAAc,EAAE;EAC7C,MAAMC,OAAO,GAAGD,cAAc,CAACE,KAAK,CAAC,CAAC,CAAC;EACvC,OAAOC,eAAM,CAACC,SAAS,CAACH,OAAO,EAAG,KAAIJ,gBAAiB,EAAC,CAAC;AAC3D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdaccio/cli",
3
- "version": "6.0.0-6-next.75",
3
+ "version": "7.0.0-next-7.7",
4
4
  "author": {
5
5
  "name": "Juan Picado",
6
6
  "email": "juanpicado19@gmail.com"
@@ -26,25 +26,24 @@
26
26
  "verdaccio"
27
27
  ],
28
28
  "engines": {
29
- "node": ">=14",
30
- "npm": ">=6"
29
+ "node": ">=18"
31
30
  },
32
31
  "description": "verdaccio CLI",
33
32
  "license": "MIT",
34
33
  "main": "./build/index.js",
35
34
  "types": "build/index.d.ts",
36
35
  "dependencies": {
37
- "@verdaccio/core": "6.0.0-6-next.75",
38
- "@verdaccio/config": "6.0.0-6-next.75",
39
- "@verdaccio/logger": "6.0.0-6-next.43",
40
- "@verdaccio/node-api": "6.0.0-6-next.75",
36
+ "@verdaccio/core": "7.0.0-next-7.7",
37
+ "@verdaccio/config": "7.0.0-next-7.7",
38
+ "@verdaccio/logger": "7.0.0-next-7.7",
39
+ "@verdaccio/node-api": "7.0.0-next-7.7",
41
40
  "clipanion": "3.2.1",
42
- "envinfo": "7.8.1",
41
+ "envinfo": "7.11.0",
43
42
  "kleur": "4.1.5",
44
43
  "semver": "7.5.4"
45
44
  },
46
45
  "devDependencies": {
47
- "ts-node": "10.9.1"
46
+ "ts-node": "10.9.2"
48
47
  },
49
48
  "funding": {
50
49
  "type": "opencollective",