verdaccio 6.6.0 → 6.6.2
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/CHANGELOG.md +2722 -0
- package/build/api/index.js +1 -1
- package/build/lib/cli/cli.js +1 -1
- package/build/lib/cli/commands/init.js +1 -1
- package/build/lib/cli/commands/version.js +1 -1
- package/build/types/index.js +6 -0
- package/package.json +11 -5
- package/security.txt +0 -2
- package/build/api/debug/index.d.ts +0 -3
- package/build/api/endpoint/api/dist-tags.d.ts +0 -4
- package/build/api/endpoint/api/package.d.ts +0 -5
- package/build/api/endpoint/api/ping.d.ts +0 -2
- package/build/api/endpoint/api/publish.d.ts +0 -26
- package/build/api/endpoint/api/search.d.ts +0 -1
- package/build/api/endpoint/api/star.d.ts +0 -4
- package/build/api/endpoint/api/stars.d.ts +0 -3
- package/build/api/endpoint/api/user.d.ts +0 -4
- package/build/api/endpoint/api/v1/profile.d.ts +0 -14
- package/build/api/endpoint/api/v1/search.d.ts +0 -5
- package/build/api/endpoint/api/v1/token.d.ts +0 -8
- package/build/api/endpoint/api/whoami.d.ts +0 -2
- package/build/api/endpoint/index.d.ts +0 -4
- package/build/api/index.d.ts +0 -4
- package/build/api/middleware.d.ts +0 -3
- package/build/api/web/api/index.d.ts +0 -2
- package/build/api/web/api/package.d.ts +0 -12
- package/build/api/web/api/search.d.ts +0 -5
- package/build/api/web/api/user.d.ts +0 -5
- package/build/api/web/api/utils.d.ts +0 -2
- package/build/api/web/index.d.ts +0 -9
- package/build/index.d.ts +0 -4
- package/build/lib/auth-utils.d.ts +0 -2
- package/build/lib/bootstrap.d.ts +0 -22
- package/build/lib/cli/cli.d.ts +0 -1
- package/build/lib/cli/commands/info.d.ts +0 -5
- package/build/lib/cli/commands/init.d.ts +0 -9
- package/build/lib/cli/commands/version.d.ts +0 -5
- package/build/lib/cli/utils.d.ts +0 -2
- package/build/lib/cli.d.ts +0 -2
- package/build/lib/config.d.ts +0 -5
- package/build/lib/constants.d.ts +0 -25
- package/build/lib/experiments.d.ts +0 -1
- package/build/lib/local-storage.d.ts +0 -182
- package/build/lib/logger/index.d.ts +0 -6
- package/build/lib/metadata-utils.d.ts +0 -10
- package/build/lib/run-server.d.ts +0 -22
- package/build/lib/storage-utils.d.ts +0 -30
- package/build/lib/storage.d.ts +0 -136
- package/build/lib/up-storage.d.ts +0 -138
- package/build/lib/uplink-util.d.ts +0 -7
- package/build/lib/utils.d.ts +0 -68
package/build/api/index.js
CHANGED
|
@@ -24,7 +24,7 @@ var _endpoint = _interopRequireDefault(require("./endpoint"));
|
|
|
24
24
|
var _middleware2 = require("./middleware");
|
|
25
25
|
var _web = _interopRequireDefault(require("./web"));
|
|
26
26
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
27
|
-
const version = "6.6.
|
|
27
|
+
const version = "6.6.2" || 'dev';
|
|
28
28
|
const defineAPI = async function (config, storage) {
|
|
29
29
|
const auth = new _auth.Auth(config, _logger.logger, {
|
|
30
30
|
legacyMergeConfigs: true
|
package/build/lib/cli/cli.js
CHANGED
|
@@ -5,7 +5,7 @@ var _info = require("./commands/info");
|
|
|
5
5
|
var _init = require("./commands/init");
|
|
6
6
|
var _version = require("./commands/version");
|
|
7
7
|
var _utils = require("./utils");
|
|
8
|
-
const pkgVersion = "6.6.
|
|
8
|
+
const pkgVersion = "6.6.2" || 'dev';
|
|
9
9
|
if (process.getuid && process.getuid() === 0) {
|
|
10
10
|
process.emitWarning(`Verdaccio doesn't need superuser privileges. don't run it under root`);
|
|
11
11
|
}
|
|
@@ -12,7 +12,7 @@ var _logger = require("../../logger");
|
|
|
12
12
|
var _runServer = require("../../run-server");
|
|
13
13
|
var _utils = require("../../utils");
|
|
14
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
-
const pkgVersion = "6.6.
|
|
15
|
+
const pkgVersion = "6.6.2" || 'dev';
|
|
16
16
|
const pkgName = 'verdaccio';
|
|
17
17
|
const DEFAULT_PROCESS_NAME = exports.DEFAULT_PROCESS_NAME = 'verdaccio';
|
|
18
18
|
class InitCommand extends _clipanion.Command {
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.VersionCommand = void 0;
|
|
7
7
|
var _clipanion = require("clipanion");
|
|
8
|
-
const pkgVersion = "6.6.
|
|
8
|
+
const pkgVersion = "6.6.2" || 'dev';
|
|
9
9
|
class VersionCommand extends _clipanion.Command {
|
|
10
10
|
static paths = [[`--version`], [`-v`]];
|
|
11
11
|
async execute() {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6W10sInNvdXJjZXMiOlsiLi4vLi4vc3JjL3R5cGVzL2luZGV4LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgTmV4dEZ1bmN0aW9uLCBSZXF1ZXN0LCBSZXNwb25zZSB9IGZyb20gJ2V4cHJlc3MnO1xuXG5pbXBvcnQgdHlwZSB7IHBsdWdpblV0aWxzIH0gZnJvbSAnQHZlcmRhY2Npby9jb3JlJztcbmltcG9ydCB0eXBlIHtcbiAgQ2FsbGJhY2ssXG4gIENvbmZpZyxcbiAgTG9nZ2VyLFxuICBNYW5pZmVzdCxcbiAgUGFja2FnZUFjY2VzcyxcbiAgUmVtb3RlVXNlcixcbiAgU3RyaW5nVmFsdWUgYXMgdmVyZGFjY2lvJFN0cmluZ1ZhbHVlLFxufSBmcm9tICdAdmVyZGFjY2lvL3R5cGVzJztcblxuZXhwb3J0IHR5cGUgU3RyaW5nVmFsdWUgPSB2ZXJkYWNjaW8kU3RyaW5nVmFsdWU7XG5cbi8vIGxlZ2FjeSBzaG91bGQgYm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|
"description": "A lightweight private npm proxy registry",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Verdaccio Maintainers",
|
|
@@ -59,6 +59,9 @@
|
|
|
59
59
|
"@babel/preset-typescript": "7.28.5",
|
|
60
60
|
"@babel/register": "7.28.6",
|
|
61
61
|
"@babel/runtime": "7.28.6",
|
|
62
|
+
"@changesets/changelog-github": "0.5.2",
|
|
63
|
+
"@changesets/cli": "2.27.12",
|
|
64
|
+
"@changesets/get-dependents-graph": "2.1.3",
|
|
62
65
|
"@trivago/prettier-plugin-sort-imports": "5.2.2",
|
|
63
66
|
"@types/async": "3.2.25",
|
|
64
67
|
"@types/debug": "4.1.12",
|
|
@@ -93,11 +96,10 @@
|
|
|
93
96
|
"node-mocks-http": "^1.17.2",
|
|
94
97
|
"prettier": "3.6.2",
|
|
95
98
|
"selfsigned": "5.5.0",
|
|
96
|
-
"standard-version": "9.5.0",
|
|
97
99
|
"supertest": "7.2.2",
|
|
98
100
|
"ts-node": "10.9.2",
|
|
99
101
|
"typescript": "5.9.3",
|
|
100
|
-
"verdaccio-auth-memory": "
|
|
102
|
+
"verdaccio-auth-memory": "13.0.1",
|
|
101
103
|
"verdaccio-memory": "10.4.3",
|
|
102
104
|
"vitest": "4.1.5"
|
|
103
105
|
},
|
|
@@ -113,7 +115,11 @@
|
|
|
113
115
|
"verdaccio"
|
|
114
116
|
],
|
|
115
117
|
"scripts": {
|
|
116
|
-
"
|
|
118
|
+
"changeset": "changeset",
|
|
119
|
+
"changeset:check": "changeset status --since=origin/6.x",
|
|
120
|
+
"ci:version": "yarn ci:version:changeset && yarn install --no-immutable",
|
|
121
|
+
"ci:version:changeset": "changeset version",
|
|
122
|
+
"ci:publish": "yarn npm publish --access public --provenance",
|
|
117
123
|
"type-check": "tsc --noEmit",
|
|
118
124
|
"cache:clean": "yarn cache clean --mirror && yarn cache clean --all",
|
|
119
125
|
"type-check:watch": "yarn run type-check -- --watch",
|
|
@@ -154,4 +160,4 @@
|
|
|
154
160
|
"logo": "https://opencollective.com/verdaccio/logo.txt"
|
|
155
161
|
},
|
|
156
162
|
"packageManager": "yarn@4.14.1"
|
|
157
|
-
}
|
|
163
|
+
}
|
package/security.txt
CHANGED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { Router } from 'express';
|
|
2
|
-
import type { Auth } from '@verdaccio/auth';
|
|
3
|
-
import type { Config } from '@verdaccio/types';
|
|
4
|
-
import type Storage from '../../../lib/storage';
|
|
5
|
-
export default function (route: Router, auth: Auth, storage: Storage, config: Config): void;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { Router } from 'express';
|
|
2
|
-
import type { Auth } from '@verdaccio/auth';
|
|
3
|
-
import type { Config } from '@verdaccio/types';
|
|
4
|
-
import type Storage from '../../../lib/storage';
|
|
5
|
-
import type { $NextFunctionVer, $RequestExtend, $ResponseExtend } from '../../../types';
|
|
6
|
-
export default function publish(router: Router, auth: Auth, storage: Storage, config: Config): void;
|
|
7
|
-
/**
|
|
8
|
-
* Publish a package
|
|
9
|
-
*/
|
|
10
|
-
export declare function publishPackage(storage: Storage, config: Config, auth: Auth): any;
|
|
11
|
-
/**
|
|
12
|
-
* un-publish a package
|
|
13
|
-
*/
|
|
14
|
-
export declare function unPublishPackage(storage: Storage): (req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) => void;
|
|
15
|
-
/**
|
|
16
|
-
* Delete tarball
|
|
17
|
-
*/
|
|
18
|
-
export declare function removeTarball(storage: Storage): (req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) => void;
|
|
19
|
-
/**
|
|
20
|
-
* Adds a new version
|
|
21
|
-
*/
|
|
22
|
-
export declare function addVersion(storage: Storage): (req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) => void;
|
|
23
|
-
/**
|
|
24
|
-
* uploadPackageTarball
|
|
25
|
-
*/
|
|
26
|
-
export declare function uploadPackageTarball(storage: Storage): (req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function (route: any, auth: any, storage: any): void;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { Response } from 'express';
|
|
2
|
-
import type Storage from '../../../lib/storage';
|
|
3
|
-
import type { $NextFunctionVer, $RequestExtend } from '../../../types';
|
|
4
|
-
export default function (storage: Storage): (req: $RequestExtend, res: Response, next: $NextFunctionVer) => void;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Router } from 'express';
|
|
2
|
-
import type { Auth } from '@verdaccio/auth';
|
|
3
|
-
import type { ConfigYaml } from '@verdaccio/types';
|
|
4
|
-
export interface Profile {
|
|
5
|
-
tfa: boolean;
|
|
6
|
-
name: string;
|
|
7
|
-
email: string;
|
|
8
|
-
email_verified: boolean;
|
|
9
|
-
created: string;
|
|
10
|
-
updated: string;
|
|
11
|
-
cidr_whitelist: string[] | null;
|
|
12
|
-
fullname: string;
|
|
13
|
-
}
|
|
14
|
-
export default function (router: Router, auth: Auth, config: ConfigYaml): void;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Router } from 'express';
|
|
2
|
-
import type { Auth } from '@verdaccio/auth';
|
|
3
|
-
import type { Config, Token } from '@verdaccio/types';
|
|
4
|
-
import type Storage from '../../../../lib/storage';
|
|
5
|
-
export type NormalizeToken = Token & {
|
|
6
|
-
created: string;
|
|
7
|
-
};
|
|
8
|
-
export default function (router: Router, auth: Auth, storage: Storage, config: Config): void;
|
package/build/api/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Router } from 'express';
|
|
2
|
-
import type { Auth } from '@verdaccio/auth';
|
|
3
|
-
import type { Config, Manifest } from '@verdaccio/types';
|
|
4
|
-
import type Storage from '../../../lib/storage';
|
|
5
|
-
export type PackcageExt = Manifest & {
|
|
6
|
-
author: any;
|
|
7
|
-
dist?: {
|
|
8
|
-
tarball: string;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
declare function addPackageWebApi(storage: Storage, auth: Auth, config: Config): Router;
|
|
12
|
-
export default addPackageWebApi;
|
package/build/api/web/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { RequestHandler } from 'express';
|
|
2
|
-
import { Router } from 'express';
|
|
3
|
-
export declare const PLUGIN_UI_PREFIX = "verdaccio-theme";
|
|
4
|
-
export declare const DEFAULT_PLUGIN_UI_THEME = "@verdaccio/ui-theme";
|
|
5
|
-
export declare function loadTheme(config: any): Promise<any>;
|
|
6
|
-
export declare function webAPIMiddleware(tokenMiddleware: RequestHandler, webEndpointsApi: RequestHandler): Router;
|
|
7
|
-
export declare function webMiddleware(config: any, middlewares: any, pluginOptions: any): any;
|
|
8
|
-
declare const _default: (config: any, auth: any, storage: any, logger: any) => Promise<import("express-serve-static-core").Router>;
|
|
9
|
-
export default _default;
|
package/build/index.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { startVerdaccio as default, startVerdaccio } from './lib/bootstrap';
|
|
2
|
-
export { runServer } from './lib/run-server';
|
|
3
|
-
export { ConfigBuilder, parseConfigFile, getDefaultConfig, Config } from '@verdaccio/config';
|
|
4
|
-
export { fileUtils, errorUtils, cryptoUtils, pkgUtils } from '@verdaccio/core';
|
package/build/lib/bootstrap.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Application } from 'express';
|
|
2
|
-
import { Callback, ConfigYaml } from '@verdaccio/types';
|
|
3
|
-
/**
|
|
4
|
-
* Trigger the server after configuration has been loaded.
|
|
5
|
-
* @param {Object} config
|
|
6
|
-
* @param {Object} cliArguments
|
|
7
|
-
* @param {String} configPath
|
|
8
|
-
* @param {String} pkgVersion
|
|
9
|
-
* @param {String} pkgName
|
|
10
|
-
* @deprecated use runServer instead
|
|
11
|
-
*/
|
|
12
|
-
declare function startVerdaccio(config: ConfigYaml, cliListen: string, configPath: string, pkgVersion: string, pkgName: string, callback: Callback): void;
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
* @param webServer
|
|
16
|
-
* @param addr
|
|
17
|
-
* @param pkgName
|
|
18
|
-
* @param pkgVersion
|
|
19
|
-
* @deprecated use initServer instead
|
|
20
|
-
*/
|
|
21
|
-
declare function listenDefaultCallback(webServer: Application, addr: any, pkgName: string, pkgVersion: string): void;
|
|
22
|
-
export { startVerdaccio, listenDefaultCallback };
|
package/build/lib/cli/cli.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Command } from 'clipanion';
|
|
2
|
-
export declare const DEFAULT_PROCESS_NAME: string;
|
|
3
|
-
export declare class InitCommand extends Command {
|
|
4
|
-
static paths: never[][];
|
|
5
|
-
listen: string | undefined;
|
|
6
|
-
static usage: import("clipanion").Usage;
|
|
7
|
-
config: string | undefined;
|
|
8
|
-
execute(): Promise<void>;
|
|
9
|
-
}
|
package/build/lib/cli/utils.d.ts
DELETED
package/build/lib/cli.d.ts
DELETED
package/build/lib/config.d.ts
DELETED
package/build/lib/constants.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export { API_ERROR, API_MESSAGE, HTTP_STATUS, HEADERS, HEADER_TYPE, CHARACTER_ENCODING, TOKEN_BASIC, TOKEN_BEARER, SUPPORT_ERRORS, APP_ERROR, DEFAULT_PROTOCOL, DEFAULT_DOMAIN, } from '@verdaccio/core';
|
|
2
|
-
export { ROLES, PACKAGE_ACCESS } from '@verdaccio/utils';
|
|
3
|
-
export declare const TIME_EXPIRATION_24H = "24h";
|
|
4
|
-
export declare const TIME_EXPIRATION_1H = "1h";
|
|
5
|
-
export declare const DIST_TAGS = "dist-tags";
|
|
6
|
-
export declare const LATEST = "latest";
|
|
7
|
-
export declare const USERS = "users";
|
|
8
|
-
export declare const DEFAULT_MIN_LIMIT_PASSWORD = 3;
|
|
9
|
-
export declare const keyPem = "verdaccio-key.pem";
|
|
10
|
-
export declare const certPem = "verdaccio-cert.pem";
|
|
11
|
-
export declare const csrPem = "verdaccio-csr.pem";
|
|
12
|
-
export declare const ERROR_CODE: {
|
|
13
|
-
token_required: string;
|
|
14
|
-
};
|
|
15
|
-
export declare const DEFAULT_REGISTRY = "https://registry.npmjs.org";
|
|
16
|
-
export declare const DEFAULT_UPLINK = "npmjs";
|
|
17
|
-
export declare const DEFAULT_NO_README = "ERROR: No README data found!";
|
|
18
|
-
export declare const MODULE_NOT_FOUND = "MODULE_NOT_FOUND";
|
|
19
|
-
export declare const WEB_TITLE = "Verdaccio";
|
|
20
|
-
export declare const STORAGE: {
|
|
21
|
-
PACKAGE_FILE_NAME: string;
|
|
22
|
-
FILE_EXIST_ERROR: string;
|
|
23
|
-
NO_SUCH_FILE_ERROR: string;
|
|
24
|
-
DEFAULT_REVISION: string;
|
|
25
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function displayExperimentsInfoBox(flags: any): any;
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import { ReadTarball, UploadTarball } from '@verdaccio/streams';
|
|
2
|
-
import { Callback, Config, Logger, Manifest, MergeTags, Token, TokenFilter, Version } from '@verdaccio/types';
|
|
3
|
-
import { StoragePluginLegacy } from '../../types/custom';
|
|
4
|
-
import { StringValue } from '../types';
|
|
5
|
-
export type StoragePlugin = StoragePluginLegacy<Config> | any;
|
|
6
|
-
/**
|
|
7
|
-
* Implements Storage interface (same for storage.js, local-storage.js, up-storage.js).
|
|
8
|
-
*/
|
|
9
|
-
declare class LocalStorage {
|
|
10
|
-
config: Config;
|
|
11
|
-
storagePlugin: StoragePlugin;
|
|
12
|
-
logger: Logger;
|
|
13
|
-
constructor(config: Config, logger: Logger, localStorage: StoragePlugin);
|
|
14
|
-
addPackage(name: string, pkg: Manifest, callback: Callback): void;
|
|
15
|
-
/**
|
|
16
|
-
* Remove package.
|
|
17
|
-
* @param {*} name
|
|
18
|
-
* @param {*} callback
|
|
19
|
-
* @return {Function}
|
|
20
|
-
*/
|
|
21
|
-
removePackage(name: string, callback: Callback): void;
|
|
22
|
-
/**
|
|
23
|
-
* Synchronize remote package info with the local one
|
|
24
|
-
* @param {*} name
|
|
25
|
-
* @param {*} packageInfo
|
|
26
|
-
* @param {*} callback
|
|
27
|
-
*/
|
|
28
|
-
updateVersions(name: string, packageInfo: Manifest, callback: Callback): void;
|
|
29
|
-
/**
|
|
30
|
-
* Add a new version to a previous local package.
|
|
31
|
-
* @param {*} name
|
|
32
|
-
* @param {*} version
|
|
33
|
-
* @param {*} metadata
|
|
34
|
-
* @param {*} tag
|
|
35
|
-
* @param {*} callback
|
|
36
|
-
*/
|
|
37
|
-
addVersion(name: string, version: string, metadata: Version, tag: StringValue, callback: Callback): void;
|
|
38
|
-
/**
|
|
39
|
-
* Merge a new list of tags for a local packages with the existing one.
|
|
40
|
-
* @param {*} pkgName
|
|
41
|
-
* @param {*} tags
|
|
42
|
-
* @param {*} callback
|
|
43
|
-
*/
|
|
44
|
-
mergeTags(pkgName: string, tags: MergeTags, callback: Callback): void;
|
|
45
|
-
/**
|
|
46
|
-
* Return version not found
|
|
47
|
-
* @return {String}
|
|
48
|
-
* @private
|
|
49
|
-
*/
|
|
50
|
-
private _getVersionNotFound;
|
|
51
|
-
/**
|
|
52
|
-
* Return file no available
|
|
53
|
-
* @return {String}
|
|
54
|
-
* @private
|
|
55
|
-
*/
|
|
56
|
-
private _getFileNotAvailable;
|
|
57
|
-
/**
|
|
58
|
-
* Update the package metadata, tags and attachments (tarballs).
|
|
59
|
-
* Note: Currently supports unpublishing and deprecation.
|
|
60
|
-
* @param {*} name
|
|
61
|
-
* @param {*} incomingPkg
|
|
62
|
-
* @param {*} revision
|
|
63
|
-
* @param {*} callback
|
|
64
|
-
* @return {Function}
|
|
65
|
-
*/
|
|
66
|
-
changePackage(name: string, incomingPkg: Manifest, revision: string | void, callback: Callback): void;
|
|
67
|
-
/**
|
|
68
|
-
* Remove a tarball.
|
|
69
|
-
* @param {*} name
|
|
70
|
-
* @param {*} filename
|
|
71
|
-
* @param {*} revision
|
|
72
|
-
* @param {*} callback
|
|
73
|
-
*/
|
|
74
|
-
removeTarball(name: string, filename: string, revision: string, callback: Callback): void;
|
|
75
|
-
/**
|
|
76
|
-
* Add a tarball.
|
|
77
|
-
* @param {String} name
|
|
78
|
-
* @param {String} filename
|
|
79
|
-
* @return {Stream}
|
|
80
|
-
*/
|
|
81
|
-
addTarball(name: string, filename: string): UploadTarball;
|
|
82
|
-
/**
|
|
83
|
-
* Get a tarball.
|
|
84
|
-
* @param {*} name
|
|
85
|
-
* @param {*} filename
|
|
86
|
-
* @return {ReadTarball}
|
|
87
|
-
*/
|
|
88
|
-
getTarball(name: string, filename: string): ReadTarball;
|
|
89
|
-
/**
|
|
90
|
-
* Return a stream that emits a read failure.
|
|
91
|
-
* @private
|
|
92
|
-
* @return {ReadTarball}
|
|
93
|
-
*/
|
|
94
|
-
private _createFailureStreamResponse;
|
|
95
|
-
/**
|
|
96
|
-
* Return a stream that emits the tarball data
|
|
97
|
-
* @param {Object} storage
|
|
98
|
-
* @param {String} filename
|
|
99
|
-
* @private
|
|
100
|
-
* @return {ReadTarball}
|
|
101
|
-
*/
|
|
102
|
-
private _streamSuccessReadTarBall;
|
|
103
|
-
/**
|
|
104
|
-
* Retrieve a package by name.
|
|
105
|
-
* @param {*} name
|
|
106
|
-
* @param {*} callback
|
|
107
|
-
* @return {Function}
|
|
108
|
-
*/
|
|
109
|
-
getPackageMetadata(name: string, callback?: Callback): void;
|
|
110
|
-
getPackageMetadataAsync(name: string): Promise<Manifest>;
|
|
111
|
-
updateVersionsAsync(name: string, packageInfo: Manifest): Promise<Manifest>;
|
|
112
|
-
/**
|
|
113
|
-
* Search a local package.
|
|
114
|
-
* @param {*} startKey
|
|
115
|
-
* @param {*} options
|
|
116
|
-
* @return {Function}
|
|
117
|
-
*/
|
|
118
|
-
search(startKey: string, options: any): ReadTarball;
|
|
119
|
-
/**
|
|
120
|
-
* Retrieve a wrapper that provide access to the package location.
|
|
121
|
-
* @param {Object} pkgName package name.
|
|
122
|
-
* @return {Object}
|
|
123
|
-
*/
|
|
124
|
-
private _getLocalStorage;
|
|
125
|
-
/**
|
|
126
|
-
* Read a json file from storage.
|
|
127
|
-
* @param {Object} storage
|
|
128
|
-
* @param {Function} callback
|
|
129
|
-
*/
|
|
130
|
-
private _readPackage;
|
|
131
|
-
/**
|
|
132
|
-
* Walks through each package and calls `on_package` on them.
|
|
133
|
-
* @param {*} onPackage
|
|
134
|
-
* @param {*} onEnd
|
|
135
|
-
*/
|
|
136
|
-
private _searchEachPackage;
|
|
137
|
-
/**
|
|
138
|
-
* Retrieve either a previous created local package or a boilerplate.
|
|
139
|
-
* @param {*} pkgName
|
|
140
|
-
* @param {*} callback
|
|
141
|
-
* @return {Function}
|
|
142
|
-
*/
|
|
143
|
-
private _readCreatePackage;
|
|
144
|
-
private _createNewPackage;
|
|
145
|
-
/**
|
|
146
|
-
* Handle internal error
|
|
147
|
-
* @param {*} err
|
|
148
|
-
* @param {*} file
|
|
149
|
-
* @param {*} message
|
|
150
|
-
* @return {Object} Error instance
|
|
151
|
-
*/
|
|
152
|
-
private _internalError;
|
|
153
|
-
/**
|
|
154
|
-
* @param {*} name package name
|
|
155
|
-
* @param {*} updateHandler function(package, cb) - update function
|
|
156
|
-
* @param {*} callback callback that gets invoked after it's all updated
|
|
157
|
-
* @return {Function}
|
|
158
|
-
*/
|
|
159
|
-
private _updatePackage;
|
|
160
|
-
/**
|
|
161
|
-
* Update the revision (_rev) string for a package.
|
|
162
|
-
* @param {*} name
|
|
163
|
-
* @param {*} json
|
|
164
|
-
* @param {*} callback
|
|
165
|
-
* @return {Function}
|
|
166
|
-
*/
|
|
167
|
-
private _writePackage;
|
|
168
|
-
private _setDefaultRevision;
|
|
169
|
-
private _deleteAttachments;
|
|
170
|
-
/**
|
|
171
|
-
* Ensure the dist file remains as the same protocol
|
|
172
|
-
* @param {Object} hash metadata
|
|
173
|
-
* @param {String} upLinkKey registry key
|
|
174
|
-
* @private
|
|
175
|
-
*/
|
|
176
|
-
private _updateUplinkToRemoteProtocol;
|
|
177
|
-
getSecret(config: Config): Promise<string>;
|
|
178
|
-
saveToken(token: Token): Promise<any>;
|
|
179
|
-
deleteToken(user: string, tokenKey: string): Promise<any>;
|
|
180
|
-
readTokens(filter: TokenFilter): Promise<Token[]>;
|
|
181
|
-
}
|
|
182
|
-
export default LocalStorage;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { setup as setupModule } from '@verdaccio/logger';
|
|
2
|
-
import { Logger } from '@verdaccio/types';
|
|
3
|
-
declare let logger: Logger;
|
|
4
|
-
type SetupModuleOptions = Parameters<typeof setupModule>[0];
|
|
5
|
-
export declare function setup(options: SetupModuleOptions): void;
|
|
6
|
-
export { logger };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Package } from '@verdaccio/types';
|
|
2
|
-
/**
|
|
3
|
-
* Function gets a local info and an info from uplinks and tries to merge it
|
|
4
|
-
exported for unit tests only.
|
|
5
|
-
* @param {*} local
|
|
6
|
-
* @param {*} up
|
|
7
|
-
* @param {*} config
|
|
8
|
-
* @static
|
|
9
|
-
*/
|
|
10
|
-
export declare function mergeVersions(local: Package, up: Package): void;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ConfigYaml } from '@verdaccio/types';
|
|
2
|
-
/**
|
|
3
|
-
* Exposes a server factory to be instantiated programmatically.
|
|
4
|
-
*
|
|
5
|
-
const app = await runServer(); // default configuration
|
|
6
|
-
const app = await runServer('./config/config.yaml');
|
|
7
|
-
const app = await runServer({ configuration });
|
|
8
|
-
app.listen(4000, (event) => {
|
|
9
|
-
// do something
|
|
10
|
-
});
|
|
11
|
-
* @param config
|
|
12
|
-
*/
|
|
13
|
-
export declare function runServer(config?: string | ConfigYaml, options?: {
|
|
14
|
-
listenArg?: string;
|
|
15
|
-
}): Promise<any>;
|
|
16
|
-
/**
|
|
17
|
-
* Return a native HTTP/HTTPS server instance
|
|
18
|
-
* @param config
|
|
19
|
-
* @param addr
|
|
20
|
-
* @param app
|
|
21
|
-
*/
|
|
22
|
-
export declare function createServerFactory(config: ConfigYaml, addr: any, app: any): any;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { AbbreviatedManifest, Manifest, Version } from '@verdaccio/types';
|
|
2
|
-
import LocalStorage from './local-storage';
|
|
3
|
-
export declare function generatePackageTemplate(name: string): Manifest;
|
|
4
|
-
/**
|
|
5
|
-
* Normalize package properties, tags, revision id.
|
|
6
|
-
* @param {Object} pkg package reference.
|
|
7
|
-
*/
|
|
8
|
-
export declare function normalizePackage(pkg: Manifest): Manifest;
|
|
9
|
-
export declare function generateRevision(rev: string): string;
|
|
10
|
-
export declare function getLatestReadme(pkg: Manifest): string;
|
|
11
|
-
export declare function cleanUpReadme(version: Version): Version;
|
|
12
|
-
export declare const WHITELIST: string[];
|
|
13
|
-
export declare function cleanUpLinksRef(keepUpLinkData: boolean, result: Manifest): Manifest;
|
|
14
|
-
/**
|
|
15
|
-
* Check whether a package it is already a local package
|
|
16
|
-
* @param {*} name
|
|
17
|
-
* @param {*} localStorage
|
|
18
|
-
*/
|
|
19
|
-
export declare function checkPackageLocal(name: string, localStorage: LocalStorage): Promise<void>;
|
|
20
|
-
export declare function publishPackage(name: string, metadata: any, localStorage: LocalStorage): Promise<void>;
|
|
21
|
-
export declare function checkPackageRemote(name: string, isAllowPublishOffline: boolean, syncMetadata: any): Promise<void>;
|
|
22
|
-
export declare function mergeUplinkTimeIntoLocal(cacheManifest: Manifest, remoteManifest: Manifest): any;
|
|
23
|
-
export declare function prepareSearchPackage(data: Manifest, time: unknown): any;
|
|
24
|
-
/**
|
|
25
|
-
* Check whether the package metadta has enough data to be published
|
|
26
|
-
* @param pkg metadata
|
|
27
|
-
*/
|
|
28
|
-
export declare function isPublishablePackage(pkg: Manifest): boolean;
|
|
29
|
-
export declare function hasInstallScript(version: Version): boolean;
|
|
30
|
-
export declare function convertAbbreviatedManifest(manifest: Manifest): AbbreviatedManifest;
|