@pnpm/plugin-commands-store 5.1.46 → 6.0.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/lib/store.js +13 -13
- package/lib/store.js.map +1 -1
- package/lib/storeAdd.d.ts +1 -1
- package/lib/storeAdd.js +11 -36
- package/lib/storeAdd.js.map +1 -1
- package/lib/storePrune.d.ts +1 -1
- package/lib/storePrune.js +3 -2
- package/lib/storePrune.js.map +1 -1
- package/lib/storeStatus/extendStoreStatusOptions.d.ts +1 -2
- package/lib/storeStatus/extendStoreStatusOptions.js +6 -27
- package/lib/storeStatus/extendStoreStatusOptions.js.map +1 -1
- package/lib/storeStatus/index.d.ts +1 -1
- package/lib/storeStatus/index.js +5 -4
- package/lib/storeStatus/index.js.map +1 -1
- package/package.json +17 -17
package/lib/store.js
CHANGED
|
@@ -6,15 +6,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.handler = exports.help = exports.commandNames = exports.cliOptionsTypes = exports.rcOptionsTypes = void 0;
|
|
7
7
|
const cli_utils_1 = require("@pnpm/cli-utils");
|
|
8
8
|
const config_1 = require("@pnpm/config");
|
|
9
|
-
const error_1 =
|
|
10
|
-
const logger_1 =
|
|
9
|
+
const error_1 = require("@pnpm/error");
|
|
10
|
+
const logger_1 = require("@pnpm/logger");
|
|
11
11
|
const store_connection_manager_1 = require("@pnpm/store-connection-manager");
|
|
12
|
-
const store_path_1 =
|
|
12
|
+
const store_path_1 = require("@pnpm/store-path");
|
|
13
13
|
const pick_1 = __importDefault(require("ramda/src/pick"));
|
|
14
14
|
const render_help_1 = __importDefault(require("render-help"));
|
|
15
|
-
const storeAdd_1 =
|
|
16
|
-
const storePrune_1 =
|
|
17
|
-
const storeStatus_1 =
|
|
15
|
+
const storeAdd_1 = require("./storeAdd");
|
|
16
|
+
const storePrune_1 = require("./storePrune");
|
|
17
|
+
const storeStatus_1 = require("./storeStatus");
|
|
18
18
|
exports.rcOptionsTypes = cliOptionsTypes;
|
|
19
19
|
function cliOptionsTypes() {
|
|
20
20
|
return (0, pick_1.default)([
|
|
@@ -61,7 +61,7 @@ Visit the documentation for more information on unreferenced packages and why th
|
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
exports.help = help;
|
|
64
|
-
class StoreStatusError extends error_1.
|
|
64
|
+
class StoreStatusError extends error_1.PnpmError {
|
|
65
65
|
constructor(modified) {
|
|
66
66
|
super('MODIFIED_DEPENDENCY', '');
|
|
67
67
|
this.modified = modified;
|
|
@@ -73,7 +73,7 @@ async function handler(opts, params) {
|
|
|
73
73
|
case 'status':
|
|
74
74
|
return statusCmd(opts);
|
|
75
75
|
case 'path':
|
|
76
|
-
return (0, store_path_1.
|
|
76
|
+
return (0, store_path_1.getStorePath)({
|
|
77
77
|
pkgRoot: opts.dir,
|
|
78
78
|
storePath: opts.storeDir,
|
|
79
79
|
pnpmHomeDir: opts.pnpmHomeDir,
|
|
@@ -84,11 +84,11 @@ async function handler(opts, params) {
|
|
|
84
84
|
storeController: store.ctrl,
|
|
85
85
|
storeDir: store.dir,
|
|
86
86
|
});
|
|
87
|
-
return (0, storePrune_1.
|
|
87
|
+
return (0, storePrune_1.storePrune)(storePruneOptions);
|
|
88
88
|
}
|
|
89
89
|
case 'add':
|
|
90
90
|
store = await (0, store_connection_manager_1.createOrConnectStoreController)(opts);
|
|
91
|
-
return (0, storeAdd_1.
|
|
91
|
+
return (0, storeAdd_1.storeAdd)(params.slice(1), {
|
|
92
92
|
prefix: opts.dir,
|
|
93
93
|
registries: opts.registries,
|
|
94
94
|
reporter: opts.reporter,
|
|
@@ -101,15 +101,15 @@ async function handler(opts, params) {
|
|
|
101
101
|
}
|
|
102
102
|
exports.handler = handler;
|
|
103
103
|
async function statusCmd(opts) {
|
|
104
|
-
const modifiedPkgs = await (0, storeStatus_1.
|
|
105
|
-
storeDir: await (0, store_path_1.
|
|
104
|
+
const modifiedPkgs = await (0, storeStatus_1.storeStatus)(Object.assign(opts, {
|
|
105
|
+
storeDir: await (0, store_path_1.getStorePath)({
|
|
106
106
|
pkgRoot: opts.dir,
|
|
107
107
|
storePath: opts.storeDir,
|
|
108
108
|
pnpmHomeDir: opts.pnpmHomeDir,
|
|
109
109
|
}),
|
|
110
110
|
}));
|
|
111
111
|
if (!modifiedPkgs || (modifiedPkgs.length === 0)) {
|
|
112
|
-
logger_1.
|
|
112
|
+
logger_1.logger.info({
|
|
113
113
|
message: 'Packages in the store are untouched',
|
|
114
114
|
prefix: opts.dir,
|
|
115
115
|
});
|
package/lib/store.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAyC;AACzC,yCAAwD;AACxD,
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAyC;AACzC,yCAAwD;AACxD,uCAAuC;AACvC,yCAA8C;AAC9C,6EAA6G;AAC7G,iDAA+C;AAC/C,0DAAiC;AACjC,8DAAoC;AACpC,yCAAqC;AACrC,6CAAyC;AACzC,+CAA2C;AAE9B,QAAA,cAAc,GAAG,eAAe,CAAA;AAE7C,SAAgB,eAAe;IAC7B,OAAO,IAAA,cAAI,EAAC;QACV,UAAU;QACV,OAAO;QACP,WAAW;KACZ,EAAE,cAAQ,CAAC,CAAA;AACd,CAAC;AAND,0CAMC;AAEY,QAAA,YAAY,GAAG,CAAC,OAAO,CAAC,CAAA;AAErC,SAAgB,IAAI;IAClB,OAAO,IAAA,qBAAU,EAAC;QAChB,WAAW,EAAE,6EAA6E;QAC1F,gBAAgB,EAAE;YAChB;gBACE,KAAK,EAAE,UAAU;gBAEjB,IAAI,EAAE;oBACJ;wBACE,WAAW,EAAE;;iGAEwE;wBACrF,IAAI,EAAE,QAAQ;qBACf;oBACD;wBACE,WAAW,EAAE,oFAAoF;wBACjG,IAAI,EAAE,cAAc;qBAC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M,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;gBAC/B,MAAM,EAAE,IAAI,CAAC,GAAG;gBAChB,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,eAAe,EAAE,KAAK,CAAC,IAAI;gBAC3B,GAAG,EAAE,IAAI,CAAC,GAAG;aACd,CAAC,CAAA;QACJ;YACE,OAAO,IAAI,EAAE,CAAA;KACd;AACH,CAAC;AA/BD,0BA+BC;AAED,KAAK,UAAU,SAAS,CAAE,IAAyB;IACjD,MAAM,YAAY,GAAG,MAAM,IAAA,yBAAW,EAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE;QACzD,QAAQ,EAAE,MAAM,IAAA,yBAAY,EAAC;YAC3B,OAAO,EAAE,IAAI,CAAC,GAAG;YACjB,SAAS,EAAE,IAAI,CAAC,QAAQ;YACxB,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAC;KACH,CAAC,CAAC,CAAA;IACH,IAAI,CAAC,YAAY,IAAI,CAAC,YAAY,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE;QAChD,eAAM,CAAC,IAAI,CAAC;YACV,OAAO,EAAE,qCAAqC;YAC9C,MAAM,EAAE,IAAI,CAAC,GAAG;SACjB,CAAC,CAAA;QACF,OAAM;KACP;IAED,MAAM,IAAI,gBAAgB,CAAC,YAAY,CAAC,CAAA;AAC1C,CAAC"}
|
package/lib/storeAdd.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoreController } from '@pnpm/store-controller-types';
|
|
2
2
|
import { Registries } from '@pnpm/types';
|
|
3
3
|
import { ReporterFunction } from './types';
|
|
4
|
-
export
|
|
4
|
+
export declare function storeAdd(fuzzyDeps: string[], opts: {
|
|
5
5
|
prefix?: string;
|
|
6
6
|
registries?: Registries;
|
|
7
7
|
reporter?: ReporterFunction;
|
package/lib/storeAdd.js
CHANGED
|
@@ -1,41 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
|
|
3
|
+
exports.storeAdd = void 0;
|
|
4
|
+
const error_1 = require("@pnpm/error");
|
|
5
|
+
const logger_1 = require("@pnpm/logger");
|
|
6
|
+
const parse_wanted_dependency_1 = require("@pnpm/parse-wanted-dependency");
|
|
7
|
+
const pick_registry_for_package_1 = require("@pnpm/pick-registry-for-package");
|
|
8
|
+
async function storeAdd(fuzzyDeps, opts) {
|
|
34
9
|
const reporter = opts?.reporter;
|
|
35
10
|
if ((reporter != null) && typeof reporter === 'function') {
|
|
36
11
|
logger_1.streamParser.on('data', reporter);
|
|
37
12
|
}
|
|
38
|
-
const deps = fuzzyDeps.map((dep) => (0, parse_wanted_dependency_1.
|
|
13
|
+
const deps = fuzzyDeps.map((dep) => (0, parse_wanted_dependency_1.parseWantedDependency)(dep));
|
|
39
14
|
let hasFailures = false;
|
|
40
15
|
const prefix = opts.prefix ?? process.cwd();
|
|
41
16
|
const registries = opts.registries ?? {
|
|
@@ -48,22 +23,22 @@ async function default_1(fuzzyDeps, opts) {
|
|
|
48
23
|
lockfileDir: prefix,
|
|
49
24
|
preferredVersions: {},
|
|
50
25
|
projectDir: prefix,
|
|
51
|
-
registry: (dep.alias && (0, pick_registry_for_package_1.
|
|
26
|
+
registry: (dep.alias && (0, pick_registry_for_package_1.pickRegistryForPackage)(registries, dep.alias)) ?? registries.default,
|
|
52
27
|
});
|
|
53
28
|
await pkgResponse.files();
|
|
54
29
|
(0, logger_1.globalInfo)(`+ ${pkgResponse.body.id}`);
|
|
55
30
|
}
|
|
56
31
|
catch (e) { // eslint-disable-line
|
|
57
32
|
hasFailures = true;
|
|
58
|
-
(0, logger_1.
|
|
33
|
+
(0, logger_1.logger)('store').error(e);
|
|
59
34
|
}
|
|
60
35
|
}));
|
|
61
36
|
if ((reporter != null) && typeof reporter === 'function') {
|
|
62
37
|
logger_1.streamParser.removeListener('data', reporter);
|
|
63
38
|
}
|
|
64
39
|
if (hasFailures) {
|
|
65
|
-
throw new error_1.
|
|
40
|
+
throw new error_1.PnpmError('STORE_ADD_FAILURE', 'Some packages have not been added correctly');
|
|
66
41
|
}
|
|
67
42
|
}
|
|
68
|
-
exports.
|
|
43
|
+
exports.storeAdd = storeAdd;
|
|
69
44
|
//# sourceMappingURL=storeAdd.js.map
|
package/lib/storeAdd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storeAdd.js","sourceRoot":"","sources":["../src/storeAdd.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"storeAdd.js","sourceRoot":"","sources":["../src/storeAdd.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,yCAA+D;AAC/D,2EAAqE;AACrE,+EAAwE;AAKjE,KAAK,UAAU,QAAQ,CAC5B,SAAmB,EACnB,IAMC;IAED,MAAM,QAAQ,GAAG,IAAI,EAAE,QAAQ,CAAA;IAC/B,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;QACxD,qBAAY,CAAC,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;KAClC;IAED,MAAM,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,+CAAqB,EAAC,GAAG,CAAC,CAAC,CAAA;IAE/D,IAAI,WAAW,GAAG,KAAK,CAAA;IACvB,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,OAAO,CAAC,GAAG,EAAE,CAAA;IAC3C,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI;QACpC,OAAO,EAAE,6BAA6B;KACvC,CAAA;IACD,MAAM,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QACvC,IAAI;YACF,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,GAAG,EAAE;gBACjE,gBAAgB,EAAE,CAAC;gBACnB,WAAW,EAAE,MAAM;gBACnB,iBAAiB,EAAE,EAAE;gBACrB,UAAU,EAAE,MAAM;gBAClB,QAAQ,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,IAAA,kDAAsB,EAAC,UAAU,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,UAAU,CAAC,OAAO;aAC7F,CAAC,CAAA;YACF,MAAM,WAAW,CAAC,KAAM,EAAE,CAAA;YAC1B,IAAA,mBAAU,EAAC,KAAK,WAAW,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAA;SACvC;QAAC,OAAO,CAAM,EAAE,EAAE,sBAAsB;YACvC,WAAW,GAAG,IAAI,CAAA;YAClB,IAAA,eAAM,EAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;SACzB;IACH,CAAC,CAAC,CAAC,CAAA;IAEH,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;QACxD,qBAAY,CAAC,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;KAC9C;IAED,IAAI,WAAW,EAAE;QACf,MAAM,IAAI,iBAAS,CAAC,mBAAmB,EAAE,6CAA6C,CAAC,CAAA;KACxF;AACH,CAAC;AA9CD,4BA8CC"}
|
package/lib/storePrune.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StoreController } from '@pnpm/store-controller-types';
|
|
2
2
|
import { ReporterFunction } from './types';
|
|
3
|
-
export
|
|
3
|
+
export declare function storePrune(opts: {
|
|
4
4
|
reporter?: ReporterFunction;
|
|
5
5
|
storeController: StoreController;
|
|
6
6
|
}): Promise<void>;
|
package/lib/storePrune.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.storePrune = void 0;
|
|
3
4
|
const logger_1 = require("@pnpm/logger");
|
|
4
|
-
async function
|
|
5
|
+
async function storePrune(opts) {
|
|
5
6
|
const reporter = opts?.reporter;
|
|
6
7
|
if ((reporter != null) && typeof reporter === 'function') {
|
|
7
8
|
logger_1.streamParser.on('data', reporter);
|
|
@@ -12,5 +13,5 @@ async function default_1(opts) {
|
|
|
12
13
|
logger_1.streamParser.removeListener('data', reporter);
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
|
-
exports.
|
|
16
|
+
exports.storePrune = storePrune;
|
|
16
17
|
//# sourceMappingURL=storePrune.js.map
|
package/lib/storePrune.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storePrune.js","sourceRoot":"","sources":["../src/storePrune.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"storePrune.js","sourceRoot":"","sources":["../src/storePrune.ts"],"names":[],"mappings":";;;AAAA,yCAA2C;AAIpC,KAAK,UAAU,UAAU,CAC9B,IAGC;IAED,MAAM,QAAQ,GAAG,IAAI,EAAE,QAAQ,CAAA;IAC/B,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;QACxD,qBAAY,CAAC,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;KAClC;IACD,MAAM,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAA;IAClC,MAAM,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAA;IAElC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;QACxD,qBAAY,CAAC,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;KAC9C;AACH,CAAC;AAhBD,gCAgBC"}
|
|
@@ -17,5 +17,4 @@ export interface StrictStoreStatusOptions {
|
|
|
17
17
|
binsDir: string;
|
|
18
18
|
}
|
|
19
19
|
export declare type StoreStatusOptions = Partial<StrictStoreStatusOptions> & Pick<StrictStoreStatusOptions, 'storeDir'>;
|
|
20
|
-
declare
|
|
21
|
-
export default _default;
|
|
20
|
+
export declare function extendStoreStatusOptions(opts: StoreStatusOptions): Promise<StrictStoreStatusOptions>;
|
|
@@ -1,33 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
4
|
};
|
|
28
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.extendStoreStatusOptions = void 0;
|
|
29
7
|
const path_1 = __importDefault(require("path"));
|
|
30
|
-
const normalize_registries_1 =
|
|
8
|
+
const normalize_registries_1 = require("@pnpm/normalize-registries");
|
|
31
9
|
const defaults = async (opts) => {
|
|
32
10
|
const dir = opts.dir ?? process.cwd();
|
|
33
11
|
const lockfileDir = opts.lockfileDir ?? dir;
|
|
@@ -44,7 +22,7 @@ const defaults = async (opts) => {
|
|
|
44
22
|
useLockfile: true,
|
|
45
23
|
};
|
|
46
24
|
};
|
|
47
|
-
|
|
25
|
+
async function extendStoreStatusOptions(opts) {
|
|
48
26
|
if (opts) {
|
|
49
27
|
for (const key in opts) {
|
|
50
28
|
if (opts[key] === undefined) {
|
|
@@ -54,7 +32,8 @@ exports.default = async (opts) => {
|
|
|
54
32
|
}
|
|
55
33
|
const defaultOpts = await defaults(opts);
|
|
56
34
|
const extendedOpts = { ...defaultOpts, ...opts, storeDir: defaultOpts.storeDir };
|
|
57
|
-
extendedOpts.registries = (0, normalize_registries_1.
|
|
35
|
+
extendedOpts.registries = (0, normalize_registries_1.normalizeRegistries)(extendedOpts.registries);
|
|
58
36
|
return extendedOpts;
|
|
59
|
-
}
|
|
37
|
+
}
|
|
38
|
+
exports.extendStoreStatusOptions = extendStoreStatusOptions;
|
|
60
39
|
//# sourceMappingURL=extendStoreStatusOptions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extendStoreStatusOptions.js","sourceRoot":"","sources":["../../src/storeStatus/extendStoreStatusOptions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"extendStoreStatusOptions.js","sourceRoot":"","sources":["../../src/storeStatus/extendStoreStatusOptions.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAuB;AACvB,qEAAoF;AAyBpF,MAAM,QAAQ,GAAG,KAAK,EAAE,IAAwB,EAAE,EAAE;IAClD,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAA;IACrC,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,IAAI,GAAG,CAAA;IAC3C,OAAO;QACL,OAAO,EAAE,cAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,EAAE,MAAM,CAAC;QAC/C,GAAG;QACH,KAAK,EAAE,KAAK;QACZ,mBAAmB,EAAE,KAAK;QAC1B,WAAW;QACX,UAAU,EAAE,UAAU;QACtB,UAAU,EAAE,yCAAkB;QAC9B,eAAe,EAAE,KAAK;QACtB,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,WAAW,EAAE,IAAI;KACU,CAAA;AAC/B,CAAC,CAAA;AAEM,KAAK,UAAU,wBAAwB,CAC5C,IAAwB;IAExB,IAAI,IAAI,EAAE;QACR,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;YACtB,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE;gBAC3B,OAAO,IAAI,CAAC,GAAG,CAAC,CAAA;aACjB;SACF;KACF;IACD,MAAM,WAAW,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,CAAA;IACxC,MAAM,YAAY,GAAG,EAAE,GAAG,WAAW,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,WAAW,CAAC,QAAQ,EAAE,CAAA;IAChF,YAAY,CAAC,UAAU,GAAG,IAAA,0CAAmB,EAAC,YAAY,CAAC,UAAU,CAAC,CAAA;IACtE,OAAO,YAAY,CAAA;AACrB,CAAC;AAdD,4DAcC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { StoreStatusOptions } from './extendStoreStatusOptions';
|
|
2
|
-
export
|
|
2
|
+
export declare function storeStatus(maybeOpts: StoreStatusOptions): Promise<string[]>;
|
package/lib/storeStatus/index.js
CHANGED
|
@@ -26,6 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.storeStatus = void 0;
|
|
29
30
|
const path_1 = __importDefault(require("path"));
|
|
30
31
|
const cafs_1 = require("@pnpm/cafs");
|
|
31
32
|
const get_context_1 = require("@pnpm/get-context");
|
|
@@ -35,13 +36,13 @@ const dp = __importStar(require("dependency-path"));
|
|
|
35
36
|
const dint_1 = __importDefault(require("dint"));
|
|
36
37
|
const load_json_file_1 = __importDefault(require("load-json-file"));
|
|
37
38
|
const p_filter_1 = __importDefault(require("p-filter"));
|
|
38
|
-
const extendStoreStatusOptions_1 =
|
|
39
|
-
async function
|
|
39
|
+
const extendStoreStatusOptions_1 = require("./extendStoreStatusOptions");
|
|
40
|
+
async function storeStatus(maybeOpts) {
|
|
40
41
|
const reporter = maybeOpts?.reporter;
|
|
41
42
|
if ((reporter != null) && typeof reporter === 'function') {
|
|
42
43
|
logger_1.streamParser.on('data', reporter);
|
|
43
44
|
}
|
|
44
|
-
const opts = await (0, extendStoreStatusOptions_1.
|
|
45
|
+
const opts = await (0, extendStoreStatusOptions_1.extendStoreStatusOptions)(maybeOpts);
|
|
45
46
|
const { registries, storeDir, skipped, virtualStoreDir, wantedLockfile, } = await (0, get_context_1.getContextForSingleImporter)({}, {
|
|
46
47
|
...opts,
|
|
47
48
|
extraBinPaths: [], // ctx.extraBinPaths is not needed, so this is fine
|
|
@@ -74,5 +75,5 @@ async function default_1(maybeOpts) {
|
|
|
74
75
|
}
|
|
75
76
|
return modified.map(({ pkgPath }) => pkgPath);
|
|
76
77
|
}
|
|
77
|
-
exports.
|
|
78
|
+
exports.storeStatus = storeStatus;
|
|
78
79
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/storeStatus/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/storeStatus/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAuB;AACvB,qCAAiE;AACjE,mDAA+D;AAC/D,yDAG6B;AAC7B,yCAA2C;AAC3C,oDAAqC;AACrC,gDAAuB;AACvB,oEAAyC;AACzC,wDAA8B;AAC9B,yEAGmC;AAE5B,KAAK,UAAU,WAAW,CAAE,SAA6B;IAC9D,MAAM,QAAQ,GAAG,SAAS,EAAE,QAAQ,CAAA;IACpC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;QACxD,qBAAY,CAAC,EAAE,CAAC,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C,CAAC,IAAA,wBAAiB,EAAC,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC;YAChD,CAAC,CAAC,cAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,iBAAiB,CAAC,EAAE,CAAC,EAAE,gBAAgB,CAAC,CAAA;QACnE,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAA,wBAAY,EAAoB,gBAAgB,CAAC,CAAA;QACzE,OAAO,CAAC,MAAM,cAAI,CAAC,KAAK,CAAC,cAAI,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,cAAc,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC,KAAK,KAAK,CAAA;IAC7H,CAAC,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC,CAAA;IAEtB,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;QACxD,qBAAY,CAAC,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;KAC9C;IAED,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,CAAA;AAC/C,CAAC;AA9CD,kCA8CC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/plugin-commands-store",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "Commands for controlling the store",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
},
|
|
24
24
|
"homepage": "https://github.com/pnpm/pnpm/blob/main/packages/plugin-commands-store#readme",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@pnpm/assert-store": "1.0.
|
|
27
|
-
"@pnpm/lockfile-file": "
|
|
28
|
-
"@pnpm/plugin-commands-store": "
|
|
29
|
-
"@pnpm/prepare": "0.0.
|
|
30
|
-
"@pnpm/registry-mock": "3.
|
|
26
|
+
"@pnpm/assert-store": "1.0.49",
|
|
27
|
+
"@pnpm/lockfile-file": "6.0.0",
|
|
28
|
+
"@pnpm/plugin-commands-store": "6.0.0",
|
|
29
|
+
"@pnpm/prepare": "0.0.55",
|
|
30
|
+
"@pnpm/registry-mock": "3.1.0",
|
|
31
31
|
"@types/archy": "0.0.32",
|
|
32
32
|
"@types/ramda": "0.28.15",
|
|
33
33
|
"@types/ssri": "^7.1.1",
|
|
@@ -38,18 +38,18 @@
|
|
|
38
38
|
"tempy": "^1.0.1"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@pnpm/cafs": "
|
|
42
|
-
"@pnpm/cli-utils": "0.
|
|
43
|
-
"@pnpm/config": "
|
|
44
|
-
"@pnpm/error": "
|
|
45
|
-
"@pnpm/get-context": "
|
|
41
|
+
"@pnpm/cafs": "5.0.0",
|
|
42
|
+
"@pnpm/cli-utils": "1.0.0",
|
|
43
|
+
"@pnpm/config": "16.0.0",
|
|
44
|
+
"@pnpm/error": "4.0.0",
|
|
45
|
+
"@pnpm/get-context": "8.0.0",
|
|
46
46
|
"@pnpm/lockfile-utils": "4.2.6",
|
|
47
|
-
"@pnpm/normalize-registries": "
|
|
48
|
-
"@pnpm/parse-wanted-dependency": "
|
|
49
|
-
"@pnpm/pick-registry-for-package": "
|
|
50
|
-
"@pnpm/store-connection-manager": "
|
|
47
|
+
"@pnpm/normalize-registries": "4.0.0",
|
|
48
|
+
"@pnpm/parse-wanted-dependency": "4.0.0",
|
|
49
|
+
"@pnpm/pick-registry-for-package": "4.0.0",
|
|
50
|
+
"@pnpm/store-connection-manager": "5.0.0",
|
|
51
51
|
"@pnpm/store-controller-types": "14.1.3",
|
|
52
|
-
"@pnpm/store-path": "
|
|
52
|
+
"@pnpm/store-path": "7.0.0",
|
|
53
53
|
"@pnpm/types": "8.7.0",
|
|
54
54
|
"archy": "^1.0.0",
|
|
55
55
|
"dependency-path": "9.2.6",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"render-help": "^1.0.2"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@pnpm/logger": "^
|
|
63
|
+
"@pnpm/logger": "^5.0.0"
|
|
64
64
|
},
|
|
65
65
|
"funding": "https://opencollective.com/pnpm",
|
|
66
66
|
"exports": {
|