@spences10/pi-lsp 0.0.4 → 0.0.6
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 +8 -5
- package/dist/env.js +6 -45
- package/dist/env.js.map +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
# @spences10/pi-lsp
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/@spences10/pi-lsp)
|
|
4
|
+
[](https://viteplus.dev)
|
|
5
|
+
[](https://vitest.dev)
|
|
5
6
|
|
|
6
|
-
Pi extension that exposes Language Server Protocol diagnostics
|
|
7
|
-
|
|
7
|
+
Pi extension that exposes Language Server Protocol diagnostics, hover,
|
|
8
|
+
definitions, references, and document symbols to the model.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
Maintained in the `my-pi` Vite+ workspace and tested with Vitest.
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
10
13
|
|
|
11
14
|
```bash
|
|
12
15
|
pi install npm:@spences10/pi-lsp
|
package/dist/env.js
CHANGED
|
@@ -1,48 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
'CI',
|
|
3
|
-
'COLORTERM',
|
|
4
|
-
'FORCE_COLOR',
|
|
5
|
-
'HOME',
|
|
6
|
-
'LANG',
|
|
7
|
-
'LOGNAME',
|
|
8
|
-
'NO_COLOR',
|
|
9
|
-
'PATH',
|
|
10
|
-
'SHELL',
|
|
11
|
-
'TEMP',
|
|
12
|
-
'TERM',
|
|
13
|
-
'TMP',
|
|
14
|
-
'TMPDIR',
|
|
15
|
-
'USER',
|
|
16
|
-
]);
|
|
17
|
-
const EXTRA_ENV_ALLOWLIST_KEYS = [
|
|
18
|
-
'MY_PI_CHILD_ENV_ALLOWLIST',
|
|
19
|
-
'MY_PI_LSP_ENV_ALLOWLIST',
|
|
20
|
-
];
|
|
1
|
+
import { create_child_process_env as create_shared_child_process_env } from '@spences10/pi-child-env';
|
|
21
2
|
export function create_child_process_env(explicit_env = {}, source_env = process.env) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
for (const allowlist_key of EXTRA_ENV_ALLOWLIST_KEYS) {
|
|
29
|
-
for (const key of parse_env_allowlist(source_env[allowlist_key])) {
|
|
30
|
-
allowed_keys.add(key);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
for (const key of allowed_keys) {
|
|
34
|
-
const value = source_env[key];
|
|
35
|
-
if (typeof value === 'string')
|
|
36
|
-
env[key] = value;
|
|
37
|
-
}
|
|
38
|
-
return { ...env, ...explicit_env };
|
|
39
|
-
}
|
|
40
|
-
function parse_env_allowlist(value) {
|
|
41
|
-
if (!value)
|
|
42
|
-
return [];
|
|
43
|
-
return value
|
|
44
|
-
.split(',')
|
|
45
|
-
.map((key) => key.trim())
|
|
46
|
-
.filter(Boolean);
|
|
3
|
+
return create_shared_child_process_env({
|
|
4
|
+
profile: 'lsp',
|
|
5
|
+
explicit_env,
|
|
6
|
+
source_env,
|
|
7
|
+
});
|
|
47
8
|
}
|
|
48
9
|
//# sourceMappingURL=env.js.map
|
package/dist/env.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.js","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,IAAI,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAEtG,MAAM,UAAU,wBAAwB,CACvC,eAAuC,EAAE,EACzC,aAAgC,OAAO,CAAC,GAAG;IAE3C,OAAO,+BAA+B,CAAC;QACtC,OAAO,EAAE,KAAK;QACd,YAAY;QACZ,UAAU;KACV,CAAC,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spences10/pi-lsp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "Pi extension that exposes Language Server Protocol diagnostics, hover, definition, and reference tools",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"language-server",
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@mariozechner/pi-coding-agent": "^0.70.6",
|
|
36
|
-
"typebox": "^1.1.34"
|
|
36
|
+
"typebox": "^1.1.34",
|
|
37
|
+
"@spences10/pi-child-env": "0.1.1"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
39
40
|
"@types/node": "^25.6.0",
|
|
@@ -51,6 +52,6 @@
|
|
|
51
52
|
"scripts": {
|
|
52
53
|
"build": "tsc -p tsconfig.build.json",
|
|
53
54
|
"check": "tsc --noEmit -p tsconfig.json",
|
|
54
|
-
"test": "vitest run"
|
|
55
|
+
"test": "pnpm --filter @spences10/pi-child-env run build && vitest run"
|
|
55
56
|
}
|
|
56
57
|
}
|