@pnpm/mount-modules 0.2.0 → 0.2.3
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/README.md +2 -2
- package/lib/cli.js +10 -1
- package/lib/cli.js.map +1 -1
- package/package.json +10 -8
package/README.md
CHANGED
|
@@ -24,12 +24,12 @@ Once the packages are in the store, run:
|
|
|
24
24
|
mount-modules
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
If something goes wrong and the modules directory will be not accessible,
|
|
27
|
+
If something goes wrong and the modules directory will be not accessible, unmount it using:
|
|
28
28
|
|
|
29
29
|
```
|
|
30
30
|
unmount <path to node_modules>
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
## License
|
|
33
|
+
## License
|
|
34
34
|
|
|
35
35
|
MIT
|
package/lib/cli.js
CHANGED
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const config_1 = __importDefault(require("@pnpm/config"));
|
|
6
7
|
const fs_1 = require("fs");
|
|
7
8
|
const path_1 = __importDefault(require("path"));
|
|
8
9
|
const store_path_1 = __importDefault(require("@pnpm/store-path"));
|
|
@@ -11,7 +12,15 @@ const createFuseHandlers_1 = __importDefault(require("./createFuseHandlers"));
|
|
|
11
12
|
(async () => {
|
|
12
13
|
const mnt = path_1.default.join(process.cwd(), 'node_modules');
|
|
13
14
|
await fs_1.promises.mkdir(mnt, { recursive: true });
|
|
14
|
-
const
|
|
15
|
+
const { config } = await (0, config_1.default)({
|
|
16
|
+
cliOptions: {},
|
|
17
|
+
packageManager: { name: '', version: '' },
|
|
18
|
+
});
|
|
19
|
+
const cafsDir = path_1.default.join(await (0, store_path_1.default)({
|
|
20
|
+
pkgRoot: process.cwd(),
|
|
21
|
+
storePath: config.storeDir,
|
|
22
|
+
pnpmHomeDir: config.pnpmHomeDir,
|
|
23
|
+
}), 'files');
|
|
15
24
|
const fuse = new fuse_native_1.default(mnt, await (0, createFuseHandlers_1.default)(process.cwd(), cafsDir), { debug: true });
|
|
16
25
|
fuse.mount(function (err) {
|
|
17
26
|
if (err != null)
|
package/lib/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;;;AAAA,2BAAmC;AACnC,gDAAuB;AAEvB,kEAA2C;AAC3C,8DAA8B;AAC9B,8EAAqD;AACrD,CAAC,KAAK,IAAI,EAAE;IACV,MAAM,GAAG,GAAG,cAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC,CAAA;IACpD,MAAM,aAAE,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IACxC,MAAM,OAAO,GAAG,cAAI,CAAC,IAAI,CAAC,MAAM,IAAA,oBAAY,EAAC,OAAO,CAAC,GAAG,EAAE,CAAC,EAAE,OAAO,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;;;AAAA,0DAAoC;AACpC,2BAAmC;AACnC,gDAAuB;AAEvB,kEAA2C;AAC3C,8DAA8B;AAC9B,8EAAqD;AACrD,CAAC,KAAK,IAAI,EAAE;IACV,MAAM,GAAG,GAAG,cAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC,CAAA;IACpD,MAAM,aAAE,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IACxC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,IAAA,gBAAS,EAAC;QACjC,UAAU,EAAE,EAAE;QACd,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;KAC1C,CAAC,CAAA;IACF,MAAM,OAAO,GAAG,cAAI,CAAC,IAAI,CAAC,MAAM,IAAA,oBAAY,EAAC;QAC3C,OAAO,EAAE,OAAO,CAAC,GAAG,EAAE;QACtB,SAAS,EAAE,MAAM,CAAC,QAAQ;QAC1B,WAAW,EAAE,MAAM,CAAC,WAAW;KAChC,CAAC,EAAE,OAAO,CAAC,CAAA;IACZ,MAAM,IAAI,GAAG,IAAI,qBAAI,CAAC,GAAG,EAAE,MAAM,IAAA,4BAAkB,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;IAC7F,IAAI,CAAC,KAAK,CAAC,UAAU,GAAW;QAC9B,IAAI,GAAG,IAAI,IAAI;YAAE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACrC,CAAC,CAAC,CAAA;IAEF,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE;QACrB,IAAI,CAAC,OAAO,CAAC,CAAC,GAAW,EAAE,EAAE;YAC3B,IAAI,GAAG,IAAI,IAAI,EAAE;gBACf,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,CAAC,GAAa,gBAAgB,EAAE,GAAG,CAAC,CAAA;aACtE;iBAAM;gBACL,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,CAAC,GAAa,YAAY,CAAC,CAAA;aAC7D;QACH,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/mount-modules",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Mounts a node_modules directory with FUSE",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"bin": "bin/mount-modules.js",
|
|
@@ -30,16 +30,18 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@pnpm/logger": "^4.0.0",
|
|
33
|
-
"@pnpm/mount-modules": "0.2.
|
|
33
|
+
"@pnpm/mount-modules": "0.2.3",
|
|
34
|
+
"@types/normalize-path": "^3.0.0",
|
|
34
35
|
"rimraf": "^3.0.2"
|
|
35
36
|
},
|
|
36
37
|
"dependencies": {
|
|
37
|
-
"@pnpm/cafs": "4.0.
|
|
38
|
-
"@pnpm/
|
|
39
|
-
"@pnpm/lockfile-
|
|
40
|
-
"@pnpm/
|
|
41
|
-
"@pnpm/
|
|
42
|
-
"
|
|
38
|
+
"@pnpm/cafs": "4.0.1",
|
|
39
|
+
"@pnpm/config": "15.1.1",
|
|
40
|
+
"@pnpm/lockfile-file": "5.0.2",
|
|
41
|
+
"@pnpm/lockfile-utils": "4.0.2",
|
|
42
|
+
"@pnpm/store-path": "6.0.0",
|
|
43
|
+
"@pnpm/types": "8.0.1",
|
|
44
|
+
"dependency-path": "9.1.1",
|
|
43
45
|
"hyperdrive-schemas": "^2.0.0",
|
|
44
46
|
"load-json-file": "^6.2.0",
|
|
45
47
|
"normalize-path": "^3.0.0"
|