@spences10/pi-lsp 0.0.3 → 0.0.5

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 CHANGED
@@ -1,12 +1,15 @@
1
1
  # @spences10/pi-lsp
2
2
 
3
- [![built with vite+](https://img.shields.io/badge/built%20with-Vite+-646CFF?logo=vite&logoColor=white)](https://viteplus.dev)
4
- [![tested with vitest](https://img.shields.io/badge/tested%20with-Vitest-6E9F18?logo=vitest&logoColor=white)](https://vitest.dev)
3
+ [![npm version](https://img.shields.io/npm/v/@spences10/pi-lsp?color=CB3837&logo=npm)](https://www.npmjs.com/package/@spences10/pi-lsp)
4
+ [![built with Vite+](https://img.shields.io/badge/built%20with-Vite+-646CFF?logo=vite&logoColor=white)](https://viteplus.dev)
5
+ [![tested with Vitest](https://img.shields.io/badge/tested%20with-Vitest-6E9F18?logo=vitest&logoColor=white)](https://vitest.dev)
5
6
 
6
- Pi extension that exposes Language Server Protocol diagnostics and
7
- symbol tools to the model.
7
+ Pi extension that exposes Language Server Protocol diagnostics, hover,
8
+ definitions, references, and document symbols to the model.
8
9
 
9
- ## Install
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
- const BASE_CHILD_ENV_KEYS = new Set([
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
- const env = {};
23
- const allowed_keys = new Set(BASE_CHILD_ENV_KEYS);
24
- for (const key of Object.keys(source_env)) {
25
- if (key.startsWith('LC_'))
26
- allowed_keys.add(key);
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,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC;IACnC,IAAI;IACJ,WAAW;IACX,aAAa;IACb,MAAM;IACN,MAAM;IACN,SAAS;IACT,UAAU;IACV,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,KAAK;IACL,QAAQ;IACR,MAAM;CACN,CAAC,CAAC;AAEH,MAAM,wBAAwB,GAAG;IAChC,2BAA2B;IAC3B,yBAAyB;CACzB,CAAC;AAEF,MAAM,UAAU,wBAAwB,CACvC,eAAuC,EAAE,EACzC,aAAgC,OAAO,CAAC,GAAG;IAE3C,MAAM,GAAG,GAAsB,EAAE,CAAC;IAClC,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,mBAAmB,CAAC,CAAC;IAElD,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;QAC3C,IAAI,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC;YAAE,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAClD,CAAC;IACD,KAAK,MAAM,aAAa,IAAI,wBAAwB,EAAE,CAAC;QACtD,KAAK,MAAM,GAAG,IAAI,mBAAmB,CACpC,UAAU,CAAC,aAAa,CAAC,CACzB,EAAE,CAAC;YACH,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACvB,CAAC;IACF,CAAC;IAED,KAAK,MAAM,GAAG,IAAI,YAAY,EAAE,CAAC;QAChC,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;QAC9B,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACjD,CAAC;IAED,OAAO,EAAE,GAAG,GAAG,EAAE,GAAG,YAAY,EAAE,CAAC;AACpC,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAyB;IACrD,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC;IACtB,OAAO,KAAK;SACV,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;SACxB,MAAM,CAAC,OAAO,CAAC,CAAC;AACnB,CAAC"}
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",
3
+ "version": "0.0.5",
4
4
  "description": "Pi extension that exposes Language Server Protocol diagnostics, hover, definition, and reference tools",
5
5
  "keywords": [
6
6
  "language-server",
@@ -32,8 +32,9 @@
32
32
  "access": "public"
33
33
  },
34
34
  "dependencies": {
35
- "@mariozechner/pi-coding-agent": "^0.70.5",
36
- "typebox": "^1.1.33"
35
+ "@mariozechner/pi-coding-agent": "^0.70.6",
36
+ "typebox": "^1.1.34",
37
+ "@spences10/pi-child-env": "0.1.0"
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
  }