@verdaccio/core 6.0.0-6-next.4 → 6.0.0-6-next.5

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,41 @@
1
1
  # @verdaccio/core
2
2
 
3
+ ## 6.0.0-6-next.5
4
+
5
+ ### Major Changes
6
+
7
+ - 82cb0f2b: feat!: config.logs throw an error, logging config not longer accept array or logs property
8
+
9
+ ### 💥 Breaking change
10
+
11
+ This is valid
12
+
13
+ ```yaml
14
+ log: { type: stdout, format: pretty, level: http }
15
+ ```
16
+
17
+ This is invalid
18
+
19
+ ```yaml
20
+ logs: { type: stdout, format: pretty, level: http }
21
+ ```
22
+
23
+ or
24
+
25
+ ```yaml
26
+ logs:
27
+ - [{ type: stdout, format: pretty, level: http }]
28
+ ```
29
+
30
+ ### Minor Changes
31
+
32
+ - 5167bb52: feat: ui search support for remote, local and private packages
33
+
34
+ The command `npm search` search globally and return all matches, with this improvement the user interface
35
+ is powered with the same capabilities.
36
+
37
+ The UI also tag where is the origin the package with a tag, also provide the latest version and description of the package.
38
+
3
39
  ## 6.0.0-6-next.4
4
40
 
5
41
  ### Minor Changes
@@ -14,10 +14,14 @@ export declare type SearchItemPkg = {
14
14
  path?: string;
15
15
  time?: number | Date;
16
16
  };
