@verdaccio/core 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 (78) hide show
  1. package/build/_virtual/_rolldown/runtime.js +33 -0
  2. package/build/_virtual/_rolldown/runtime.mjs +13 -0
  3. package/build/auth-utils.d.ts +0 -1
  4. package/build/auth-utils.js +23 -25
  5. package/build/auth-utils.js.map +1 -1
  6. package/build/auth-utils.mjs +32 -0
  7. package/build/auth-utils.mjs.map +1 -0
  8. package/build/constants.js +201 -157
  9. package/build/constants.js.map +1 -1
  10. package/build/constants.mjs +185 -0
  11. package/build/constants.mjs.map +1 -0
  12. package/build/crypto-utils.d.ts +0 -2
  13. package/build/crypto-utils.js +33 -29
  14. package/build/crypto-utils.js.map +1 -1
  15. package/build/crypto-utils.mjs +40 -0
  16. package/build/crypto-utils.mjs.map +1 -0
  17. package/build/error-utils.js +92 -80
  18. package/build/error-utils.js.map +1 -1
  19. package/build/error-utils.mjs +107 -0
  20. package/build/error-utils.mjs.map +1 -0
  21. package/build/file-utils.js +35 -31
  22. package/build/file-utils.js.map +1 -1
  23. package/build/file-utils.mjs +35 -0
  24. package/build/file-utils.mjs.map +1 -0
  25. package/build/index.d.ts +2 -1
  26. package/build/index.js +125 -185
  27. package/build/index.mjs +15 -0
  28. package/build/ip-utils.js +52 -69
  29. package/build/ip-utils.js.map +1 -1
  30. package/build/ip-utils.mjs +60 -0
  31. package/build/ip-utils.mjs.map +1 -0
  32. package/build/pkg-utils.js +60 -76
  33. package/build/pkg-utils.js.map +1 -1
  34. package/build/pkg-utils.mjs +69 -0
  35. package/build/pkg-utils.mjs.map +1 -0
  36. package/build/plugin-utils.d.ts +0 -1
  37. package/build/plugin-utils.js +27 -78
  38. package/build/plugin-utils.js.map +1 -1
  39. package/build/plugin-utils.mjs +26 -0
  40. package/build/plugin-utils.mjs.map +1 -0
  41. package/build/schemes/publish-manifest.js +33 -43
  42. package/build/schemes/publish-manifest.js.map +1 -1
  43. package/build/schemes/publish-manifest.mjs +36 -0
  44. package/build/schemes/publish-manifest.mjs.map +1 -0
  45. package/build/schemes/unpublish-manifest.js +51 -72
  46. package/build/schemes/unpublish-manifest.js.map +1 -1
  47. package/build/schemes/unpublish-manifest.mjs +54 -0
  48. package/build/schemes/unpublish-manifest.mjs.map +1 -0
  49. package/build/search-utils.js +9 -9
  50. package/build/search-utils.js.map +1 -1
  51. package/build/search-utils.mjs +8 -0
  52. package/build/search-utils.mjs.map +1 -0
  53. package/build/stream-utils.d.ts +0 -1
  54. package/build/stream-utils.js +29 -28
  55. package/build/stream-utils.js.map +1 -1
  56. package/build/stream-utils.mjs +30 -0
  57. package/build/stream-utils.mjs.map +1 -0
  58. package/build/string-utils.js +31 -34
  59. package/build/string-utils.js.map +1 -1
  60. package/build/string-utils.mjs +31 -0
  61. package/build/string-utils.mjs.map +1 -0
  62. package/build/tarball-utils.js +40 -39
  63. package/build/tarball-utils.js.map +1 -1
  64. package/build/tarball-utils.mjs +46 -0
  65. package/build/tarball-utils.mjs.map +1 -0
  66. package/build/validation-utils.js +78 -112
  67. package/build/validation-utils.js.map +1 -1
  68. package/build/validation-utils.mjs +91 -0
  69. package/build/validation-utils.mjs.map +1 -0
  70. package/build/warning-utils.d.ts +1 -0
  71. package/build/warning-utils.js +38 -33
  72. package/build/warning-utils.js.map +1 -1
  73. package/build/warning-utils.mjs +40 -0
  74. package/build/warning-utils.mjs.map +1 -0
  75. package/package.json +19 -6
  76. package/build/index.js.map +0 -1
  77. package/build/path-utils.js +0 -2
  78. package/build/path-utils.js.map +0 -1
