@probelabs/probe 0.6.0-rc100 → 0.6.0-rc101

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@probelabs/probe",
3
- "version": "0.6.0-rc100",
3
+ "version": "0.6.0-rc101",
4
4
  "description": "Node.js wrapper for the probe code search tool",
5
5
  "main": "src/index.js",
6
6
  "module": "src/index.js",
@@ -10,8 +10,12 @@
10
10
  import fs from 'fs-extra';
11
11
  import path from 'path';
12
12
  import { fileURLToPath } from 'url';
13
+ import { exec } from 'child_process';
14
+ import { promisify } from 'util';
13
15
  import { downloadProbeBinary } from '../src/downloader.js';
14
16
 
17
+ const execAsync = promisify(exec);
18
+
15
19
  // Get the directory of the current module
16
20
  const __filename = fileURLToPath(import.meta.url);
17
21
  const __dirname = path.dirname(__filename);
@@ -24,7 +28,19 @@ const binDir = path.resolve(__dirname, '..', 'bin');
24
28
  */
25
29
  async function main() {
26
30
  try {
27
- // Skip postinstall if binary already exists (for CI or development)
31
+ // Skip postinstall in CI environments to prevent wrong binaries from being packaged
32
+ const isCI = process.env.CI || process.env.GITHUB_ACTIONS || process.env.CONTINUOUS_INTEGRATION ||
33
+ process.env.BUILD_NUMBER || process.env.JENKINS_URL || process.env.TRAVIS ||
34
+ process.env.CIRCLECI || process.env.GITLAB_CI;
35
+
36
+ if (isCI) {
37
+ if (process.env.DEBUG === '1' || process.env.VERBOSE === '1') {
38
+ console.log('Detected CI environment, skipping probe binary download');
39
+ }
40
+ return;
41
+ }
42
+
43
+ // Skip postinstall if binary already exists (for development)
28
44
  const isWindows = process.platform === 'win32';
29
45
  const targetBinaryName = isWindows ? 'probe.exe' : 'probe-binary';
30
46
  const targetBinaryPath = path.join(binDir, targetBinaryName);
@@ -135,7 +151,7 @@ You can download the binary from: https://github.com/probelabs/probe/releases
135
151
  // On macOS, try to remove quarantine attributes that might prevent execution
136
152
  if (process.platform === 'darwin') {
137
153
  try {
138
- await exec(`xattr -d com.apple.quarantine "${targetBinaryPath}" 2>/dev/null || true`);
154
+ await execAsync(`xattr -d com.apple.quarantine "${targetBinaryPath}" 2>/dev/null || true`);
139
155
  if (process.env.DEBUG === '1' || process.env.VERBOSE === '1') {
140
156
  console.log('Removed quarantine attributes from binary');
141
157
  }
package/bin/probe-binary DELETED
Binary file