@verdaccio/cli 6.0.0-6-next.76 → 7.0.0-next-7.8

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.8
4
+
5
+ ### Patch Changes
6
+
7
+ - @verdaccio/node-api@7.0.0-next-7.8
8
+ - @verdaccio/core@7.0.0-next-7.8
9
+ - @verdaccio/config@7.0.0-next-7.8
10
+ - @verdaccio/logger@7.0.0-next-7.8
11
+
12
+ ## 7.0.0-next-7.7
13
+
14
+ ### Patch Changes
15
+
16
+ - @verdaccio/core@7.0.0-next-7.7
17
+ - @verdaccio/config@7.0.0-next-7.7
18
+ - @verdaccio/node-api@7.0.0-next-7.7
19
+ - @verdaccio/logger@7.0.0-next-7.7
20
+
21
+ ## 7.0.0-next.6
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies [4d96324]
26
+ - @verdaccio/config@7.0.0-next.6
27
+ - @verdaccio/node-api@7.0.0-next.6
28
+ - @verdaccio/core@7.0.0-next.6
29
+ - @verdaccio/logger@7.0.0-next.6
30
+
31
+ ## 7.0.0-next.5
32
+
33
+ ### Patch Changes
34
+
35
+ - Updated dependencies [f047cc8]
36
+ - @verdaccio/core@7.0.0-next.5
37
+ - @verdaccio/config@7.0.0-next.5
38
+ - @verdaccio/node-api@7.0.0-next.5
39
+ - @verdaccio/logger@7.0.0-next.5
40
+
41
+ ## 7.0.0-next.4
42
+
43
+ ### Patch Changes
44
+
45
+ - @verdaccio/node-api@7.0.0-next.4
46
+ - @verdaccio/core@7.0.0-next.4
47
+ - @verdaccio/config@7.0.0-next.4
48
+ - @verdaccio/logger@7.0.0-next.4
49
+
50
+ ## 7.0.0-next.3
51
+
52
+ ### Major Changes
53
+
54
+ - e7ebccb61: update major dependencies, remove old nodejs support
55
+
56
+ ### Patch Changes
57
+
58
+ - Updated dependencies [daceb6d87]
59
+ - Updated dependencies [e7ebccb61]
60
+ - @verdaccio/config@7.0.0-next.3
61
+ - @verdaccio/core@7.0.0-next.3
62
+ - @verdaccio/logger@7.0.0-next.3
63
+ - @verdaccio/node-api@7.0.0-next.3
64
+
65
+ ## 7.0.0-next.2
66
+
67
+ ### Patch Changes
68
+
69
+ - @verdaccio/core@7.0.0-next.2
70
+ - @verdaccio/config@7.0.0-next.2
71
+ - @verdaccio/node-api@7.0.0-next.2
72
+ - @verdaccio/logger@7.0.0-next.2
73
+
74
+ ## 7.0.0-next.1
75
+
76
+ ### Patch Changes
77
+
78
+ - @verdaccio/core@7.0.0-next.1
79
+ - @verdaccio/config@7.0.0-next.1
80
+ - @verdaccio/node-api@7.0.0-next.1
81
+ - @verdaccio/logger@7.0.0-next.1
82
+
83
+ ## 7.0.0-next.0
84
+
85
+ ### Major Changes
86
+
87
+ - feat!: bump to v7
88
+
89
+ ### Patch Changes
90
+
91
+ - Updated dependencies
92
+ - @verdaccio/config@7.0.0-next.0
93
+ - @verdaccio/core@7.0.0-next.0
94
+ - @verdaccio/logger@7.0.0-next.0
95
+ - @verdaccio/node-api@7.0.0-next.0
96
+
97
+ ## 6.0.0
98
+
99
+ ### Major Changes
100
+
101
+ - 292c0a37f: feat!: replace deprecated request dependency by got
102
+
103
+ 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.
104
+
105
+ ## Notes
106
+
107
+ - Remove deprecated `request` by other `got`, retry improved, custom Agent ( got does not include it built-in)
108
+ - Remove `async` dependency from storage (used by core) it was linked with proxy somehow safe to remove now
109
+ - Refactor with promises instead callback wherever is possible
110
+ - ~Document the API~
111
+ - Improve testing, integration tests
112
+ - Bugfix
113
+ - Clean up old validations
114
+ - Improve performance
115
+
116
+ ## 💥 Breaking changes
117
+
118
+ - Plugin API methods were callbacks based are returning promises, this will break current storage plugins, check documentation for upgrade.
119
+ - 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));`
120
+ - `@verdaccio/streams` stream abort support is legacy is being deprecated removed
121
+ - Remove AWS and Google Cloud packages for future refactoring [#2574](https://github.com/verdaccio/verdaccio/pull/2574).
122
+
123
+ - a3a209b5e: feat: migrate to pino.js 8
124
+ - 459b6fa72: refactor: search v1 endpoint and local-database
125
+
126
+ - refactor search `api v1` endpoint, improve performance
127
+ - remove usage of `async` dependency https://github.com/verdaccio/verdaccio/issues/1225
128
+ - refactor method storage class
129
+ - create new module `core` to reduce the ammount of modules with utilities
130
+ - use `undici` instead `node-fetch`
131
+ - use `fastify` instead `express` for functional test
132
+
133
+ ### Breaking changes
134
+
135
+ - plugin storage API changes
136
+ - remove old search endpoint (return 404)
137
+ - filter local private packages at plugin level
138
+
139
+ 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.
140
+
141
+ ```ts
142
+ export interface IPluginStorage<T> extends IPlugin {
143
+ add(name: string): Promise<void>;
144
+ remove(name: string): Promise<void>;
145
+ get(): Promise<any>;
146
+ init(): Promise<void>;
147
+ getSecret(): Promise<string>;
148
+ setSecret(secret: string): Promise<any>;
149
+ getPackageStorage(packageInfo: string): IPackageStorage;
150
+ search(query: searchUtils.SearchQuery): Promise<searchUtils.SearchItem[]>;
151
+ saveToken(token: Token): Promise<any>;
152
+ deleteToken(user: string, tokenKey: string): Promise<any>;
153
+ readTokens(filter: TokenFilter): Promise<Token[]>;
154
+ }
155
+ ```
156
+
157
+ - 794af76c5: Remove Node 12 support
158
+
159
+ - We need move to the new `undici` and does not support Node.js 12
160
+
161
+ - 10aeb4f13: feat!: experiments config renamed to flags
162
+
163
+ - The `experiments` configuration is renamed to `flags`. The functionality is exactly the same.
164
+
165
+ ```js
166
+ flags: token: false;
167
+ search: false;
168
+ ```
169
+
170
+ - The `self_path` property from the config file is being removed in favor of `config_file` full path.
171
+ - Refactor `config` module, better types and utilities
172
+
173
+ - e367c3f1e: - Replace signature handler for legacy tokens by removing deprecated crypto.createDecipher by createCipheriv
174
+
175
+ - Introduce environment variables for legacy tokens
176
+
177
+ ### Code Improvements
178
+
179
+ - Add debug library for improve developer experience
180
+
181
+ ### Breaking change
182
+
183
+ - The new signature invalidates all previous tokens generated by Verdaccio 4 or previous versions.
184
+ - The secret key must have 32 characters long.
185
+
186
+ ### New environment variables
187
+
188
+ - `VERDACCIO_LEGACY_ALGORITHM`: Allows to define the specific algorithm for the token signature which by default is `aes-256-ctr`
189
+ - `VERDACCIO_LEGACY_ENCRYPTION_KEY`: By default, the token stores in the database, but using this variable allows to get it from memory
190
+
191
+ - 2e3b9552c: feat: node 14 as minimum for running cli
192
+ - 5becf3f25: feat: use clipanion over commander
193
+ - 82cb0f2bf: feat!: config.logs throw an error, logging config not longer accept array or logs property
194
+
195
+ ### 💥 Breaking change
196
+
197
+ This is valid
198
+
199
+ ```yaml
200
+ log: { type: stdout, format: pretty, level: http }
201
+ ```
202
+
203
+ This is invalid
204
+
205
+ ```yaml
206
+ logs: { type: stdout, format: pretty, level: http }
207
+ ```
208
+
209
+ or
210
+
211
+ ```yaml
212
+ logs:
213
+ - [{ type: stdout, format: pretty, level: http }]
214
+ ```
215
+
216
+ - 8f43bf17d: feat: node api new structure based on promise
217
+
218
+ ```js
219
+ import { runServer } from "@verdaccio/node-api";
220
+ // or
221
+ import { runServer } from "verdaccio";
222
+
223
+ const app = await runServer(); // default configuration
224
+ const app = await runServer("./config/config.yaml");
225
+ const app = await runServer({ configuration });
226
+ app.listen(4000, (event) => {
227
+ // do something
228
+ });
229
+ ```
230
+
231
+ ### Breaking Change
232
+
233
+ If you are using the node-api, the new structure is Promise based and less arguments.
234
+
235
+ ### Minor Changes
236
+
237
+ - 974cd8c19: fix: startup messages improved and logs support on types
238
+ - 631abe1ac: feat: refactor logger
239
+ - 00d1d2a17: chore: env variable for launch fastify
240
+
241
+ - Update fastify to major release `v4.3.0`
242
+ - Update CLI launcher
243
+
244
+ via CLI
245
+
246
+ ```
247
+ VERDACCIO_SERVER=fastify verdaccio
248
+ ```
249
+
250
+ with docker
251
+
252
+ ```
253
+ docker run -it --rm --name verdaccio \
254
+ -e "VERDACCIO_SERVER=8080" -p 8080:8080 \
255
+ -e "VERDACCIO_SERVER=fastify" \
256
+ verdaccio/verdaccio
257
+ ```
258
+
259
+ - 55ee3fdd9: [Fastify] Add ping endpoint
260
+ - b61f762d6: feat: add server rate limit protection to all request
261
+
262
+ To modify custom values, use the server settings property.
263
+
264
+ ```markdown
265
+ server:
266
+
267
+ ## https://www.npmjs.com/package/express-rate-limit#configuration-options
268
+
269
+ rateLimit:
270
+ windowMs: 1000
271
+ max: 10000
272
+ ```
273
+
274
+ The values are intended to be high, if you want to improve security of your server consider
275
+ using different values.
276
+
277
+ - 154b2ecd3: refactor: remove @verdaccio/commons-api in favor @verdaccio/core and remove duplications
278
+ - aa763baec: feat: add typescript project references settings
279
+
280
+ 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.
281
+
282
+ It allows to navigate (IDE) trough the packages without need compile the packages.
283
+
284
+ 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).
285
+
286
+ - d5eacc218: feat: improve cli loggin on start up
287
+ - 6c1eb021b: feat: use warning codes for deprecation warnings
288
+
289
+ ### Patch Changes
290
+
291
+ - d78c8b515: chore: improve error logger message
292
+ - 351aeeaa8: fix(deps): @verdaccio/utils should be a prod dep of local-storage
293
+ - 19d272d10: fix: restore logger on init
294
+
295
+ Enable logger after parse configuration and log the very first step on startup phase.
296
+
297
+ ```bash
298
+ warn --- experiments are enabled, it is recommended do not use experiments in production comment out this section to disable it
299
+ info --- support for experiment [token] is disabled
300
+ info --- support for experiment [search] is disabled
301
+ (node:50831) Warning: config.logs is deprecated, rename configuration to "config.log"
302
+ (Use `node --trace-warnings ...` to show where the warning was created)
303
+ info --- http address http://localhost:4873/
304
+ info --- version: 6.0.0-6-next.11
305
+ info --- server started
306
+ ```
307
+
308
+ - a610ef26b: chore: add release step to private regisry on merge changeset pr
309
+ - 020ede43f: fix: version with breakline
310
+ - 34f0f1101: Enable prerelease mode with **changesets**
311
+ - 68ea21214: ESLint Warnings Fixed
312
+
313
+ Related to issue #1461
314
+
315
+ - max-len: most of the sensible max-len errors are fixed
316
+ - no-unused-vars: most of these types of errors are fixed by deleting not needed declarations
317
+ - @typescript-eslint/no-unused-vars: same as above
318
+
319
+ - b849128de: fix: handle upload scoped tarball
320
+ - Updated dependencies [292c0a37f]
321
+ - Updated dependencies [974cd8c19]
322
+ - Updated dependencies [ef88da3b4]
323
+ - Updated dependencies [43f32687c]
324
+ - Updated dependencies [679c19c1b]
325
+ - Updated dependencies [a3a209b5e]
326
+ - Updated dependencies [459b6fa72]
327
+ - Updated dependencies [9fc2e7961]
328
+ - Updated dependencies [24b9be020]
329
+ - Updated dependencies [794af76c5]
330
+ - Updated dependencies [e75c0a3b9]
331
+ - Updated dependencies [351aeeaa8]
332
+ - Updated dependencies [10aeb4f13]
333
+ - Updated dependencies [631abe1ac]
334
+ - Updated dependencies [9718e0330]
335
+ - Updated dependencies [1b217fd34]
336
+ - Updated dependencies [e367c3f1e]
337
+ - Updated dependencies [a1da11308]
338
+ - Updated dependencies [d167f92e1]
339
+ - Updated dependencies [00d1d2a17]
340
+ - Updated dependencies [19d272d10]
341
+ - Updated dependencies [1810ed0d8]
342
+ - Updated dependencies [a610ef26b]
343
+ - Updated dependencies [ddb6a2239]
344
+ - Updated dependencies [b61f762d6]
345
+ - Updated dependencies [d43894e8f]
346
+ - Updated dependencies [154b2ecd3]
347
+ - Updated dependencies [aa763baec]
348
+ - Updated dependencies [d5eacc218]
349
+ - Updated dependencies [378e907d5]
350
+ - Updated dependencies [16e38df8a]
351
+ - Updated dependencies [34f0f1101]
352
+ - Updated dependencies [df0da3d69]
353
+ - Updated dependencies [82cb0f2bf]
354
+ - Updated dependencies [dc571aabd]
355
+ - Updated dependencies [b78f35257]
356
+ - Updated dependencies [f859d2b1a]
357
+ - Updated dependencies [2c594910d]
358
+ - Updated dependencies [6c1eb021b]
359
+ - Updated dependencies [62c24b632]
360
+ - Updated dependencies [0a6412ca9]
361
+ - Updated dependencies [d08fe29d9]
362
+ - Updated dependencies [5167bb528]
363
+ - Updated dependencies [65f88b826]
364
+ - Updated dependencies [b3e8438f6]
365
+ - Updated dependencies [c9d1af0e5]
366
+ - Updated dependencies [730b5d8cc]
367
+ - Updated dependencies [4b29d715b]
368
+ - Updated dependencies [68ea21214]
369
+ - Updated dependencies [8f43bf17d]
370
+ - Updated dependencies [45c03819e]
371
+ - Updated dependencies [b849128de]
372
+ - @verdaccio/config@6.0.0
373
+ - @verdaccio/core@6.0.0
374
+ - @verdaccio/logger@6.0.0
375
+ - @verdaccio/node-api@6.0.0
376
+
3
377
  ## 6.0.0-6-next.76
4
378
 
5
379
  ### Patch Changes
@@ -693,14 +1067,14 @@
693
1067
  - 5c5057fc: feat: node api new structure based on promise
694
1068
 
695
1069
  ```js
696
- import { runServer } from '@verdaccio/node-api';
1070
+ import { runServer } from "@verdaccio/node-api";
697
1071
  // or
698
- import { runServer } from 'verdaccio';
1072
+ import { runServer } from "verdaccio";
699
1073
 
700
1074
  const app = await runServer(); // default configuration
701
- const app = await runServer('./config/config.yaml');
1075
+ const app = await runServer("./config/config.yaml");
702
1076
  const app = await runServer({ configuration });
703
- app.listen(4000, event => {
1077
+ app.listen(4000, (event) => {
704
1078
  // do something
705
1079
  });
706
1080
  ```
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.76",
3
+ "version": "7.0.0-next-7.8",
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.76",
38
- "@verdaccio/config": "6.0.0-6-next.76",
39
- "@verdaccio/logger": "6.0.0-6-next.44",
40
- "@verdaccio/node-api": "6.0.0-6-next.76",
36
+ "@verdaccio/core": "7.0.0-next-7.8",
37
+ "@verdaccio/config": "7.0.0-next-7.8",
38
+ "@verdaccio/logger": "7.0.0-next-7.8",
39
+ "@verdaccio/node-api": "7.0.0-next-7.8",
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",