@duhem/cli-darwin-x64 0.1.0

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 (3) hide show
  1. package/duhem +0 -0
  2. package/package.json +24 -0
  3. package/postinstall.js +23 -0
package/duhem ADDED
Binary file
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@duhem/cli-darwin-x64",
3
+ "version": "0.1.0",
4
+ "description": "Prebuilt `duhem` binary for darwin-x64.",
5
+ "license": "Apache-2.0",
6
+ "os": [
7
+ "darwin"
8
+ ],
9
+ "cpu": [
10
+ "x64"
11
+ ],
12
+ "main": "duhem",
13
+ "files": [
14
+ "duhem",
15
+ "postinstall.js"
16
+ ],
17
+ "scripts": {
18
+ "postinstall": "node postinstall.js"
19
+ },
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/onsager-ai/duhem.git"
23
+ }
24
+ }
package/postinstall.js ADDED
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * postinstall.js — ensure the shipped binary is executable on Unix.
5
+ *
6
+ * npm does not preserve the exec bit inside a published tarball, so the
7
+ * binary arrives 0644. chmod it to 0755 on install. No-op / ignored on
8
+ * Windows.
9
+ */
10
+
11
+ const { existsSync, chmodSync } = require('node:fs');
12
+ const { join } = require('node:path');
13
+
14
+ const pkg = require('./package.json');
15
+ const binaryPath = join(__dirname, pkg.main);
16
+
17
+ if (existsSync(binaryPath)) {
18
+ try {
19
+ chmodSync(binaryPath, 0o755);
20
+ } catch {
21
+ // chmod is unsupported / unnecessary on Windows — ignore.
22
+ }
23
+ }