@t2code/cli 0.0.41-preview.20260915.34 → 0.0.41-preview.20260915.38

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.
Files changed (2) hide show
  1. package/bin/t2code.js +18 -4
  2. package/package.json +6 -6
package/bin/t2code.js CHANGED
@@ -6,16 +6,30 @@ const { dirname, join } = require("node:path");
6
6
 
7
7
  const SUPPORTED = ["darwin-arm64", "linux-arm64", "linux-x64", "win32-arm64", "win32-x64"];
8
8
  const key = process.platform + "-" + process.arch;
9
+ const platformPackage = "@t2code/t2-" + key;
10
+ const launcherVersion = require("../package.json").version;
11
+
12
+ if (!SUPPORTED.includes(key)) {
13
+ process.stderr.write(
14
+ [
15
+ "t2code: this platform is not supported (" + key + ").",
16
+ "Supported platforms: " + SUPPORTED.join(", ") + ".",
17
+ "The desktop app and release archives are at https://github.com/ashutoshpw/t2code/releases",
18
+ "",
19
+ ].join("\n"),
20
+ );
21
+ process.exit(1);
22
+ }
9
23
 
10
24
  let packageDir;
11
25
  try {
12
- packageDir = dirname(require.resolve("@t2code/t2-" + key + "/package.json"));
26
+ packageDir = dirname(require.resolve(platformPackage + "/package.json"));
13
27
  } catch {
14
28
  process.stderr.write(
15
29
  [
16
- "t2code: no T2 Code CLI build is available for this platform (" + key + ").",
17
- "Supported platforms: " + SUPPORTED.join(", ") + ".",
18
- "If yours is listed, reinstall @t2code/cli so npm fetches its optional dependency.",
30
+ "t2code: the optional package " + platformPackage + " is missing for this supported platform (" + key + ").",
31
+ "Reinstall @t2code/cli@" + launcherVersion + " with optional dependencies enabled: npm install --include=optional @t2code/cli@" + launcherVersion + ".",
32
+ "If it is still missing, check npm's install output and registry/network settings.",
19
33
  "The desktop app and release archives are at https://github.com/ashutoshpw/t2code/releases",
20
34
  "",
21
35
  ].join("\n"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@t2code/cli",
3
- "version": "0.0.41-preview.20260915.34",
3
+ "version": "0.0.41-preview.20260915.38",
4
4
  "description": "T2 Code CLI. Installs the self-contained executable for this platform.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -15,10 +15,10 @@
15
15
  "bin"
16
16
  ],
17
17
  "optionalDependencies": {
18
- "@t2code/t2-darwin-arm64": "0.0.41-preview.20260915.34",
19
- "@t2code/t2-linux-arm64": "0.0.41-preview.20260915.34",
20
- "@t2code/t2-linux-x64": "0.0.41-preview.20260915.34",
21
- "@t2code/t2-win32-arm64": "0.0.41-preview.20260915.34",
22
- "@t2code/t2-win32-x64": "0.0.41-preview.20260915.34"
18
+ "@t2code/t2-darwin-arm64": "0.0.41-preview.20260915.38",
19
+ "@t2code/t2-linux-arm64": "0.0.41-preview.20260915.38",
20
+ "@t2code/t2-linux-x64": "0.0.41-preview.20260915.38",
21
+ "@t2code/t2-win32-arm64": "0.0.41-preview.20260915.38",
22
+ "@t2code/t2-win32-x64": "0.0.41-preview.20260915.38"
23
23
  }
24
24
  }