@@ -0,0 +1,185 @@
1
+ import { __exportAll } from "./_virtual/_rolldown/runtime.mjs";
2
+ import httpCodes from "http-status-codes";
3
+ //#region src/constants.ts
4
+ var constants_exports = /* @__PURE__ */ __exportAll({
5
+ ANONYMOUS_USER: () => ANONYMOUS_USER,
6
+ API_MESSAGE: () => API_MESSAGE,
7
+ CHARACTER_ENCODING: () => CHARACTER_ENCODING,
8
+ DEFAULT_DOMAIN: () => DEFAULT_DOMAIN,
9
+ DEFAULT_PASSWORD_VALIDATION: () => DEFAULT_PASSWORD_VALIDATION,
10
+ DEFAULT_PORT: () => DEFAULT_PORT,
11
+ DEFAULT_PROTOCOL: () => DEFAULT_PROTOCOL,
12
+ DEFAULT_USER: () => DEFAULT_USER,
13
+ DIST_TAGS: () => DIST_TAGS,
14
+ ERROR_CODE: () => ERROR_CODE,
15
+ HEADERS: () => HEADERS,
16
+ HEADER_TYPE: () => HEADER_TYPE,
17
+ HTTP_STATUS: () => HTTP_STATUS,
18
+ HtpasswdHashAlgorithm: () => HtpasswdHashAlgorithm,
19
+ LATEST: () => LATEST,
20
+ LOG_STATUS_MESSAGE: () => LOG_STATUS_MESSAGE,
21
+ LOG_VERDACCIO_BYTES: () => LOG_VERDACCIO_BYTES,
22
+ LOG_VERDACCIO_ERROR: () => LOG_VERDACCIO_ERROR,
23
+ MAINTAINERS: () => MAINTAINERS,
24
+ PACKAGE_ACCESS: () => PACKAGE_ACCESS,
25
+ PLUGIN_CATEGORY: () => PLUGIN_CATEGORY,
26
+ PLUGIN_PREFIX: () => PLUGIN_PREFIX,
27
+ PLUGIN_UI_PREFIX: () => PLUGIN_UI_PREFIX,
28
+ ROLES: () => ROLES,
29
+ TIME_EXPIRATION_1H: () => "1h",
30
+ TIME_EXPIRATION_24H: () => "24h",
31
+ TOKEN_BASIC: () => TOKEN_BASIC,
32
+ TOKEN_BEARER: () => TOKEN_BEARER,
33
+ USERS: () => USERS
34
+ });
35
+ var DEFAULT_PASSWORD_VALIDATION = /.{3}$/;
36
+ var DIST_TAGS = "dist-tags";
37
+ var LATEST = "latest";
38
+ var USERS = "users";
39
+ var MAINTAINERS = "maintainers";
40
+ var DEFAULT_USER = "Anonymous";
41
+ var ANONYMOUS_USER = "anonymous";
42
+ var HEADER_TYPE = {
43
+ CONTENT_ENCODING: "content-encoding",
44
+ CONTENT_TYPE: "content-type",
45
+ CONTENT_LENGTH: "content-length",
46
+ ACCEPT_ENCODING: "accept-encoding",
47
+ AUTHORIZATION: "authorization"
48
+ };
49
+ var CHARACTER_ENCODING = { UTF8: "utf8" };
50
+ var TOKEN_BASIC = "Basic";
51
+ var TOKEN_BEARER = "Bearer";
52
+ var HEADERS = {
53
+ ACCEPT: "Accept",
54
+ ACCEPT_ENCODING: "Accept-Encoding",
55
+ USER_AGENT: "User-Agent",
56
+ JSON: "application/json",
57
+ CONTENT_TYPE: "Content-type",
58
+ CONTENT_LENGTH: "content-length",
59
+ TEXT_PLAIN: "text/plain",
60
+ TEXT_PLAIN_UTF8: "text/plain; charset=utf-8",
61
+ TEXT_HTML_UTF8: "text/html; charset=utf-8",
62
+ TEXT_HTML: "text/html",
63
+ AUTHORIZATION: "authorization",
64
+ CACHE_CONTROL: "Cache-Control",
65
+ NO_CACHE: "no-cache, no-store",
66
+ RETRY_AFTER: "Retry-After",
67
+ FORWARDED_PROTO: "X-Forwarded-Proto",
68
+ FORWARDED_FOR: "X-Forwarded-For",
69
+ FRAMES_OPTIONS: "X-Frame-Options",
70
+ CSP: "Content-Security-Policy",
71
+ CTO: "X-Content-Type-Options",
72
+ XSS: "X-XSS-Protection",
73
+ CLIENT: "X-Client",
74
+ POWERED_BY: "X-Powered-By",
75
+ RATELIMIT_LIMIT: "X-RateLimit-Limit",
76
+ RATELIMIT_REMAINING: "X-RateLimit-Remaining",
77
+ NONE_MATCH: "If-None-Match",
78
+ ETAG: "ETag",
79
+ JSON_CHARSET: "application/json; charset=utf-8",
80
+ JSON_INSTALL_CHARSET: "application/vnd.npm.install-v1+json; charset=utf-8",
81
+ OCTET_STREAM: "application/octet-stream; charset=utf-8",
82
+ TEXT_CHARSET: "text/plain; charset=utf-8",
83
+ JAVASCRIPT_CHARSET: "application/javascript; charset=utf-8",
84
+ WWW_AUTH: "WWW-Authenticate",
85
+ GZIP: "gzip",
86
+ HOST: "host"
87
+ };
88
+ /**
89
+ * HTTP status codes used throughout Verdaccio.
90
+ */
91
+ var HTTP_STATUS = {
92
+ /** 202: The request has been accepted for processing, but the processing is not yet complete. */
93
+ ACCEPTED: httpCodes.ACCEPTED,
94
+ /** 200: Standard response for successful HTTP requests. */
95
+ OK: httpCodes.OK,
96
+ /** 201: The request has been fulfilled and resulted in a new resource being created. */
97
+ CREATED: httpCodes.CREATED,
98
+ /** 300: Indicates multiple options for the resource from which the client may choose. */
99
+ MULTIPLE_CHOICES: httpCodes.MULTIPLE_CHOICES,
100
+ /** 304: Indicates that the resource has not been modified since the last request. */
101
+ NOT_MODIFIED: httpCodes.NOT_MODIFIED,
102
+ /** 400: The server could not understand the request due to invalid syntax. */
103
+ BAD_REQUEST: httpCodes.BAD_REQUEST,
104
+ /** 401: The client must authenticate itself to get the requested response. */
105
+ UNAUTHORIZED: httpCodes.UNAUTHORIZED,
106
+ /** 403: The client does not have access rights to the content. */
107
+ FORBIDDEN: httpCodes.FORBIDDEN,
108
+ /** 404: The server can not find the requested resource. */
109
+ NOT_FOUND: httpCodes.NOT_FOUND,
110
+ /** 408: The server timed out waiting for the request. */
111
+ REQUEST_TIMEOUT: httpCodes.REQUEST_TIMEOUT,
112
+ /** 409: The request could not be completed due to a conflict with the current state of the resource. */
113
+ CONFLICT: httpCodes.CONFLICT,
114
+ /** 415: The media format of the requested data is not supported by the server. */
115
+ UNSUPPORTED_MEDIA: httpCodes.UNSUPPORTED_MEDIA_TYPE,
116
+ /** 422: The request was well-formed but was unable to be followed due to semantic errors. */
117
+ BAD_DATA: httpCodes.UNPROCESSABLE_ENTITY,
118
+ /** 500: The server has encountered a situation it doesn't know how to handle. */
119
+ INTERNAL_ERROR: httpCodes.INTERNAL_SERVER_ERROR,
120
+ /** 501: The request method is not supported by the server and cannot be handled. */
121
+ NOT_IMPLEMENTED: httpCodes.NOT_IMPLEMENTED,
122
+ /** 502: The server, while acting as a gateway or proxy, received an invalid response from the upstream server. */
123
+ BAD_GATEWAY: httpCodes.BAD_GATEWAY,
124
+ /** 503: The server is not ready to handle the request. */
125
+ SERVICE_UNAVAILABLE: httpCodes.SERVICE_UNAVAILABLE,
126
+ /** 504: The server, while acting as a gateway or proxy, did not get a response in time from the upstream server. */
127
+ GATEWAY_TIMEOUT: httpCodes.GATEWAY_TIMEOUT,
128
+ /** 508: The server detected an infinite loop while processing the request. */
129
+ LOOP_DETECTED: 508,
130
+ /** 590: Custom Verdaccio code indicating the server cannot handle the request. */
131
+ CANNOT_HANDLE: 590
132
+ };
133
+ var ERROR_CODE = { token_required: "token is required" };
134
+ var API_MESSAGE = {
135
+ PKG_CREATED: "created new package",
136
+ PKG_CHANGED: "package changed",
137
+ PKG_REMOVED: "package removed",
138
+ PKG_PUBLISHED: "package published",
139
+ TARBALL_UPLOADED: "tarball uploaded successfully",
140
+ TARBALL_REMOVED: "tarball removed",
141
+ TAG_UPDATED: "tags updated",
142
+ TAG_REMOVED: "tag removed",
143
+ TAG_ADDED: "package tagged",
144
+ OK: "ok",
145
+ LOGGED_OUT: "Logged out"
146
+ };
147
+ var LOG_STATUS_MESSAGE = "@{status}, user: @{user}(@{remoteIP}), req: '@{request.method} @{request.url}'";
148
+ var LOG_VERDACCIO_ERROR = `${LOG_STATUS_MESSAGE}, error: @{!error}`;
149
+ var LOG_VERDACCIO_BYTES = `${LOG_STATUS_MESSAGE}, bytes: @{bytes.in}/@{bytes.out}`;
150
+ var ROLES = {
151
+ $ALL: "$all",
152
+ ALL: "all",
153
+ $AUTH: "$authenticated",
154
+ $ANONYMOUS: "$anonymous",
155
+ DEPRECATED_ALL: "@all",
156
+ DEPRECATED_AUTH: "@authenticated",
157
+ DEPRECATED_ANONYMOUS: "@anonymous"
158
+ };
159
+ var PACKAGE_ACCESS = {
160
+ SCOPE: "@*/*",
161
+ ALL: "**"
162
+ };
163
+ var HtpasswdHashAlgorithm = /* @__PURE__ */ function(HtpasswdHashAlgorithm) {
164
+ HtpasswdHashAlgorithm["md5"] = "md5";
165
+ HtpasswdHashAlgorithm["sha1"] = "sha1";
166
+ HtpasswdHashAlgorithm["crypt"] = "crypt";
167
+ HtpasswdHashAlgorithm["bcrypt"] = "bcrypt";
168
+ return HtpasswdHashAlgorithm;
169
+ }({});
170
+ var PLUGIN_PREFIX = "verdaccio";
171
+ var PLUGIN_UI_PREFIX = "verdaccio-theme";
172
+ var PLUGIN_CATEGORY = {
173
+ AUTHENTICATION: "authentication",
174
+ MIDDLEWARE: "middleware",
175
+ STORAGE: "storage",
176
+ FILTER: "filter",
177
+ THEME: "theme"
178
+ };
179
+ var DEFAULT_PORT = "4873";
180
+ var DEFAULT_PROTOCOL = "http";
181
+ var DEFAULT_DOMAIN = "localhost";
182
+ //#endregion
183
+ export { ANONYMOUS_USER, API_MESSAGE, CHARACTER_ENCODING, DEFAULT_DOMAIN, DEFAULT_PASSWORD_VALIDATION, DEFAULT_PORT, DEFAULT_PROTOCOL, DEFAULT_USER, DIST_TAGS, HEADERS, HEADER_TYPE, HTTP_STATUS, HtpasswdHashAlgorithm, LATEST, MAINTAINERS, PLUGIN_CATEGORY, PLUGIN_PREFIX, PLUGIN_UI_PREFIX, TOKEN_BASIC, TOKEN_BEARER, USERS, constants_exports };
184
+
185
+ //# sourceMappingURL=constants.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.mjs","names":[],"sources":["../src/constants.ts"],"sourcesContent":["import httpCodes from 'http-status-codes';\n\nexport const DEFAULT_PASSWORD_VALIDATION = /.{3}$/;\nexport const TIME_EXPIRATION_24H = '24h';\nexport const TIME_EXPIRATION_1H = '1h';\nexport const DIST_TAGS = 'dist-tags';\nexport const LATEST = 'latest';\nexport const USERS = 'users';\nexport const MAINTAINERS = 'maintainers';\nexport const DEFAULT_USER = 'Anonymous'; // for display purposes\nexport const ANONYMOUS_USER = 'anonymous'; // for username purposes\n\nexport const HEADER_TYPE = {\n CONTENT_ENCODING: 'content-encoding',\n CONTENT_TYPE: 'content-type',\n CONTENT_LENGTH: 'content-length',\n ACCEPT_ENCODING: 'accept-encoding',\n AUTHORIZATION: 'authorization',\n};\n\nexport const CHARACTER_ENCODING = {\n UTF8: 'utf8',\n};\n\n// @deprecated use Bearer instead\nexport const TOKEN_BASIC = 'Basic';\nexport const TOKEN_BEARER = 'Bearer';\n\nexport const HEADERS = {\n ACCEPT: 'Accept',\n ACCEPT_ENCODING: 'Accept-Encoding',\n USER_AGENT: 'User-Agent',\n JSON: 'application/json',\n CONTENT_TYPE: 'Content-type',\n CONTENT_LENGTH: 'content-length',\n TEXT_PLAIN: 'text/plain',\n TEXT_PLAIN_UTF8: 'text/plain; charset=utf-8',\n TEXT_HTML_UTF8: 'text/html; charset=utf-8',\n TEXT_HTML: 'text/html',\n AUTHORIZATION: 'authorization',\n CACHE_CONTROL: 'Cache-Control',\n NO_CACHE: 'no-cache, no-store',\n RETRY_AFTER: 'Retry-After',\n // only set with proxy that setup HTTPS\n // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Proto\n FORWARDED_PROTO: 'X-Forwarded-Proto',\n FORWARDED_FOR: 'X-Forwarded-For',\n FRAMES_OPTIONS: 'X-Frame-Options',\n CSP: 'Content-Security-Policy',\n CTO: 'X-Content-Type-Options',\n XSS: 'X-XSS-Protection',\n CLIENT: 'X-Client',\n POWERED_BY: 'X-Powered-By',\n RATELIMIT_LIMIT: 'X-RateLimit-Limit',\n RATELIMIT_REMAINING: 'X-RateLimit-Remaining',\n NONE_MATCH: 'If-None-Match',\n ETAG: 'ETag',\n JSON_CHARSET: 'application/json; charset=utf-8',\n JSON_INSTALL_CHARSET: 'application/vnd.npm.install-v1+json; charset=utf-8',\n OCTET_STREAM: 'application/octet-stream; charset=utf-8',\n TEXT_CHARSET: 'text/plain; charset=utf-8',\n JAVASCRIPT_CHARSET: 'application/javascript; charset=utf-8',\n WWW_AUTH: 'WWW-Authenticate',\n GZIP: 'gzip',\n HOST: 'host',\n};\n\n/**\n * HTTP status codes used throughout Verdaccio.\n */\nexport const HTTP_STATUS = {\n /** 202: The request has been accepted for processing, but the processing is not yet complete. */\n ACCEPTED: httpCodes.ACCEPTED,\n /** 200: Standard response for successful HTTP requests. */\n OK: httpCodes.OK,\n /** 201: The request has been fulfilled and resulted in a new resource being created. */\n CREATED: httpCodes.CREATED,\n /** 300: Indicates multiple options for the resource from which the client may choose. */\n MULTIPLE_CHOICES: httpCodes.MULTIPLE_CHOICES,\n /** 304: Indicates that the resource has not been modified since the last request. */\n NOT_MODIFIED: httpCodes.NOT_MODIFIED,\n /** 400: The server could not understand the request due to invalid syntax. */\n BAD_REQUEST: httpCodes.BAD_REQUEST,\n /** 401: The client must authenticate itself to get the requested response. */\n UNAUTHORIZED: httpCodes.UNAUTHORIZED,\n /** 403: The client does not have access rights to the content. */\n FORBIDDEN: httpCodes.FORBIDDEN,\n /** 404: The server can not find the requested resource. */\n NOT_FOUND: httpCodes.NOT_FOUND,\n /** 408: The server timed out waiting for the request. */\n REQUEST_TIMEOUT: httpCodes.REQUEST_TIMEOUT,\n /** 409: The request could not be completed due to a conflict with the current state of the resource. */\n CONFLICT: httpCodes.CONFLICT,\n /** 415: The media format of the requested data is not supported by the server. */\n UNSUPPORTED_MEDIA: httpCodes.UNSUPPORTED_MEDIA_TYPE,\n /** 422: The request was well-formed but was unable to be followed due to semantic errors. */\n BAD_DATA: httpCodes.UNPROCESSABLE_ENTITY,\n /** 500: The server has encountered a situation it doesn't know how to handle. */\n INTERNAL_ERROR: httpCodes.INTERNAL_SERVER_ERROR,\n /** 501: The request method is not supported by the server and cannot be handled. */\n NOT_IMPLEMENTED: httpCodes.NOT_IMPLEMENTED,\n /** 502: The server, while acting as a gateway or proxy, received an invalid response from the upstream server. */\n BAD_GATEWAY: httpCodes.BAD_GATEWAY,\n /** 503: The server is not ready to handle the request. */\n SERVICE_UNAVAILABLE: httpCodes.SERVICE_UNAVAILABLE,\n /** 504: The server, while acting as a gateway or proxy, did not get a response in time from the upstream server. */\n GATEWAY_TIMEOUT: httpCodes.GATEWAY_TIMEOUT,\n /** 508: The server detected an infinite loop while processing the request. */\n LOOP_DETECTED: 508,\n /** 590: Custom Verdaccio code indicating the server cannot handle the request. */\n CANNOT_HANDLE: 590,\n};\n\nexport const ERROR_CODE = {\n token_required: 'token is required',\n};\n\nexport const API_MESSAGE = {\n PKG_CREATED: 'created new package',\n PKG_CHANGED: 'package changed',\n PKG_REMOVED: 'package removed',\n PKG_PUBLISHED: 'package published',\n TARBALL_UPLOADED: 'tarball uploaded successfully',\n TARBALL_REMOVED: 'tarball removed',\n TAG_UPDATED: 'tags updated',\n TAG_REMOVED: 'tag removed',\n TAG_ADDED: 'package tagged',\n OK: 'ok',\n LOGGED_OUT: 'Logged out',\n};\n\nexport const LOG_STATUS_MESSAGE =\n \"@{status}, user: @{user}(@{remoteIP}), req: '@{request.method} @{request.url}'\";\nexport const LOG_VERDACCIO_ERROR = `${LOG_STATUS_MESSAGE}, error: @{!error}`;\nexport const LOG_VERDACCIO_BYTES = `${LOG_STATUS_MESSAGE}, bytes: @{bytes.in}/@{bytes.out}`;\n\nexport const ROLES = {\n $ALL: '$all',\n ALL: 'all',\n $AUTH: '$authenticated',\n $ANONYMOUS: '$anonymous',\n DEPRECATED_ALL: '@all',\n DEPRECATED_AUTH: '@authenticated',\n DEPRECATED_ANONYMOUS: '@anonymous',\n};\n\nexport const PACKAGE_ACCESS = {\n SCOPE: '@*/*',\n ALL: '**',\n};\n\nexport enum HtpasswdHashAlgorithm {\n md5 = 'md5',\n sha1 = 'sha1',\n crypt = 'crypt',\n bcrypt = 'bcrypt',\n}\n\nexport const PLUGIN_PREFIX = 'verdaccio';\nexport const PLUGIN_UI_PREFIX = 'verdaccio-theme';\n\nexport const PLUGIN_CATEGORY = {\n AUTHENTICATION: 'authentication',\n MIDDLEWARE: 'middleware',\n STORAGE: 'storage',\n FILTER: 'filter',\n THEME: 'theme',\n};\n\nexport const DEFAULT_PORT = '4873';\nexport const DEFAULT_PROTOCOL = 'http';\nexport const DEFAULT_DOMAIN = 'localhost';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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c;CACzB,aAAa;CACb,aAAa;CACb,aAAa;CACb,eAAe;CACf,kBAAkB;CAClB,iBAAiB;CACjB,aAAa;CACb,aAAa;CACb,WAAW;CACX,IAAI;CACJ,YAAY;AACd;AAEA,IAAa,qBACX;AACF,IAAa,sBAAsB,GAAG,mBAAmB;AACzD,IAAa,sBAAsB,GAAG,mBAAmB;AAEzD,IAAa,QAAQ;CACnB,MAAM;CACN,KAAK;CACL,OAAO;CACP,YAAY;CACZ,gBAAgB;CAChB,iBAAiB;CACjB,sBAAsB;AACxB;AAEA,IAAa,iBAAiB;CAC5B,OAAO;CACP,KAAK;AACP;AAEA,IAAY,wBAAL,yBAAA,uBAAA;CACL,sBAAA,SAAA;CACA,sBAAA,UAAA;CACA,sBAAA,WAAA;CACA,sBAAA,YAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAa,gBAAgB;AAC7B,IAAa,mBAAmB;AAEhC,IAAa,kBAAkB;CAC7B,gBAAgB;CAChB,YAAY;CACZ,SAAS;CACT,QAAQ;CACR,OAAO;AACT;AAEA,IAAa,eAAe;AAC5B,IAAa,mBAAmB;AAChC,IAAa,iBAAiB"}
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import type { Hash } from 'node:crypto';
4
2
  export declare const defaultTarballHashAlgorithm = "sha1";
