bitbucket-gemini-action 1.0.3 → 1.0.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/dist/cli.js CHANGED
@@ -8112,20 +8112,6 @@ function outputResults(results) {
8112
8112
  console.log(`::set-output name=tracking_comment_id::${results.trackingCommentId}`);
8113
8113
  }
8114
8114
  }
8115
- if (__require.main == __require.module) {
8116
- prepare().then((result) => {
8117
- if (!result.success) {
8118
- process.exit(1);
8119
- }
8120
- if (!result.shouldContinue) {
8121
- console.log("ℹ️ No action needed");
8122
- process.exit(0);
8123
- }
8124
- }).catch((error) => {
8125
- console.error("Fatal error:", error);
8126
- process.exit(1);
8127
- });
8128
- }
8129
8115
 
8130
8116
  // src/gemini/client.ts
8131
8117
  var DEFAULT_MODEL = "gemini-2.0-flash";
@@ -8431,6 +8417,7 @@ var GEMINI_RETRY_OPTIONS = {
8431
8417
  async function execute(options) {
8432
8418
  console.log("\uD83D\uDE80 Starting Bitbucket Gemini Action - Execute Phase");
8433
8419
  try {
8420
+ const config = getEnvConfig();
8434
8421
  const opts = options || loadPrepareOutput();
8435
8422
  console.log(`\uD83D\uDCCB Mode: ${opts.mode}`);
8436
8423
  const geminiClient = createGeminiClientFromEnv();
@@ -8565,17 +8552,6 @@ function loadPrepareOutput() {
8565
8552
  trackingCommentId: data.trackingCommentId
8566
8553
  };
8567
8554
  }
8568
- if (__require.main == __require.module) {
8569
- execute().then((result) => {
8570
- if (!result.success) {
8571
- process.exit(1);
8572
- }
8573
- console.log(`\uD83D\uDCCA Inline comments created: ${result.inlineCommentsCreated}`);
8574
- }).catch((error) => {
8575
- console.error("Fatal error:", error);
8576
- process.exit(1);
8577
- });
8578
- }
8579
8555
 
8580
8556
  // src/cli.ts
8581
8557
  async function main() {
@@ -7924,6 +7924,7 @@ var GEMINI_RETRY_OPTIONS = {
7924
7924
  async function execute(options) {
7925
7925
  console.log("\uD83D\uDE80 Starting Bitbucket Gemini Action - Execute Phase");
7926
7926
  try {
7927
+ const config = getEnvConfig();
7927
7928
  const opts = options || loadPrepareOutput();
7928
7929
  console.log(`\uD83D\uDCCB Mode: ${opts.mode}`);
7929
7930
  const geminiClient = createGeminiClientFromEnv();
@@ -8058,17 +8059,6 @@ function loadPrepareOutput() {
8058
8059
  trackingCommentId: data.trackingCommentId
8059
8060
  };
8060
8061
  }
8061
- if (__require.main == __require.module) {
8062
- execute().then((result) => {
8063
- if (!result.success) {
8064
- process.exit(1);
8065
- }
8066
- console.log(`\uD83D\uDCCA Inline comments created: ${result.inlineCommentsCreated}`);
8067
- }).catch((error) => {
8068
- console.error("Fatal error:", error);
8069
- process.exit(1);
8070
- });
8071
- }
8072
8062
  export {
8073
8063
  execute
8074
8064
  };
@@ -8111,20 +8111,6 @@ function outputResults(results) {
8111
8111
  console.log(`::set-output name=tracking_comment_id::${results.trackingCommentId}`);
8112
8112
  }
8113
8113
  }
8114
- if (__require.main == __require.module) {
8115
- prepare().then((result) => {
8116
- if (!result.success) {
8117
- process.exit(1);
8118
- }
8119
- if (!result.shouldContinue) {
8120
- console.log("ℹ️ No action needed");
8121
- process.exit(0);
8122
- }
8123
- }).catch((error) => {
8124
- console.error("Fatal error:", error);
8125
- process.exit(1);
8126
- });
8127
- }
8128
8114
  export {
8129
8115
  prepare
8130
8116
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitbucket-gemini-action",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Bitbucket Pipeline action for AI-powered code review using Google Gemini",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",