@verdaccio/core 8.1.2 → 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.
- package/build/_virtual/_rolldown/runtime.js +33 -0
- package/build/_virtual/_rolldown/runtime.mjs +13 -0
- package/build/auth-utils.d.ts +0 -1
- package/build/auth-utils.js +23 -25
- package/build/auth-utils.js.map +1 -1
- package/build/auth-utils.mjs +32 -0
- package/build/auth-utils.mjs.map +1 -0
- package/build/constants.js +201 -157
- package/build/constants.js.map +1 -1
- package/build/constants.mjs +185 -0
- package/build/constants.mjs.map +1 -0
- package/build/crypto-utils.d.ts +0 -2
- package/build/crypto-utils.js +33 -29
- package/build/crypto-utils.js.map +1 -1
- package/build/crypto-utils.mjs +40 -0
- package/build/crypto-utils.mjs.map +1 -0
- package/build/error-utils.js +92 -80
- package/build/error-utils.js.map +1 -1
- package/build/error-utils.mjs +107 -0
- package/build/error-utils.mjs.map +1 -0
- package/build/file-utils.js +35 -31
- package/build/file-utils.js.map +1 -1
- package/build/file-utils.mjs +35 -0
- package/build/file-utils.mjs.map +1 -0
- package/build/index.d.ts +2 -1
- package/build/index.js +125 -185
- package/build/index.mjs +15 -0
- package/build/ip-utils.js +52 -69
- package/build/ip-utils.js.map +1 -1
- package/build/ip-utils.mjs +60 -0
- package/build/ip-utils.mjs.map +1 -0
- package/build/pkg-utils.js +60 -76
- package/build/pkg-utils.js.map +1 -1
- package/build/pkg-utils.mjs +69 -0
- package/build/pkg-utils.mjs.map +1 -0
- package/build/plugin-utils.d.ts +0 -1
- package/build/plugin-utils.js +27 -78
- package/build/plugin-utils.js.map +1 -1
- package/build/plugin-utils.mjs +26 -0
- package/build/plugin-utils.mjs.map +1 -0
- package/build/schemes/publish-manifest.js +33 -43
- package/build/schemes/publish-manifest.js.map +1 -1
- package/build/schemes/publish-manifest.mjs +36 -0
- package/build/schemes/publish-manifest.mjs.map +1 -0
- package/build/schemes/unpublish-manifest.js +51 -72
- package/build/schemes/unpublish-manifest.js.map +1 -1
- package/build/schemes/unpublish-manifest.mjs +54 -0
- package/build/schemes/unpublish-manifest.mjs.map +1 -0
- package/build/search-utils.js +9 -9
- package/build/search-utils.js.map +1 -1
- package/build/search-utils.mjs +8 -0
- package/build/search-utils.mjs.map +1 -0
- package/build/stream-utils.d.ts +0 -1
- package/build/stream-utils.js +29 -28
- package/build/stream-utils.js.map +1 -1
- package/build/stream-utils.mjs +30 -0
- package/build/stream-utils.mjs.map +1 -0
- package/build/string-utils.js +31 -34
- package/build/string-utils.js.map +1 -1
- package/build/string-utils.mjs +31 -0
- package/build/string-utils.mjs.map +1 -0
- package/build/tarball-utils.js +40 -39
- package/build/tarball-utils.js.map +1 -1
- package/build/tarball-utils.mjs +46 -0
- package/build/tarball-utils.mjs.map +1 -0
- package/build/validation-utils.js +78 -112
- package/build/validation-utils.js.map +1 -1
- package/build/validation-utils.mjs +91 -0
- package/build/validation-utils.mjs.map +1 -0
- package/build/warning-utils.d.ts +1 -0
- package/build/warning-utils.js +38 -33
- package/build/warning-utils.js.map +1 -1
- package/build/warning-utils.mjs +40 -0
- package/build/warning-utils.mjs.map +1 -0
- package/package.json +35 -22
- package/build/index.js.map +0 -1
- package/build/path-utils.js +0 -2
- package/build/path-utils.js.map +0 -1
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { __exportAll } from "./_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { HTTP_STATUS } from "./constants.mjs";
|
|
3
|
+
import createError from "http-errors";
|
|
4
|
+
//#region src/error-utils.ts
|
|
5
|
+
var error_utils_exports = /* @__PURE__ */ __exportAll({
|
|
6
|
+
API_ERROR: () => API_ERROR,
|
|
7
|
+
APP_ERROR: () => APP_ERROR,
|
|
8
|
+
SUPPORT_ERRORS: () => SUPPORT_ERRORS,
|
|
9
|
+
getBadData: () => getBadData,
|
|
10
|
+
getBadRequest: () => getBadRequest,
|
|
11
|
+
getCode: () => getCode,
|
|
12
|
+
getConflict: () => getConflict,
|
|
13
|
+
getForbidden: () => getForbidden,
|
|
14
|
+
getInternalError: () => getInternalError,
|
|
15
|
+
getNotFound: () => getNotFound,
|
|
16
|
+
getServiceUnavailable: () => getServiceUnavailable,
|
|
17
|
+
getUnauthorized: () => getUnauthorized
|
|
18
|
+
});
|
|
19
|
+
var 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"
|
|
60
|
+
};
|
|
61
|
+
var 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"
|
|
66
|
+
};
|
|
67
|
+
var 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"
|
|
71
|
+
};
|
|
72
|
+
function getError(code, message) {
|
|
73
|
+
const httpError = createError(code, message);
|
|
74
|
+
httpError.code = code;
|
|
75
|
+
return httpError;
|
|
76
|
+
}
|
|
77
|
+
function getConflict(message = API_ERROR.PACKAGE_EXIST) {
|
|
78
|
+
return getError(HTTP_STATUS.CONFLICT, message);
|
|
79
|
+
}
|
|
80
|
+
function getBadData(customMessage) {
|
|
81
|
+
return getError(HTTP_STATUS.BAD_DATA, customMessage || API_ERROR.BAD_DATA);
|
|
82
|
+
}
|
|
83
|
+
function getBadRequest(customMessage) {
|
|
84
|
+
return getError(HTTP_STATUS.BAD_REQUEST, customMessage);
|
|
85
|
+
}
|
|
86
|
+
function getInternalError(customMessage) {
|
|
87
|
+
return customMessage ? getError(HTTP_STATUS.INTERNAL_ERROR, customMessage) : getError(HTTP_STATUS.INTERNAL_ERROR, API_ERROR.UNKNOWN_ERROR);
|
|
88
|
+
}
|
|
89
|
+
function getUnauthorized(message = "no credentials provided") {
|
|
90
|
+
return getError(HTTP_STATUS.UNAUTHORIZED, message);
|
|
91
|
+
}
|
|
92
|
+
function getForbidden(message = "can't use this filename") {
|
|
93
|
+
return getError(HTTP_STATUS.FORBIDDEN, message);
|
|
94
|
+
}
|
|
95
|
+
function getServiceUnavailable(message = API_ERROR.RESOURCE_UNAVAILABLE) {
|
|
96
|
+
return getError(HTTP_STATUS.SERVICE_UNAVAILABLE, message);
|
|
97
|
+
}
|
|
98
|
+
function getNotFound(customMessage) {
|
|
99
|
+
return getError(HTTP_STATUS.NOT_FOUND, customMessage || API_ERROR.NO_PACKAGE);
|
|
100
|
+
}
|
|
101
|
+
function getCode(statusCode, customMessage) {
|
|
102
|
+
return getError(statusCode, customMessage);
|
|
103
|
+
}
|
|
104
|
+
//#endregion
|
|
105
|
+
export { API_ERROR, APP_ERROR, SUPPORT_ERRORS, error_utils_exports };
|
|
106
|
+
|
|
107
|
+
//# sourceMappingURL=error-utils.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-utils.mjs","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;CACzB,uBAAuB;CACvB,sBAAsB;CACtB,kBAAkB;CAClB,4BAA4B;CAC5B,6BAA6B;CAC7B,mBAAmB;CACnB,qBAAqB;CACrB,oBAAoB;CACpB,uBAAuB;AACzB;AAEA,IAAa,iBAAiB;CAC5B,0BAA0B;CAC1B,cAAc;CACd,uBAAuB;CACvB,sBAAsB;AACxB;AAEA,IAAa,YAAY;CACvB,kBAAkB;CAClB,eAAe;CACf,qBAAqB;AACvB;AAIA,SAAS,SAAS,MAAc,SAAiC;CAC/D,MAAM,YAAY,YAAY,MAAM,OAAO;CAE3C,UAAU,OAAO;CAEjB,OAAO;AACT;AAEA,SAAgB,YAAY,UAAkB,UAAU,eAA+B;CACrF,OAAO,SAAS,YAAY,UAAU,OAAO;AAC/C;AAEA,SAAgB,WAAW,eAAwC;CACjE,OAAO,SAAS,YAAY,UAAU,iBAAiB,UAAU,QAAQ;AAC3E;AAEA,SAAgB,cAAc,eAAuC;CACnE,OAAO,SAAS,YAAY,aAAa,aAAa;AACxD;AAEA,SAAgB,iBAAiB,eAAwC;CACvE,OAAO,gBACH,SAAS,YAAY,gBAAgB,aAAa,IAClD,SAAS,YAAY,gBAAgB,UAAU,aAAa;AAClE;AAEA,SAAgB,gBAAgB,UAAU,2BAA2C;CACnF,OAAO,SAAS,YAAY,cAAc,OAAO;AACnD;AAEA,SAAgB,aAAa,UAAU,2BAA2C;CAChF,OAAO,SAAS,YAAY,WAAW,OAAO;AAChD;AAEA,SAAgB,sBACd,UAAkB,UAAU,sBACZ;CAChB,OAAO,SAAS,YAAY,qBAAqB,OAAO;AAC1D;AAEA,SAAgB,YAAY,eAAwC;CAClE,OAAO,SAAS,YAAY,WAAW,iBAAiB,UAAU,UAAU;AAC9E;AAEA,SAAgB,QAAQ,YAAoB,eAAuC;CACjF,OAAO,SAAS,YAAY,aAAa;AAC3C"}
|
package/build/file-utils.js
CHANGED
|
@@ -1,38 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
const require_runtime = require("./_virtual/_rolldown/runtime.js");
|
|
2
|
+
let node_fs_promises = require("node:fs/promises");
|
|
3
|
+
let node_os = require("node:os");
|
|
4
|
+
node_os = require_runtime.__toESM(node_os);
|
|
5
|
+
let node_path = require("node:path");
|
|
6
|
+
node_path = require_runtime.__toESM(node_path);
|
|
7
|
+
//#region src/file-utils.ts
|
|
8
|
+
var file_utils_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
9
|
+
Files: () => Files,
|
|
10
|
+
createTempFolder: () => createTempFolder,
|
|
11
|
+
createTempStorageFolder: () => createTempStorageFolder
|
|
5
12
|
});
|
|
6
|
-
|
|
7
|
-
exports.createTempFolder = createTempFolder;
|
|
8
|
-
exports.createTempStorageFolder = createTempStorageFolder;
|
|
9
|
-
var _promises = require("node:fs/promises");
|
|
10
|
-
var _nodeOs = _interopRequireDefault(require("node:os"));
|
|
11
|
-
var _nodePath = _interopRequireDefault(require("node:path"));
|
|
12
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
-
const Files = exports.Files = {
|
|
14
|
-
DatabaseName: '.verdaccio-db.json'
|
|
15
|
-
};
|
|
16
|
-
|
|
13
|
+
var Files = { DatabaseName: ".verdaccio-db.json" };
|
|
17
14
|
/**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
* Create a temporary folder.
|
|
16
|
+
* @param prefix The prefix of the folder name.
|
|
17
|
+
* @returns string
|
|
18
|
+
*/
|
|
22
19
|
async function createTempFolder(prefix) {
|
|
23
|
-
|
|
20
|
+
return await (0, node_fs_promises.mkdtemp)(node_path.default.join(node_os.default.tmpdir(), "verdaccio-" + prefix + "-"));
|
|
24
21
|
}
|
|
25
|
-
|
|
26
22
|
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
async function createTempStorageFolder(prefix, folder =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
23
|
+
* Create temporary folder for an asset.
|
|
24
|
+
* @param prefix
|
|
25
|
+
* @param folder name
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
28
|
+
async function createTempStorageFolder(prefix, folder = "storage") {
|
|
29
|
+
const tempFolder = await createTempFolder(prefix);
|
|
30
|
+
const storageFolder = node_path.default.join(tempFolder, folder);
|
|
31
|
+
await (0, node_fs_promises.mkdir)(storageFolder);
|
|
32
|
+
return storageFolder;
|
|
37
33
|
}
|
|
34
|
+
//#endregion
|
|
35
|
+
Object.defineProperty(exports, "file_utils_exports", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function() {
|
|
38
|
+
return file_utils_exports;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
|
|
38
42
|
//# sourceMappingURL=file-utils.js.map
|
package/build/file-utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-utils.js","names":[
|
|
1
|
+
{"version":3,"file":"file-utils.js","names":[],"sources":["../src/file-utils.ts"],"sourcesContent":["import { mkdir, mkdtemp } from 'node:fs/promises';\nimport os from 'node:os';\nimport path from 'node:path';\n\nexport const Files = {\n DatabaseName: '.verdaccio-db.json',\n};\n\n/**\n * Create a temporary folder.\n * @param prefix The prefix of the folder name.\n * @returns string\n */\nexport async function createTempFolder(prefix: string): Promise<string> {\n return await mkdtemp(path.join(os.tmpdir(), 'verdaccio-' + prefix + '-'));\n}\n\n/**\n * Create temporary folder for an asset.\n * @param prefix\n * @param folder name\n * @returns\n */\nexport async function createTempStorageFolder(prefix: string, folder = 'storage'): Promise<string> {\n const tempFolder = await createTempFolder(prefix);\n const storageFolder = path.join(tempFolder, folder);\n await mkdir(storageFolder);\n return storageFolder;\n}\n"],"mappings":";;;;;;;;;;;;AAIA,IAAa,QAAQ,EACnB,cAAc,qBAChB;;;;;;AAOA,eAAsB,iBAAiB,QAAiC;CACtE,OAAO,OAAA,GAAA,iBAAA,SAAc,UAAA,QAAK,KAAK,QAAA,QAAG,OAAO,GAAG,eAAe,SAAS,GAAG,CAAC;AAC1E;;;;;;;AAQA,eAAsB,wBAAwB,QAAgB,SAAS,WAA4B;CACjG,MAAM,aAAa,MAAM,iBAAiB,MAAM;CAChD,MAAM,gBAAgB,UAAA,QAAK,KAAK,YAAY,MAAM;CAClD,OAAA,GAAA,iBAAA,OAAY,aAAa;CACzB,OAAO;AACT"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { __exportAll } from "./_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { mkdir, mkdtemp } from "node:fs/promises";
|
|
3
|
+
import os from "node:os";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
//#region src/file-utils.ts
|
|
6
|
+
var file_utils_exports = /* @__PURE__ */ __exportAll({
|
|
7
|
+
Files: () => Files,
|
|
8
|
+
createTempFolder: () => createTempFolder,
|
|
9
|
+
createTempStorageFolder: () => createTempStorageFolder
|
|
10
|
+
});
|
|
11
|
+
var Files = { DatabaseName: ".verdaccio-db.json" };
|
|
12
|
+
/**
|
|
13
|
+
* Create a temporary folder.
|
|
14
|
+
* @param prefix The prefix of the folder name.
|
|
15
|
+
* @returns string
|
|
16
|
+
*/
|
|
17
|
+
async function createTempFolder(prefix) {
|
|
18
|
+
return await mkdtemp(path.join(os.tmpdir(), "verdaccio-" + prefix + "-"));
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Create temporary folder for an asset.
|
|
22
|
+
* @param prefix
|
|
23
|
+
* @param folder name
|
|
24
|
+
* @returns
|
|
25
|
+
*/
|
|
26
|
+
async function createTempStorageFolder(prefix, folder = "storage") {
|
|
27
|
+
const tempFolder = await createTempFolder(prefix);
|
|
28
|
+
const storageFolder = path.join(tempFolder, folder);
|
|
29
|
+
await mkdir(storageFolder);
|
|
30
|
+
return storageFolder;
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { file_utils_exports };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=file-utils.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-utils.mjs","names":[],"sources":["../src/file-utils.ts"],"sourcesContent":["import { mkdir, mkdtemp } from 'node:fs/promises';\nimport os from 'node:os';\nimport path from 'node:path';\n\nexport const Files = {\n DatabaseName: '.verdaccio-db.json',\n};\n\n/**\n * Create a temporary folder.\n * @param prefix The prefix of the folder name.\n * @returns string\n */\nexport async function createTempFolder(prefix: string): Promise<string> {\n return await mkdtemp(path.join(os.tmpdir(), 'verdaccio-' + prefix + '-'));\n}\n\n/**\n * Create temporary folder for an asset.\n * @param prefix\n * @param folder name\n * @returns\n */\nexport async function createTempStorageFolder(prefix: string, folder = 'storage'): Promise<string> {\n const tempFolder = await createTempFolder(prefix);\n const storageFolder = path.join(tempFolder, folder);\n await mkdir(storageFolder);\n return storageFolder;\n}\n"],"mappings":";;;;;;;;;;AAIA,IAAa,QAAQ,EACnB,cAAc,qBAChB;;;;;;AAOA,eAAsB,iBAAiB,QAAiC;CACtE,OAAO,MAAM,QAAQ,KAAK,KAAK,GAAG,OAAO,GAAG,eAAe,SAAS,GAAG,CAAC;AAC1E;;;;;;;AAQA,eAAsB,wBAAwB,QAAgB,SAAS,WAA4B;CACjG,MAAM,aAAa,MAAM,iBAAiB,MAAM;CAChD,MAAM,gBAAgB,KAAK,KAAK,YAAY,MAAM;CAClD,MAAM,MAAM,aAAa;CACzB,OAAO;AACT"}
|
package/build/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import * as stringUtils from './string-utils';
|
|
|
12
12
|
import * as tarballUtils from './tarball-utils';
|
|
13
13
|
import * as validationUtils from './validation-utils';
|
|
14
14
|
import * as warningUtils from './warning-utils';
|
|
15
|
-
export { VerdaccioError
|
|
15
|
+
export type { VerdaccioError } from './error-utils';
|
|
16
|
+
export { API_ERROR, SUPPORT_ERRORS, APP_ERROR } from './error-utils';
|
|
16
17
|
export { TOKEN_BASIC, TOKEN_BEARER, HTTP_STATUS, API_MESSAGE, HEADERS, DIST_TAGS, CHARACTER_ENCODING, HEADER_TYPE, LATEST, DEFAULT_PASSWORD_VALIDATION, DEFAULT_USER, ANONYMOUS_USER, USERS, MAINTAINERS, PLUGIN_CATEGORY, PLUGIN_PREFIX, PLUGIN_UI_PREFIX, HtpasswdHashAlgorithm, DEFAULT_DOMAIN, DEFAULT_PORT, DEFAULT_PROTOCOL, } from './constants';
|
|
17
18
|
export { authUtils, cryptoUtils, fileUtils, ipUtils, pkgUtils, searchUtils, streamUtils, errorUtils, validationUtils, stringUtils, constants, pluginUtils, warningUtils, tarballUtils, };
|
package/build/index.js
CHANGED
|
@@ -1,186 +1,126 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_auth_utils = require("./auth-utils.js");
|
|
6
|
+
const require_constants = require("./constants.js");
|
|
7
|
+
const require_crypto_utils = require("./crypto-utils.js");
|
|
8
|
+
const require_error_utils = require("./error-utils.js");
|
|
9
|
+
const require_file_utils = require("./file-utils.js");
|
|
10
|
+
const require_ip_utils = require("./ip-utils.js");
|
|
11
|
+
const require_pkg_utils = require("./pkg-utils.js");
|
|
12
|
+
const require_plugin_utils = require("./plugin-utils.js");
|
|
13
|
+
const require_search_utils = require("./search-utils.js");
|
|
14
|
+
const require_stream_utils = require("./stream-utils.js");
|
|
15
|
+
const require_string_utils = require("./string-utils.js");
|
|
16
|
+
const require_tarball_utils = require("./tarball-utils.js");
|
|
17
|
+
const require_validation_utils = require("./validation-utils.js");
|
|
18
|
+
const require_warning_utils = require("./warning-utils.js");
|
|
19
|
+
exports.ANONYMOUS_USER = require_constants.ANONYMOUS_USER;
|
|
20
|
+
exports.API_ERROR = require_error_utils.API_ERROR;
|
|
21
|
+
exports.API_MESSAGE = require_constants.API_MESSAGE;
|
|
22
|
+
exports.APP_ERROR = require_error_utils.APP_ERROR;
|
|
23
|
+
exports.CHARACTER_ENCODING = require_constants.CHARACTER_ENCODING;
|
|
24
|
+
exports.DEFAULT_DOMAIN = require_constants.DEFAULT_DOMAIN;
|
|
25
|
+
exports.DEFAULT_PASSWORD_VALIDATION = require_constants.DEFAULT_PASSWORD_VALIDATION;
|
|
26
|
+
exports.DEFAULT_PORT = require_constants.DEFAULT_PORT;
|
|
27
|
+
exports.DEFAULT_PROTOCOL = require_constants.DEFAULT_PROTOCOL;
|
|
28
|
+
exports.DEFAULT_USER = require_constants.DEFAULT_USER;
|
|
29
|
+
exports.DIST_TAGS = require_constants.DIST_TAGS;
|
|
30
|
+
exports.HEADERS = require_constants.HEADERS;
|
|
31
|
+
exports.HEADER_TYPE = require_constants.HEADER_TYPE;
|
|
32
|
+
exports.HTTP_STATUS = require_constants.HTTP_STATUS;
|
|
33
|
+
exports.HtpasswdHashAlgorithm = require_constants.HtpasswdHashAlgorithm;
|
|
34
|
+
exports.LATEST = require_constants.LATEST;
|
|
35
|
+
exports.MAINTAINERS = require_constants.MAINTAINERS;
|
|
36
|
+
exports.PLUGIN_CATEGORY = require_constants.PLUGIN_CATEGORY;
|
|
37
|
+
exports.PLUGIN_PREFIX = require_constants.PLUGIN_PREFIX;
|
|
38
|
+
exports.PLUGIN_UI_PREFIX = require_constants.PLUGIN_UI_PREFIX;
|
|
39
|
+
exports.SUPPORT_ERRORS = require_error_utils.SUPPORT_ERRORS;
|
|
40
|
+
exports.TOKEN_BASIC = require_constants.TOKEN_BASIC;
|
|
41
|
+
exports.TOKEN_BEARER = require_constants.TOKEN_BEARER;
|
|
42
|
+
exports.USERS = require_constants.USERS;
|
|
43
|
+
Object.defineProperty(exports, "authUtils", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function() {
|
|
46
|
+
return require_auth_utils.auth_utils_exports;
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
Object.defineProperty(exports, "constants", {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
get: function() {
|
|
52
|
+
return require_constants.constants_exports;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
Object.defineProperty(exports, "cryptoUtils", {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
get: function() {
|
|
58
|
+
return require_crypto_utils.crypto_utils_exports;
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
Object.defineProperty(exports, "errorUtils", {
|
|
62
|
+
enumerable: true,
|
|
63
|
+
get: function() {
|
|
64
|
+
return require_error_utils.error_utils_exports;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
Object.defineProperty(exports, "fileUtils", {
|
|
68
|
+
enumerable: true,
|
|
69
|
+
get: function() {
|
|
70
|
+
return require_file_utils.file_utils_exports;
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
Object.defineProperty(exports, "ipUtils", {
|
|
74
|
+
enumerable: true,
|
|
75
|
+
get: function() {
|
|
76
|
+
return require_ip_utils.ip_utils_exports;
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
Object.defineProperty(exports, "pkgUtils", {
|
|
80
|
+
enumerable: true,
|
|
81
|
+
get: function() {
|
|
82
|
+
return require_pkg_utils.pkg_utils_exports;
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
Object.defineProperty(exports, "pluginUtils", {
|
|
86
|
+
enumerable: true,
|
|
87
|
+
get: function() {
|
|
88
|
+
return require_plugin_utils.plugin_utils_exports;
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
Object.defineProperty(exports, "searchUtils", {
|
|
92
|
+
enumerable: true,
|
|
93
|
+
get: function() {
|
|
94
|
+
return require_search_utils.search_utils_exports;
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
Object.defineProperty(exports, "streamUtils", {
|
|
98
|
+
enumerable: true,
|
|
99
|
+
get: function() {
|
|
100
|
+
return require_stream_utils.stream_utils_exports;
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
Object.defineProperty(exports, "stringUtils", {
|
|
104
|
+
enumerable: true,
|
|
105
|
+
get: function() {
|
|
106
|
+
return require_string_utils.string_utils_exports;
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
Object.defineProperty(exports, "tarballUtils", {
|
|
110
|
+
enumerable: true,
|
|
111
|
+
get: function() {
|
|
112
|
+
return require_tarball_utils.tarball_utils_exports;
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
Object.defineProperty(exports, "validationUtils", {
|
|
116
|
+
enumerable: true,
|
|
117
|
+
get: function() {
|
|
118
|
+
return require_validation_utils.validation_utils_exports;
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
Object.defineProperty(exports, "warningUtils", {
|
|
122
|
+
enumerable: true,
|
|
123
|
+
get: function() {
|
|
124
|
+
return require_warning_utils.warning_utils_exports;
|
|
125
|
+
}
|
|
5
126
|
});
|
|
6
|
-
Object.defineProperty(exports, "ANONYMOUS_USER", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return constants.ANONYMOUS_USER;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "API_ERROR", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return errorUtils.API_ERROR;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "API_MESSAGE", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return constants.API_MESSAGE;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "APP_ERROR", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
-
return errorUtils.APP_ERROR;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "CHARACTER_ENCODING", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return constants.CHARACTER_ENCODING;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "DEFAULT_DOMAIN", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () {
|
|
39
|
-
return constants.DEFAULT_DOMAIN;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
Object.defineProperty(exports, "DEFAULT_PASSWORD_VALIDATION", {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: function () {
|
|
45
|
-
return constants.DEFAULT_PASSWORD_VALIDATION;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
Object.defineProperty(exports, "DEFAULT_PORT", {
|
|
49
|
-
enumerable: true,
|
|
50
|
-
get: function () {
|
|
51
|
-
return constants.DEFAULT_PORT;
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
Object.defineProperty(exports, "DEFAULT_PROTOCOL", {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function () {
|
|
57
|
-
return constants.DEFAULT_PROTOCOL;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
Object.defineProperty(exports, "DEFAULT_USER", {
|
|
61
|
-
enumerable: true,
|
|
62
|
-
get: function () {
|
|
63
|
-
return constants.DEFAULT_USER;
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
Object.defineProperty(exports, "DIST_TAGS", {
|
|
67
|
-
enumerable: true,
|
|
68
|
-
get: function () {
|
|
69
|
-
return constants.DIST_TAGS;
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
Object.defineProperty(exports, "HEADERS", {
|
|
73
|
-
enumerable: true,
|
|
74
|
-
get: function () {
|
|
75
|
-
return constants.HEADERS;
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
Object.defineProperty(exports, "HEADER_TYPE", {
|
|
79
|
-
enumerable: true,
|
|
80
|
-
get: function () {
|
|
81
|
-
return constants.HEADER_TYPE;
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
Object.defineProperty(exports, "HTTP_STATUS", {
|
|
85
|
-
enumerable: true,
|
|
86
|
-
get: function () {
|
|
87
|
-
return constants.HTTP_STATUS;
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
Object.defineProperty(exports, "HtpasswdHashAlgorithm", {
|
|
91
|
-
enumerable: true,
|
|
92
|
-
get: function () {
|
|
93
|
-
return constants.HtpasswdHashAlgorithm;
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
Object.defineProperty(exports, "LATEST", {
|
|
97
|
-
enumerable: true,
|
|
98
|
-
get: function () {
|
|
99
|
-
return constants.LATEST;
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
Object.defineProperty(exports, "MAINTAINERS", {
|
|
103
|
-
enumerable: true,
|
|
104
|
-
get: function () {
|
|
105
|
-
return constants.MAINTAINERS;
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
Object.defineProperty(exports, "PLUGIN_CATEGORY", {
|
|
109
|
-
enumerable: true,
|
|
110
|
-
get: function () {
|
|
111
|
-
return constants.PLUGIN_CATEGORY;
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
Object.defineProperty(exports, "PLUGIN_PREFIX", {
|
|
115
|
-
enumerable: true,
|
|
116
|
-
get: function () {
|
|
117
|
-
return constants.PLUGIN_PREFIX;
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
Object.defineProperty(exports, "PLUGIN_UI_PREFIX", {
|
|
121
|
-
enumerable: true,
|
|
122
|
-
get: function () {
|
|
123
|
-
return constants.PLUGIN_UI_PREFIX;
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
Object.defineProperty(exports, "SUPPORT_ERRORS", {
|
|
127
|
-
enumerable: true,
|
|
128
|
-
get: function () {
|
|
129
|
-
return errorUtils.SUPPORT_ERRORS;
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
Object.defineProperty(exports, "TOKEN_BASIC", {
|
|
133
|
-
enumerable: true,
|
|
134
|
-
get: function () {
|
|
135
|
-
return constants.TOKEN_BASIC;
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
Object.defineProperty(exports, "TOKEN_BEARER", {
|
|
139
|
-
enumerable: true,
|
|
140
|
-
get: function () {
|
|
141
|
-
return constants.TOKEN_BEARER;
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
Object.defineProperty(exports, "USERS", {
|
|
145
|
-
enumerable: true,
|
|
146
|
-
get: function () {
|
|
147
|
-
return constants.USERS;
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
Object.defineProperty(exports, "VerdaccioError", {
|
|
151
|
-
enumerable: true,
|
|
152
|
-
get: function () {
|
|
153
|
-
return errorUtils.VerdaccioError;
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
exports.warningUtils = exports.validationUtils = exports.tarballUtils = exports.stringUtils = exports.streamUtils = exports.searchUtils = exports.pluginUtils = exports.pkgUtils = exports.ipUtils = exports.fileUtils = exports.errorUtils = exports.cryptoUtils = exports.constants = exports.authUtils = void 0;
|
|
157
|
-
var authUtils = _interopRequireWildcard(require("./auth-utils"));
|
|
158
|
-
exports.authUtils = authUtils;
|
|
159
|
-
var constants = _interopRequireWildcard(require("./constants"));
|
|
160
|
-
exports.constants = constants;
|
|
161
|
-
var cryptoUtils = _interopRequireWildcard(require("./crypto-utils"));
|
|
162
|
-
exports.cryptoUtils = cryptoUtils;
|
|
163
|
-
var errorUtils = _interopRequireWildcard(require("./error-utils"));
|
|
164
|
-
exports.errorUtils = errorUtils;
|
|
165
|
-
var fileUtils = _interopRequireWildcard(require("./file-utils"));
|
|
166
|
-
exports.fileUtils = fileUtils;
|
|
167
|
-
var ipUtils = _interopRequireWildcard(require("./ip-utils"));
|
|
168
|
-
exports.ipUtils = ipUtils;
|
|
169
|
-
var pkgUtils = _interopRequireWildcard(require("./pkg-utils"));
|
|
170
|
-
exports.pkgUtils = pkgUtils;
|
|
171
|
-
var pluginUtils = _interopRequireWildcard(require("./plugin-utils"));
|
|
172
|
-
exports.pluginUtils = pluginUtils;
|
|
173
|
-
var searchUtils = _interopRequireWildcard(require("./search-utils"));
|
|
174
|
-
exports.searchUtils = searchUtils;
|
|
175
|
-
var streamUtils = _interopRequireWildcard(require("./stream-utils"));
|
|
176
|
-
exports.streamUtils = streamUtils;
|
|
177
|
-
var stringUtils = _interopRequireWildcard(require("./string-utils"));
|
|
178
|
-
exports.stringUtils = stringUtils;
|
|
179
|
-
var tarballUtils = _interopRequireWildcard(require("./tarball-utils"));
|
|
180
|
-
exports.tarballUtils = tarballUtils;
|
|
181
|
-
var validationUtils = _interopRequireWildcard(require("./validation-utils"));
|
|
182
|
-
exports.validationUtils = validationUtils;
|
|
183
|
-
var warningUtils = _interopRequireWildcard(require("./warning-utils"));
|
|
184
|
-
exports.warningUtils = warningUtils;
|
|
185
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
186
|
-
//# sourceMappingURL=index.js.map
|
package/build/index.mjs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { auth_utils_exports } from "./auth-utils.mjs";
|
|
2
|
+
import { 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 } from "./constants.mjs";
|
|
3
|
+
import { crypto_utils_exports } from "./crypto-utils.mjs";
|
|
4
|
+
import { API_ERROR, APP_ERROR, SUPPORT_ERRORS, error_utils_exports } from "./error-utils.mjs";
|
|
5
|
+
import { file_utils_exports } from "./file-utils.mjs";
|
|
6
|
+
import { ip_utils_exports } from "./ip-utils.mjs";
|
|
7
|
+
import { pkg_utils_exports } from "./pkg-utils.mjs";
|
|
8
|
+
import { plugin_utils_exports } from "./plugin-utils.mjs";
|
|
9
|
+
import { search_utils_exports } from "./search-utils.mjs";
|
|
10
|
+
import { stream_utils_exports } from "./stream-utils.mjs";
|
|
11
|
+
import { string_utils_exports } from "./string-utils.mjs";
|
|
12
|
+
import { tarball_utils_exports } from "./tarball-utils.mjs";
|
|
13
|
+
import { validation_utils_exports } from "./validation-utils.mjs";
|
|
14
|
+
import { warning_utils_exports } from "./warning-utils.mjs";
|
|
15
|
+
export { ANONYMOUS_USER, API_ERROR, API_MESSAGE, APP_ERROR, 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, SUPPORT_ERRORS, TOKEN_BASIC, TOKEN_BEARER, USERS, auth_utils_exports as authUtils, constants_exports as constants, crypto_utils_exports as cryptoUtils, error_utils_exports as errorUtils, file_utils_exports as fileUtils, ip_utils_exports as ipUtils, pkg_utils_exports as pkgUtils, plugin_utils_exports as pluginUtils, search_utils_exports as searchUtils, stream_utils_exports as streamUtils, string_utils_exports as stringUtils, tarball_utils_exports as tarballUtils, validation_utils_exports as validationUtils, warning_utils_exports as warningUtils };
|