5
3
  export declare function createTarballHash(): Hash;
@@ -1,41 +1,45 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
1
+ const require_runtime = require("./_virtual/_rolldown/runtime.js");
2
+ let node_crypto = require("node:crypto");
3
+ //#region src/crypto-utils.ts
4
+ var crypto_utils_exports = /* @__PURE__ */ require_runtime.__exportAll({
5
+ createTarballHash: () => createTarballHash,
6
+ defaultTarballHashAlgorithm: () => defaultTarballHashAlgorithm,
7
+ generateRandomHexString: () => generateRandomHexString,
8
+ mask: () => mask,
9
+ stringToMD5: () => stringToMD5
5
10
  });
6
- exports.createTarballHash = createTarballHash;
7
- exports.defaultTarballHashAlgorithm = void 0;
8
- exports.generateRandomHexString = generateRandomHexString;
9
- exports.mask = mask;
10
- exports.stringToMD5 = stringToMD5;
11
- var _nodeCrypto = require("node:crypto");
12
- const defaultTarballHashAlgorithm = exports.defaultTarballHashAlgorithm = 'sha1';
11
+ var defaultTarballHashAlgorithm = "sha1";
13
12
  function createTarballHash() {
14
- return (0, _nodeCrypto.createHash)(defaultTarballHashAlgorithm);
13
+ return (0, node_crypto.createHash)(defaultTarballHashAlgorithm);
15
14
  }
