@verdaccio/config 8.1.4 → 8.2.0

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.
Files changed (61) hide show
  1. package/build/_virtual/_rolldown/runtime.js +23 -0
  2. package/build/address.js +80 -102
  3. package/build/address.js.map +1 -1
  4. package/build/address.mjs +86 -0
  5. package/build/address.mjs.map +1 -0
  6. package/build/agent.js +11 -16
  7. package/build/agent.js.map +1 -1
  8. package/build/agent.mjs +12 -0
  9. package/build/agent.mjs.map +1 -0
  10. package/build/builder.js +128 -131
  11. package/build/builder.js.map +1 -1
  12. package/build/builder.mjs +129 -0
  13. package/build/builder.mjs.map +1 -0
  14. package/build/conf/index.js +10 -11
  15. package/build/conf/index.js.map +1 -1
  16. package/build/conf/index.mjs +12 -0
  17. package/build/conf/index.mjs.map +1 -0
  18. package/build/config-path.js +154 -163
  19. package/build/config-path.js.map +1 -1
  20. package/build/config-path.mjs +171 -0
  21. package/build/config-path.mjs.map +1 -0
  22. package/build/config-utils.js +37 -41
  23. package/build/config-utils.js.map +1 -1
  24. package/build/config-utils.mjs +40 -0
  25. package/build/config-utils.mjs.map +1 -0
  26. package/build/config.js +154 -203
  27. package/build/config.js.map +1 -1
  28. package/build/config.mjs +153 -0
  29. package/build/config.mjs.map +1 -0
  30. package/build/index.js +52 -167
  31. package/build/index.mjs +14 -0
  32. package/build/package-access.js +52 -68
  33. package/build/package-access.js.map +1 -1
  34. package/build/package-access.mjs +52 -0
  35. package/build/package-access.mjs.map +1 -0
  36. package/build/parse.js +83 -100
  37. package/build/parse.js.map +1 -1
  38. package/build/parse.mjs +85 -0
  39. package/build/parse.mjs.map +1 -0
  40. package/build/security.js +15 -22
  41. package/build/security.js.map +1 -1
  42. package/build/security.mjs +16 -0
  43. package/build/security.mjs.map +1 -0
  44. package/build/serverSettings.js +10 -15
  45. package/build/serverSettings.js.map +1 -1
  46. package/build/serverSettings.mjs +12 -0
  47. package/build/serverSettings.mjs.map +1 -0
  48. package/build/token.js +10 -13
  49. package/build/token.js.map +1 -1
  50. package/build/token.mjs +13 -0
  51. package/build/token.mjs.map +1 -0
  52. package/build/uplinks.js +47 -55
  53. package/build/uplinks.js.map +1 -1
  54. package/build/uplinks.mjs +50 -0
  55. package/build/uplinks.mjs.map +1 -0
  56. package/build/user.js +42 -37
  57. package/build/user.js.map +1 -1
  58. package/build/user.mjs +48 -0
  59. package/build/user.mjs.map +1 -0
  60. package/package.json +22 -9
  61. package/build/index.js.map +0 -1