17
- export declare type SearchItem = {
17
+ declare type PrivatePackage = {
18
+ verdaccioPrivate?: boolean;
19
+ verdaccioPkgCached?: boolean;
20
+ };
21
+ export interface SearchItem extends UnStable, PrivatePackage {
18
22
  package: SearchItemPkg;
19
23
  score: Score;
20
- } & UnStable;
24
+ }
21
25
  export declare type Score = {
22
26
  final: number;
23
27
  detail: SearchMetrics;
@@ -48,11 +52,11 @@ export declare type SearchPackageBody = {
48
52
  publisher?: any;
49
53
  maintainers?: PublisherMaintainer[];
50
54
  };
51
- export declare type SearchPackageItem = {
55
+ export interface SearchPackageItem extends UnStable, PrivatePackage {
52
56
  package: SearchPackageBody;
53
57
  score: Score;
54
58
  searchScore?: number;
55
- } & UnStable;
59
+ }
56
60
  export declare const UNSCOPED = "unscoped";
57
61
  export declare type SearchQuery = {
58
62
  text: string;
@@ -4,6 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.UNSCOPED = void 0;
7
+ // @deprecated use @verdaccio/types
8
+ // @deprecated use @verdaccio/types
7
9
  const UNSCOPED = 'unscoped';
8
10
  exports.UNSCOPED = UNSCOPED;
9
11
  //# sourceMappingURL=search-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/search-utils.ts"],"names":["UNSCOPED"],"mappings":";;;;;;AA+DO,MAAMA,QAAQ,GAAG,UAAjB","sourcesContent":["export type SearchMetrics = {\n quality: number;\n popularity: number;\n maintenance: number;\n};\nexport type UnStable = {\n flags?: {\n // if is false is not be included in search results (majority are stable)\n unstable?: boolean;\n };\n};\nexport type SearchItemPkg = {\n name: string;\n scoped?: string;\n path?: string;\n time?: number | Date;\n};\n\nexport type SearchItem = {\n package: SearchItemPkg;\n score: Score;\n} & UnStable;\n\nexport type Score = {\n final: number;\n detail: SearchMetrics;\n};\n\nexport type SearchResults = {\n objects: SearchItemPkg[];\n total: number;\n time: string;\n};\n\ntype PublisherMaintainer = {\n username: string;\n email: string;\n};\n\nexport type SearchPackageBody = {\n name: string;\n scope: string;\n description: string;\n author: string | PublisherMaintainer;\n version: string;\n keywords: string | string[] | undefined;\n date: string;\n links?: {\n npm: string; // only include placeholder for URL eg: {url}/{packageName}\n homepage?: string;\n repository?: string;\n bugs?: string;\n };\n publisher?: any;\n maintainers?: PublisherMaintainer[];\n};\n\nexport type SearchPackageItem = {\n package: SearchPackageBody;\n score: Score;\n searchScore?: number;\n} & UnStable;\n\nexport const UNSCOPED = 'unscoped';\n\nexport type SearchQuery = {\n text: string;\n size?: number;\n from?: number;\n} & SearchMetrics;\n"],"file":"search-utils.js"}
1
+ {"version":3,"sources":["../src/search-utils.ts"],"names":["UNSCOPED"],"mappings":";;;;;;AA2CA;AAMA;AAyBO,MAAMA,QAAQ,GAAG,UAAjB","sourcesContent":["export type SearchMetrics = {\n quality: number;\n popularity: number;\n maintenance: number;\n};\nexport type UnStable = {\n flags?: {\n // if is false is not be included in search results (majority are stable)\n unstable?: boolean;\n };\n};\nexport type SearchItemPkg = {\n name: string;\n scoped?: string;\n path?: string;\n time?: number | Date;\n};\n\ntype PrivatePackage = {\n // note: prefixed to avoid external conflicts\n\n // the package is published as private\n verdaccioPrivate?: boolean;\n // if the package is not private but is cached\n verdaccioPkgCached?: boolean;\n};\n\nexport interface SearchItem extends UnStable, PrivatePackage {\n package: SearchItemPkg;\n score: Score;\n}\n\nexport type Score = {\n final: number;\n detail: SearchMetrics;\n};\n\nexport type SearchResults = {\n objects: SearchItemPkg[];\n total: number;\n time: string;\n};\n\n// @deprecated use @verdaccio/types\ntype PublisherMaintainer = {\n username: string;\n email: string;\n};\n\n// @deprecated use @verdaccio/types\nexport type SearchPackageBody = {\n name: string;\n scope: string;\n description: string;\n author: string | PublisherMaintainer;\n version: string;\n keywords: string | string[] | undefined;\n date: string;\n links?: {\n npm: string; // only include placeholder for URL eg: {url}/{packageName}\n homepage?: string;\n repository?: string;\n bugs?: string;\n };\n publisher?: any;\n maintainers?: PublisherMaintainer[];\n};\n\nexport interface SearchPackageItem extends UnStable, PrivatePackage {\n package: SearchPackageBody;\n score: Score;\n searchScore?: number;\n}\n\nexport const UNSCOPED = 'unscoped';\n\nexport type SearchQuery = {\n text: string;\n size?: number;\n from?: number;\n} & SearchMetrics;\n"],"file":"search-utils.js"}
@@ -3,8 +3,6 @@ export declare enum Codes {
3
3
  VERWAR002 = "VERWAR002",
4
4
  VERWAR003 = "VERWAR003",
5
5
  VERWAR004 = "VERWAR004",
6
- VERDEP001 = "VERDEP001",
7
- VERDEP002 = "VERDEP002",
8
6
  VERDEP003 = "VERDEP003"
9
7
  }
10
8
  export declare function emit(code: any, a?: string, b?: string, c?: string): void;
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.Codes = void 0;
7
7
  exports.emit = emit;
8
8
 
9
- var _fastifyWarning = _interopRequireDefault(require("fastify-warning"));
9
+ var _processWarning = _interopRequireDefault(require("process-warning"));
10
10
 
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
12
 
13
- const warningInstance = (0, _fastifyWarning.default)();
13
+ const warningInstance = (0, _processWarning.default)();
14
14
  const verdaccioWarning = 'VerdaccioWarning';
15
15
  const verdaccioDeprecation = 'VerdaccioDeprecation';
16
16
  let Codes;
@@ -21,8 +21,6 @@ exports.Codes = Codes;
21
21
  Codes["VERWAR002"] = "VERWAR002";
22
22
  Codes["VERWAR003"] = "VERWAR003";
23
23
  Codes["VERWAR004"] = "VERWAR004";
24
- Codes["VERDEP001"] = "VERDEP001";
25
- Codes["VERDEP002"] = "VERDEP002";
26
24
  Codes["VERDEP003"] = "VERDEP003";
27
25
  })(Codes || (exports.Codes = Codes = {}));
28
26
 
