@verdaccio/core 8.0.0-next-8.33 → 8.0.0-next-8.35

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.
@@ -26,7 +26,7 @@ function stringToMD5(data) {
26
26
  return (0, _nodeCrypto.createHash)('md5').update(data).digest('hex');
27
27
  }
28
28
  function generateRandomHexString(length = 8) {
29
- return (0, _nodeCrypto.pseudoRandomBytes)(length).toString('hex');
29
+ return (0, _nodeCrypto.randomBytes)(length).toString('hex');
30
30
  }
31
31
 
32
32
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"crypto-utils.js","names":["_nodeCrypto","require","defaultTarballHashAlgorithm","exports","createTarballHash","createHash","stringToMD5","data","update","digest","generateRandomHexString","length","pseudoRandomBytes","toString","mask","str","charNum","slice"],"sources":["../src/crypto-utils.ts"],"sourcesContent":["import type { Hash } from 'node:crypto';\nimport { createHash, pseudoRandomBytes } from 'node:crypto';\n\nexport const defaultTarballHashAlgorithm = 'sha1';\n\nexport function createTarballHash(): Hash {\n return createHash(defaultTarballHashAlgorithm);\n}\n\n/**\n * Express doesn't do ETAGS with requests <= 1024b\n * we use md5 here, it works well on 1k+ bytes, but sucks with fewer data\n * could improve performance using crc32 after benchmarks.\n * @param {Object} data\n * @return {String}\n */\nexport function stringToMD5(data: Buffer | string): string {\n // @ts-ignore update method accepts Buffer or string\n return createHash('md5').update(data).digest('hex');\n}\n\nexport function generateRandomHexString(length = 8): string {\n return pseudoRandomBytes(length).toString('hex');\n}\n\n/**\n * return a masquerade string with its first and last {charNum} and three dots in between.\n * @param {String} str\n * @param {Number} charNum\n * @returns {String}\n */\nexport function mask(str: string, charNum = 3): string {\n return `${str.slice(0, charNum)}...${str.slice(-charNum)}`;\n}\n"],"mappings":";;;;;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEO,MAAMC,2BAA2B,GAAAC,OAAA,CAAAD,2BAAA,GAAG,MAAM;AAE1C,SAASE,iBAAiBA,CAAA,EAAS;EACxC,OAAO,IAAAC,sBAAU,EAACH,2BAA2B,CAAC;AAChD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASI,WAAWA,CAACC,IAAqB,EAAU;EACzD;EACA,OAAO,IAAAF,sBAAU,EAAC,KAAK,CAAC,CAACG,MAAM,CAACD,IAAI,CAAC,CAACE,MAAM,CAAC,KAAK,CAAC;AACrD;AAEO,SAASC,uBAAuBA,CAACC,MAAM,GAAG,CAAC,EAAU;EAC1D,OAAO,IAAAC,6BAAiB,EAACD,MAAM,CAAC,CAACE,QAAQ,CAAC,KAAK,CAAC;AAClD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,IAAIA,CAACC,GAAW,EAAEC,OAAO,GAAG,CAAC,EAAU;EACrD,OAAO,GAAGD,GAAG,CAACE,KAAK,CAAC,CAAC,EAAED,OAAO,CAAC,MAAMD,GAAG,CAACE,KAAK,CAAC,CAACD,OAAO,CAAC,EAAE;AAC5D","ignoreList":[]}
1
+ {"version":3,"file":"crypto-utils.js","names":["_nodeCrypto","require","defaultTarballHashAlgorithm","exports","createTarballHash","createHash","stringToMD5","data","update","digest","generateRandomHexString","length","randomBytes","toString","mask","str","charNum","slice"],"sources":["../src/crypto-utils.ts"],"sourcesContent":["import type { Hash } from 'node:crypto';\nimport { createHash, randomBytes } from 'node:crypto';\n\nexport const defaultTarballHashAlgorithm = 'sha1';\n\nexport function createTarballHash(): Hash {\n return createHash(defaultTarballHashAlgorithm);\n}\n\n/**\n * Express doesn't do ETAGS with requests <= 1024b\n * we use md5 here, it works well on 1k+ bytes, but sucks with fewer data\n * could improve performance using crc32 after benchmarks.\n * @param {Object} data\n * @return {String}\n */\nexport function stringToMD5(data: Buffer | string): string {\n // @ts-ignore update method accepts Buffer or string\n return createHash('md5').update(data).digest('hex');\n}\n\nexport function generateRandomHexString(length = 8): string {\n return randomBytes(length).toString('hex');\n}\n\n/**\n * return a masquerade string with its first and last {charNum} and three dots in between.\n * @param {String} str\n * @param {Number} charNum\n * @returns {String}\n */\nexport function mask(str: string, charNum = 3): string {\n return `${str.slice(0, charNum)}...${str.slice(-charNum)}`;\n}\n"],"mappings":";;;;;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEO,MAAMC,2BAA2B,GAAAC,OAAA,CAAAD,2BAAA,GAAG,MAAM;AAE1C,SAASE,iBAAiBA,CAAA,EAAS;EACxC,OAAO,IAAAC,sBAAU,EAACH,2BAA2B,CAAC;AAChD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASI,WAAWA,CAACC,IAAqB,EAAU;EACzD;EACA,OAAO,IAAAF,sBAAU,EAAC,KAAK,CAAC,CAACG,MAAM,CAACD,IAAI,CAAC,CAACE,MAAM,CAAC,KAAK,CAAC;AACrD;AAEO,SAASC,uBAAuBA,CAACC,MAAM,GAAG,CAAC,EAAU;EAC1D,OAAO,IAAAC,uBAAW,EAACD,MAAM,CAAC,CAACE,QAAQ,CAAC,KAAK,CAAC;AAC5C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,IAAIA,CAACC,GAAW,EAAEC,OAAO,GAAG,CAAC,EAAU;EACrD,OAAO,GAAGD,GAAG,CAACE,KAAK,CAAC,CAAC,EAAED,OAAO,CAAC,MAAMD,GAAG,CAACE,KAAK,CAAC,CAACD,OAAO,CAAC,EAAE;AAC5D","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdaccio/core",
3
- "version": "8.0.0-next-8.33",
3
+ "version": "8.0.0-next-8.35",
4
4
  "description": "Verdaccio Core Components",
5
5
  "keywords": [
6
6
  "private",