which-webstorm 3.2.1 → 4.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/.gitattributes +0 -20
- package/README.md +2 -2
- package/bin/bin.js +5 -0
- package/bin/webstorm.js +25 -27
- package/output/cjs-shim.js +7 -0
- package/output/cjs-shim.js.map +1 -0
- package/output/main.js +2905 -0
- package/output/main.js.map +1 -0
- package/output/main.test.js +170 -0
- package/output/main.test.js.map +1 -0
- package/output/output/main.js +83 -0
- package/output/output/main.js.map +1 -0
- package/output/source/main.test.js +171 -0
- package/output/source/main.test.js.map +1 -0
- package/output/tsconfig.tsbuildinfo +1 -0
- package/package.json +50 -27
- package/.editorconfig +0 -28
- package/.github/workflows/qa.yml +0 -31
- package/.nyc_output/8b602563-2e0c-41d6-8ab7-f19f1e50f226.json +0 -1
- package/.nyc_output/d4c50289-7d1d-4075-a67e-aec2b3e247e5.json +0 -1
- package/.nyc_output/processinfo/8b602563-2e0c-41d6-8ab7-f19f1e50f226.json +0 -1
- package/.nyc_output/processinfo/d4c50289-7d1d-4075-a67e-aec2b3e247e5.json +0 -1
- package/.nyc_output/processinfo/index.json +0 -1
- package/.prettierignore +0 -4
- package/.prettierrc.json +0 -1
- package/.vscode/settings.json +0 -6
- package/index.d.ts +0 -27
- package/index.js +0 -108
- package/renovate.json +0 -21
- package/test/test.js +0 -193
package/.gitattributes
CHANGED
|
@@ -4,23 +4,3 @@
|
|
|
4
4
|
# Windows CMD does not like LF in batch files
|
|
5
5
|
*.bat text eol=crlf
|
|
6
6
|
*.cmd text eol=crlf
|
|
7
|
-
|
|
8
|
-
# Visual Studio solutions like to switch to CRLF at times
|
|
9
|
-
*.sln text eol=crlf
|
|
10
|
-
|
|
11
|
-
*.ai binary
|
|
12
|
-
*.aiff binary
|
|
13
|
-
*.dll binary
|
|
14
|
-
*.eot binary
|
|
15
|
-
*.exe binary
|
|
16
|
-
*.jar binary
|
|
17
|
-
*.jpg binary
|
|
18
|
-
*.mp3 binary
|
|
19
|
-
*.o binary
|
|
20
|
-
*.pdf binary
|
|
21
|
-
*.png binary
|
|
22
|
-
*.psd binary
|
|
23
|
-
*.so binary
|
|
24
|
-
*.ttf binary
|
|
25
|
-
*.winmd binary
|
|
26
|
-
*.zip binary
|
package/README.md
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Finds WebStorm
|
|
4
4
|
|
|
5
|
-
[](https://github.com/oliversalzburg/which-webstorm/actions/workflows/test.yml)
|
|
6
6
|
|
|
7
7
|
## Usage
|
|
8
8
|
|
|
9
9
|
### As a module
|
|
10
10
|
|
|
11
11
|
```js
|
|
12
|
-
|
|
12
|
+
import whichWebstorm from "which-webstorm";
|
|
13
13
|
console.log(await whichWebstorm()); // prints path to WebStorm binary
|
|
14
14
|
console.log(whichWebstorm.sync()); // prints path to WebStorm binary
|
|
15
15
|
```
|
package/bin/bin.js
ADDED
package/bin/webstorm.js
CHANGED
|
@@ -1,34 +1,32 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import { execa } from "execa";
|
|
4
|
+
import { statSync } from "node:fs";
|
|
5
|
+
import { resolve } from "node:path";
|
|
6
|
+
import { WebStormLocator } from "../output/main.js";
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
const path = require("path");
|
|
8
|
-
const whichWebstorm = require("..");
|
|
8
|
+
new WebStormLocator().findWebstormAsync().then(webstorm => {
|
|
9
|
+
const args = process.argv.splice(2);
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
if (args.length) {
|
|
12
|
+
return Promise.all(
|
|
13
|
+
args.map(arg => {
|
|
14
|
+
// Attempt to construct absolute path.
|
|
15
|
+
// This ensures that WebStorm doesn't try to resolve paths relative to
|
|
16
|
+
// the location where the webstorm binary is located.
|
|
17
|
+
const fullPath = resolve(arg);
|
|
18
|
+
if (statSync(fullPath)) {
|
|
19
|
+
arg = fullPath;
|
|
20
|
+
}
|
|
12
21
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const fullPath = path.resolve(arg);
|
|
20
|
-
if (fs.statSync(fullPath)) {
|
|
21
|
-
arg = fullPath;
|
|
22
|
-
}
|
|
22
|
+
return execa(webstorm, [arg], {
|
|
23
|
+
cwd: process.cwd(),
|
|
24
|
+
});
|
|
25
|
+
}),
|
|
26
|
+
);
|
|
27
|
+
}
|
|
23
28
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
})
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return execa(webstorm, {
|
|
32
|
-
cwd: process.cwd(),
|
|
33
|
-
});
|
|
29
|
+
return execa(webstorm, {
|
|
30
|
+
cwd: process.cwd(),
|
|
31
|
+
});
|
|
34
32
|
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import url from "node:url";
|
|
4
|
+
globalThis.require = createRequire(import.meta.url);
|
|
5
|
+
globalThis.__filename = url.fileURLToPath(import.meta.url);
|
|
6
|
+
globalThis.__dirname = path.dirname(__filename);
|
|
7
|
+
//# sourceMappingURL=cjs-shim.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cjs-shim.js","sourceRoot":"","sources":["../source/cjs-shim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,GAAG,MAAM,UAAU,CAAC;AAE3B,UAAU,CAAC,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACpD,UAAU,CAAC,UAAU,GAAG,GAAG,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC3D,UAAU,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC"}
|