@@ -32,8 +30,6 @@ warningInstance.create(verdaccioWarning, Codes.VERWAR003, 'rotating-file type is
32
30
  warningInstance.create(verdaccioWarning, Codes.VERWAR004, `invalid address - %s, we expect a port (e.g. "4873"),
33
31
  host:port (e.g. "localhost:4873") or full url '(e.g. "http://localhost:4873/")
34
32
  https://verdaccio.org/docs/en/configuration#listen-port`);
35
- warningInstance.create(verdaccioDeprecation, Codes.VERDEP001, 'config.logs is deprecated, rename configuration to "config.log" in singular');
36
- warningInstance.create(verdaccioDeprecation, Codes.VERDEP002, 'deprecate: multiple logger configuration is deprecated, please check the migration guide.');
37
33
  warningInstance.create(verdaccioDeprecation, Codes.VERDEP003, 'multiple addresses will be deprecated in the next major, only use one');
38
34
 
39
35
  function emit(code, a, b, c) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/warning-utils.ts"],"names":["warningInstance","verdaccioWarning","verdaccioDeprecation","Codes","create","VERWAR001","VERWAR002","VERWAR003","VERWAR004","VERDEP001","VERDEP002","VERDEP003","emit","code","a","b","c"],"mappings":";;;;;;;;AAAA;;;;AAEA,MAAMA,eAAe,GAAG,8BAAxB;AACA,MAAMC,gBAAgB,GAAG,kBAAzB;AACA,MAAMC,oBAAoB,GAAG,sBAA7B;IAEYC,K;;;WAAAA,K;AAAAA,EAAAA,K;AAAAA,EAAAA,K;AAAAA,EAAAA,K;AAAAA,EAAAA,K;AAAAA,EAAAA,K;AAAAA,EAAAA,K;AAAAA,EAAAA,K;GAAAA,K,qBAAAA,K;;AAUZH,eAAe,CAACI,MAAhB,CACEH,gBADF,EAEEE,KAAK,CAACE,SAFR,EAGG,sEAHH;AAMAL,eAAe,CAACI,MAAhB,CAAuBH,gBAAvB,EAAyCE,KAAK,CAACG,SAA/C,EAA0D,uBAA1D;AAEAN,eAAe,CAACI,MAAhB,CACEH,gBADF,EAEEE,KAAK,CAACI,SAFR,EAGE,8EAHF;AAMAP,eAAe,CAACI,MAAhB,CACEH,gBADF,EAEEE,KAAK,CAACK,SAFR,EAGG;AACH;AACA,wDALA;AAQAR,eAAe,CAACI,MAAhB,CACEF,oBADF,EAEEC,KAAK,CAACM,SAFR,EAGE,6EAHF;AAMAT,eAAe,CAACI,MAAhB,CACEF,oBADF,EAEEC,KAAK,CAACO,SAFR,EAGE,2FAHF;AAMAV,eAAe,CAACI,MAAhB,CACEF,oBADF,EAEEC,KAAK,CAACQ,SAFR,EAGE,uEAHF;;AAMO,SAASC,IAAT,CAAcC,IAAd,EAAoBC,CAApB,EAAgCC,CAAhC,EAA4CC,CAA5C,EAAwD;AAC7DhB,EAAAA,eAAe,CAACY,IAAhB,CAAqBC,IAArB,EAA2BC,CAA3B,EAA8BC,CAA9B,EAAiCC,CAAjC;AACD","sourcesContent":["import warning from 'fastify-warning';\n\nconst warningInstance = warning();\nconst verdaccioWarning = 'VerdaccioWarning';\nconst verdaccioDeprecation = 'VerdaccioDeprecation';\n\nexport enum Codes {\n VERWAR001 = 'VERWAR001',\n VERWAR002 = 'VERWAR002',\n VERWAR003 = 'VERWAR003',\n VERWAR004 = 'VERWAR004',\n VERDEP001 = 'VERDEP001',\n VERDEP002 = 'VERDEP002',\n VERDEP003 = 'VERDEP003',\n}\n\nwarningInstance.create(\n verdaccioWarning,\n Codes.VERWAR001,\n `Verdaccio doesn't need superuser privileges. don't run it under root`\n);\n\nwarningInstance.create(verdaccioWarning, Codes.VERWAR002, 'logger is not defined');\n\nwarningInstance.create(\n verdaccioWarning,\n Codes.VERWAR003,\n 'rotating-file type is not longer supported, consider use [logrotate] instead'\n);\n\nwarningInstance.create(\n verdaccioWarning,\n Codes.VERWAR004,\n `invalid address - %s, we expect a port (e.g. \"4873\"), \nhost:port (e.g. \"localhost:4873\") or full url '(e.g. \"http://localhost:4873/\")\nhttps://verdaccio.org/docs/en/configuration#listen-port`\n);\n\nwarningInstance.create(\n verdaccioDeprecation,\n Codes.VERDEP001,\n 'config.logs is deprecated, rename configuration to \"config.log\" in singular'\n);\n\nwarningInstance.create(\n verdaccioDeprecation,\n Codes.VERDEP002,\n 'deprecate: multiple logger configuration is deprecated, please check the migration guide.'\n);\n\nwarningInstance.create(\n verdaccioDeprecation,\n Codes.VERDEP003,\n 'multiple addresses will be deprecated in the next major, only use one'\n);\n\nexport function emit(code, a?: string, b?: string, c?: string) {\n warningInstance.emit(code, a, b, c);\n}\n"],"file":"warning-utils.js"}
1
+ {"version":3,"sources":["../src/warning-utils.ts"],"names":["warningInstance","verdaccioWarning","verdaccioDeprecation","Codes","create","VERWAR001","VERWAR002","VERWAR003","VERWAR004","VERDEP003","emit","code","a","b","c"],"mappings":";;;;;;;;AAAA;;;;AAEA,MAAMA,eAAe,GAAG,8BAAxB;AACA,MAAMC,gBAAgB,GAAG,kBAAzB;AACA,MAAMC,oBAAoB,GAAG,sBAA7B;IAEYC,K;;;WAAAA,K;AAAAA,EAAAA,K;AAAAA,EAAAA,K;AAAAA,EAAAA,K;AAAAA,EAAAA,K;AAAAA,EAAAA,K;GAAAA,K,qBAAAA,K;;AASZH,eAAe,CAACI,MAAhB,CACEH,gBADF,EAEEE,KAAK,CAACE,SAFR,EAGG,sEAHH;AAMAL,eAAe,CAACI,MAAhB,CAAuBH,gBAAvB,EAAyCE,KAAK,CAACG,SAA/C,EAA0D,uBAA1D;AAEAN,eAAe,CAACI,MAAhB,CACEH,gBADF,EAEEE,KAAK,CAACI,SAFR,EAGE,8EAHF;AAMAP,eAAe,CAACI,MAAhB,CACEH,gBADF,EAEEE,KAAK,CAACK,SAFR,EAGG;AACH;AACA,wDALA;AAQAR,eAAe,CAACI,MAAhB,CACEF,oBADF,EAEEC,KAAK,CAACM,SAFR,EAGE,uEAHF;;AAMO,SAASC,IAAT,CAAcC,IAAd,EAAoBC,CAApB,EAAgCC,CAAhC,EAA4CC,CAA5C,EAAwD;AAC7Dd,EAAAA,eAAe,CAACU,IAAhB,CAAqBC,IAArB,EAA2BC,CAA3B,EAA8BC,CAA9B,EAAiCC,CAAjC;AACD","sourcesContent":["import warning from 'process-warning';\n\nconst warningInstance = warning();\nconst verdaccioWarning = 'VerdaccioWarning';\nconst verdaccioDeprecation = 'VerdaccioDeprecation';\n\nexport enum Codes {\n VERWAR001 = 'VERWAR001',\n VERWAR002 = 'VERWAR002',\n VERWAR003 = 'VERWAR003',\n VERWAR004 = 'VERWAR004',\n // deprecation warnings\n VERDEP003 = 'VERDEP003',\n}\n\nwarningInstance.create(\n verdaccioWarning,\n Codes.VERWAR001,\n `Verdaccio doesn't need superuser privileges. don't run it under root`\n);\n\nwarningInstance.create(verdaccioWarning, Codes.VERWAR002, 'logger is not defined');\n\nwarningInstance.create(\n verdaccioWarning,\n Codes.VERWAR003,\n 'rotating-file type is not longer supported, consider use [logrotate] instead'\n);\n\nwarningInstance.create(\n verdaccioWarning,\n Codes.VERWAR004,\n `invalid address - %s, we expect a port (e.g. \"4873\"), \nhost:port (e.g. \"localhost:4873\") or full url '(e.g. \"http://localhost:4873/\")\nhttps://verdaccio.org/docs/en/configuration#listen-port`\n);\n\nwarningInstance.create(\n verdaccioDeprecation,\n Codes.VERDEP003,\n 'multiple addresses will be deprecated in the next major, only use one'\n);\n\nexport function emit(code, a?: string, b?: string, c?: string) {\n warningInstance.emit(code, a, b, c);\n}\n"],"file":"warning-utils.js"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdaccio/core",
3
- "version": "6.0.0-6-next.4",
3
+ "version": "6.0.0-6-next.5",
4
4
  "description": "core utilities",
5
5
  "keywords": [
6
6
  "private",
@@ -35,13 +35,13 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "http-errors": "1.8.1",
38
- "http-status-codes": "2.1.4",
38
+ "http-status-codes": "2.2.0",
39
39
  "semver": "7.3.5",
40
- "fastify-warning": "0.2.0",
41
- "core-js": "3.17.2"
40
+ "process-warning": "1.0.0",
41
+ "core-js": "3.20.3"
42
42
  },
43
43
  "devDependencies": {
44
- "@verdaccio/types": "11.0.0-6-next.10"
44
+ "@verdaccio/types": "11.0.0-6-next.11"
45
45
  },
46
46
  "funding": {
47
47
  "type": "opencollective",
@@ -16,10 +16,19 @@ export type SearchItemPkg = {
16
16
  time?: number | Date;
17
17
  };
18
18
 
19
- export type SearchItem = {
19
+ type PrivatePackage = {
20
+ // note: prefixed to avoid external conflicts
21
+
22
+ // the package is published as private
23
+ verdaccioPrivate?: boolean;
24
+ // if the package is not private but is cached
25
+ verdaccioPkgCached?: boolean;
26
+ };
27
+
28
+ export interface SearchItem extends UnStable, PrivatePackage {
20
29
  package: SearchItemPkg;
21
30
  score: Score;
22
- } & UnStable;
31
+ }
23
32
 
24
33
  export type Score = {
25
34
  final: number;
@@ -32,11 +41,13 @@ export type SearchResults = {
32
41
  time: string;
33
42
  };
34
43
 
44
+ // @deprecated use @verdaccio/types
35
45
  type PublisherMaintainer = {
36
46
  username: string;
37
47
  email: string;
38
48
  };
39
49
 
50
+ // @deprecated use @verdaccio/types
40
51
  export type SearchPackageBody = {
41
52
  name: string;
42
53
  scope: string;
@@ -55,11 +66,11 @@ export type SearchPackageBody = {
55
66
  maintainers?: PublisherMaintainer[];
56
67
  };
57
68
 
58
- export type SearchPackageItem = {
69
+ export interface SearchPackageItem extends UnStable, PrivatePackage {
59
70
  package: SearchPackageBody;
60
71
  score: Score;
61
72
  searchScore?: number;
62
- } & UnStable;
73
+ }
63
74
 
64
75
  export const UNSCOPED = 'unscoped';
65
76
 
@@ -1,4 +1,4 @@
1
- import warning from 'fastify-warning';
1
+ import warning from 'process-warning';
2
2
 
3
3
  const warningInstance = warning();
4
4
  const verdaccioWarning = 'VerdaccioWarning';
@@ -9,8 +9,7 @@ export enum Codes {
9
9
  VERWAR002 = 'VERWAR002',
10
10
  VERWAR003 = 'VERWAR003',
11
11
  VERWAR004 = 'VERWAR004',
12
- VERDEP001 = 'VERDEP001',
13
- VERDEP002 = 'VERDEP002',
12
+ // deprecation warnings
14
13
  VERDEP003 = 'VERDEP003',
15
14
  }
16
15
 
@@ -36,18 +35,6 @@ host:port (e.g. "localhost:4873") or full url '(e.g. "http://localhost:4873/")
36
35
  https://verdaccio.org/docs/en/configuration#listen-port`
37
36
  );
38
37
 
39
- warningInstance.create(
40
- verdaccioDeprecation,
41
- Codes.VERDEP001,
42
- 'config.logs is deprecated, rename configuration to "config.log" in singular'
43
- );
44
-
45
- warningInstance.create(
46
- verdaccioDeprecation,
47
- Codes.VERDEP002,
48
- 'deprecate: multiple logger configuration is deprecated, please check the migration guide.'
49
- );
50
-
51
38
  warningInstance.create(
52
39
  verdaccioDeprecation,
53
40
  Codes.VERDEP003,