typeslayer 0.1.2 → 0.1.4

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,6 +1,6 @@
1
1
 
2
2
  <p align="center">
3
- <img src="src/assets/typeslayer-nightmare.png">
3
+ <img src="https://raw.githubusercontent.com/dimitropoulos/typeslayer/main/packages/typeslayer/src/assets/typeslayer-nightmare.png" alt="TypeSlayer">
4
4
  </p>
5
5
 
6
6
  <p align="center">
@@ -30,6 +30,8 @@ in the root package you want to inspect (i.e. colocated to your package.json). T
30
30
  - why isn't this just a CLI tool?
31
31
  - A goal of the project is show intuitive/beautiful interactive visualizations like treemaps and force graphs, inherently not something a terminal can provide.
32
32
  - I don't like CLI tools. I view them as a last resort, at this point in engineering history. If you're someone that stays up late into the night staring at your dotfiles from neovim... I'm happy for you. Be happy for me too?
33
+ - will this work with ts-go?
34
+ - that's the hope but it ain't ready yet on the ts-go side
33
35
 
34
36
  ## Data / Security
35
37
 
package/bin/typeslayer.js CHANGED
@@ -45,7 +45,9 @@ try {
45
45
  const binaryInfo = getBinaryInfo();
46
46
 
47
47
  if (!existsSync(binaryInfo.path)) {
48
- console.error(`\n⚠️ Binary not found for ${binaryInfo.platform}. Attempting download...`);
48
+ console.error(
49
+ `\n⚠️ Binary not found for ${binaryInfo.platform}. Attempting download...`,
50
+ );
49
51
  const postinstallPath = join(__dirname, "..", "scripts", "postinstall.js");
50
52
  const res = spawnSync(process.execPath, [postinstallPath], {
51
53
  stdio: "inherit",
package/package.json CHANGED
@@ -1,99 +1,53 @@
1
1
  {
2
- "name": "typeslayer",
3
- "version": "0.1.2",
4
- "description": "Slay your TypeScript types",
5
- "private": false,
6
- "type": "module",
7
- "keywords": [
8
- "typescript",
9
- "ts",
10
- "tauri",
11
- "desktop",
12
- "benchmarking",
13
- "performance"
14
- ],
15
- "author": "Dimitri Mitropoulos",
16
- "license": "MIT",
17
- "repository": {
18
- "type": "git",
19
- "url": "git+https://github.com/dimitropoulos/typeslayer.git"
20
- },
21
- "bugs": {
22
- "url": "https://github.com/dimitropoulos/typeslayer/issues"
23
- },
24
- "homepage": "https://github.com/dimitropoulos/typeslayer#readme",
25
- "bin": {
26
- "typeslayer": "bin/typeslayer.js"
27
- },
28
- "files": [
29
- "bin",
30
- "scripts"
31
- ],
32
- "os": [
33
- "linux",
34
- "darwin",
35
- "win32"
36
- ],
37
- "cpu": [
38
- "x64",
39
- "arm64"
40
- ],
41
- "engines": {
42
- "node": ">=24.0.0",
43
- "pnpm": ">=10.0.0"
44
- },
45
- "packageManager": "pnpm@10.6.5",
46
- "scripts": {
47
- "postinstall": "node scripts/postinstall.js",
48
- "dev": "vite",
49
- "build": "tsc && vite build",
50
- "preview": "vite preview",
51
- "tauri": "tauri"
52
- },
53
- "dependencies": {
54
- "@tauri-apps/api": "2.9.0",
55
- "@tauri-apps/plugin-clipboard-manager": "~2",
56
- "@tauri-apps/plugin-dialog": "2.4.2",
57
- "@tauri-apps/plugin-opener": "2.5.2",
58
- "@tauri-apps/plugin-upload": "^2.3.2",
59
- "react": "19.2.0",
60
- "react-dom": "19.2.0"
61
- },
62
- "devDependencies": {
63
- "@emotion/react": "11.14.0",
64
- "@emotion/styled": "11.14.1",
65
- "@fastify/cors": "11.1.0",
66
- "@fastify/static": "8.3.0",
67
- "@fontsource/roboto": "5.2.9",
68
- "@mui/icons-material": "7.3.5",
69
- "@mui/material": "7.3.5",
70
- "@mui/x-tree-view": "8.19.0",
71
- "@tanstack/react-query": "5.90.10",
72
- "@tanstack/react-router": "1.139.3",
73
- "@tauri-apps/cli": "2.9.4",
74
- "@types/mime-types": "3.0.1",
75
- "@types/node": "24.10.1",
76
- "@types/ramda": "0.31.1",
77
- "@types/react": "19.2.6",
78
- "@types/react-dom": "19.2.3",
79
- "@typeslayer/analyze-trace": "workspace:*",
80
- "@typeslayer/validate": "workspace:*",
81
- "@vitejs/plugin-react": "5.1.1",
82
- "concurrently": "9.2.1",
83
- "fastify": "5.6.2",
84
- "mime-types": "3.0.2",
85
- "ramda": "0.32.0",
86
- "ramda-adjunct": "5.1.0",
87
- "react": "19.2.0",
88
- "react-dom": "19.2.0",
89
- "tsx": "4.20.6",
90
- "typescript": "5.9.3",
91
- "vite": "7.2.4",
92
- "zod": "4.1.12"
93
- },
94
- "pnpm": {
95
- "onlyBuiltDependencies": [
96
- "esbuild"
97
- ]
98
- }
2
+ "name": "typeslayer",
3
+ "version": "0.1.4",
4
+ "description": "Slay your TypeScript types",
5
+ "private": false,
6
+ "type": "module",
7
+ "keywords": [
8
+ "typescript",
9
+ "ts",
10
+ "tauri",
11
+ "desktop",
12
+ "benchmarking",
13
+ "performance"
14
+ ],
15
+ "author": "Dimitri Mitropoulos",
16
+ "license": "MIT",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/dimitropoulos/typeslayer.git"
20
+ },
21
+ "bugs": {
22
+ "url": "https://github.com/dimitropoulos/typeslayer/issues"
23
+ },
24
+ "homepage": "https://github.com/dimitropoulos/typeslayer#readme",
25
+ "bin": {
26
+ "typeslayer": "bin/typeslayer.js"
27
+ },
28
+ "files": [
29
+ "bin",
30
+ "scripts"
31
+ ],
32
+ "os": [
33
+ "linux",
34
+ "darwin",
35
+ "win32"
36
+ ],
37
+ "cpu": [
38
+ "x64",
39
+ "arm64"
40
+ ],
41
+ "engines": {
42
+ "node": ">=24.0.0",
43
+ "pnpm": ">=10.0.0"
44
+ },
45
+ "packageManager": "pnpm@10.6.5",
46
+ "scripts": {
47
+ "postinstall": "node scripts/postinstall.js",
48
+ "dev": "vite",
49
+ "build": "tsc && vite build",
50
+ "preview": "vite preview",
51
+ "tauri": "tauri"
52
+ }
99
53
  }
@@ -11,30 +11,42 @@ const __dirname = dirname(__filename);
11
11
 
12
12
  const PACKAGE_VERSION = process.env.npm_package_version;
13
13
 
14
+ // Allow CI or callers to skip binary download (release assets may not exist yet in same run)
15
+ if (process.env.TYPESLAYER_SKIP_POSTINSTALL) {
16
+ console.log(
17
+ "⏭️ Skipping typeslayer binary download (TYPESLAYER_SKIP_POSTINSTALL set).",
18
+ );
19
+ process.exit(0);
20
+ }
21
+
14
22
  const getBinaryInfo = () => {
15
23
  const plat = platform();
16
24
  const architecture = arch();
17
25
 
18
- let platformDir, binaryName;
26
+ let platformDir, binaryName, releaseAssetName;
19
27
 
20
28
  if (plat === "linux" && architecture === "x64") {
21
29
  platformDir = "linux-x64";
22
30
  binaryName = "typeslayer";
31
+ releaseAssetName = "typeslayer-linux-x64";
23
32
  } else if (plat === "darwin" && architecture === "x64") {
24
33
  platformDir = "darwin-x64";
25
34
  binaryName = "typeslayer";
35
+ releaseAssetName = "typeslayer-darwin-x64";
26
36
  } else if (plat === "darwin" && architecture === "arm64") {
27
37
  platformDir = "darwin-arm64";
28
38
  binaryName = "typeslayer";
39
+ releaseAssetName = "typeslayer-darwin-arm64";
29
40
  } else if (plat === "win32" && architecture === "x64") {
30
41
  platformDir = "win32-x64";
31
42
  binaryName = "typeslayer.exe";
43
+ releaseAssetName = "typeslayer-win32-x64.exe";
32
44
  } else {
33
45
  console.warn(`⚠️ Platform ${plat}-${architecture} is not supported`);
34
46
  process.exit(0); // Don't fail the install, just skip
35
47
  }
36
48
 
37
- return { platformDir, binaryName };
49
+ return { platformDir, binaryName, releaseAssetName };
38
50
  };
39
51
 
40
52
  const downloadBinary = (url, destPath) => {
@@ -83,7 +95,7 @@ const downloadBinary = (url, destPath) => {
83
95
 
84
96
  (async () => {
85
97
  try {
86
- const { platformDir, binaryName } = getBinaryInfo();
98
+ const { platformDir, binaryName, releaseAssetName } = getBinaryInfo();
87
99
  const binariesDir = join(__dirname, "..", "binaries", platformDir);
88
100
  const binaryPath = join(binariesDir, binaryName);
89
101
 
@@ -97,7 +109,7 @@ const downloadBinary = (url, destPath) => {
97
109
  mkdirSync(binariesDir, { recursive: true });
98
110
 
99
111
  // Download from GitHub release
100
- const releaseUrl = `https://github.com/dimitropoulos/typeslayer/releases/download/typeslayer-v${PACKAGE_VERSION}/${binaryName}`;
112
+ const releaseUrl = `https://github.com/dimitropoulos/typeslayer/releases/download/typeslayer-v${PACKAGE_VERSION}/${releaseAssetName}`;
101
113
 
102
114
  await downloadBinary(releaseUrl, binaryPath);
103
115
  } catch (error) {