16
-
17
15
  /**
18
- * Express doesn't do ETAGS with requests <= 1024b
19
- * we use md5 here, it works well on 1k+ bytes, but sucks with fewer data
20
- * could improve performance using crc32 after benchmarks.
21
- * @param {Object} data
22
- * @return {String}
23
- */
16
+ * Express doesn't do ETAGS with requests <= 1024b
17
+ * we use md5 here, it works well on 1k+ bytes, but sucks with fewer data
18
+ * could improve performance using crc32 after benchmarks.
19
+ * @param {Object} data
20
+ * @return {String}
21
+ */
24
22
  function stringToMD5(data) {
25
- // @ts-ignore update method accepts Buffer or string
26
- return (0, _nodeCrypto.createHash)('md5').update(data).digest('hex');
23
+ return (0, node_crypto.createHash)("md5").update(data).digest("hex");
27
24
  }
28
25
  function generateRandomHexString(length = 8) {
29
- return (0, _nodeCrypto.randomBytes)(length).toString('hex');
26
+ return (0, node_crypto.randomBytes)(length).toString("hex");
30
27
  }
31
-
32
28
  /**
33
- * return a masquerade string with its first and last {charNum} and three dots in between.
34
- * @param {String} str
35
- * @param {Number} charNum
36
- * @returns {String}
37
- */
29
+ * return a masquerade string with its first and last {charNum} and three dots in between.
30
+ * @param {String} str
31
+ * @param {Number} charNum
32
+ * @returns {String}
33
+ */
38
34
  function mask(str, charNum = 3) {
39
- return `${str.slice(0, charNum)}...${str.slice(-charNum)}`;
35
+ return `${str.slice(0, charNum)}...${str.slice(-charNum)}`;
40
36
  }
37
+ //#endregion
38
+ Object.defineProperty(exports, "crypto_utils_exports", {
39
+ enumerable: true,
40
+ get: function() {
41
+ return crypto_utils_exports;
42
+ }
43
+ });
44
+
41
45
  //# sourceMappingURL=crypto-utils.js.map
