@code-fixer-23/pi-session-manager 1.0.5 → 1.1.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/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@code-fixer-23/pi-session-manager",
3
3
  "type": "module",
4
- "version": "1.0.5",
4
+ "version": "1.1.0",
5
5
  "keywords": [
6
6
  "pi-package"
7
7
  ],
8
8
  "devDependencies": {
9
- "typescript": "latest",
9
+ "typescript": "~6.0.3",
10
10
  "vitest": "latest"
11
11
  },
12
12
  "private": false,
@@ -25,6 +25,7 @@
25
25
  "url": "https://github.com/louiss0/pi-packages/issues"
26
26
  },
27
27
  "dependencies": {
28
+ "@juanibiapina/pi-extension-settings": "^0.9.1",
28
29
  "valibot": "^1.4"
29
30
  },
30
31
  "peerDependencies": {
package/tsconfig.json CHANGED
@@ -21,7 +21,12 @@
21
21
  "noFallthroughCasesInSwitch": true,
22
22
  "noImplicitReturns": true,
23
23
  "noImplicitThis": true,
24
+ "paths": {
25
+ "@juanibiapina/pi-extension-settings": [
26
+ "./types/pi-extension-settings.d.ts"
27
+ ]
28
+ },
24
29
  "types": ["vitest/globals", "node"]
25
30
  },
26
- "include": ["extensions/**/*.ts"]
31
+ "include": ["extensions/**/*.ts", "types/**/*.d.ts"]
27
32
  }
@@ -0,0 +1,40 @@
1
+ // Type surface for @juanibiapina/pi-extension-settings.
2
+ //
3
+ // The package ships raw TS sources that don't compile under this workspace's
4
+ // strict compiler flags, so tsconfig maps the module here for typechecking.
5
+ // At runtime the real package is loaded from node_modules.
6
+ declare module "@juanibiapina/pi-extension-settings" {
7
+ export interface OrderedListOption {
8
+ id: string;
9
+ label: string;
10
+ }
11
+
12
+ export interface SettingDefinition {
13
+ id: string;
14
+ label: string;
15
+ description?: string;
16
+ defaultValue: string;
17
+ values?: string[];
18
+ options?: OrderedListOption[];
19
+ }
20
+
21
+ export interface SettingStorageOptions {
22
+ scope?: "global" | "local";
23
+ cwd?: string;
24
+ agentDir?: string;
25
+ }
26
+
27
+ export function getSetting(
28
+ extensionName: string,
29
+ settingId: string,
30
+ defaultValue?: string,
31
+ options?: SettingStorageOptions,
32
+ ): string | undefined;
33
+
34
+ export function setSetting(
35
+ extensionName: string,
36
+ settingId: string,
37
+ value: string,
38
+ options?: SettingStorageOptions,
39
+ ): void;
40
+ }