package/build/uplinks.js CHANGED
@@ -1,67 +1,59 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.DEFAULT_UPLINK = exports.DEFAULT_REGISTRY = void 0;
7
- exports.getProxiesForPackage = getProxiesForPackage;
8
- exports.hasProxyTo = hasProxyTo;
9
- exports.sanityCheckNames = sanityCheckNames;
10
- exports.sanityCheckUplinksProps = sanityCheckUplinksProps;
11
- exports.uplinkSanityCheck = uplinkSanityCheck;
12
- var _lodash = _interopRequireDefault(require("lodash"));
13
- var _nodeAssert = _interopRequireDefault(require("node:assert"));
14
- var _core = require("@verdaccio/core");
15
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
- const DEFAULT_REGISTRY = exports.DEFAULT_REGISTRY = 'https://registry.npmjs.org';
17
- const DEFAULT_UPLINK = exports.DEFAULT_UPLINK = 'npmjs';
18
- const BLACKLIST = {
19
- all: true,
20
- anonymous: true,
21
- undefined: true,
22
- owner: true,
23
- none: true
1
+ const require_runtime = require("./_virtual/_rolldown/runtime.js");
2
+ let lodash = require("lodash");
3
+ lodash = require_runtime.__toESM(lodash);
4
+ let node_assert = require("node:assert");
5
+ node_assert = require_runtime.__toESM(node_assert);
6
+ let _verdaccio_core = require("@verdaccio/core");
7
+ //#region src/uplinks.ts
8
+ var DEFAULT_REGISTRY = "https://registry.npmjs.org";
9
+ var DEFAULT_UPLINK = "npmjs";
10
+ var BLACKLIST = {
11
+ all: true,
12
+ anonymous: true,
13
+ undefined: true,
14
+ owner: true,
15
+ none: true
24
16
  };
25
17
  function uplinkSanityCheck(uplinks, users = BLACKLIST) {
26
- const newUplinks = _lodash.default.clone(uplinks);
27
- let newUsers = _lodash.default.clone(users);
28
- for (const uplink in newUplinks) {
29
- if (Object.prototype.hasOwnProperty.call(newUplinks, uplink)) {
30
- if (typeof newUplinks[uplink].cache === 'undefined') {
31
- newUplinks[uplink].cache = true;
32
- }
33
- newUsers = sanityCheckNames(uplink, newUsers);
34
- }
35
- }
36
- return newUplinks;
18
+ const newUplinks = lodash.default.clone(uplinks);
19
+ let newUsers = lodash.default.clone(users);
20
+ for (const uplink in newUplinks) if (Object.prototype.hasOwnProperty.call(newUplinks, uplink)) {
21
+ if (typeof newUplinks[uplink].cache === "undefined") newUplinks[uplink].cache = true;
22
+ newUsers = sanityCheckNames(uplink, newUsers);
23
+ }
24
+ return newUplinks;
37
25
  }
38
26
  function sanityCheckUplinksProps(configUpLinks) {
39
- const uplinks = _lodash.default.clone(configUpLinks);
40
- for (const uplink in uplinks) {
41
- if (Object.prototype.hasOwnProperty.call(uplinks, uplink)) {
42
- (0, _nodeAssert.default)(uplinks[uplink].url, 'CONFIG: no url for uplink: ' + uplink);
43
- (0, _nodeAssert.default)(_lodash.default.isString(uplinks[uplink].url), 'CONFIG: wrong url format for uplink: ' + uplink);
44
- uplinks[uplink].url = uplinks[uplink].url.replace(/\/$/, '');
45
- }
46
- }
47
- return uplinks;
27
+ const uplinks = lodash.default.clone(configUpLinks);
28
+ for (const uplink in uplinks) if (Object.prototype.hasOwnProperty.call(uplinks, uplink)) {
29
+ (0, node_assert.default)(uplinks[uplink].url, "CONFIG: no url for uplink: " + uplink);
30
+ (0, node_assert.default)(lodash.default.isString(uplinks[uplink].url), "CONFIG: wrong url format for uplink: " + uplink);
31
+ uplinks[uplink].url = uplinks[uplink].url.replace(/\/$/, "");
32
+ }
33
+ return uplinks;
48
34
  }
49
35
  function getProxiesForPackage(pkg, packages) {
50
- const matchedPkg = _core.authUtils.getMatchedPackagesSpec(pkg, packages);
51
- return matchedPkg?.proxy || [];
36
+ return _verdaccio_core.authUtils.getMatchedPackagesSpec(pkg, packages)?.proxy || [];
52
37
  }
53
38
  function hasProxyTo(pkg, upLink, packages) {
54
- const proxyList = getProxiesForPackage(pkg, packages);
55
- if (proxyList) {
56
- return proxyList.some(curr => upLink === curr);
57
- }
58
- return false;
39
+ const proxyList = getProxiesForPackage(pkg, packages);
40
+ if (proxyList) return proxyList.some((curr) => upLink === curr);
41
+ return false;
59
42
  }
60
43
  function sanityCheckNames(item, users) {
61
- (0, _nodeAssert.default)(item !== 'all' && item !== 'owner' && item !== 'anonymous' && item !== 'undefined' && item !== 'none', 'CONFIG: reserved uplink name: ' + item);
62
- (0, _nodeAssert.default)(!item.match(/\s/), 'CONFIG: invalid uplink name: ' + item);
63
- (0, _nodeAssert.default)(_lodash.default.isNil(users[item]), 'CONFIG: duplicate uplink name: ' + item);
64
- users[item] = true;
65
- return users;
44
+ (0, node_assert.default)(item !== "all" && item !== "owner" && item !== "anonymous" && item !== "undefined" && item !== "none", "CONFIG: reserved uplink name: " + item);
45
+ (0, node_assert.default)(!item.match(/\s/), "CONFIG: invalid uplink name: " + item);
46
+ (0, node_assert.default)(lodash.default.isNil(users[item]), "CONFIG: duplicate uplink name: " + item);
47
+ users[item] = true;
48
+ return users;
66
49
  }
50
+ //#endregion
51
+ exports.DEFAULT_REGISTRY = DEFAULT_REGISTRY;
52
+ exports.DEFAULT_UPLINK = DEFAULT_UPLINK;
53
+ exports.getProxiesForPackage = getProxiesForPackage;
54
+ exports.hasProxyTo = hasProxyTo;
55
+ exports.sanityCheckNames = sanityCheckNames;
56
+ exports.sanityCheckUplinksProps = sanityCheckUplinksProps;
57
+ exports.uplinkSanityCheck = uplinkSanityCheck;
58
+
67
59
  //# sourceMappingURL=uplinks.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"uplinks.js","names":["_lodash","_interopRequireDefault","require","_nodeAssert","_core","e","__esModule","default","DEFAULT_REGISTRY","exports","DEFAULT_UPLINK","BLACKLIST","all","anonymous","undefined","owner","none","uplinkSanityCheck","uplinks","users","newUplinks","_","clone","newUsers","uplink","Object","prototype","hasOwnProperty","call","cache","sanityCheckNames","sanityCheckUplinksProps","configUpLinks","assert","url","isString","replace","getProxiesForPackage","pkg","packages","matchedPkg","authUtils","getMatchedPackagesSpec","proxy","hasProxyTo","upLink","proxyList","some","curr","item","match","isNil"],"sources":["../src/uplinks.ts"],"sourcesContent":["import _ from 'lodash';\nimport assert from 'node:assert';\n\nimport { authUtils } from '@verdaccio/core';\nimport type { PackageList, UpLinksConfList } from '@verdaccio/types';\n\nexport const DEFAULT_REGISTRY = 'https://registry.npmjs.org';\nexport const DEFAULT_UPLINK = 'npmjs';\n\nconst BLACKLIST = {\n all: true,\n anonymous: true,\n undefined: true,\n owner: true,\n none: true,\n};\n\nexport function uplinkSanityCheck(\n uplinks: UpLinksConfList,\n users: any = BLACKLIST\n): UpLinksConfList {\n const newUplinks = _.clone(uplinks);\n let newUsers = _.clone(users);\n\n for (const uplink in newUplinks) {\n if (Object.prototype.hasOwnProperty.call(newUplinks, uplink)) {\n if (typeof newUplinks[uplink].cache === 'undefined') {\n newUplinks[uplink].cache = true;\n }\n newUsers = sanityCheckNames(uplink, newUsers);\n }\n }\n\n return newUplinks;\n}\n\nexport function sanityCheckUplinksProps(configUpLinks: UpLinksConfList): UpLinksConfList {\n const uplinks = _.clone(configUpLinks);\n\n for (const uplink in uplinks) {\n if (Object.prototype.hasOwnProperty.call(uplinks, uplink)) {\n assert(uplinks[uplink].url, 'CONFIG: no url for uplink: ' + uplink);\n assert(_.isString(uplinks[uplink].url), 'CONFIG: wrong url format for uplink: ' + uplink);\n uplinks[uplink].url = uplinks[uplink].url.replace(/\\/$/, '');\n }\n }\n\n return uplinks;\n}\n\nexport function getProxiesForPackage(pkg: string, packages: PackageList): string[] {\n const matchedPkg = authUtils.getMatchedPackagesSpec(pkg, packages);\n return matchedPkg?.proxy || [];\n}\n\nexport function hasProxyTo(pkg: string, upLink: string, packages: PackageList): boolean {\n const proxyList = getProxiesForPackage(pkg, packages);\n if (proxyList) {\n return proxyList.some((curr) => upLink === curr);\n }\n\n return false;\n}\n\nexport function sanityCheckNames(item: string, users: any): any {\n assert(\n item !== 'all' &&\n item !== 'owner' &&\n item !== 'anonymous' &&\n item !== 'undefined' &&\n item !== 'none',\n 'CONFIG: reserved uplink name: ' + item\n );\n assert(!item.match(/\\s/), 'CONFIG: invalid uplink name: ' + item);\n assert(_.isNil(users[item]), 'CONFIG: duplicate uplink name: ' + item);\n users[item] = true;\n\n return users;\n}\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,KAAA,GAAAF,OAAA;AAA4C,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGrC,MAAMG,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG,4BAA4B;AACrD,MAAME,cAAc,GAAAD,OAAA,CAAAC,cAAA,GAAG,OAAO;AAErC,MAAMC,SAAS,GAAG;EAChBC,GAAG,EAAE,IAAI;EACTC,SAAS,EAAE,IAAI;EACfC,SAAS,EAAE,IAAI;EACfC,KAAK,EAAE,IAAI;EACXC,IAAI,EAAE;AACR,CAAC;AAEM,SAASC,iBAAiBA,CAC/BC,OAAwB,EACxBC,KAAU,GAAGR,SAAS,EACL;EACjB,MAAMS,UAAU,GAAGC,eAAC,CAACC,KAAK,CAACJ,OAAO,CAAC;EACnC,IAAIK,QAAQ,GAAGF,eAAC,CAACC,KAAK,CAACH,KAAK,CAAC;EAE7B,KAAK,MAAMK,MAAM,IAAIJ,UAAU,EAAE;IAC/B,IAAIK,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,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AC;EACrD,IAAIO,SAAS,EAAE;IACb,OAAOA,SAAS,CAACC,IAAI,CAAEC,IAAI,IAAKH,MAAM,KAAKG,IAAI,CAAC;EAClD;EAEA,OAAO,KAAK;AACd;AAEO,SAASlB,gBAAgBA,CAACmB,IAAY,EAAE9B,KAAU,EAAO;EAC9D,IAAAc,mBAAM,EACJgB,IAAI,KAAK,KAAK,IACZA,IAAI,KAAK,OAAO,IAChBA,IAAI,KAAK,WAAW,IACpBA,IAAI,KAAK,WAAW,IACpBA,IAAI,KAAK,MAAM,EACjB,gCAAgC,GAAGA,IACrC,CAAC;EACD,IAAAhB,mBAAM,EAAC,CAACgB,IAAI,CAACC,KAAK,CAAC,IAAI,CAAC,EAAE,+BAA+B,GAAGD,IAAI,CAAC;EACjE,IAAAhB,mBAAM,EAACZ,eAAC,CAAC8B,KAAK,CAAChC,KAAK,CAAC8B,IAAI,CAAC,CAAC,EAAE,iCAAiC,GAAGA,IAAI,CAAC;EACtE9B,KAAK,CAAC8B,IAAI,CAAC,GAAG,IAAI;EAElB,OAAO9B,KAAK;AACd","ignoreList":[]}
1
+ {"version":3,"file":"uplinks.js","names":[],"sources":["../src/uplinks.ts"],"sourcesContent":["import _ from 'lodash';\nimport assert from 'node:assert';\n\nimport { authUtils } from '@verdaccio/core';\nimport type { PackageList, UpLinksConfList } from '@verdaccio/types';\n\nexport const DEFAULT_REGISTRY = 'https://registry.npmjs.org';\nexport const DEFAULT_UPLINK = 'npmjs';\n\nconst BLACKLIST = {\n all: true,\n anonymous: true,\n undefined: true,\n owner: true,\n none: true,\n};\n\nexport function uplinkSanityCheck(\n uplinks: UpLinksConfList,\n users: any = BLACKLIST\n): UpLinksConfList {\n const newUplinks = _.clone(uplinks);\n let newUsers = _.clone(users);\n\n for (const uplink in newUplinks) {\n if (Object.prototype.hasOwnProperty.call(newUplinks, uplink)) {\n if (typeof newUplinks[uplink].cache === 'undefined') {\n newUplinks[uplink].cache = true;\n }\n newUsers = sanityCheckNames(uplink, newUsers);\n }\n }\n\n return newUplinks;\n}\n\nexport function sanityCheckUplinksProps(configUpLinks: UpLinksConfList): UpLinksConfList {\n const uplinks = _.clone(configUpLinks);\n\n for (const uplink in uplinks) {\n if (Object.prototype.hasOwnProperty.call(uplinks, uplink)) {\n assert(uplinks[uplink].url, 'CONFIG: no url for uplink: ' + uplink);\n assert(_.isString(uplinks[uplink].url), 'CONFIG: wrong url format for uplink: ' + uplink);\n uplinks[uplink].url = uplinks[uplink].url.replace(/\\/$/, '');\n }\n }\n\n return uplinks;\n}\n\nexport function getProxiesForPackage(pkg: string, packages: PackageList): string[] {\n const matchedPkg = authUtils.getMatchedPackagesSpec(pkg, packages);\n return matchedPkg?.proxy || [];\n}\n\nexport function hasProxyTo(pkg: string, upLink: string, packages: PackageList): boolean {\n const proxyList = getProxiesForPackage(pkg, packages);\n if (proxyList) {\n return proxyList.some((curr) => upLink === curr);\n }\n\n return false;\n}\n\nexport function sanityCheckNames(item: string, users: any): any {\n assert(\n item !== 'all' &&\n item !== 'owner' &&\n item !== 'anonymous' &&\n item !== 'undefined' &&\n item !== 'none',\n 'CONFIG: reserved uplink name: ' + item\n );\n assert(!item.match(/\\s/), 'CONFIG: invalid uplink name: ' + item);\n assert(_.isNil(users[item]), 'CONFIG: duplicate uplink name: ' + item);\n users[item] = true;\n\n return users;\n}\n"],"mappings":";;;;;;;AAMA,IAAa,mBAAmB;AAChC,IAAa,iBAAiB;AAE9B,IAAM,YAAY;CAChB,KAAK;CACL,WAAW;CACX,WAAW;CACX,OAAO;CACP,MAAM;AACR;AAEA,SAAgB,kBACd,SACA,QAAa,WACI;CACjB,MAAM,aAAa,OAAA,QAAE,MAAM,OAAO;CAClC,IAAI,WAAW,OAAA,QAAE,MAAM,KAAK;CAE5B,KAAK,MAAM,UAAU,YACnB,IAAI,OAAO,UAAU,eAAe,KAAK,YAAY,MAAM,GAAG;EAC5D,IAAI,OAAO,WAAW,QAAQ,UAAU,aACtC,WAAW,QAAQ,QAAQ;EAE7B,WAAW,iBAAiB,QAAQ,QAAQ;CAC9C;CAGF,OAAO;AACT;AAEA,SAAgB,wBAAwB,eAAiD;CACvF,MAAM,UAAU,OAAA,QAAE,MAAM,aAAa;CAErC,KAAK,MAAM,UAAU,SACnB,IAAI,OAAO,UAAU,eAAe,KAAK,SAAS,MAAM,GAAG;EACzD,CAAA,GAAA,YAAA,SAAO,QAAQ,QAAQ,KAAK,gCAAgC,MAAM;EAClE,CAAA,GAAA,YAAA,SAAO,OAAA,QAAE,SAAS,QAAQ,QAAQ,GAAG,GAAG,0CAA0C,MAAM;EACxF,QAAQ,QAAQ,MAAM,QAAQ,QAAQ,IAAI,QAAQ,OAAO,EAAE;CAC7D;CAGF,OAAO;AACT;AAEA,SAAgB,qBAAqB,KAAa,UAAiC;CAEjF,OADmB,gBAAA,UAAU,uBAAuB,KAAK,QAClD,GAAY,SAAS,CAAC;AAC/B;AAEA,SAAgB,WAAW,KAAa,QAAgB,UAAgC;CACtF,MAAM,YAAY,qBAAqB,KAAK,QAAQ;CACpD,IAAI,WACF,OAAO,UAAU,MAAM,SAAS,WAAW,IAAI;CAGjD,OAAO;AACT;AAEA,SAAgB,iBAAiB,MAAc,OAAiB;CAC9D,CAAA,GAAA,YAAA,SACE,SAAS,SACP,SAAS,WACT,SAAS,eACT,SAAS,eACT,SAAS,QACX,mCAAmC,IACrC;CACA,CAAA,GAAA,YAAA,SAAO,CAAC,KAAK,MAAM,IAAI,GAAG,kCAAkC,IAAI;CAChE,CAAA,GAAA,YAAA,SAAO,OAAA,QAAE,MAAM,MAAM,KAAK,GAAG,oCAAoC,IAAI;CACrE,MAAM,QAAQ;CAEd,OAAO;AACT"}
@@ -0,0 +1,50 @@
1
+ import _ from "lodash";
2
+ import assert from "node:assert";
3
+ import { authUtils } from "@verdaccio/core";
4
+ //#region src/uplinks.ts
5
+ var DEFAULT_REGISTRY = "https://registry.npmjs.org";
6
+ var DEFAULT_UPLINK = "npmjs";
7
+ var BLACKLIST = {
8
+ all: true,
9
+ anonymous: true,
10
+ undefined: true,
11
+ owner: true,
12
+ none: true
13
+ };
14
+ function uplinkSanityCheck(uplinks, users = BLACKLIST) {
15
+ const newUplinks = _.clone(uplinks);
16
+ let newUsers = _.clone(users);
17
+ for (const uplink in newUplinks) if (Object.prototype.hasOwnProperty.call(newUplinks, uplink)) {
18
+ if (typeof newUplinks[uplink].cache === "undefined") newUplinks[uplink].cache = true;
19
+ newUsers = sanityCheckNames(uplink, newUsers);
20
+ }
21
+ return newUplinks;
22
+ }
23
+ function sanityCheckUplinksProps(configUpLinks) {
24
+ const uplinks = _.clone(configUpLinks);
25
+ for (const uplink in uplinks) if (Object.prototype.hasOwnProperty.call(uplinks, uplink)) {
26
+ assert(uplinks[uplink].url, "CONFIG: no url for uplink: " + uplink);
27
+ assert(_.isString(uplinks[uplink].url), "CONFIG: wrong url format for uplink: " + uplink);
28
+ uplinks[uplink].url = uplinks[uplink].url.replace(/\/$/, "");
29
+ }
30
+ return uplinks;
31
+ }
32
+ function getProxiesForPackage(pkg, packages) {
33
+ return authUtils.getMatchedPackagesSpec(pkg, packages)?.proxy || [];
34
+ }
35
+ function hasProxyTo(pkg, upLink, packages) {
36
+ const proxyList = getProxiesForPackage(pkg, packages);
37
+ if (proxyList) return proxyList.some((curr) => upLink === curr);
38
+ return false;
39
+ }
40
+ function sanityCheckNames(item, users) {
41
+ assert(item !== "all" && item !== "owner" && item !== "anonymous" && item !== "undefined" && item !== "none", "CONFIG: reserved uplink name: " + item);
42
+ assert(!item.match(/\s/), "CONFIG: invalid uplink name: " + item);
43
+ assert(_.isNil(users[item]), "CONFIG: duplicate uplink name: " + item);
44
+ users[item] = true;
45
+ return users;
46
+ }
47
+ //#endregion
48
+ export { DEFAULT_REGISTRY, DEFAULT_UPLINK, getProxiesForPackage, hasProxyTo, sanityCheckNames, sanityCheckUplinksProps, uplinkSanityCheck };
49
+
50
+ //# sourceMappingURL=uplinks.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uplinks.mjs","names":[],"sources":["../src/uplinks.ts"],"sourcesContent":["import _ from 'lodash';\nimport assert from 'node:assert';\n\nimport { authUtils } from '@verdaccio/core';\nimport type { PackageList, UpLinksConfList } from '@verdaccio/types';\n\nexport const DEFAULT_REGISTRY = 'https://registry.npmjs.org';\nexport const DEFAULT_UPLINK = 'npmjs';\n\nconst BLACKLIST = {\n all: true,\n anonymous: true,\n undefined: true,\n owner: true,\n none: true,\n};\n\nexport function uplinkSanityCheck(\n uplinks: UpLinksConfList,\n users: any = BLACKLIST\n): UpLinksConfList {\n const newUplinks = _.clone(uplinks);\n let newUsers = _.clone(users);\n\n for (const uplink in newUplinks) {\n if (Object.prototype.hasOwnProperty.call(newUplinks, uplink)) {\n if (typeof newUplinks[uplink].cache === 'undefined') {\n newUplinks[uplink].cache = true;\n }\n newUsers = sanityCheckNames(uplink, newUsers);\n }\n }\n\n return newUplinks;\n}\n\nexport function sanityCheckUplinksProps(configUpLinks: UpLinksConfList): UpLinksConfList {\n const uplinks = _.clone(configUpLinks);\n\n for (const uplink in uplinks) {\n if (Object.prototype.hasOwnProperty.call(uplinks, uplink)) {\n assert(uplinks[uplink].url, 'CONFIG: no url for uplink: ' + uplink);\n assert(_.isString(uplinks[uplink].url), 'CONFIG: wrong url format for uplink: ' + uplink);\n uplinks[uplink].url = uplinks[uplink].url.replace(/\\/$/, '');\n }\n }\n\n return uplinks;\n}\n\nexport function getProxiesForPackage(pkg: string, packages: PackageList): string[] {\n const matchedPkg = authUtils.getMatchedPackagesSpec(pkg, packages);\n return matchedPkg?.proxy || [];\n}\n\nexport function hasProxyTo(pkg: string, upLink: string, packages: PackageList): boolean {\n const proxyList = getProxiesForPackage(pkg, packages);\n if (proxyList) {\n return proxyList.some((curr) => upLink === curr);\n }\n\n return false;\n}\n\nexport function sanityCheckNames(item: string, users: any): any {\n assert(\n item !== 'all' &&\n item !== 'owner' &&\n item !== 'anonymous' &&\n item !== 'undefined' &&\n item !== 'none',\n 'CONFIG: reserved uplink name: ' + item\n );\n assert(!item.match(/\\s/), 'CONFIG: invalid uplink name: ' + item);\n assert(_.isNil(users[item]), 'CONFIG: duplicate uplink name: ' + item);\n users[item] = true;\n\n return users;\n}\n"],"mappings":";;;;AAMA,IAAa,mBAAmB;AAChC,IAAa,iBAAiB;AAE9B,IAAM,YAAY;CAChB,KAAK;CACL,WAAW;CACX,WAAW;CACX,OAAO;CACP,MAAM;AACR;AAEA,SAAgB,kBACd,SACA,QAAa,WACI;CACjB,MAAM,aAAa,EAAE,MAAM,OAAO;CAClC,IAAI,WAAW,EAAE,MAAM,KAAK;CAE5B,KAAK,MAAM,UAAU,YACnB,IAAI,OAAO,UAAU,eAAe,KAAK,YAAY,MAAM,GAAG;EAC5D,IAAI,OAAO,WAAW,QAAQ,UAAU,aACtC,WAAW,QAAQ,QAAQ;EAE7B,WAAW,iBAAiB,QAAQ,QAAQ;CAC9C;CAGF,OAAO;AACT;AAEA,SAAgB,wBAAwB,eAAiD;CACvF,MAAM,UAAU,EAAE,MAAM,aAAa;CAErC,KAAK,MAAM,UAAU,SACnB,IAAI,OAAO,UAAU,eAAe,KAAK,SAAS,MAAM,GAAG;EACzD,OAAO,QAAQ,QAAQ,KAAK,gCAAgC,MAAM;EAClE,OAAO,EAAE,SAAS,QAAQ,QAAQ,GAAG,GAAG,0CAA0C,MAAM;EACxF,QAAQ,QAAQ,MAAM,QAAQ,QAAQ,IAAI,QAAQ,OAAO,EAAE;CAC7D;CAGF,OAAO;AACT;AAEA,SAAgB,qBAAqB,KAAa,UAAiC;CAEjF,OADmB,UAAU,uBAAuB,KAAK,QAClD,GAAY,SAAS,CAAC;AAC/B;AAEA,SAAgB,WAAW,KAAa,QAAgB,UAAgC;CACtF,MAAM,YAAY,qBAAqB,KAAK,QAAQ;CACpD,IAAI,WACF,OAAO,UAAU,MAAM,SAAS,WAAW,IAAI;CAGjD,OAAO;AACT;AAEA,SAAgB,iBAAiB,MAAc,OAAiB;CAC9D,OACE,SAAS,SACP,SAAS,WACT,SAAS,eACT,SAAS,eACT,SAAS,QACX,mCAAmC,IACrC;CACA,OAAO,CAAC,KAAK,MAAM,IAAI,GAAG,kCAAkC,IAAI;CAChE,OAAO,EAAE,MAAM,MAAM,KAAK,GAAG,oCAAoC,IAAI;CACrE,MAAM,QAAQ;CAEd,OAAO;AACT"}
package/build/user.js CHANGED
@@ -1,46 +1,51 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createAnonymousRemoteUser = createAnonymousRemoteUser;
7
- exports.createRemoteUser = createRemoteUser;
8
- exports.defaultNonLoggedUserRoles = exports.defaultLoggedUserRoles = void 0;
9
- var _packageAccess = require("./package-access");
1
+ const require_package_access = require("./package-access.js");
2
+ //#region src/user.ts
10
3
  /**
11
- * All logged users will have by default the group $all and $authenticate
12
- */
13
- const defaultLoggedUserRoles = exports.defaultLoggedUserRoles = [_packageAccess.ROLES.$ALL, _packageAccess.ROLES.$AUTH, _packageAccess.ROLES.DEPRECATED_ALL, _packageAccess.ROLES.DEPRECATED_AUTH, _packageAccess.ROLES.ALL];
4
+ * All logged users will have by default the group $all and $authenticate
5
+ */
6
+ var defaultLoggedUserRoles = [
7
+ require_package_access.ROLES.$ALL,
8
+ require_package_access.ROLES.$AUTH,
9
+ require_package_access.ROLES.DEPRECATED_ALL,
10
+ require_package_access.ROLES.DEPRECATED_AUTH,
11
+ require_package_access.ROLES.ALL
12
+ ];
14
13
  /**
15
- *
16
- */
17
- const defaultNonLoggedUserRoles = exports.defaultNonLoggedUserRoles = [_packageAccess.ROLES.$ALL, _packageAccess.ROLES.$ANONYMOUS,
18
- // groups without '$' are going to be deprecated eventually
19
- _packageAccess.ROLES.DEPRECATED_ALL, _packageAccess.ROLES.DEPRECATED_ANONYMOUS];
20
-
14
+ *
15
+ */
16
+ var defaultNonLoggedUserRoles = [
17
+ require_package_access.ROLES.$ALL,
18
+ require_package_access.ROLES.$ANONYMOUS,
19
+ require_package_access.ROLES.DEPRECATED_ALL,
20
+ require_package_access.ROLES.DEPRECATED_ANONYMOUS
21
+ ];
21
22
  /**
22
- * Create a RemoteUser object
23
- * @return {Object} \{ name: xx, pluginGroups: [], real_groups: [] \}
24
- */
23
+ * Create a RemoteUser object
24
+ * @return {Object} \{ name: xx, pluginGroups: [], real_groups: [] \}
25
+ */
25
26
  function createRemoteUser(name, pluginGroups) {
26
- const isGroupValid = Array.isArray(pluginGroups);
27
- const groups = Array.from(new Set((isGroupValid ? pluginGroups : []).concat([...defaultLoggedUserRoles])));
28
- return {
29
- name,
30
- groups,
31
- real_groups: pluginGroups
32
- };
27
+ const isGroupValid = Array.isArray(pluginGroups);
28
+ return {
29
+ name,
30
+ groups: Array.from(new Set((isGroupValid ? pluginGroups : []).concat([...defaultLoggedUserRoles]))),
31
+ real_groups: pluginGroups
32
+ };
33
33
  }
34
-
35
34
  /**
36
- * Builds an anonymous remote user in case none is logged in.
37
- * @return {Object} \{ name: xx, groups: [], real_groups: [] \}
38
- */
35
+ * Builds an anonymous remote user in case none is logged in.
36
+ * @return {Object} \{ name: xx, groups: [], real_groups: [] \}
37
+ */
39
38
  function createAnonymousRemoteUser() {
40
- return {
41
- name: undefined,
42
- groups: [...defaultNonLoggedUserRoles],
43
- real_groups: []
44
- };
39
+ return {
40
+ name: void 0,
41
+ groups: [...defaultNonLoggedUserRoles],
42
+ real_groups: []
43
+ };
45
44
  }
45
+ //#endregion
46
+ exports.createAnonymousRemoteUser = createAnonymousRemoteUser;
47
+ exports.createRemoteUser = createRemoteUser;
48
+ exports.defaultLoggedUserRoles = defaultLoggedUserRoles;
49
+ exports.defaultNonLoggedUserRoles = defaultNonLoggedUserRoles;
50
+
46
51
  //# sourceMappingURL=user.js.map
package/build/user.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"user.js","names":["_packageAccess","require","defaultLoggedUserRoles","exports","ROLES","$ALL","$AUTH","DEPRECATED_ALL","DEPRECATED_AUTH","ALL","defaultNonLoggedUserRoles","$ANONYMOUS","DEPRECATED_ANONYMOUS","createRemoteUser","name","pluginGroups","isGroupValid","Array","isArray","groups","from","Set","concat","real_groups","createAnonymousRemoteUser","undefined"],"sources":["../src/user.ts"],"sourcesContent":["import type { RemoteUser } from '@verdaccio/types';\n\nimport { ROLES } from './package-access';\n\n/**\n * All logged users will have by default the group $all and $authenticate\n */\nexport const defaultLoggedUserRoles = [\n ROLES.$ALL,\n ROLES.$AUTH,\n ROLES.DEPRECATED_ALL,\n ROLES.DEPRECATED_AUTH,\n ROLES.ALL,\n];\n/**\n *\n */\nexport const defaultNonLoggedUserRoles = [\n ROLES.$ALL,\n ROLES.$ANONYMOUS,\n // groups without '$' are going to be deprecated eventually\n ROLES.DEPRECATED_ALL,\n ROLES.DEPRECATED_ANONYMOUS,\n];\n\n/**\n * Create a RemoteUser object\n * @return {Object} \\{ name: xx, pluginGroups: [], real_groups: [] \\}\n */\nexport function createRemoteUser(name: string, pluginGroups: string[]): RemoteUser {\n const isGroupValid: boolean = Array.isArray(pluginGroups);\n const groups = Array.from(\n new Set((isGroupValid ? pluginGroups : []).concat([...defaultLoggedUserRoles]))\n );\n\n return {\n name,\n groups,\n real_groups: pluginGroups,\n };\n}\n\n/**\n * Builds an anonymous remote user in case none is logged in.\n * @return {Object} \\{ name: xx, groups: [], real_groups: [] \\}\n */\nexport function createAnonymousRemoteUser(): RemoteUser {\n return {\n name: undefined,\n groups: [...defaultNonLoggedUserRoles],\n real_groups: [],\n };\n}\n"],"mappings":";;;;;;;;AAEA,IAAAA,cAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACO,MAAMC,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAG,CACpCE,oBAAK,CAACC,IAAI,EACVD,oBAAK,CAACE,KAAK,EACXF,oBAAK,CAACG,cAAc,EACpBH,oBAAK,CAACI,eAAe,EACrBJ,oBAAK,CAACK,GAAG,CACV;AACD;AACA;AACA;AACO,MAAMC,yBAAyB,GAAAP,OAAA,CAAAO,yBAAA,GAAG,CACvCN,oBAAK,CAACC,IAAI,EACVD,oBAAK,CAACO,UAAU;AAChB;AACAP,oBAAK,CAACG,cAAc,EACpBH,oBAAK,CAACQ,oBAAoB,CAC3B;;AAED;AACA;AACA;AACA;AACO,SAASC,gBAAgBA,CAACC,IAAY,EAAEC,YAAsB,EAAc;EACjF,MAAMC,YAAqB,GAAGC,KAAK,CAACC,OAAO,CAACH,YAAY,CAAC;EACzD,MAAMI,MAAM,GAAGF,KAAK,CAACG,IAAI,CACvB,IAAIC,GAAG,CAAC,CAACL,YAAY,GAAGD,YAAY,GAAG,EAAE,EAAEO,MAAM,CAAC,CAAC,GAAGpB,sBAAsB,CAAC,CAAC,CAChF,CAAC;EAED,OAAO;IACLY,IAAI;IACJK,MAAM;IACNI,WAAW,EAAER;EACf,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACO,SAASS,yBAAyBA,CAAA,EAAe;EACtD,OAAO;IACLV,IAAI,EAAEW,SAAS;IACfN,MAAM,EAAE,CAAC,GAAGT,yBAAyB,CAAC;IACtCa,WAAW,EAAE;EACf,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"file":"user.js","names":[],"sources":["../src/user.ts"],"sourcesContent":["import type { RemoteUser } from '@verdaccio/types';\n\nimport { ROLES } from './package-access';\n\n/**\n * All logged users will have by default the group $all and $authenticate\n */\nexport const defaultLoggedUserRoles = [\n ROLES.$ALL,\n ROLES.$AUTH,\n ROLES.DEPRECATED_ALL,\n ROLES.DEPRECATED_AUTH,\n ROLES.ALL,\n];\n/**\n *\n */\nexport const defaultNonLoggedUserRoles = [\n ROLES.$ALL,\n ROLES.$ANONYMOUS,\n // groups without '$' are going to be deprecated eventually\n ROLES.DEPRECATED_ALL,\n ROLES.DEPRECATED_ANONYMOUS,\n];\n\n/**\n * Create a RemoteUser object\n * @return {Object} \\{ name: xx, pluginGroups: [], real_groups: [] \\}\n */\nexport function createRemoteUser(name: string, pluginGroups: string[]): RemoteUser {\n const isGroupValid: boolean = Array.isArray(pluginGroups);\n const groups = Array.from(\n new Set((isGroupValid ? pluginGroups : []).concat([...defaultLoggedUserRoles]))\n );\n\n return {\n name,\n groups,\n real_groups: pluginGroups,\n };\n}\n\n/**\n * Builds an anonymous remote user in case none is logged in.\n * @return {Object} \\{ name: xx, groups: [], real_groups: [] \\}\n */\nexport function createAnonymousRemoteUser(): RemoteUser {\n return {\n name: undefined,\n groups: [...defaultNonLoggedUserRoles],\n real_groups: [],\n };\n}\n"],"mappings":";;;;;AAOA,IAAa,yBAAyB;CACpC,uBAAA,MAAM;CACN,uBAAA,MAAM;CACN,uBAAA,MAAM;CACN,uBAAA,MAAM;CACN,uBAAA,MAAM;AACR;;;;AAIA,IAAa,4BAA4B;CACvC,uBAAA,MAAM;CACN,uBAAA,MAAM;CAEN,uBAAA,MAAM;CACN,uBAAA,MAAM;AACR;;;;;AAMA,SAAgB,iBAAiB,MAAc,cAAoC;CACjF,MAAM,eAAwB,MAAM,QAAQ,YAAY;CAKxD,OAAO;EACL;EACA,QANa,MAAM,KACnB,IAAI,KAAK,eAAe,eAAe,CAAC,GAAG,OAAO,CAAC,GAAG,sBAAsB,CAAC,CAAC,CAK9E;EACA,aAAa;CACf;AACF;;;;;AAMA,SAAgB,4BAAwC;CACtD,OAAO;EACL,MAAM,KAAA;EACN,QAAQ,CAAC,GAAG,yBAAyB;EACrC,aAAa,CAAC;CAChB;AACF"}
package/build/user.mjs ADDED
@@ -0,0 +1,48 @@
1
+ import { ROLES } from "./package-access.mjs";
2
+ //#region src/user.ts
3
+ /**
4
+ * All logged users will have by default the group $all and $authenticate
5
+ */
6
+ var defaultLoggedUserRoles = [
7
+ ROLES.$ALL,
8
+ ROLES.$AUTH,
9
+ ROLES.DEPRECATED_ALL,
10
+ ROLES.DEPRECATED_AUTH,
11
+ ROLES.ALL
12
+ ];
13
+ /**
14
+ *
15
+ */
16
+ var defaultNonLoggedUserRoles = [
17
+ ROLES.$ALL,
18
+ ROLES.$ANONYMOUS,
19
+ ROLES.DEPRECATED_ALL,
20
+ ROLES.DEPRECATED_ANONYMOUS
21
+ ];
22
+ /**
23
+ * Create a RemoteUser object
24
+ * @return {Object} \{ name: xx, pluginGroups: [], real_groups: [] \}
25
+ */
26
+ function createRemoteUser(name, pluginGroups) {
27
+ const isGroupValid = Array.isArray(pluginGroups);
28
+ return {
29
+ name,
30
+ groups: Array.from(new Set((isGroupValid ? pluginGroups : []).concat([...defaultLoggedUserRoles]))),
31
+ real_groups: pluginGroups
32
+ };
33
+ }
34
+ /**
35
+ * Builds an anonymous remote user in case none is logged in.
36
+ * @return {Object} \{ name: xx, groups: [], real_groups: [] \}
37
+ */
38
+ function createAnonymousRemoteUser() {
39
+ return {
40
+ name: void 0,
41
+ groups: [...defaultNonLoggedUserRoles],
42
+ real_groups: []
43
+ };
44
+ }
45
+ //#endregion
46
+ export { createAnonymousRemoteUser, createRemoteUser, defaultLoggedUserRoles, defaultNonLoggedUserRoles };
47
+
48
+ //# sourceMappingURL=user.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.mjs","names":[],"sources":["../src/user.ts"],"sourcesContent":["import type { RemoteUser } from '@verdaccio/types';\n\nimport { ROLES } from './package-access';\n\n/**\n * All logged users will have by default the group $all and $authenticate\n */\nexport const defaultLoggedUserRoles = [\n ROLES.$ALL,\n ROLES.$AUTH,\n ROLES.DEPRECATED_ALL,\n ROLES.DEPRECATED_AUTH,\n ROLES.ALL,\n];\n/**\n *\n */\nexport const defaultNonLoggedUserRoles = [\n ROLES.$ALL,\n ROLES.$ANONYMOUS,\n // groups without '$' are going to be deprecated eventually\n ROLES.DEPRECATED_ALL,\n ROLES.DEPRECATED_ANONYMOUS,\n];\n\n/**\n * Create a RemoteUser object\n * @return {Object} \\{ name: xx, pluginGroups: [], real_groups: [] \\}\n */\nexport function createRemoteUser(name: string, pluginGroups: string[]): RemoteUser {\n const isGroupValid: boolean = Array.isArray(pluginGroups);\n const groups = Array.from(\n new Set((isGroupValid ? pluginGroups : []).concat([...defaultLoggedUserRoles]))\n );\n\n return {\n name,\n groups,\n real_groups: pluginGroups,\n };\n}\n\n/**\n * Builds an anonymous remote user in case none is logged in.\n * @return {Object} \\{ name: xx, groups: [], real_groups: [] \\}\n */\nexport function createAnonymousRemoteUser(): RemoteUser {\n return {\n name: undefined,\n groups: [...defaultNonLoggedUserRoles],\n real_groups: [],\n };\n}\n"],"mappings":";;;;;AAOA,IAAa,yBAAyB;CACpC,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;AACR;;;;AAIA,IAAa,4BAA4B;CACvC,MAAM;CACN,MAAM;CAEN,MAAM;CACN,MAAM;AACR;;;;;AAMA,SAAgB,iBAAiB,MAAc,cAAoC;CACjF,MAAM,eAAwB,MAAM,QAAQ,YAAY;CAKxD,OAAO;EACL;EACA,QANa,MAAM,KACnB,IAAI,KAAK,eAAe,eAAe,CAAC,GAAG,OAAO,CAAC,GAAG,sBAAsB,CAAC,CAAC,CAK9E;EACA,aAAa;CACf;AACF;;;;;AAMA,SAAgB,4BAAwC;CACtD,OAAO;EACL,MAAM,KAAA;EACN,QAAQ,CAAC,GAAG,yBAAyB;EACrC,aAAa,CAAC;CAChB;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdaccio/config",
3
- "version": "8.1.4",
3
+ "version": "8.2.0",
4
4
  "description": "Verdaccio Configuration",
5
5
  "keywords": [
6
6
  "enterprise",
@@ -32,27 +32,40 @@
32
32
  "url": "https://opencollective.com/verdaccio"
33
33
  },
34
34
  "main": "./build/index.js",
35
- "types": "build/index.d.ts",
35
+ "module": "./build/index.mjs",
36
+ "types": "./build/index.d.ts",
37
+ "exports": {
38
+ ".": {
39
+ "import": {
40
+ "types": "./build/index.d.ts",
41
+ "default": "./build/index.mjs"
42
+ },
43
+ "require": {
44
+ "types": "./build/index.d.ts",
45
+ "default": "./build/index.js"
46
+ }
47
+ },
48
+ "./build/*": "./build/*"
49
+ },
36
50
  "dependencies": {
37
- "@verdaccio/core": "8.1.4",
51
+ "@verdaccio/core": "8.2.0",
38
52
  "debug": "4.4.3",
39
- "js-yaml": "4.3.0",
53
+ "js-yaml": "5.2.2",
40
54
  "lodash": "4.18.1"
41
55
  },
42
56
  "devDependencies": {
43
57
  "@verdaccio/types": "13.0.5",
58
+ "vite": "8.0.16",
44
59
  "vitest": "4.1.2"
45
60
  },
46
61
  "engines": {
47
- "node": ">=18"
62
+ "node": ">=22"
48
63
  },
49
64
  "scripts": {
50
65
  "clean": "rimraf ./build",
51
66
  "test": "vitest run",
52
67
  "type-check": "tsc --noEmit -p tsconfig.build.json",
53
- "build:types": "tsc --emitDeclarationOnly -p tsconfig.build.json",
54
- "build:js": "babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
55
- "watch": "pnpm build:js -- --watch",
56
- "build": "pnpm run build:js && pnpm run build:types"
68
+ "watch": "vite build --watch",
69
+ "build": "vite build && tsc --emitDeclarationOnly -p tsconfig.build.json"
57
70
  }
58
71
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["_config","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_configPath","_token","_configUtils","_packageAccess","_parse","_uplinks","_security","_agent","_user","_builder","_interopRequireDefault","_conf","_address","e","__esModule","default"],"sources":["../src/index.ts"],"sourcesContent":["export * from './config';\nexport * from './config-path';\nexport * from './token';\nexport * from './config-utils';\nexport * from './package-access';\nexport { fromJStoYAML, parseConfigFile, getConfigParsed } from './parse';\nexport * from './uplinks';\nexport * from './security';\nexport * from './agent';\nexport * from './user';\nexport { default as ConfigBuilder } from './builder';\nexport { getDefaultConfig } from './conf';\nexport * from './address';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,G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