@pwrs/cem 0.9.6 → 0.9.8

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/cem.js +10 -0
  2. package/package.json +7 -7
package/bin/cem.js CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { platform, arch } from "node:os";
3
3
  import { createRequire } from "node:module";
4
+ import { chmodSync, accessSync, constants } from "node:fs";
4
5
  import { spawn } from "node:child_process";
5
6
 
6
7
  const require = createRequire(import.meta.url);
@@ -28,6 +29,15 @@ try {
28
29
  process.exit(1);
29
30
  }
30
31
 
32
+ // npm tarball extraction can strip the execute bit; fix it before spawning
33
+ if (platform() !== 'win32') {
34
+ try {
35
+ accessSync(binPath, constants.X_OK);
36
+ } catch {
37
+ chmodSync(binPath, 0o755);
38
+ }
39
+ }
40
+
31
41
  const child = spawn(binPath, process.argv.slice(2), { stdio: "inherit" });
32
42
 
33
43
  // Forward common termination signals to child
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pwrs/cem",
3
- "version": "0.9.6",
3
+ "version": "0.9.8",
4
4
  "description": "CLI tool for generating and working with Custom Elements Manifests",
5
5
  "type": "module",
6
6
  "engines": {
@@ -13,12 +13,12 @@
13
13
  "postinstall": "node ./install-platform-binary.js"
14
14
  },
15
15
  "optionalDependencies": {
16
- "@pwrs/cem-linux-x64": "0.9.6",
17
- "@pwrs/cem-linux-arm64": "0.9.6",
18
- "@pwrs/cem-darwin-x64": "0.9.6",
19
- "@pwrs/cem-darwin-arm64": "0.9.6",
20
- "@pwrs/cem-win32-x64": "0.9.6",
21
- "@pwrs/cem-win32-arm64": "0.9.6"
16
+ "@pwrs/cem-linux-x64": "0.9.8",
17
+ "@pwrs/cem-linux-arm64": "0.9.8",
18
+ "@pwrs/cem-darwin-x64": "0.9.8",
19
+ "@pwrs/cem-darwin-arm64": "0.9.8",
20
+ "@pwrs/cem-win32-x64": "0.9.8",
21
+ "@pwrs/cem-win32-arm64": "0.9.8"
22
22
  },
23
23
  "files": [
24
24
  "bin/cem.js",