@hypertestco/node-sdk-v3 0.0.1-22 → 0.0.1-24

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.
@@ -1 +1 @@
1
- export declare function getUncommittedChanges(): string;
1
+ export declare function getUncommittedChanges(): any;
package/index.cjs CHANGED
@@ -147438,7 +147438,7 @@ var opentelemetry = __toESM(require_src30());
147438
147438
  var import_register = __toESM(require_register());
147439
147439
 
147440
147440
  // ../../package.json
147441
- var version = "0.0.1-22";
147441
+ var version = "0.0.1-24";
147442
147442
 
147443
147443
  // ../utils/syncSleep/index.ts
147444
147444
  function synchronousBlock(seconds) {
@@ -161608,14 +161608,23 @@ var manualRequest = {
161608
161608
  var import_child_process6 = require("child_process");
161609
161609
  var debug8 = debug_default("ht-node-sdk::getUncommittedChanges");
161610
161610
  function getUncommittedChanges() {
161611
+ var _a4, _b2;
161611
161612
  const projectRoot2 = getProjectRoot();
161612
- let command = "git diff HEAD";
161613
- if (GIT_DIFF_IGNORED_FILES.length > 0) {
161614
- const excludeArgs = GIT_DIFF_IGNORED_FILES.map((pattern) => `':!${pattern}'`).join(" ");
161615
- command += ` -- . ':!.*' ${excludeArgs}`;
161613
+ const pathspecs = ["."];
161614
+ pathspecs.push('":(exclude,glob).*/"');
161615
+ pathspecs.push('":(exclude,glob).*"');
161616
+ for (const f of GIT_DIFF_IGNORED_FILES) {
161617
+ pathspecs.push(`":(exclude,glob)**/${f}"`);
161616
161618
  }
161619
+ const command = `git diff HEAD -- ${pathspecs.join(" ")}`;
161617
161620
  debug8(`Executing: ${command}`);
161618
- return (0, import_child_process6.execSync)(command, { cwd: projectRoot2 }).toString();
161621
+ try {
161622
+ const output = (0, import_child_process6.execSync)(command, { cwd: projectRoot2 }).toString().trim();
161623
+ return output;
161624
+ } catch (err) {
161625
+ debug8(`Error executing git diff: ${err.message}`);
161626
+ return ((_b2 = (_a4 = err == null ? void 0 : err.stdout) == null ? void 0 : _a4.toString()) == null ? void 0 : _b2.trim()) || "";
161627
+ }
161619
161628
  }
161620
161629
 
161621
161630
  // src/helpers/isCurrentFolderAGitRepo.ts
@@ -161633,30 +161642,25 @@ function isCurrentFolderInGitRepoFn() {
161633
161642
  var import_child_process8 = require("child_process");
161634
161643
  function isHavingUncommittedChangesFn() {
161635
161644
  const projectRoot2 = getProjectRoot();
161636
- const pathspecs = [":!.*"];
161637
- pathspecs.push(...GIT_DIFF_IGNORED_FILES.map((file) => `:!${file}`));
161638
- const pathspecArgs = pathspecs.join(" ");
161639
- try {
161640
- (0, import_child_process8.execSync)(
161641
- `git diff --ignore-submodules --quiet --exit-code -- ${pathspecArgs}`,
161642
- {
161643
- cwd: projectRoot2
161644
- }
161645
- );
161646
- } catch (_err) {
161647
- return true;
161645
+ const pathspecs = ["."];
161646
+ pathspecs.push('":(exclude,glob).*/"');
161647
+ pathspecs.push('":(exclude,glob).*"');
161648
+ for (const file of GIT_DIFF_IGNORED_FILES) {
161649
+ pathspecs.push(`":(exclude,glob)**/${file}"`);
161648
161650
  }
161651
+ const pathspecArgs = pathspecs.join(" ");
161649
161652
  try {
161650
161653
  (0, import_child_process8.execSync)(
161651
- `git diff --ignore-submodules --quiet --exit-code --staged -- ${pathspecArgs}`,
161654
+ `git diff HEAD --ignore-submodules --quiet --exit-code -- ${pathspecArgs}`,
161652
161655
  {
161653
- cwd: projectRoot2
161656
+ cwd: projectRoot2,
161657
+ stdio: "ignore"
161654
161658
  }
161655
161659
  );
161656
- } catch (_err) {
161660
+ return false;
161661
+ } catch {
161657
161662
  return true;
161658
161663
  }
161659
- return false;
161660
161664
  }
161661
161665
 
161662
161666
  // src/instrumentation/core/types/ExperimentalFlagEnums.ts
package/index.mjs CHANGED
@@ -154919,7 +154919,7 @@ import fs2 from "fs";
154919
154919
  import path3 from "path";
154920
154920
 
154921
154921
  // ../../package.json
154922
- var version = "0.0.1-22";
154922
+ var version = "0.0.1-24";
154923
154923
 
154924
154924
  // ../utils/syncSleep/index.ts
154925
154925
  function synchronousBlock(seconds) {
@@ -169004,14 +169004,23 @@ var cliClient = {
169004
169004
  import { execSync as execSync2 } from "child_process";
169005
169005
  var debug8 = debug_default("ht-node-sdk::getUncommittedChanges");
169006
169006
  function getUncommittedChanges() {
169007
+ var _a4, _b2;
169007
169008
  const projectRoot2 = getProjectRoot();
169008
- let command = "git diff HEAD";
169009
- if (GIT_DIFF_IGNORED_FILES.length > 0) {
169010
- const excludeArgs = GIT_DIFF_IGNORED_FILES.map((pattern) => `':!${pattern}'`).join(" ");
169011
- command += ` -- . ':!.*' ${excludeArgs}`;
169009
+ const pathspecs = ["."];
169010
+ pathspecs.push('":(exclude,glob).*/"');
169011
+ pathspecs.push('":(exclude,glob).*"');
169012
+ for (const f of GIT_DIFF_IGNORED_FILES) {
169013
+ pathspecs.push(`":(exclude,glob)**/${f}"`);
169012
169014
  }
169015
+ const command = `git diff HEAD -- ${pathspecs.join(" ")}`;
169013
169016
  debug8(`Executing: ${command}`);
169014
- return execSync2(command, { cwd: projectRoot2 }).toString();
169017
+ try {
169018
+ const output = execSync2(command, { cwd: projectRoot2 }).toString().trim();
169019
+ return output;
169020
+ } catch (err) {
169021
+ debug8(`Error executing git diff: ${err.message}`);
169022
+ return ((_b2 = (_a4 = err == null ? void 0 : err.stdout) == null ? void 0 : _a4.toString()) == null ? void 0 : _b2.trim()) || "";
169023
+ }
169015
169024
  }
169016
169025
 
169017
169026
  // src/helpers/isCurrentFolderAGitRepo.ts
@@ -169029,30 +169038,25 @@ function isCurrentFolderInGitRepoFn() {
169029
169038
  import { execSync as execSync4 } from "child_process";
169030
169039
  function isHavingUncommittedChangesFn() {
169031
169040
  const projectRoot2 = getProjectRoot();
169032
- const pathspecs = [":!.*"];
169033
- pathspecs.push(...GIT_DIFF_IGNORED_FILES.map((file) => `:!${file}`));
169034
- const pathspecArgs = pathspecs.join(" ");
169035
- try {
169036
- execSync4(
169037
- `git diff --ignore-submodules --quiet --exit-code -- ${pathspecArgs}`,
169038
- {
169039
- cwd: projectRoot2
169040
- }
169041
- );
169042
- } catch (_err) {
169043
- return true;
169041
+ const pathspecs = ["."];
169042
+ pathspecs.push('":(exclude,glob).*/"');
169043
+ pathspecs.push('":(exclude,glob).*"');
169044
+ for (const file of GIT_DIFF_IGNORED_FILES) {
169045
+ pathspecs.push(`":(exclude,glob)**/${file}"`);
169044
169046
  }
169047
+ const pathspecArgs = pathspecs.join(" ");
169045
169048
  try {
169046
169049
  execSync4(
169047
- `git diff --ignore-submodules --quiet --exit-code --staged -- ${pathspecArgs}`,
169050
+ `git diff HEAD --ignore-submodules --quiet --exit-code -- ${pathspecArgs}`,
169048
169051
  {
169049
- cwd: projectRoot2
169052
+ cwd: projectRoot2,
169053
+ stdio: "ignore"
169050
169054
  }
169051
169055
  );
169052
- } catch (_err) {
169056
+ return false;
169057
+ } catch {
169053
169058
  return true;
169054
169059
  }
169055
- return false;
169056
169060
  }
169057
169061
 
169058
169062
  // src/instrumentation/core/types/ExperimentalFlagEnums.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hypertestco/node-sdk-v3",
3
- "version": "0.0.1-22",
3
+ "version": "0.0.1-24",
4
4
  "description": "node-sdk-v3 for hypertest",
5
5
  "private": false,
6
6
  "publishConfig": {