@verdaccio/core 9.0.0-next-9.19 → 9.0.0-next-9.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/constants.d.ts +6 -2
- package/build/constants.js +8 -2
- package/build/constants.js.map +1 -1
- package/build/constants.mjs +8 -2
- package/build/constants.mjs.map +1 -1
- package/package.json +3 -3
package/build/constants.d.ts
CHANGED
|
@@ -59,12 +59,12 @@ export declare const HEADERS: {
|
|
|
59
59
|
* HTTP status codes used throughout Verdaccio.
|
|
60
60
|
*/
|
|
61
61
|
export declare const HTTP_STATUS: {
|
|
62
|
-
/** 202: The request has been accepted for processing, but the processing is not yet complete. */
|
|
63
|
-
ACCEPTED: number;
|
|
64
62
|
/** 200: Standard response for successful HTTP requests. */
|
|
65
63
|
OK: number;
|
|
66
64
|
/** 201: The request has been fulfilled and resulted in a new resource being created. */
|
|
67
65
|
CREATED: number;
|
|
66
|
+
/** 202: The request has been accepted for processing, but the processing is not yet complete. */
|
|
67
|
+
ACCEPTED: number;
|
|
68
68
|
/** 300: Indicates multiple options for the resource from which the client may choose. */
|
|
69
69
|
MULTIPLE_CHOICES: number;
|
|
70
70
|
/** 304: Indicates that the resource has not been modified since the last request. */
|
|
@@ -85,6 +85,8 @@ export declare const HTTP_STATUS: {
|
|
|
85
85
|
UNSUPPORTED_MEDIA: number;
|
|
86
86
|
/** 422: The request was well-formed but was unable to be followed due to semantic errors. */
|
|
87
87
|
BAD_DATA: number;
|
|
88
|
+
/** 499: The request was aborted by the client. */
|
|
89
|
+
CLIENT_CLOSED_REQUEST: number;
|
|
88
90
|
/** 500: The server has encountered a situation it doesn't know how to handle. */
|
|
89
91
|
INTERNAL_ERROR: number;
|
|
90
92
|
/** 501: The request method is not supported by the server and cannot be handled. */
|
|
@@ -119,6 +121,8 @@ export declare const API_MESSAGE: {
|
|
|
119
121
|
export declare const LOG_STATUS_MESSAGE = "@{status}, user: @{user}(@{remoteIP}), req: '@{request.method} @{request.url}'";
|
|
120
122
|
export declare const LOG_VERDACCIO_ERROR = "@{status}, user: @{user}(@{remoteIP}), req: '@{request.method} @{request.url}', error: @{!error}";
|
|
121
123
|
export declare const LOG_VERDACCIO_BYTES = "@{status}, user: @{user}(@{remoteIP}), req: '@{request.method} @{request.url}', bytes: @{bytes.in}/@{bytes.out}";
|
|
124
|
+
export declare const LOG_VERDACCIO_ABORT = "@{status}, user: @{user}(@{remoteIP}), req: '@{request.method} @{request.url}', request aborted by client";
|
|
125
|
+
export declare const LOG_REQUEST_MESSAGE = "@{ip} requested '@{req.method} @{req.url}'";
|
|
122
126
|
export declare const ROLES: {
|
|
123
127
|
$ALL: string;
|
|
124
128
|
ALL: string;
|
package/build/constants.js
CHANGED
|
@@ -18,7 +18,9 @@ var constants_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
|
18
18
|
HTTP_STATUS: () => HTTP_STATUS,
|
|
19
19
|
HtpasswdHashAlgorithm: () => HtpasswdHashAlgorithm,
|
|
20
20
|
LATEST: () => LATEST,
|
|
21
|
+
LOG_REQUEST_MESSAGE: () => LOG_REQUEST_MESSAGE,
|
|
21
22
|
LOG_STATUS_MESSAGE: () => LOG_STATUS_MESSAGE,
|
|
23
|
+
LOG_VERDACCIO_ABORT: () => LOG_VERDACCIO_ABORT,
|
|
22
24
|
LOG_VERDACCIO_BYTES: () => LOG_VERDACCIO_BYTES,
|
|
23
25
|
LOG_VERDACCIO_ERROR: () => LOG_VERDACCIO_ERROR,
|
|
24
26
|
MAINTAINERS: () => MAINTAINERS,
|
|
@@ -90,12 +92,12 @@ var HEADERS = {
|
|
|
90
92
|
* HTTP status codes used throughout Verdaccio.
|
|
91
93
|
*/
|
|
92
94
|
var HTTP_STATUS = {
|
|
93
|
-
/** 202: The request has been accepted for processing, but the processing is not yet complete. */
|
|
94
|
-
ACCEPTED: http_status_codes.default.ACCEPTED,
|
|
95
95
|
/** 200: Standard response for successful HTTP requests. */
|
|
96
96
|
OK: http_status_codes.default.OK,
|
|
97
97
|
/** 201: The request has been fulfilled and resulted in a new resource being created. */
|
|
98
98
|
CREATED: http_status_codes.default.CREATED,
|
|
99
|
+
/** 202: The request has been accepted for processing, but the processing is not yet complete. */
|
|
100
|
+
ACCEPTED: http_status_codes.default.ACCEPTED,
|
|
99
101
|
/** 300: Indicates multiple options for the resource from which the client may choose. */
|
|
100
102
|
MULTIPLE_CHOICES: http_status_codes.default.MULTIPLE_CHOICES,
|
|
101
103
|
/** 304: Indicates that the resource has not been modified since the last request. */
|
|
@@ -116,6 +118,8 @@ var HTTP_STATUS = {
|
|
|
116
118
|
UNSUPPORTED_MEDIA: http_status_codes.default.UNSUPPORTED_MEDIA_TYPE,
|
|
117
119
|
/** 422: The request was well-formed but was unable to be followed due to semantic errors. */
|
|
118
120
|
BAD_DATA: http_status_codes.default.UNPROCESSABLE_ENTITY,
|
|
121
|
+
/** 499: The request was aborted by the client. */
|
|
122
|
+
CLIENT_CLOSED_REQUEST: 499,
|
|
119
123
|
/** 500: The server has encountered a situation it doesn't know how to handle. */
|
|
120
124
|
INTERNAL_ERROR: http_status_codes.default.INTERNAL_SERVER_ERROR,
|
|
121
125
|
/** 501: The request method is not supported by the server and cannot be handled. */
|
|
@@ -148,6 +152,8 @@ var API_MESSAGE = {
|
|
|
148
152
|
var LOG_STATUS_MESSAGE = "@{status}, user: @{user}(@{remoteIP}), req: '@{request.method} @{request.url}'";
|
|
149
153
|
var LOG_VERDACCIO_ERROR = `${LOG_STATUS_MESSAGE}, error: @{!error}`;
|
|
150
154
|
var LOG_VERDACCIO_BYTES = `${LOG_STATUS_MESSAGE}, bytes: @{bytes.in}/@{bytes.out}`;
|
|
155
|
+
var LOG_VERDACCIO_ABORT = `${LOG_STATUS_MESSAGE}, request aborted by client`;
|
|
156
|
+
var LOG_REQUEST_MESSAGE = "@{ip} requested '@{req.method} @{req.url}'";
|
|
151
157
|
var ROLES = {
|
|
152
158
|
$ALL: "$all",
|
|
153
159
|
ALL: "all",
|
package/build/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","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 /**
|
|
1
|
+
{"version":3,"file":"constants.js","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 /** 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 /** 202: The request has been accepted for processing, but the processing is not yet complete. */\n ACCEPTED: httpCodes.ACCEPTED,\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 /** 499: The request was aborted by the client. */\n CLIENT_CLOSED_REQUEST: 499,\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}`;\nexport const LOG_VERDACCIO_ABORT = `${LOG_STATUS_MESSAGE}, request aborted by client`;\nexport const LOG_REQUEST_MESSAGE = \"@{ip} requested '@{req.method} @{req.url}'\";\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAa,8BAA8B;AAG3C,IAAa,YAAY;AACzB,IAAa,SAAS;AACtB,IAAa,QAAQ;AACrB,IAAa,cAAc;AAC3B,IAAa,eAAe;AAC5B,IAAa,iBAAiB;AAE9B,IAAa,cAAc;CACzB,kBAAkB;CAClB,cAAc;CACd,gBAAgB;CAChB,iBAAiB;CACjB,eAAe;AACjB;AAEA,IAAa,qBAAqB,EAChC,MAAM,OACR;AAGA,IAAa,cAAc;AAC3B,IAAa,eAAe;AAE5B,IAAa,UAAU;CACrB,QAAQ;CACR,iBAAiB;CACjB,YAAY;CACZ,MAAM;CACN,cAAc;CACd,gBAAgB;CAChB,YAAY;CACZ,iBAAiB;CACjB,gBAAgB;CAChB,WAAW;CACX,eAAe;CACf,eAAe;CACf,UAAU;CACV,aAAa;CAGb,iBAAiB;CACjB,eAAe;CACf,gBAAgB;CAChB,KAAK;CACL,KAAK;CACL,KAAK;CACL,QAAQ;CACR,YAAY;CACZ,iBAAiB;CACjB,qBAAqB;CACrB,YAAY;CACZ,MAAM;CACN,cAAc;CACd,sBAAsB;CACtB,cAAc;CACd,cAAc;CACd,oBAAoB;CACpB,UAAU;CACV,MAAM;CACN,MAAM;AACR;;;;AAKA,IAAa,cAAc;;CAEzB,IAAI,kBAAA,QAAU;;CAEd,SAAS,kBAAA,QAAU;;CAEnB,UAAU,kBAAA,QAAU;;CAEpB,kBAAkB,kBAAA,QAAU;;CAE5B,cAAc,kBAAA,QAAU;;CAExB,aAAa,kBAAA,QAAU;;CAEvB,cAAc,kBAAA,QAAU;;CAExB,WAAW,kBAAA,QAAU;;CAErB,WAAW,kBAAA,QAAU;;CAErB,iBAAiB,kBAAA,QAAU;;CAE3B,UAAU,kBAAA,QAAU;;CAEpB,mBAAmB,kBAAA,QAAU;;CAE7B,UAAU,kBAAA,QAAU;;CAEpB,uBAAuB;;CAEvB,gBAAgB,kBAAA,QAAU;;CAE1B,iBAAiB,kBAAA,QAAU;;CAE3B,aAAa,kBAAA,QAAU;;CAEvB,qBAAqB,kBAAA,QAAU;;CAE/B,iBAAiB,kBAAA,QAAU;;CAE3B,eAAe;;CAEf,eAAe;AACjB;AAEA,IAAa,aAAa,EACxB,gBAAgB,oBAClB;AAEA,IAAa,cAAc;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;AACzD,IAAa,sBAAsB,GAAG,mBAAmB;AACzD,IAAa,sBAAsB;AAEnC,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"}
|
package/build/constants.mjs
CHANGED
|
@@ -17,7 +17,9 @@ var constants_exports = /* @__PURE__ */ __exportAll({
|
|
|
17
17
|
HTTP_STATUS: () => HTTP_STATUS,
|
|
18
18
|
HtpasswdHashAlgorithm: () => HtpasswdHashAlgorithm,
|
|
19
19
|
LATEST: () => LATEST,
|
|
20
|
+
LOG_REQUEST_MESSAGE: () => LOG_REQUEST_MESSAGE,
|
|
20
21
|
LOG_STATUS_MESSAGE: () => LOG_STATUS_MESSAGE,
|
|
22
|
+
LOG_VERDACCIO_ABORT: () => LOG_VERDACCIO_ABORT,
|
|
21
23
|
LOG_VERDACCIO_BYTES: () => LOG_VERDACCIO_BYTES,
|
|
22
24
|
LOG_VERDACCIO_ERROR: () => LOG_VERDACCIO_ERROR,
|
|
23
25
|
MAINTAINERS: () => MAINTAINERS,
|
|
@@ -89,12 +91,12 @@ var HEADERS = {
|
|
|
89
91
|
* HTTP status codes used throughout Verdaccio.
|
|
90
92
|
*/
|
|
91
93
|
var HTTP_STATUS = {
|
|
92
|
-
/** 202: The request has been accepted for processing, but the processing is not yet complete. */
|
|
93
|
-
ACCEPTED: httpCodes.ACCEPTED,
|
|
94
94
|
/** 200: Standard response for successful HTTP requests. */
|
|
95
95
|
OK: httpCodes.OK,
|
|
96
96
|
/** 201: The request has been fulfilled and resulted in a new resource being created. */
|
|
97
97
|
CREATED: httpCodes.CREATED,
|
|
98
|
+
/** 202: The request has been accepted for processing, but the processing is not yet complete. */
|
|
99
|
+
ACCEPTED: httpCodes.ACCEPTED,
|
|
98
100
|
/** 300: Indicates multiple options for the resource from which the client may choose. */
|
|
99
101
|
MULTIPLE_CHOICES: httpCodes.MULTIPLE_CHOICES,
|
|
100
102
|
/** 304: Indicates that the resource has not been modified since the last request. */
|
|
@@ -115,6 +117,8 @@ var HTTP_STATUS = {
|
|
|
115
117
|
UNSUPPORTED_MEDIA: httpCodes.UNSUPPORTED_MEDIA_TYPE,
|
|
116
118
|
/** 422: The request was well-formed but was unable to be followed due to semantic errors. */
|
|
117
119
|
BAD_DATA: httpCodes.UNPROCESSABLE_ENTITY,
|
|
120
|
+
/** 499: The request was aborted by the client. */
|
|
121
|
+
CLIENT_CLOSED_REQUEST: 499,
|
|
118
122
|
/** 500: The server has encountered a situation it doesn't know how to handle. */
|
|
119
123
|
INTERNAL_ERROR: httpCodes.INTERNAL_SERVER_ERROR,
|
|
120
124
|
/** 501: The request method is not supported by the server and cannot be handled. */
|
|
@@ -147,6 +151,8 @@ var API_MESSAGE = {
|
|
|
147
151
|
var LOG_STATUS_MESSAGE = "@{status}, user: @{user}(@{remoteIP}), req: '@{request.method} @{request.url}'";
|
|
148
152
|
var LOG_VERDACCIO_ERROR = `${LOG_STATUS_MESSAGE}, error: @{!error}`;
|
|
149
153
|
var LOG_VERDACCIO_BYTES = `${LOG_STATUS_MESSAGE}, bytes: @{bytes.in}/@{bytes.out}`;
|
|
154
|
+
var LOG_VERDACCIO_ABORT = `${LOG_STATUS_MESSAGE}, request aborted by client`;
|
|
155
|
+
var LOG_REQUEST_MESSAGE = "@{ip} requested '@{req.method} @{req.url}'";
|
|
150
156
|
var ROLES = {
|
|
151
157
|
$ALL: "$all",
|
|
152
158
|
ALL: "all",
|
package/build/constants.mjs.map
CHANGED
|
@@ -1 +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 /**
|
|
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 /** 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 /** 202: The request has been accepted for processing, but the processing is not yet complete. */\n ACCEPTED: httpCodes.ACCEPTED,\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 /** 499: The request was aborted by the client. */\n CLIENT_CLOSED_REQUEST: 499,\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}`;\nexport const LOG_VERDACCIO_ABORT = `${LOG_STATUS_MESSAGE}, request aborted by client`;\nexport const LOG_REQUEST_MESSAGE = \"@{ip} requested '@{req.method} @{req.url}'\";\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAa,8BAA8B;AAG3C,IAAa,YAAY;AACzB,IAAa,SAAS;AACtB,IAAa,QAAQ;AACrB,IAAa,cAAc;AAC3B,IAAa,eAAe;AAC5B,IAAa,iBAAiB;AAE9B,IAAa,cAAc;CACzB,kBAAkB;CAClB,cAAc;CACd,gBAAgB;CAChB,iBAAiB;CACjB,eAAe;AACjB;AAEA,IAAa,qBAAqB,EAChC,MAAM,OACR;AAGA,IAAa,cAAc;AAC3B,IAAa,eAAe;AAE5B,IAAa,UAAU;CACrB,QAAQ;CACR,iBAAiB;CACjB,YAAY;CACZ,MAAM;CACN,cAAc;CACd,gBAAgB;CAChB,YAAY;CACZ,iBAAiB;CACjB,gBAAgB;CAChB,WAAW;CACX,eAAe;CACf,eAAe;CACf,UAAU;CACV,aAAa;CAGb,iBAAiB;CACjB,eAAe;CACf,gBAAgB;CAChB,KAAK;CACL,KAAK;CACL,KAAK;CACL,QAAQ;CACR,YAAY;CACZ,iBAAiB;CACjB,qBAAqB;CACrB,YAAY;CACZ,MAAM;CACN,cAAc;CACd,sBAAsB;CACtB,cAAc;CACd,cAAc;CACd,oBAAoB;CACpB,UAAU;CACV,MAAM;CACN,MAAM;AACR;;;;AAKA,IAAa,cAAc;;CAEzB,IAAI,UAAU;;CAEd,SAAS,UAAU;;CAEnB,UAAU,UAAU;;CAEpB,kBAAkB,UAAU;;CAE5B,cAAc,UAAU;;CAExB,aAAa,UAAU;;CAEvB,cAAc,UAAU;;CAExB,WAAW,UAAU;;CAErB,WAAW,UAAU;;CAErB,iBAAiB,UAAU;;CAE3B,UAAU,UAAU;;CAEpB,mBAAmB,UAAU;;CAE7B,UAAU,UAAU;;CAEpB,uBAAuB;;CAEvB,gBAAgB,UAAU;;CAE1B,iBAAiB,UAAU;;CAE3B,aAAa,UAAU;;CAEvB,qBAAqB,UAAU;;CAE/B,iBAAiB,UAAU;;CAE3B,eAAe;;CAEf,eAAe;AACjB;AAEA,IAAa,aAAa,EACxB,gBAAgB,oBAClB;AAEA,IAAa,cAAc;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;AACzD,IAAa,sBAAsB,GAAG,mBAAmB;AACzD,IAAa,sBAAsB;AAEnC,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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verdaccio/core",
|
|
3
|
-
"version": "9.0.0-next-9.
|
|
3
|
+
"version": "9.0.0-next-9.21",
|
|
4
4
|
"description": "Verdaccio Core Components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"private",
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
"semver": "7.8.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@verdaccio/types": "14.0.0-next-9.
|
|
45
|
+
"@verdaccio/types": "14.0.0-next-9.11",
|
|
46
46
|
"express": "5.2.1",
|
|
47
47
|
"rimraf": "6.1.3",
|
|
48
48
|
"typedoc": "0.28.14",
|
|
49
|
-
"vite": "8.0.
|
|
49
|
+
"vite": "8.0.16",
|
|
50
50
|
"vitest": "4.1.7"
|
|
51
51
|
},
|
|
52
52
|
"funding": {
|