@@ -1 +1 @@
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":[]}
1
+ {"version":3,"file":"crypto-utils.js","names":[],"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":";;;;;;;;;;AAGA,IAAa,8BAA8B;AAE3C,SAAgB,oBAA0B;CACxC,QAAA,GAAA,YAAA,YAAkB,2BAA2B;AAC/C;;;;;;;;AASA,SAAgB,YAAY,MAA+B;CAEzD,QAAA,GAAA,YAAA,YAAkB,KAAK,EAAE,OAAO,IAAI,EAAE,OAAO,KAAK;AACpD;AAEA,SAAgB,wBAAwB,SAAS,GAAW;CAC1D,QAAA,GAAA,YAAA,aAAmB,MAAM,EAAE,SAAS,KAAK;AAC3C;;;;;;;AAQA,SAAgB,KAAK,KAAa,UAAU,GAAW;CACrD,OAAO,GAAG,IAAI,MAAM,GAAG,OAAO,EAAE,KAAK,IAAI,MAAM,CAAC,OAAO;AACzD"}
@@ -0,0 +1,40 @@
1
+ import { __exportAll } from "./_virtual/_rolldown/runtime.mjs";
2
+ import { createHash, randomBytes } from "node:crypto";
3
+ //#region src/crypto-utils.ts
4
+ var crypto_utils_exports = /* @__PURE__ */ __exportAll({
5
+ createTarballHash: () => createTarballHash,
6
+ defaultTarballHashAlgorithm: () => defaultTarballHashAlgorithm,
7
+ generateRandomHexString: () => generateRandomHexString,
8
+ mask: () => mask,
9
+ stringToMD5: () => stringToMD5
10
+ });
11
+ var defaultTarballHashAlgorithm = "sha1";
12
+ function createTarballHash() {
13
+ return createHash(defaultTarballHashAlgorithm);
14
+ }
15
+ /**
16
+ * Express doesn't do ETAGS with requests <= 1024b
17
+ * we use md5 here, it works well on 1k+ bytes, but sucks with fewer data
18
+ * could improve performance using crc32 after benchmarks.
19
+ * @param {Object} data
20
+ * @return {String}
21
+ */
22
+ function stringToMD5(data) {
23
+ return createHash("md5").update(data).digest("hex");
24
+ }
25
+ function generateRandomHexString(length = 8) {
26
+ return randomBytes(length).toString("hex");
27
+ }
28
+ /**
29
+ * return a masquerade string with its first and last {charNum} and three dots in between.
30
+ * @param {String} str
31
+ * @param {Number} charNum
32
+ * @returns {String}
33
+ */
34
+ function mask(str, charNum = 3) {
35
+ return `${str.slice(0, charNum)}...${str.slice(-charNum)}`;
36
+ }
37
+ //#endregion
38
+ export { crypto_utils_exports };
39
+
40
+ //# sourceMappingURL=crypto-utils.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crypto-utils.mjs","names":[],"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":";;;;;;;;;;AAGA,IAAa,8BAA8B;AAE3C,SAAgB,oBAA0B;CACxC,OAAO,WAAW,2BAA2B;AAC/C;;;;;;;;AASA,SAAgB,YAAY,MAA+B;CAEzD,OAAO,WAAW,KAAK,EAAE,OAAO,IAAI,EAAE,OAAO,KAAK;AACpD;AAEA,SAAgB,wBAAwB,SAAS,GAAW;CAC1D,OAAO,YAAY,MAAM,EAAE,SAAS,KAAK;AAC3C;;;;;;;AAQA,SAAgB,KAAK,KAAa,UAAU,GAAW;CACrD,OAAO,GAAG,IAAI,MAAM,GAAG,OAAO,EAAE,KAAK,IAAI,MAAM,CAAC,OAAO;AACzD"}
@@ -1,104 +1,116 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
1
+ const require_runtime = require("./_virtual/_rolldown/runtime.js");
2
+ const require_constants = require("./constants.js");
3
+ let http_errors = require("http-errors");
4
+ http_errors = require_runtime.__toESM(http_errors);
5
+ //#region src/error-utils.ts
6
+ var error_utils_exports = /* @__PURE__ */ require_runtime.__exportAll({
7
+ API_ERROR: () => API_ERROR,
8
+ APP_ERROR: () => APP_ERROR,
9
+ SUPPORT_ERRORS: () => SUPPORT_ERRORS,
10
+ getBadData: () => getBadData,
11
+ getBadRequest: () => getBadRequest,
12
+ getCode: () => getCode,
13
+ getConflict: () => getConflict,
14
+ getForbidden: () => getForbidden,
15
+ getInternalError: () => getInternalError,
16
+ getNotFound: () => getNotFound,
17
+ getServiceUnavailable: () => getServiceUnavailable,
18
+ getUnauthorized: () => getUnauthorized
5
19
  });
