@probelabs/visor 0.1.23 → 0.1.25

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/action.yml CHANGED
@@ -149,6 +149,4 @@ outputs:
149
149
 
150
150
  runs:
151
151
  using: 'node20'
152
- main: 'dist/index.js'
153
- args:
154
- - '--github-action'
152
+ main: 'dist/index.js'
package/dist/index.js CHANGED
@@ -80814,8 +80814,8 @@ class ActionCliBridge {
80814
80814
  const bundledPath = actionPath
80815
80815
  ? path.join(actionPath, 'dist', 'index.js')
80816
80816
  : path.join(__dirname, 'index.js'); // When running locally
80817
- // Don't pass --github-action flag, so it runs in CLI mode
80818
- const result = await this.executeCommand('node', [bundledPath, ...cliArgs], {
80817
+ // Pass --cli flag to force CLI mode even when GITHUB_ACTIONS env var is set
80818
+ const result = await this.executeCommand('node', [bundledPath, '--cli', ...cliArgs], {
80819
80819
  cwd: workingDir,
80820
80820
  env,
80821
80821
  timeout,
@@ -87192,12 +87192,13 @@ async function markCheckAsFailed(checkService, owner, repo, checkRunId, checkNam
87192
87192
  console.error(`❌ Failed to mark ${checkName} check as failed:`, finalError);
87193
87193
  }
87194
87194
  }
87195
- if (require.main === require.cache[eval('__filename')]) {
87196
- // Simple mode detection: if --github-action flag is present, run as action, otherwise CLI
87197
- const isGitHubAction = process.argv.includes('--github-action');
87195
+ // Entry point - execute immediately when the script is run
87196
+ // Note: require.main === module check doesn't work reliably with ncc bundling
87197
+ (() => {
87198
+ // Simple mode detection: use GITHUB_ACTIONS env var which is always 'true' in GitHub Actions
87199
+ // Also check for --cli flag to force CLI mode even in GitHub Actions environment
87200
+ const isGitHubAction = process.env.GITHUB_ACTIONS === 'true' && !process.argv.includes('--cli');
87198
87201
  if (isGitHubAction) {
87199
- // Remove the --github-action flag from argv so it doesn't interfere
87200
- process.argv = process.argv.filter(arg => arg !== '--github-action');
87201
87202
  // Run as GitHub Action
87202
87203
  run();
87203
87204
  }
@@ -87208,9 +87209,12 @@ if (require.main === require.cache[eval('__filename')]) {
87208
87209
  console.error('CLI execution failed:', error);
87209
87210
  process.exit(1);
87210
87211
  });
87212
+ }).catch(error => {
87213
+ console.error('Failed to import CLI module:', error);
87214
+ process.exit(1);
87211
87215
  });
87212
87216
  }
87213
- }
87217
+ })();
87214
87218
 
87215
87219
 
87216
87220
  /***/ }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@probelabs/visor",
3
- "version": "0.1.23",
3
+ "version": "0.1.25",
4
4
  "main": "dist/index.js",
5
5
  "bin": {
6
6
  "visor": "./dist/cli-main.js"