@tishlang/tish 1.0.6

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/bin/tish.js ADDED
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const path = require('path');
5
+ const fs = require('fs');
6
+ const { spawnSync } = require('child_process');
7
+
8
+ const platformKey = `${process.platform}-${process.arch}`;
9
+ const supported = ['darwin-arm64', 'darwin-x64', 'linux-x64', 'linux-arm64', 'win32-x64'];
10
+ const binaryName = process.platform === 'win32' ? 'tish.exe' : 'tish';
11
+
12
+ const binPath = path.join(__dirname, '..', 'platform', platformKey, binaryName);
13
+ if (!fs.existsSync(binPath)) {
14
+ console.error(`[tish] Unsupported or missing binary for platform: ${platformKey}`);
15
+ console.error('Supported:', supported.join(', '));
16
+ console.error('Build from source: https://github.com/tishlang/tish');
17
+ process.exit(1);
18
+ }
19
+
20
+ // Convenience: "npx @tishlang/tish FILE [args]" → "tish run FILE [args]"
21
+ const args = process.argv.slice(2);
22
+ const subcommands = ['run', 'repl', 'compile', 'dump-ast'];
23
+ const first = args[0];
24
+ const looksLikeFile = first && !first.startsWith('-') && !subcommands.includes(first);
25
+
26
+ const finalArgs = looksLikeFile ? ['run', ...args] : args;
27
+
28
+ const result = spawnSync(binPath, finalArgs, {
29
+ stdio: 'inherit',
30
+ windowsHide: true,
31
+ });
32
+ process.exit(result.status !== null ? result.status : 1);
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@tishlang/tish",
3
+ "version": "1.0.6",
4
+ "description": "Tish - minimal TS/JS-compatible language. Run, REPL, compile to native.",
5
+ "license": "SEE LICENSE IN ../../LICENSE",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/tishlang/tish.git"
9
+ },
10
+ "publishConfig": {
11
+ "access": "public"
12
+ },
13
+ "bin": {
14
+ "tish": "./bin/tish.js"
15
+ },
16
+ "files": [
17
+ "bin",
18
+ "platform"
19
+ ],
20
+ "engines": {
21
+ "node": ">=22"
22
+ },
23
+ "devDependencies": {
24
+ "@semantic-release/commit-analyzer": "^13.0.1",
25
+ "@semantic-release/github": "^12.0.6",
26
+ "@semantic-release/npm": "^13.1.5",
27
+ "@semantic-release/release-notes-generator": "^14.1.0",
28
+ "semantic-release": "^25.0.3"
29
+ },
30
+ "keywords": [
31
+ "tish",
32
+ "language",
33
+ "javascript",
34
+ "typescript",
35
+ "compiler",
36
+ "interpreter"
37
+ ]
38
+ }
Binary file
Binary file
Binary file
Binary file
Binary file