@lerna-lite/publish 1.16.1 → 1.16.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/dist/index.d.ts +3 -3
- package/dist/index.js +6 -6
- package/dist/lib/create-temp-licenses.d.ts +7 -7
- package/dist/lib/create-temp-licenses.js +30 -30
- package/dist/lib/fetch-config.d.ts +10 -10
- package/dist/lib/fetch-config.js +19 -19
- package/dist/lib/get-current-sha.d.ts +6 -6
- package/dist/lib/get-current-sha.js +17 -17
- package/dist/lib/get-current-tags.d.ts +8 -8
- package/dist/lib/get-current-tags.js +32 -32
- package/dist/lib/get-npm-username.d.ts +7 -7
- package/dist/lib/get-npm-username.js +52 -52
- package/dist/lib/get-packages-without-license.d.ts +8 -8
- package/dist/lib/get-packages-without-license.js +20 -20
- package/dist/lib/get-packed.d.ts +3 -3
- package/dist/lib/get-packed.js +63 -63
- package/dist/lib/get-profile-data.d.ts +7 -7
- package/dist/lib/get-profile-data.js +20 -20
- package/dist/lib/get-tagged-packages.d.ts +9 -9
- package/dist/lib/get-tagged-packages.js +26 -26
- package/dist/lib/get-two-factor-auth-required.d.ts +7 -7
- package/dist/lib/get-two-factor-auth-required.js +42 -42
- package/dist/lib/get-unpublished-packages.d.ts +8 -8
- package/dist/lib/get-unpublished-packages.js +34 -34
- package/dist/lib/get-whoami.d.ts +11 -11
- package/dist/lib/get-whoami.js +18 -18
- package/dist/lib/git-checkout.d.ts +10 -10
- package/dist/lib/git-checkout.js +18 -18
- package/dist/lib/index.d.ts +19 -19
- package/dist/lib/index.js +22 -22
- package/dist/lib/log-packed.d.ts +5 -5
- package/dist/lib/log-packed.js +70 -70
- package/dist/lib/npm-dist-tag.d.ts +33 -33
- package/dist/lib/npm-dist-tag.js +137 -137
- package/dist/lib/npm-publish.d.ts +11 -11
- package/dist/lib/npm-publish.js +93 -93
- package/dist/lib/override-publish-config.d.ts +6 -6
- package/dist/lib/override-publish-config.js +43 -43
- package/dist/lib/pack-directory.d.ts +9 -9
- package/dist/lib/pack-directory.js +67 -67
- package/dist/lib/remove-temp-licenses.d.ts +6 -6
- package/dist/lib/remove-temp-licenses.js +17 -17
- package/dist/lib/verify-npm-package-access.d.ts +9 -9
- package/dist/lib/verify-npm-package-access.js +53 -53
- package/dist/models/index.d.ts +34 -34
- package/dist/models/index.js +2 -2
- package/dist/publish-command.d.ts +74 -74
- package/dist/publish-command.js +781 -781
- package/package.json +4 -4
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getProfileData = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const npm_registry_fetch_1 = tslib_1.__importDefault(require("npm-registry-fetch"));
|
|
6
|
-
const core_1 = require("@lerna-lite/core");
|
|
7
|
-
/**
|
|
8
|
-
* Retrieve profile data of logged-in user.
|
|
9
|
-
* @param {import("./fetch-config").FetchConfig} opts
|
|
10
|
-
* @returns {Promise<ProfileData>}
|
|
11
|
-
*/
|
|
12
|
-
async function getProfileData(opts) {
|
|
13
|
-
opts.log.verbose('', 'Retrieving npm user profile');
|
|
14
|
-
const data = await (0, core_1.pulseTillDone)(await npm_registry_fetch_1.default.json('/-/npm/v1/user', opts));
|
|
15
|
-
opts.log.silly('npm profile get', 'received %j', data);
|
|
16
|
-
return Object.assign(
|
|
17
|
-
// remap to match legacy whoami format
|
|
18
|
-
{ username: data.name }, data);
|
|
19
|
-
}
|
|
20
|
-
exports.getProfileData = getProfileData;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getProfileData = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const npm_registry_fetch_1 = tslib_1.__importDefault(require("npm-registry-fetch"));
|
|
6
|
+
const core_1 = require("@lerna-lite/core");
|
|
7
|
+
/**
|
|
8
|
+
* Retrieve profile data of logged-in user.
|
|
9
|
+
* @param {import("./fetch-config").FetchConfig} opts
|
|
10
|
+
* @returns {Promise<ProfileData>}
|
|
11
|
+
*/
|
|
12
|
+
async function getProfileData(opts) {
|
|
13
|
+
opts.log.verbose('', 'Retrieving npm user profile');
|
|
14
|
+
const data = await (0, core_1.pulseTillDone)(await npm_registry_fetch_1.default.json('/-/npm/v1/user', opts));
|
|
15
|
+
opts.log.silly('npm profile get', 'received %j', data);
|
|
16
|
+
return Object.assign(
|
|
17
|
+
// remap to match legacy whoami format
|
|
18
|
+
{ username: data.name }, data);
|
|
19
|
+
}
|
|
20
|
+
exports.getProfileData = getProfileData;
|
|
21
21
|
//# sourceMappingURL=get-profile-data.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ExecOpts, PackageGraph } from '@lerna-lite/core';
|
|
2
|
-
/**
|
|
3
|
-
* Retrieve a list of graph nodes for packages that were tagged in a non-independent release.
|
|
4
|
-
* @param {import("@lerna/package-graph").PackageGraph} packageGraph
|
|
5
|
-
* @param {string} rootPath
|
|
6
|
-
* @param {import("@lerna/child-process").ExecOpts} execOpts
|
|
7
|
-
* @returns {Promise<import("@lerna/package-graph").PackageGraphNode[]>}
|
|
8
|
-
*/
|
|
9
|
-
export declare function getTaggedPackages(packageGraph: PackageGraph, rootPath: string, execOpts: ExecOpts, dryRun?: boolean): Promise<import("@lerna-lite/core").PackageGraphNode[]>;
|
|
1
|
+
import { ExecOpts, PackageGraph } from '@lerna-lite/core';
|
|
2
|
+
/**
|
|
3
|
+
* Retrieve a list of graph nodes for packages that were tagged in a non-independent release.
|
|
4
|
+
* @param {import("@lerna/package-graph").PackageGraph} packageGraph
|
|
5
|
+
* @param {string} rootPath
|
|
6
|
+
* @param {import("@lerna/child-process").ExecOpts} execOpts
|
|
7
|
+
* @returns {Promise<import("@lerna/package-graph").PackageGraphNode[]>}
|
|
8
|
+
*/
|
|
9
|
+
export declare function getTaggedPackages(packageGraph: PackageGraph, rootPath: string, execOpts: ExecOpts, dryRun?: boolean): Promise<import("@lerna-lite/core").PackageGraphNode[]>;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getTaggedPackages = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
|
-
const npmlog_1 = tslib_1.__importDefault(require("npmlog"));
|
|
7
|
-
const core_1 = require("@lerna-lite/core");
|
|
8
|
-
/**
|
|
9
|
-
* Retrieve a list of graph nodes for packages that were tagged in a non-independent release.
|
|
10
|
-
* @param {import("@lerna/package-graph").PackageGraph} packageGraph
|
|
11
|
-
* @param {string} rootPath
|
|
12
|
-
* @param {import("@lerna/child-process").ExecOpts} execOpts
|
|
13
|
-
* @returns {Promise<import("@lerna/package-graph").PackageGraphNode[]>}
|
|
14
|
-
*/
|
|
15
|
-
function getTaggedPackages(packageGraph, rootPath, execOpts, dryRun = false) {
|
|
16
|
-
npmlog_1.default.silly('getTaggedPackages', '');
|
|
17
|
-
// @see https://stackoverflow.com/a/424142/5707
|
|
18
|
-
// FIXME: --root is only necessary for tests :P
|
|
19
|
-
return (0, core_1.exec)('git', ['diff-tree', '--name-only', '--no-commit-id', '--root', '-r', '-c', 'HEAD'], execOpts, dryRun).then(({ stdout }) => {
|
|
20
|
-
const manifests = stdout.split('\n').filter((fp) => path_1.default.basename(fp) === 'package.json');
|
|
21
|
-
const locations = new Set(manifests.map((fp) => path_1.default.join(rootPath, path_1.default.dirname(fp))));
|
|
22
|
-
// @ts-ignore
|
|
23
|
-
return Array.from(packageGraph.values()).filter((node) => locations.has(node.location));
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
exports.getTaggedPackages = getTaggedPackages;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTaggedPackages = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
|
+
const npmlog_1 = tslib_1.__importDefault(require("npmlog"));
|
|
7
|
+
const core_1 = require("@lerna-lite/core");
|
|
8
|
+
/**
|
|
9
|
+
* Retrieve a list of graph nodes for packages that were tagged in a non-independent release.
|
|
10
|
+
* @param {import("@lerna/package-graph").PackageGraph} packageGraph
|
|
11
|
+
* @param {string} rootPath
|
|
12
|
+
* @param {import("@lerna/child-process").ExecOpts} execOpts
|
|
13
|
+
* @returns {Promise<import("@lerna/package-graph").PackageGraphNode[]>}
|
|
14
|
+
*/
|
|
15
|
+
function getTaggedPackages(packageGraph, rootPath, execOpts, dryRun = false) {
|
|
16
|
+
npmlog_1.default.silly('getTaggedPackages', '');
|
|
17
|
+
// @see https://stackoverflow.com/a/424142/5707
|
|
18
|
+
// FIXME: --root is only necessary for tests :P
|
|
19
|
+
return (0, core_1.exec)('git', ['diff-tree', '--name-only', '--no-commit-id', '--root', '-r', '-c', 'HEAD'], execOpts, dryRun).then(({ stdout }) => {
|
|
20
|
+
const manifests = stdout.split('\n').filter((fp) => path_1.default.basename(fp) === 'package.json');
|
|
21
|
+
const locations = new Set(manifests.map((fp) => path_1.default.join(rootPath, path_1.default.dirname(fp))));
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
return Array.from(packageGraph.values()).filter((node) => locations.has(node.location));
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
exports.getTaggedPackages = getTaggedPackages;
|
|
27
27
|
//# sourceMappingURL=get-tagged-packages.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FetchConfig } from '@lerna-lite/core';
|
|
2
|
-
/**
|
|
3
|
-
* Determine if the logged-in user has enabled two-factor auth.
|
|
4
|
-
* @param {import('./fetch-config').FetchConfig} options
|
|
5
|
-
* @returns {Promise<boolean>}
|
|
6
|
-
*/
|
|
7
|
-
export declare function getTwoFactorAuthRequired(options?: FetchConfig): Promise<boolean>;
|
|
1
|
+
import { FetchConfig } from '@lerna-lite/core';
|
|
2
|
+
/**
|
|
3
|
+
* Determine if the logged-in user has enabled two-factor auth.
|
|
4
|
+
* @param {import('./fetch-config').FetchConfig} options
|
|
5
|
+
* @returns {Promise<boolean>}
|
|
6
|
+
*/
|
|
7
|
+
export declare function getTwoFactorAuthRequired(options?: FetchConfig): Promise<boolean>;
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getTwoFactorAuthRequired = void 0;
|
|
4
|
-
const core_1 = require("@lerna-lite/core");
|
|
5
|
-
const fetch_config_1 = require("./fetch-config");
|
|
6
|
-
const get_profile_data_1 = require("./get-profile-data");
|
|
7
|
-
/**
|
|
8
|
-
* Determine if the logged-in user has enabled two-factor auth.
|
|
9
|
-
* @param {import('./fetch-config').FetchConfig} options
|
|
10
|
-
* @returns {Promise<boolean>}
|
|
11
|
-
*/
|
|
12
|
-
function getTwoFactorAuthRequired(options) {
|
|
13
|
-
const opts = (0, fetch_config_1.getFetchConfig)(options, {
|
|
14
|
-
// don't wait forever for third-party failures to be dealt with
|
|
15
|
-
fetchRetries: 0,
|
|
16
|
-
});
|
|
17
|
-
opts.log.info('', 'Checking two-factor auth mode');
|
|
18
|
-
return (0, get_profile_data_1.getProfileData)(opts).then(success, failure);
|
|
19
|
-
function success(result) {
|
|
20
|
-
opts.log.silly('2FA', result.tfa.toString());
|
|
21
|
-
if (result.tfa.pending) {
|
|
22
|
-
// if 2FA is pending, it is disabled
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
return result.tfa.mode === 'auth-and-writes';
|
|
26
|
-
}
|
|
27
|
-
function failure(err) {
|
|
28
|
-
// pass if registry does not support profile endpoint
|
|
29
|
-
if (err.code === 'E500' || err.code === 'E404') {
|
|
30
|
-
// most likely a private registry (npm Enterprise, verdaccio, etc)
|
|
31
|
-
opts.log.warn('EREGISTRY', `Registry "${opts.registry}" does not support 'npm profile get', skipping two-factor auth check...`);
|
|
32
|
-
// don't log redundant errors
|
|
33
|
-
return false;
|
|
34
|
-
}
|
|
35
|
-
// Log the error cleanly to stderr
|
|
36
|
-
opts.log.pause();
|
|
37
|
-
console.error(err.message); // eslint-disable-line no-console
|
|
38
|
-
opts.log.resume();
|
|
39
|
-
throw new core_1.ValidationError('ETWOFACTOR', 'Unable to obtain two-factor auth mode');
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.getTwoFactorAuthRequired = getTwoFactorAuthRequired;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTwoFactorAuthRequired = void 0;
|
|
4
|
+
const core_1 = require("@lerna-lite/core");
|
|
5
|
+
const fetch_config_1 = require("./fetch-config");
|
|
6
|
+
const get_profile_data_1 = require("./get-profile-data");
|
|
7
|
+
/**
|
|
8
|
+
* Determine if the logged-in user has enabled two-factor auth.
|
|
9
|
+
* @param {import('./fetch-config').FetchConfig} options
|
|
10
|
+
* @returns {Promise<boolean>}
|
|
11
|
+
*/
|
|
12
|
+
function getTwoFactorAuthRequired(options) {
|
|
13
|
+
const opts = (0, fetch_config_1.getFetchConfig)(options, {
|
|
14
|
+
// don't wait forever for third-party failures to be dealt with
|
|
15
|
+
fetchRetries: 0,
|
|
16
|
+
});
|
|
17
|
+
opts.log.info('', 'Checking two-factor auth mode');
|
|
18
|
+
return (0, get_profile_data_1.getProfileData)(opts).then(success, failure);
|
|
19
|
+
function success(result) {
|
|
20
|
+
opts.log.silly('2FA', result.tfa.toString());
|
|
21
|
+
if (result.tfa.pending) {
|
|
22
|
+
// if 2FA is pending, it is disabled
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
return result.tfa.mode === 'auth-and-writes';
|
|
26
|
+
}
|
|
27
|
+
function failure(err) {
|
|
28
|
+
// pass if registry does not support profile endpoint
|
|
29
|
+
if (err.code === 'E500' || err.code === 'E404') {
|
|
30
|
+
// most likely a private registry (npm Enterprise, verdaccio, etc)
|
|
31
|
+
opts.log.warn('EREGISTRY', `Registry "${opts.registry}" does not support 'npm profile get', skipping two-factor auth check...`);
|
|
32
|
+
// don't log redundant errors
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
// Log the error cleanly to stderr
|
|
36
|
+
opts.log.pause();
|
|
37
|
+
console.error(err.message); // eslint-disable-line no-console
|
|
38
|
+
opts.log.resume();
|
|
39
|
+
throw new core_1.ValidationError('ETWOFACTOR', 'Unable to obtain two-factor auth mode');
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.getTwoFactorAuthRequired = getTwoFactorAuthRequired;
|
|
43
43
|
//# sourceMappingURL=get-two-factor-auth-required.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FetchConfig, PackageGraph, PackageGraphNode } from '@lerna-lite/core';
|
|
2
|
-
/**
|
|
3
|
-
* Retrieve a list of graph nodes for packages that need to be published.
|
|
4
|
-
* @param {import("@lerna/package-graph").PackageGraph} packageGraph
|
|
5
|
-
* @param {import("./fetch-config").FetchConfig} opts
|
|
6
|
-
* @returns {Promise<import("@lerna/package-graph").PackageGraphNode[]>}
|
|
7
|
-
*/
|
|
8
|
-
export declare function getUnpublishedPackages(packageGraph: PackageGraph, opts: FetchConfig): Promise<PackageGraphNode>;
|
|
1
|
+
import { FetchConfig, PackageGraph, PackageGraphNode } from '@lerna-lite/core';
|
|
2
|
+
/**
|
|
3
|
+
* Retrieve a list of graph nodes for packages that need to be published.
|
|
4
|
+
* @param {import("@lerna/package-graph").PackageGraph} packageGraph
|
|
5
|
+
* @param {import("./fetch-config").FetchConfig} opts
|
|
6
|
+
* @returns {Promise<import("@lerna/package-graph").PackageGraphNode[]>}
|
|
7
|
+
*/
|
|
8
|
+
export declare function getUnpublishedPackages(packageGraph: PackageGraph, opts: FetchConfig): Promise<PackageGraphNode>;
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getUnpublishedPackages = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const npmlog_1 = tslib_1.__importDefault(require("npmlog"));
|
|
6
|
-
const p_map_1 = tslib_1.__importDefault(require("p-map"));
|
|
7
|
-
const pacote_1 = tslib_1.__importDefault(require("pacote"));
|
|
8
|
-
/**
|
|
9
|
-
* Retrieve a list of graph nodes for packages that need to be published.
|
|
10
|
-
* @param {import("@lerna/package-graph").PackageGraph} packageGraph
|
|
11
|
-
* @param {import("./fetch-config").FetchConfig} opts
|
|
12
|
-
* @returns {Promise<import("@lerna/package-graph").PackageGraphNode[]>}
|
|
13
|
-
*/
|
|
14
|
-
function getUnpublishedPackages(packageGraph, opts) {
|
|
15
|
-
npmlog_1.default.silly('getUnpublishedPackages', '');
|
|
16
|
-
let chain = Promise.resolve();
|
|
17
|
-
// don't bother attempting to get the packument for private packages
|
|
18
|
-
// @ts-ignore
|
|
19
|
-
const graphNodesToCheck = Array.from(packageGraph.values()).filter(({ pkg }) => !pkg.private);
|
|
20
|
-
const mapper = (pkg) => {
|
|
21
|
-
var _a;
|
|
22
|
-
return pacote_1.default.packument((_a = pkg === null || pkg === void 0 ? void 0 : pkg.name) !== null && _a !== void 0 ? _a : '', opts).then((packument) => {
|
|
23
|
-
if (packument.versions === undefined || packument.versions[pkg.version] === undefined) {
|
|
24
|
-
return pkg;
|
|
25
|
-
}
|
|
26
|
-
}, () => {
|
|
27
|
-
npmlog_1.default.warn('', 'Unable to determine published version, assuming %j unpublished.', pkg.name);
|
|
28
|
-
return pkg;
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
chain = chain.then(() => (0, p_map_1.default)(graphNodesToCheck, mapper, { concurrency: 4 }));
|
|
32
|
-
return chain.then((results) => results.filter(Boolean));
|
|
33
|
-
}
|
|
34
|
-
exports.getUnpublishedPackages = getUnpublishedPackages;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getUnpublishedPackages = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const npmlog_1 = tslib_1.__importDefault(require("npmlog"));
|
|
6
|
+
const p_map_1 = tslib_1.__importDefault(require("p-map"));
|
|
7
|
+
const pacote_1 = tslib_1.__importDefault(require("pacote"));
|
|
8
|
+
/**
|
|
9
|
+
* Retrieve a list of graph nodes for packages that need to be published.
|
|
10
|
+
* @param {import("@lerna/package-graph").PackageGraph} packageGraph
|
|
11
|
+
* @param {import("./fetch-config").FetchConfig} opts
|
|
12
|
+
* @returns {Promise<import("@lerna/package-graph").PackageGraphNode[]>}
|
|
13
|
+
*/
|
|
14
|
+
function getUnpublishedPackages(packageGraph, opts) {
|
|
15
|
+
npmlog_1.default.silly('getUnpublishedPackages', '');
|
|
16
|
+
let chain = Promise.resolve();
|
|
17
|
+
// don't bother attempting to get the packument for private packages
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
const graphNodesToCheck = Array.from(packageGraph.values()).filter(({ pkg }) => !pkg.private);
|
|
20
|
+
const mapper = (pkg) => {
|
|
21
|
+
var _a;
|
|
22
|
+
return pacote_1.default.packument((_a = pkg === null || pkg === void 0 ? void 0 : pkg.name) !== null && _a !== void 0 ? _a : '', opts).then((packument) => {
|
|
23
|
+
if (packument.versions === undefined || packument.versions[pkg.version] === undefined) {
|
|
24
|
+
return pkg;
|
|
25
|
+
}
|
|
26
|
+
}, () => {
|
|
27
|
+
npmlog_1.default.warn('', 'Unable to determine published version, assuming %j unpublished.', pkg.name);
|
|
28
|
+
return pkg;
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
chain = chain.then(() => (0, p_map_1.default)(graphNodesToCheck, mapper, { concurrency: 4 }));
|
|
32
|
+
return chain.then((results) => results.filter(Boolean));
|
|
33
|
+
}
|
|
34
|
+
exports.getUnpublishedPackages = getUnpublishedPackages;
|
|
35
35
|
//# sourceMappingURL=get-unpublished-packages.js.map
|
package/dist/lib/get-whoami.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { FetchConfig } from '@lerna-lite/core';
|
|
2
|
-
interface WhoIAm {
|
|
3
|
-
username: string;
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* Retrieve logged-in user's username via legacy API.
|
|
7
|
-
* @param {import("./fetch-config").FetchConfig} opts
|
|
8
|
-
* @returns {WhoIAm}
|
|
9
|
-
*/
|
|
10
|
-
export declare function getWhoAmI(opts: FetchConfig): Promise<WhoIAm>;
|
|
11
|
-
export {};
|
|
1
|
+
import { FetchConfig } from '@lerna-lite/core';
|
|
2
|
+
interface WhoIAm {
|
|
3
|
+
username: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Retrieve logged-in user's username via legacy API.
|
|
7
|
+
* @param {import("./fetch-config").FetchConfig} opts
|
|
8
|
+
* @returns {WhoIAm}
|
|
9
|
+
*/
|
|
10
|
+
export declare function getWhoAmI(opts: FetchConfig): Promise<WhoIAm>;
|
|
11
|
+
export {};
|
package/dist/lib/get-whoami.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getWhoAmI = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const npm_registry_fetch_1 = tslib_1.__importDefault(require("npm-registry-fetch"));
|
|
6
|
-
const core_1 = require("@lerna-lite/core");
|
|
7
|
-
/**
|
|
8
|
-
* Retrieve logged-in user's username via legacy API.
|
|
9
|
-
* @param {import("./fetch-config").FetchConfig} opts
|
|
10
|
-
* @returns {WhoIAm}
|
|
11
|
-
*/
|
|
12
|
-
async function getWhoAmI(opts) {
|
|
13
|
-
opts.log.verbose('', 'Retrieving npm username');
|
|
14
|
-
const data = (0, core_1.pulseTillDone)(await npm_registry_fetch_1.default.json('/-/whoami', opts));
|
|
15
|
-
opts.log.silly('npm whoami', 'received %j', data);
|
|
16
|
-
return data;
|
|
17
|
-
}
|
|
18
|
-
exports.getWhoAmI = getWhoAmI;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWhoAmI = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const npm_registry_fetch_1 = tslib_1.__importDefault(require("npm-registry-fetch"));
|
|
6
|
+
const core_1 = require("@lerna-lite/core");
|
|
7
|
+
/**
|
|
8
|
+
* Retrieve logged-in user's username via legacy API.
|
|
9
|
+
* @param {import("./fetch-config").FetchConfig} opts
|
|
10
|
+
* @returns {WhoIAm}
|
|
11
|
+
*/
|
|
12
|
+
async function getWhoAmI(opts) {
|
|
13
|
+
opts.log.verbose('', 'Retrieving npm username');
|
|
14
|
+
const data = (0, core_1.pulseTillDone)(await npm_registry_fetch_1.default.json('/-/whoami', opts));
|
|
15
|
+
opts.log.silly('npm whoami', 'received %j', data);
|
|
16
|
+
return data;
|
|
17
|
+
}
|
|
18
|
+
exports.getWhoAmI = getWhoAmI;
|
|
19
19
|
//# sourceMappingURL=get-whoami.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ExecOpts } from '@lerna-lite/core';
|
|
2
|
-
/**
|
|
3
|
-
* Reset files modified by publish steps.
|
|
4
|
-
* @param {string[]} stagedFiles
|
|
5
|
-
* @param {{ granularPathspec: boolean; }} gitOpts
|
|
6
|
-
* @param {import("@lerna/child-process").ExecOpts} execOpts
|
|
7
|
-
*/
|
|
8
|
-
export declare function gitCheckout(stagedFiles: string[], gitOpts: {
|
|
9
|
-
granularPathspec: boolean;
|
|
10
|
-
}, execOpts: ExecOpts, dryRun?: boolean): Promise<any>;
|
|
1
|
+
import { ExecOpts } from '@lerna-lite/core';
|
|
2
|
+
/**
|
|
3
|
+
* Reset files modified by publish steps.
|
|
4
|
+
* @param {string[]} stagedFiles
|
|
5
|
+
* @param {{ granularPathspec: boolean; }} gitOpts
|
|
6
|
+
* @param {import("@lerna/child-process").ExecOpts} execOpts
|
|
7
|
+
*/
|
|
8
|
+
export declare function gitCheckout(stagedFiles: string[], gitOpts: {
|
|
9
|
+
granularPathspec: boolean;
|
|
10
|
+
}, execOpts: ExecOpts, dryRun?: boolean): Promise<any>;
|
package/dist/lib/git-checkout.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.gitCheckout = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const npmlog_1 = tslib_1.__importDefault(require("npmlog"));
|
|
6
|
-
const core_1 = require("@lerna-lite/core");
|
|
7
|
-
/**
|
|
8
|
-
* Reset files modified by publish steps.
|
|
9
|
-
* @param {string[]} stagedFiles
|
|
10
|
-
* @param {{ granularPathspec: boolean; }} gitOpts
|
|
11
|
-
* @param {import("@lerna/child-process").ExecOpts} execOpts
|
|
12
|
-
*/
|
|
13
|
-
function gitCheckout(stagedFiles, gitOpts, execOpts, dryRun = false) {
|
|
14
|
-
const files = (gitOpts.granularPathspec ? stagedFiles : '.');
|
|
15
|
-
npmlog_1.default.silly('gitCheckout', files);
|
|
16
|
-
return (0, core_1.exec)('git', ['checkout', '--'].concat(files), execOpts, dryRun);
|
|
17
|
-
}
|
|
18
|
-
exports.gitCheckout = gitCheckout;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.gitCheckout = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const npmlog_1 = tslib_1.__importDefault(require("npmlog"));
|
|
6
|
+
const core_1 = require("@lerna-lite/core");
|
|
7
|
+
/**
|
|
8
|
+
* Reset files modified by publish steps.
|
|
9
|
+
* @param {string[]} stagedFiles
|
|
10
|
+
* @param {{ granularPathspec: boolean; }} gitOpts
|
|
11
|
+
* @param {import("@lerna/child-process").ExecOpts} execOpts
|
|
12
|
+
*/
|
|
13
|
+
function gitCheckout(stagedFiles, gitOpts, execOpts, dryRun = false) {
|
|
14
|
+
const files = (gitOpts.granularPathspec ? stagedFiles : '.');
|
|
15
|
+
npmlog_1.default.silly('gitCheckout', files);
|
|
16
|
+
return (0, core_1.exec)('git', ['checkout', '--'].concat(files), execOpts, dryRun);
|
|
17
|
+
}
|
|
18
|
+
exports.gitCheckout = gitCheckout;
|
|
19
19
|
//# sourceMappingURL=git-checkout.js.map
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export * from './create-temp-licenses';
|
|
2
|
-
export * from './fetch-config';
|
|
3
|
-
export * from './get-current-sha';
|
|
4
|
-
export * from './get-current-tags';
|
|
5
|
-
export * from './get-npm-username';
|
|
6
|
-
export * from './get-packages-without-license';
|
|
7
|
-
export * from './get-packed';
|
|
8
|
-
export * from './get-profile-data';
|
|
9
|
-
export * from './get-tagged-packages';
|
|
10
|
-
export * from './get-two-factor-auth-required';
|
|
11
|
-
export * from './get-unpublished-packages';
|
|
12
|
-
export * from './get-whoami';
|
|
13
|
-
export * from './git-checkout';
|
|
14
|
-
export * from './log-packed';
|
|
15
|
-
export * from './npm-dist-tag';
|
|
16
|
-
export * from './npm-publish';
|
|
17
|
-
export * from './pack-directory';
|
|
18
|
-
export * from './remove-temp-licenses';
|
|
19
|
-
export * from './verify-npm-package-access';
|
|
1
|
+
export * from './create-temp-licenses';
|
|
2
|
+
export * from './fetch-config';
|
|
3
|
+
export * from './get-current-sha';
|
|
4
|
+
export * from './get-current-tags';
|
|
5
|
+
export * from './get-npm-username';
|
|
6
|
+
export * from './get-packages-without-license';
|
|
7
|
+
export * from './get-packed';
|
|
8
|
+
export * from './get-profile-data';
|
|
9
|
+
export * from './get-tagged-packages';
|
|
10
|
+
export * from './get-two-factor-auth-required';
|
|
11
|
+
export * from './get-unpublished-packages';
|
|
12
|
+
export * from './get-whoami';
|
|
13
|
+
export * from './git-checkout';
|
|
14
|
+
export * from './log-packed';
|
|
15
|
+
export * from './npm-dist-tag';
|
|
16
|
+
export * from './npm-publish';
|
|
17
|
+
export * from './pack-directory';
|
|
18
|
+
export * from './remove-temp-licenses';
|
|
19
|
+
export * from './verify-npm-package-access';
|
package/dist/lib/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./create-temp-licenses"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./fetch-config"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./get-current-sha"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./get-current-tags"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./get-npm-username"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./get-packages-without-license"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("./get-packed"), exports);
|
|
11
|
-
tslib_1.__exportStar(require("./get-profile-data"), exports);
|
|
12
|
-
tslib_1.__exportStar(require("./get-tagged-packages"), exports);
|
|
13
|
-
tslib_1.__exportStar(require("./get-two-factor-auth-required"), exports);
|
|
14
|
-
tslib_1.__exportStar(require("./get-unpublished-packages"), exports);
|
|
15
|
-
tslib_1.__exportStar(require("./get-whoami"), exports);
|
|
16
|
-
tslib_1.__exportStar(require("./git-checkout"), exports);
|
|
17
|
-
tslib_1.__exportStar(require("./log-packed"), exports);
|
|
18
|
-
tslib_1.__exportStar(require("./npm-dist-tag"), exports);
|
|
19
|
-
tslib_1.__exportStar(require("./npm-publish"), exports);
|
|
20
|
-
tslib_1.__exportStar(require("./pack-directory"), exports);
|
|
21
|
-
tslib_1.__exportStar(require("./remove-temp-licenses"), exports);
|
|
22
|
-
tslib_1.__exportStar(require("./verify-npm-package-access"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./create-temp-licenses"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./fetch-config"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./get-current-sha"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./get-current-tags"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./get-npm-username"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./get-packages-without-license"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./get-packed"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./get-profile-data"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./get-tagged-packages"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./get-two-factor-auth-required"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./get-unpublished-packages"), exports);
|
|
15
|
+
tslib_1.__exportStar(require("./get-whoami"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./git-checkout"), exports);
|
|
17
|
+
tslib_1.__exportStar(require("./log-packed"), exports);
|
|
18
|
+
tslib_1.__exportStar(require("./npm-dist-tag"), exports);
|
|
19
|
+
tslib_1.__exportStar(require("./npm-publish"), exports);
|
|
20
|
+
tslib_1.__exportStar(require("./pack-directory"), exports);
|
|
21
|
+
tslib_1.__exportStar(require("./remove-temp-licenses"), exports);
|
|
22
|
+
tslib_1.__exportStar(require("./verify-npm-package-access"), exports);
|
|
23
23
|
//# sourceMappingURL=index.js.map
|
package/dist/lib/log-packed.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Package } from '@lerna-lite/core';
|
|
2
|
-
import { Tarball } from '../models';
|
|
3
|
-
export declare function logPacked(pkg: Package & {
|
|
4
|
-
packed: Tarball;
|
|
5
|
-
}, dryRun?: boolean): void;
|
|
1
|
+
import { Package } from '@lerna-lite/core';
|
|
2
|
+
import { Tarball } from '../models';
|
|
3
|
+
export declare function logPacked(pkg: Package & {
|
|
4
|
+
packed: Tarball;
|
|
5
|
+
}, dryRun?: boolean): void;
|