@code-fixer-23/pi-session-manager 1.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/CHANGELOG.md +26 -0
- package/LICENSE +21 -0
- package/README.md +76 -0
- package/assets/Pi-Session-Manager-Small.png +0 -0
- package/assets/Pi-Session_Mangager-Big.png +0 -0
- package/extensions/index.test.ts +1042 -0
- package/extensions/index.ts +966 -0
- package/package.json +37 -0
- package/project.json +64 -0
- package/scripts/create-extension.ts +18 -0
- package/tsconfig.json +27 -0
- package/vitest.config.ts +30 -0
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@code-fixer-23/pi-session-manager",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"pi-package"
|
|
7
|
+
],
|
|
8
|
+
"devDependencies": {
|
|
9
|
+
"typescript": "latest",
|
|
10
|
+
"vitest": "latest"
|
|
11
|
+
},
|
|
12
|
+
"private": false,
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public"
|
|
15
|
+
},
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"description": "Pi package scaffold for pi-session-manager",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "https://github.com/louiss0/pi-packages",
|
|
21
|
+
"directory": "pi-session-manager"
|
|
22
|
+
},
|
|
23
|
+
"homepage": "https://github.com/louiss0/pi-packages",
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://github.com/louiss0/pi-packages/issues"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"valibot": "^1.4"
|
|
29
|
+
},
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"@earendil-works/pi-coding-agent": "*",
|
|
32
|
+
"@earendil-works/pi-tui": "*"
|
|
33
|
+
},
|
|
34
|
+
"pi": {
|
|
35
|
+
"image": "https://raw.githubusercontent.com/louiss0/pi-packages/main/pi-session-manager/assets/Pi-Session-Manager-Small.png"
|
|
36
|
+
}
|
|
37
|
+
}
|
package/project.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pi-session-manager",
|
|
3
|
+
"$schema": "../node_modules/nx/schemas/project-schema.json",
|
|
4
|
+
"projectType": "library",
|
|
5
|
+
"root": "pi-session-manager",
|
|
6
|
+
"sourceRoot": "pi-session-manager/extensions",
|
|
7
|
+
"targets": {
|
|
8
|
+
"typecheck": {
|
|
9
|
+
"executor": "nx:run-commands",
|
|
10
|
+
"options": {
|
|
11
|
+
"command": "tsc -p tsconfig.json --noEmit",
|
|
12
|
+
"cwd": "{projectRoot}"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"test": {
|
|
16
|
+
"executor": "nx:run-commands",
|
|
17
|
+
"options": {
|
|
18
|
+
"command": "pnpm exec vitest run --config vitest.config.ts --passWithNoTests",
|
|
19
|
+
"cwd": "{projectRoot}"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"lint": {
|
|
23
|
+
"executor": "@nx/eslint:lint",
|
|
24
|
+
"options": {
|
|
25
|
+
"lintFilePatterns": [
|
|
26
|
+
"{projectRoot}/**/*.ts",
|
|
27
|
+
"{projectRoot}/**/*.js",
|
|
28
|
+
"{projectRoot}/**/*.mts",
|
|
29
|
+
"{projectRoot}/**/*.mjs",
|
|
30
|
+
"{projectRoot}/**/*.cts",
|
|
31
|
+
"{projectRoot}/**/*.cjs"
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"check": {
|
|
36
|
+
"executor": "nx:run-commands",
|
|
37
|
+
"options": {
|
|
38
|
+
"command": "pnpm exec biome format --config-path biome.json {projectRoot}",
|
|
39
|
+
"cwd": "{workspaceRoot}"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"format": {
|
|
43
|
+
"executor": "nx:run-commands",
|
|
44
|
+
"options": {
|
|
45
|
+
"command": "pnpm exec biome format --write --config-path biome.json {projectRoot}",
|
|
46
|
+
"cwd": "{workspaceRoot}"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"metadata": {
|
|
50
|
+
"executor": "nx:run-commands",
|
|
51
|
+
"options": {
|
|
52
|
+
"command": "node tools/validate-package-metadata.mjs {projectRoot}"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"make-extension": {
|
|
56
|
+
"executor": "nx:run-commands",
|
|
57
|
+
"options": {
|
|
58
|
+
"command": "pnpm exec tsx ./scripts/create-extension.ts",
|
|
59
|
+
"cwd": "{projectRoot}"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"tags": ["npm:public", "project:extension", "status:supported"]
|
|
64
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { dirname, join } from "node:path";
|
|
2
|
+
import { mkdirSync, writeFileSync } from "node:fs";
|
|
3
|
+
|
|
4
|
+
const extensionPath = process.argv[2];
|
|
5
|
+
|
|
6
|
+
if (!extensionPath) {
|
|
7
|
+
throw new Error(
|
|
8
|
+
"Provide an extension path. Example: pnpm create:extension auth/index.ts",
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const file = join("extensions", extensionPath);
|
|
13
|
+
|
|
14
|
+
mkdirSync(dirname(file), { recursive: true });
|
|
15
|
+
writeFileSync(
|
|
16
|
+
file,
|
|
17
|
+
'\n import { type ExtensionAPI } from "@earendil-works/pi-coding-agent";\n export default function (pi:ExtensionAPI) {\n\n }',
|
|
18
|
+
);
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "Bundler",
|
|
6
|
+
"strict": true,
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"declaration": true,
|
|
9
|
+
"declarationMap": true,
|
|
10
|
+
"sourceMap": true,
|
|
11
|
+
"verbatimModuleSyntax": true,
|
|
12
|
+
"isolatedModules": true,
|
|
13
|
+
"skipLibCheck": true,
|
|
14
|
+
"noUncheckedIndexedAccess": true,
|
|
15
|
+
"exactOptionalPropertyTypes": true,
|
|
16
|
+
"resolveJsonModule": true,
|
|
17
|
+
"forceConsistentCasingInFileNames": true,
|
|
18
|
+
"noImplicitOverride": true,
|
|
19
|
+
"noPropertyAccessFromIndexSignature": true,
|
|
20
|
+
"useUnknownInCatchVariables": true,
|
|
21
|
+
"noFallthroughCasesInSwitch": true,
|
|
22
|
+
"noImplicitReturns": true,
|
|
23
|
+
"noImplicitThis": true,
|
|
24
|
+
"types": ["vitest/globals", "node"]
|
|
25
|
+
},
|
|
26
|
+
"include": ["extensions/**/*.ts"]
|
|
27
|
+
}
|
package/vitest.config.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// vitest.config.ts
|
|
2
|
+
import { defineConfig } from "vitest/config";
|
|
3
|
+
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
test: {
|
|
6
|
+
environment: "node",
|
|
7
|
+
|
|
8
|
+
include: ["extensions/**/*.test.ts"],
|
|
9
|
+
|
|
10
|
+
exclude: ["node_modules", "dist", ".idea", ".git"],
|
|
11
|
+
|
|
12
|
+
globals: true,
|
|
13
|
+
|
|
14
|
+
clearMocks: true,
|
|
15
|
+
restoreMocks: true,
|
|
16
|
+
mockReset: true,
|
|
17
|
+
|
|
18
|
+
watch: false,
|
|
19
|
+
|
|
20
|
+
coverage: {
|
|
21
|
+
provider: "v8",
|
|
22
|
+
|
|
23
|
+
reporter: ["text", "html"],
|
|
24
|
+
|
|
25
|
+
include: ["extensions/**/*.ts"],
|
|
26
|
+
|
|
27
|
+
exclude: ["extensions/**/*.test.ts", "extensions/**/*.d.ts"],
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
});
|