treeship 0.9.2 → 0.9.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/package.json CHANGED
@@ -1,14 +1,27 @@
1
1
  {
2
2
  "name": "treeship",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "description": "Portable trust receipts for agent workflows",
5
5
  "bin": {
6
6
  "treeship": "./bin/treeship.js"
7
7
  },
8
+ "scripts": {
9
+ "preinstall": "node scripts/check-platform.js"
10
+ },
11
+ "files": [
12
+ "bin/",
13
+ "scripts/check-platform.js",
14
+ "README.md",
15
+ "LICENSE"
16
+ ],
17
+ "os": [
18
+ "darwin",
19
+ "linux"
20
+ ],
8
21
  "optionalDependencies": {
9
- "@treeship/cli-linux-x64": "0.9.2",
10
- "@treeship/cli-darwin-arm64": "0.9.2",
11
- "@treeship/cli-darwin-x64": "0.9.2"
22
+ "@treeship/cli-linux-x64": "0.9.4",
23
+ "@treeship/cli-darwin-arm64": "0.9.4",
24
+ "@treeship/cli-darwin-x64": "0.9.4"
12
25
  },
13
26
  "license": "Apache-2.0",
14
27
  "repository": {
@@ -0,0 +1,20 @@
1
+ // Treeship npm wrapper -- preinstall platform guard.
2
+ //
3
+ // We only ship binaries for darwin-arm64, darwin-x64, and linux-x64 at v0.9.3.
4
+ // Without this guard, a Windows user running `npm install -g treeship` would
5
+ // successfully install the wrapper, then hit a confusing "binary not found"
6
+ // error the first time they ran `treeship`. Fail loud, fail early.
7
+
8
+ if (process.platform === 'win32') {
9
+ process.stderr.write(
10
+ '\n' +
11
+ 'Treeship v' + require('../package.json').version + ' does not support Windows natively yet.\n' +
12
+ '\n' +
13
+ 'Use WSL (Windows Subsystem for Linux), or wait for v0.10.0 which adds a\n' +
14
+ 'native Windows binary and a PowerShell setup path.\n' +
15
+ '\n' +
16
+ 'See https://github.com/zerkerlabs/treeship for status.\n' +
17
+ '\n'
18
+ );
19
+ process.exit(1);
20
+ }