6
- exports.SUPPORT_ERRORS = exports.APP_ERROR = exports.API_ERROR = void 0;
7
- exports.getBadData = getBadData;
8
- exports.getBadRequest = getBadRequest;
9
- exports.getCode = getCode;
10
- exports.getConflict = getConflict;
11
- exports.getForbidden = getForbidden;
12
- exports.getInternalError = getInternalError;
13
- exports.getNotFound = getNotFound;
14
- exports.getServiceUnavailable = getServiceUnavailable;
15
- exports.getUnauthorized = getUnauthorized;
16
- var _httpErrors = _interopRequireDefault(require("http-errors"));
17
- var _constants = require("./constants");
18
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
19
- const API_ERROR = exports.API_ERROR = {
20
- PASSWORD_SHORT: 'The provided password does not pass the validation',
21
- MUST_BE_LOGGED: 'You must be logged in to publish packages.',
22
- PLUGIN_ERROR: 'bug in the auth plugin system',
23
- CONFIG_BAD_FORMAT: 'config file must be an object',
24
- BAD_USERNAME_PASSWORD: 'bad username/password, access denied',
25
- NO_PACKAGE: 'no such package available',
26
- PACKAGE_CANNOT_BE_ADDED: 'this package cannot be added',
27
- BAD_DATA: 'bad data',
28
- NOT_ALLOWED: 'not allowed to access package',
29
- NOT_ALLOWED_PUBLISH: 'not allowed to publish package',
30
- INTERNAL_SERVER_ERROR: 'internal server error',
31
- UNKNOWN_ERROR: 'unknown error',
32
- NOT_PACKAGE_UPLINK: 'package does not exist on uplink',
33
- UPLINK_OFFLINE_PUBLISH: 'one of the uplinks is down, refuse to publish',
34
- UPLINK_OFFLINE: 'uplink is offline',
35
- NOT_MODIFIED_NO_DATA: 'no data',
36
- CONTENT_MISMATCH: 'content length mismatch',
37
- NOT_FILE_UPLINK: "file doesn't exist on uplink",
38
- MAX_USERS_REACHED: 'maximum amount of users reached',
39
- VERSION_NOT_EXIST: "this version doesn't exist",
40
- NO_SUCH_FILE: 'no such file available',
41
- UNSUPORTED_REGISTRY_CALL: 'unsupported registry call',
42
- FILE_NOT_FOUND: 'File not found',
43
- REGISTRATION_DISABLED: 'user registration disabled',
44
- UNAUTHORIZED_ACCESS: 'unauthorized access',
45
- BAD_STATUS_CODE: 'bad status code',
46
- SERVER_TIME_OUT: 'looks like the server is taking to long to respond',
47
- PACKAGE_EXIST: 'this package is already present',
48
- BAD_AUTH_HEADER: 'bad authorization header',
49
- WEB_DISABLED: 'Web interface is disabled in the config file',
50
- DEPRECATED_BASIC_HEADER: 'basic authentication is deprecated, please use JWT instead',
51
- BAD_FORMAT_USER_GROUP: 'user groups is different than an array',
52
- RESOURCE_UNAVAILABLE: 'resource unavailable',
53
- BAD_PACKAGE_DATA: 'bad incoming package data',
54
- USERNAME_PASSWORD_REQUIRED: 'username and password is required',
55
- USERNAME_ALREADY_REGISTERED: 'username is already registered',
56
- USERNAME_MISMATCH: 'username does not match logged in user',
57
- SESSION_ID_REQUIRED: 'session id is required',
58
- SESSION_ID_INVALID: 'session id is invalid',
59
- SESSION_TOKEN_EXPIRED: 'session token expired'
20
+ var API_ERROR = {
21
+ PASSWORD_SHORT: "The provided password does not pass the validation",
22
+ MUST_BE_LOGGED: "You must be logged in to publish packages.",
23
+ PLUGIN_ERROR: "bug in the auth plugin system",
24
+ CONFIG_BAD_FORMAT: "config file must be an object",
25
+ BAD_USERNAME_PASSWORD: "bad username/password, access denied",
26
+ NO_PACKAGE: "no such package available",
27
+ PACKAGE_CANNOT_BE_ADDED: "this package cannot be added",
28
+ BAD_DATA: "bad data",
29
+ NOT_ALLOWED: "not allowed to access package",
30
+ NOT_ALLOWED_PUBLISH: "not allowed to publish package",
31
+ INTERNAL_SERVER_ERROR: "internal server error",
32
+ UNKNOWN_ERROR: "unknown error",
33
+ NOT_PACKAGE_UPLINK: "package does not exist on uplink",
34
+ UPLINK_OFFLINE_PUBLISH: "one of the uplinks is down, refuse to publish",
35
+ UPLINK_OFFLINE: "uplink is offline",
36
+ NOT_MODIFIED_NO_DATA: "no data",
37
+ CONTENT_MISMATCH: "content length mismatch",
38
+ NOT_FILE_UPLINK: "file doesn't exist on uplink",
39
+ MAX_USERS_REACHED: "maximum amount of users reached",
40
+ VERSION_NOT_EXIST: "this version doesn't exist",
41
+ NO_SUCH_FILE: "no such file available",
42
+ UNSUPORTED_REGISTRY_CALL: "unsupported registry call",
43
+ FILE_NOT_FOUND: "File not found",
44
+ REGISTRATION_DISABLED: "user registration disabled",
45
+ UNAUTHORIZED_ACCESS: "unauthorized access",
46
+ BAD_STATUS_CODE: "bad status code",
47
+ SERVER_TIME_OUT: "looks like the server is taking to long to respond",
48
+ PACKAGE_EXIST: "this package is already present",
49
+ BAD_AUTH_HEADER: "bad authorization header",
50
+ WEB_DISABLED: "Web interface is disabled in the config file",
51
+ DEPRECATED_BASIC_HEADER: "basic authentication is deprecated, please use JWT instead",
52
+ BAD_FORMAT_USER_GROUP: "user groups is different than an array",
53
+ RESOURCE_UNAVAILABLE: "resource unavailable",
54
+ BAD_PACKAGE_DATA: "bad incoming package data",
55
+ USERNAME_PASSWORD_REQUIRED: "username and password is required",
56
+ USERNAME_ALREADY_REGISTERED: "username is already registered",
57
+ USERNAME_MISMATCH: "username does not match logged in user",
58
+ SESSION_ID_REQUIRED: "session id is required",
59
+ SESSION_ID_INVALID: "session id is invalid",
60
+ SESSION_TOKEN_EXPIRED: "session token expired"
60
61
  };
61
- const SUPPORT_ERRORS = exports.SUPPORT_ERRORS = {
62
- PLUGIN_MISSING_INTERFACE: 'the plugin does not provide implementation of the requested feature',
63
- TFA_DISABLED: 'the two-factor authentication is not yet supported',
64
- STORAGE_NOT_IMPLEMENT: 'the storage does not support token saving',
65
- PARAMETERS_NOT_VALID: 'the parameters are not valid'
62
+ var SUPPORT_ERRORS = {
63
+ PLUGIN_MISSING_INTERFACE: "the plugin does not provide implementation of the requested feature",
64
+ TFA_DISABLED: "the two-factor authentication is not yet supported",
65
+ STORAGE_NOT_IMPLEMENT: "the storage does not support token saving",
66
+ PARAMETERS_NOT_VALID: "the parameters are not valid"
66
67
  };
67
- const APP_ERROR = exports.APP_ERROR = {
68
- CONFIG_NOT_VALID: 'CONFIG: it does not look like a valid config file',
69
- PROFILE_ERROR: 'profile unexpected error',
70
- PASSWORD_VALIDATION: 'not valid password'
68
+ var APP_ERROR = {
69
+ CONFIG_NOT_VALID: "CONFIG: it does not look like a valid config file",
70
+ PROFILE_ERROR: "profile unexpected error",
71
+ PASSWORD_VALIDATION: "not valid password"
71
72
  };
72
73
  function getError(code, message) {
73
- const httpError = (0, _httpErrors.default)(code, message);
74
- httpError.code = code;
75
- return httpError;
74
+ const httpError = (0, http_errors.default)(code, message);
75
+ httpError.code = code;
76
+ return httpError;
76
77
  }
77
78
  function getConflict(message = API_ERROR.PACKAGE_EXIST) {
78
- return getError(_constants.HTTP_STATUS.CONFLICT, message);
79
+ return getError(require_constants.HTTP_STATUS.CONFLICT, message);
79
80
  }
80
81
  function getBadData(customMessage) {
81
- return getError(_constants.HTTP_STATUS.BAD_DATA, customMessage || API_ERROR.BAD_DATA);
82
+ return getError(require_constants.HTTP_STATUS.BAD_DATA, customMessage || API_ERROR.BAD_DATA);
82
83
  }
83
84
  function getBadRequest(customMessage) {
84
- return getError(_constants.HTTP_STATUS.BAD_REQUEST, customMessage);
85
+ return getError(require_constants.HTTP_STATUS.BAD_REQUEST, customMessage);
85
86
  }
86
87
  function getInternalError(customMessage) {
87
- return customMessage ? getError(_constants.HTTP_STATUS.INTERNAL_ERROR, customMessage) : getError(_constants.HTTP_STATUS.INTERNAL_ERROR, API_ERROR.UNKNOWN_ERROR);
88
+ return customMessage ? getError(require_constants.HTTP_STATUS.INTERNAL_ERROR, customMessage) : getError(require_constants.HTTP_STATUS.INTERNAL_ERROR, API_ERROR.UNKNOWN_ERROR);
88
89
  }
89
- function getUnauthorized(message = 'no credentials provided') {
90
- return getError(_constants.HTTP_STATUS.UNAUTHORIZED, message);
90
+ function getUnauthorized(message = "no credentials provided") {
91
+ return getError(require_constants.HTTP_STATUS.UNAUTHORIZED, message);
91
92
  }
92
93
  function getForbidden(message = "can't use this filename") {
93
- return getError(_constants.HTTP_STATUS.FORBIDDEN, message);
94
+ return getError(require_constants.HTTP_STATUS.FORBIDDEN, message);
94
95
  }
95
96
  function getServiceUnavailable(message = API_ERROR.RESOURCE_UNAVAILABLE) {
96
- return getError(_constants.HTTP_STATUS.SERVICE_UNAVAILABLE, message);
97
+ return getError(require_constants.HTTP_STATUS.SERVICE_UNAVAILABLE, message);
97
98
  }
98
99
  function getNotFound(customMessage) {
99
- return getError(_constants.HTTP_STATUS.NOT_FOUND, customMessage || API_ERROR.NO_PACKAGE);
100
+ return getError(require_constants.HTTP_STATUS.NOT_FOUND, customMessage || API_ERROR.NO_PACKAGE);
100
101
  }
101
102
  function getCode(statusCode, customMessage) {
102
- return getError(statusCode, customMessage);
103
+ return getError(statusCode, customMessage);
103
104
  }
105
+ //#endregion
106
+ exports.API_ERROR = API_ERROR;
107
+ exports.APP_ERROR = APP_ERROR;
108
+ exports.SUPPORT_ERRORS = SUPPORT_ERRORS;
109
+ Object.defineProperty(exports, "error_utils_exports", {
110
+ enumerable: true,
111
+ get: function() {
112
+ return error_utils_exports;
113
+ }
114
+ });
115
+
104
116
  //# sourceMappingURL=error-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"error-utils.js","names":["_httpErrors","_interopRequireDefault","require","_constants","e","__esModule","default","API_ERROR","exports","PASSWORD_SHORT","MUST_BE_LOGGED","PLUGIN_ERROR","CONFIG_BAD_FORMAT","BAD_USERNAME_PASSWORD","NO_PACKAGE","PACKAGE_CANNOT_BE_ADDED","BAD_DATA","NOT_ALLOWED","NOT_ALLOWED_PUBLISH","INTERNAL_SERVER_ERROR","UNKNOWN_ERROR","NOT_PACKAGE_UPLINK","UPLINK_OFFLINE_PUBLISH","UPLINK_OFFLINE","NOT_MODIFIED_NO_DATA","CONTENT_MISMATCH","NOT_FILE_UPLINK","MAX_USERS_REACHED","VERSION_NOT_EXIST","NO_SUCH_FILE","UNSUPORTED_REGISTRY_CALL","FILE_NOT_FOUND","REGISTRATION_DISABLED","UNAUTHORIZED_ACCESS","BAD_STATUS_CODE","SERVER_TIME_OUT","PACKAGE_EXIST","BAD_AUTH_HEADER","WEB_DISABLED","DEPRECATED_BASIC_HEADER","BAD_FORMAT_USER_GROUP","RESOURCE_UNAVAILABLE","BAD_PACKAGE_DATA","USERNAME_PASSWORD_REQUIRED","USERNAME_ALREADY_REGISTERED","USERNAME_MISMATCH","SESSION_ID_REQUIRED","SESSION_ID_INVALID","SESSION_TOKEN_EXPIRED","SUPPORT_ERRORS","PLUGIN_MISSING_INTERFACE","TFA_DISABLED","STORAGE_NOT_IMPLEMENT","PARAMETERS_NOT_VALID","APP_ERROR","CONFIG_NOT_VALID","PROFILE_ERROR","PASSWORD_VALIDATION","getError","code","message","httpError","createError","getConflict","HTTP_STATUS","CONFLICT","getBadData","customMessage","getBadRequest","BAD_REQUEST","getInternalError","INTERNAL_ERROR","getUnauthorized","UNAUTHORIZED","getForbidden","FORBIDDEN","getServiceUnavailable","SERVICE_UNAVAILABLE","getNotFound","NOT_FOUND","getCode","statusCode"],"sources":["../src/error-utils.ts"],"sourcesContent":["import type { HttpError } from 'http-errors';\nimport createError from 'http-errors';\n\nimport { HTTP_STATUS } from './constants';\n\nexport const API_ERROR = {\n PASSWORD_SHORT: 'The provided password does not pass the validation',\n MUST_BE_LOGGED: 'You must be logged in to publish packages.',\n PLUGIN_ERROR: 'bug in the auth plugin system',\n CONFIG_BAD_FORMAT: 'config file must be an object',\n BAD_USERNAME_PASSWORD: 'bad username/password, access denied',\n NO_PACKAGE: 'no such package available',\n PACKAGE_CANNOT_BE_ADDED: 'this package cannot be added',\n BAD_DATA: 'bad data',\n NOT_ALLOWED: 'not allowed to access package',\n NOT_ALLOWED_PUBLISH: 'not allowed to publish package',\n INTERNAL_SERVER_ERROR: 'internal server error',\n UNKNOWN_ERROR: 'unknown error',\n NOT_PACKAGE_UPLINK: 'package does not exist on uplink',\n UPLINK_OFFLINE_PUBLISH: 'one of the uplinks is down, refuse to publish',\n UPLINK_OFFLINE: 'uplink is offline',\n NOT_MODIFIED_NO_DATA: 'no data',\n CONTENT_MISMATCH: 'content length mismatch',\n NOT_FILE_UPLINK: \"file doesn't exist on uplink\",\n MAX_USERS_REACHED: 'maximum amount of users reached',\n VERSION_NOT_EXIST: \"this version doesn't exist\",\n NO_SUCH_FILE: 'no such file available',\n UNSUPORTED_REGISTRY_CALL: 'unsupported registry call',\n FILE_NOT_FOUND: 'File not found',\n REGISTRATION_DISABLED: 'user registration disabled',\n UNAUTHORIZED_ACCESS: 'unauthorized access',\n BAD_STATUS_CODE: 'bad status code',\n SERVER_TIME_OUT: 'looks like the server is taking to long to respond',\n PACKAGE_EXIST: 'this package is already present',\n BAD_AUTH_HEADER: 'bad authorization header',\n WEB_DISABLED: 'Web interface is disabled in the config file',\n DEPRECATED_BASIC_HEADER: 'basic authentication is deprecated, please use JWT instead',\n BAD_FORMAT_USER_GROUP: 'user groups is different than an array',\n RESOURCE_UNAVAILABLE: 'resource unavailable',\n BAD_PACKAGE_DATA: 'bad incoming package data',\n USERNAME_PASSWORD_REQUIRED: 'username and password is required',\n USERNAME_ALREADY_REGISTERED: 'username is already registered',\n USERNAME_MISMATCH: 'username does not match logged in user',\n SESSION_ID_REQUIRED: 'session id is required',\n SESSION_ID_INVALID: 'session id is invalid',\n SESSION_TOKEN_EXPIRED: 'session token expired',\n};\n\nexport const SUPPORT_ERRORS = {\n PLUGIN_MISSING_INTERFACE: 'the plugin does not provide implementation of the requested feature',\n TFA_DISABLED: 'the two-factor authentication is not yet supported',\n STORAGE_NOT_IMPLEMENT: 'the storage does not support token saving',\n PARAMETERS_NOT_VALID: 'the parameters are not valid',\n};\n\nexport const APP_ERROR = {\n CONFIG_NOT_VALID: 'CONFIG: it does not look like a valid config file',\n PROFILE_ERROR: 'profile unexpected error',\n PASSWORD_VALIDATION: 'not valid password',\n};\n\nexport type VerdaccioError = HttpError & { code: number };\n\nfunction getError(code: number, message: string): VerdaccioError {\n const httpError = createError(code, message);\n\n httpError.code = code;\n\n return httpError as VerdaccioError;\n}\n\nexport function getConflict(message: string = API_ERROR.PACKAGE_EXIST): VerdaccioError {\n return getError(HTTP_STATUS.CONFLICT, message);\n}\n\nexport function getBadData(customMessage?: string): VerdaccioError {\n return getError(HTTP_STATUS.BAD_DATA, customMessage || API_ERROR.BAD_DATA);\n}\n\nexport function getBadRequest(customMessage: string): VerdaccioError {\n return getError(HTTP_STATUS.BAD_REQUEST, customMessage);\n}\n\nexport function getInternalError(customMessage?: string): VerdaccioError {\n return customMessage\n ? getError(HTTP_STATUS.INTERNAL_ERROR, customMessage)\n : getError(HTTP_STATUS.INTERNAL_ERROR, API_ERROR.UNKNOWN_ERROR);\n}\n\nexport function getUnauthorized(message = 'no credentials provided'): VerdaccioError {\n return getError(HTTP_STATUS.UNAUTHORIZED, message);\n}\n\nexport function getForbidden(message = \"can't use this filename\"): VerdaccioError {\n return getError(HTTP_STATUS.FORBIDDEN, message);\n}\n\nexport function getServiceUnavailable(\n message: string = API_ERROR.RESOURCE_UNAVAILABLE\n): VerdaccioError {\n return getError(HTTP_STATUS.SERVICE_UNAVAILABLE, message);\n}\n\nexport function getNotFound(customMessage?: string): VerdaccioError {\n return getError(HTTP_STATUS.NOT_FOUND, customMessage || API_ERROR.NO_PACKAGE);\n}\n\nexport function getCode(statusCode: number, customMessage: string): VerdaccioError {\n return getError(statusCode, customMessage);\n}\n"],"mappings":";;;;;;;;;;;;;;;AACA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AAA0C,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEnC,MAAMG,SAAS,GAAAC,O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CAACd,OAAO,GAAG,yBAAyB,EAAkB;EAChF,OAAOF,QAAQ,CAACM,sBAAW,CAACW,SAAS,EAAEf,OAAO,CAAC;AACjD;AAEO,SAASgB,qBAAqBA,CACnChB,OAAe,GAAGrD,SAAS,CAACkC,oBAAoB,EAChC;EAChB,OAAOiB,QAAQ,CAACM,sBAAW,CAACa,mBAAmB,EAAEjB,OAAO,CAAC;AAC3D;AAEO,SAASkB,WAAWA,CAACX,aAAsB,EAAkB;EAClE,OAAOT,QAAQ,CAACM,sBAAW,CAACe,SAAS,EAAEZ,aAAa,IAAI5D,SAAS,CAACO,UAAU,CAAC;AAC/E;AAEO,SAASkE,OAAOA,CAACC,UAAkB,EAAEd,aAAqB,EAAkB;EACjF,OAAOT,QAAQ,CAACuB,UAAU,EAAEd,aAAa,CAAC;AAC5C","ignoreList":[]}
1
+ {"version":3,"file":"error-utils.js","names":[],"sources":["../src/error-utils.ts"],"sourcesContent":["import type { HttpError } from 'http-errors';\nimport createError from 'http-errors';\n\nimport { HTTP_STATUS } from './constants';\n\nexport const API_ERROR = {\n PASSWORD_SHORT: 'The provided password does not pass the validation',\n MUST_BE_LOGGED: 'You must be logged in to publish packages.',\n PLUGIN_ERROR: 'bug in the auth plugin system',\n CONFIG_BAD_FORMAT: 'config file must be an object',\n BAD_USERNAME_PASSWORD: 'bad username/password, access denied',\n NO_PACKAGE: 'no such package available',\n PACKAGE_CANNOT_BE_ADDED: 'this package cannot be added',\n BAD_DATA: 'bad data',\n NOT_ALLOWED: 'not allowed to access package',\n NOT_ALLOWED_PUBLISH: 'not allowed to publish package',\n INTERNAL_SERVER_ERROR: 'internal server error',\n UNKNOWN_ERROR: 'unknown error',\n NOT_PACKAGE_UPLINK: 'package does not exist on uplink',\n UPLINK_OFFLINE_PUBLISH: 'one of the uplinks is down, refuse to publish',\n UPLINK_OFFLINE: 'uplink is offline',\n NOT_MODIFIED_NO_DATA: 'no data',\n CONTENT_MISMATCH: 'content length mismatch',\n NOT_FILE_UPLINK: \"file doesn't exist on uplink\",\n MAX_USERS_REACHED: 'maximum amount of users reached',\n VERSION_NOT_EXIST: \"this version doesn't exist\",\n NO_SUCH_FILE: 'no such file available',\n UNSUPORTED_REGISTRY_CALL: 'unsupported registry call',\n FILE_NOT_FOUND: 'File not found',\n REGISTRATION_DISABLED: 'user registration disabled',\n UNAUTHORIZED_ACCESS: 'unauthorized access',\n BAD_STATUS_CODE: 'bad status code',\n SERVER_TIME_OUT: 'looks like the server is taking to long to respond',\n PACKAGE_EXIST: 'this package is already present',\n BAD_AUTH_HEADER: 'bad authorization header',\n WEB_DISABLED: 'Web interface is disabled in the config file',\n DEPRECATED_BASIC_HEADER: 'basic authentication is deprecated, please use JWT instead',\n BAD_FORMAT_USER_GROUP: 'user groups is different than an array',\n RESOURCE_UNAVAILABLE: 'resource unavailable',\n BAD_PACKAGE_DATA: 'bad incoming package data',\n USERNAME_PASSWORD_REQUIRED: 'username and password is required',\n USERNAME_ALREADY_REGISTERED: 'username is already registered',\n USERNAME_MISMATCH: 'username does not match logged in user',\n SESSION_ID_REQUIRED: 'session id is required',\n SESSION_ID_INVALID: 'session id is invalid',\n SESSION_TOKEN_EXPIRED: 'session token expired',\n};\n\nexport const SUPPORT_ERRORS = {\n PLUGIN_MISSING_INTERFACE: 'the plugin does not provide implementation of the requested feature',\n TFA_DISABLED: 'the two-factor authentication is not yet supported',\n STORAGE_NOT_IMPLEMENT: 'the storage does not support token saving',\n PARAMETERS_NOT_VALID: 'the parameters are not valid',\n};\n\nexport const APP_ERROR = {\n CONFIG_NOT_VALID: 'CONFIG: it does not look like a valid config file',\n PROFILE_ERROR: 'profile unexpected error',\n PASSWORD_VALIDATION: 'not valid password',\n};\n\nexport type VerdaccioError = HttpError & { code: number };\n\nfunction getError(code: number, message: string): VerdaccioError {\n const httpError = createError(code, message);\n\n httpError.code = code;\n\n return httpError as VerdaccioError;\n}\n\nexport function getConflict(message: string = API_ERROR.PACKAGE_EXIST): VerdaccioError {\n return getError(HTTP_STATUS.CONFLICT, message);\n}\n\nexport function getBadData(customMessage?: string): VerdaccioError {\n return getError(HTTP_STATUS.BAD_DATA, customMessage || API_ERROR.BAD_DATA);\n}\n\nexport function getBadRequest(customMessage: string): VerdaccioError {\n return getError(HTTP_STATUS.BAD_REQUEST, customMessage);\n}\n\nexport function getInternalError(customMessage?: string): VerdaccioError {\n return customMessage\n ? getError(HTTP_STATUS.INTERNAL_ERROR, customMessage)\n : getError(HTTP_STATUS.INTERNAL_ERROR, API_ERROR.UNKNOWN_ERROR);\n}\n\nexport function getUnauthorized(message = 'no credentials provided'): VerdaccioError {\n return getError(HTTP_STATUS.UNAUTHORIZED, message);\n}\n\nexport function getForbidden(message = \"can't use this filename\"): VerdaccioError {\n return getError(HTTP_STATUS.FORBIDDEN, message);\n}\n\nexport function getServiceUnavailable(\n message: string = API_ERROR.RESOURCE_UNAVAILABLE\n): VerdaccioError {\n return getError(HTTP_STATUS.SERVICE_UNAVAILABLE, message);\n}\n\nexport function getNotFound(customMessage?: string): VerdaccioError {\n return getError(HTTP_STATUS.NOT_FOUND, customMessage || API_ERROR.NO_PACKAGE);\n}\n\nexport function getCode(statusCode: number, customMessage: string): VerdaccioError {\n return getError(statusCode, customMessage);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAKA,IAAa,YAAY;CACvB,gBAAgB;CAChB,gBAAgB;CAChB,cAAc;CACd,mBAAmB;CACnB,uBAAuB;CACvB,YAAY;CACZ,yBAAyB;CACzB,UAAU;CACV,aAAa;CACb,qBAAqB;CACrB,uBAAuB;CACvB,eAAe;CACf,oBAAoB;CACpB,wBAAwB;CACxB,gBAAgB;CAChB,sBAAsB;CACtB,kBAAkB;CAClB,iBAAiB;CACjB,mBAAmB;CACnB,mBAAmB;CACnB,cAAc;CACd,0BAA0B;CAC1B,gBAAgB;CAChB,uBAAuB;CACvB,qBAAqB;CACrB,iBAAiB;CACjB,iBAAiB;CACjB,eAAe;CACf,iBAAiB;CACjB,cAAc;CACd,yBAAyB;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