@nexiq/cli 1.0.1

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.
@@ -0,0 +1,33 @@
1
+ import js from "@eslint/js";
2
+ import globals from "globals";
3
+ import tseslint from "typescript-eslint";
4
+ import { defineConfig, globalIgnores } from "eslint/config";
5
+
6
+ export default defineConfig([
7
+ globalIgnores(["dist", "coverage"]),
8
+ {
9
+ extends: [js.configs.recommended, ...tseslint.configs.recommended],
10
+ files: ["**/*.{ts,tsx}"],
11
+ languageOptions: {
12
+ ecmaVersion: 2020,
13
+ globals: globals.node,
14
+ parserOptions: {
15
+ projectService: true,
16
+ tsconfigRootDir: import.meta.dirname,
17
+ },
18
+ },
19
+ rules: {
20
+ "@typescript-eslint/no-unused-vars": [
21
+ "error",
22
+ {
23
+ argsIgnorePattern: "^_",
24
+ varsIgnorePattern: "^_",
25
+ caughtErrorsIgnorePattern: "^_",
26
+ },
27
+ ],
28
+ "@typescript-eslint/switch-exhaustiveness-check": "error",
29
+ "no-debugger": "warn",
30
+ "@typescript-eslint/no-explicit-any": "error",
31
+ },
32
+ },
33
+ ]);
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@nexiq/cli",
3
+ "version": "1.0.1",
4
+ "description": "Short and powerful React component dependency analysis",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "publishConfig": {
9
+ "registry": "https://registry.npmjs.org/",
10
+ "access": "public"
11
+ },
12
+ "dependencies": {
13
+ "@modelcontextprotocol/sdk": "^1.26.0",
14
+ "@parcel/watcher": "^2.5.6",
15
+ "better-sqlite3": "^12.6.2",
16
+ "fast-glob": "^3.3.3",
17
+ "js-yaml": "^4.1.1",
18
+ "minimatch": "^10.2.2",
19
+ "simple-git": "^3.30.0",
20
+ "tmp": "^0.2.5",
21
+ "ws": "^8.19.0",
22
+ "@nexiq/extension-sdk": "1.0.1",
23
+ "@nexiq/analyser": "1.0.1",
24
+ "@nexiq/shared": "1.0.1"
25
+ },
26
+ "devDependencies": {
27
+ "@eslint/js": "^9.39.1",
28
+ "@types/better-sqlite3": "^7.6.13",
29
+ "@types/js-yaml": "^4.0.9",
30
+ "@types/node": "^25.2.3",
31
+ "@types/tmp": "^0.2.6",
32
+ "@types/ws": "^8.18.1",
33
+ "@vitest/coverage-istanbul": "^4.0.18",
34
+ "@vitest/coverage-v8": "3.2.4",
35
+ "eslint": "^9.39.1",
36
+ "globals": "^16.5.0",
37
+ "nodemon": "^3.1.14",
38
+ "tsup": "^8.5.1",
39
+ "typescript": "^5.9.3",
40
+ "typescript-eslint": "^8.46.4",
41
+ "vitest": "^3.0.5"
42
+ },
43
+ "scripts": {
44
+ "build": "tsup src/index.ts --format esm --clean --dts",
45
+ "dev": "nodemon --watch src --ext ts --exec \"tsup src/index.ts --onSuccess 'node dist/index.js'\"",
46
+ "start": "node dist/index.js",
47
+ "test": "vitest run",
48
+ "lint": "eslint .",
49
+ "type-check": "tsc --noEmit"
50
+ }
51
+ }
package/src/index.ts ADDED
@@ -0,0 +1,32 @@
1
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
2
+ import { ProjectManager } from "./projectManager.js";
3
+ import { BackendServer } from "./server.js";
4
+
5
+ export { ProjectManager, BackendServer };
6
+
7
+ // If this file is run directly (e.g., pnpm start)
8
+ if (import.meta.url === `file://${process.argv[1]}`) {
9
+ const projectManager = new ProjectManager();
10
+ const server = new BackendServer(projectManager);
11
+
12
+ const main = async () => {
13
+ const transport = new StdioServerTransport();
14
+ server.startWebSocketServer();
15
+ await server.startMcpServer(transport);
16
+ };
17
+
18
+ main().catch((error: unknown) => {
19
+ console.error("Fatal error in main():", error);
20
+ process.exit(1);
21
+ });
22
+
23
+ process.on("SIGINT", async () => {
24
+ await projectManager.closeAll();
25
+ process.exit(0);
26
+ });
27
+
28
+ process.on("SIGTERM", async () => {
29
+ await projectManager.closeAll();
30
+ process.exit(0);
31
+ });
32
+ }