@serviceme/devtools-cli 0.0.4 → 0.0.6

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.
@@ -9580,6 +9580,26 @@ function normalizeServicemeError(error, fallbackCode = "internal_error") {
9580
9580
  retryable: isRetryableErrorCode(fallbackCode)
9581
9581
  };
9582
9582
  }
9583
+ function terminateCommandProcess(child) {
9584
+ if (child.killed) {
9585
+ return;
9586
+ }
9587
+ if (process.platform === "win32" && child.pid) {
9588
+ const killProcess = child_process.spawn(
9589
+ "taskkill",
9590
+ ["/pid", String(child.pid), "/T", "/F"],
9591
+ {
9592
+ stdio: "ignore",
9593
+ windowsHide: true
9594
+ }
9595
+ );
9596
+ killProcess.once("error", () => {
9597
+ child.kill();
9598
+ });
9599
+ return;
9600
+ }
9601
+ child.kill("SIGTERM");
9602
+ }
9583
9603
  async function runCommand(command, options2 = {}) {
9584
9604
  return new Promise((resolve, reject) => {
9585
9605
  const child = child_process.spawn(command, options2.args ?? [], {
@@ -9640,7 +9660,7 @@ async function runCommand(command, options2 = {}) {
9640
9660
  if (options2.timeoutMs) {
9641
9661
  timeoutId = setTimeout(() => {
9642
9662
  finish(() => {
9643
- child.kill("SIGTERM");
9663
+ terminateCommandProcess(child);
9644
9664
  const error = new Error(
9645
9665
  `Command timed out after ${String(options2.timeoutMs)}ms.`
9646
9666
  );
@@ -10065,7 +10085,7 @@ var OpenCodeManager = class {
10065
10085
  __toESM(require_yauzl());
10066
10086
 
10067
10087
  // src/version.ts
10068
- var SERVICEME_CLI_VERSION = "0.0.4";
10088
+ var SERVICEME_CLI_VERSION = "0.0.6";
10069
10089
 
10070
10090
  // src/bridge/ndjson.ts
10071
10091
  function writeBridgeMessage(message) {
package/dist/cli.js CHANGED
@@ -9670,6 +9670,26 @@ function getStringFlag(parsed, name) {
9670
9670
  const value = parsed.flags.get(name);
9671
9671
  return typeof value === "string" ? value : void 0;
9672
9672
  }
9673
+ function terminateCommandProcess(child) {
9674
+ if (child.killed) {
9675
+ return;
9676
+ }
9677
+ if (process.platform === "win32" && child.pid) {
9678
+ const killProcess = child_process.spawn(
9679
+ "taskkill",
9680
+ ["/pid", String(child.pid), "/T", "/F"],
9681
+ {
9682
+ stdio: "ignore",
9683
+ windowsHide: true
9684
+ }
9685
+ );
9686
+ killProcess.once("error", () => {
9687
+ child.kill();
9688
+ });
9689
+ return;
9690
+ }
9691
+ child.kill("SIGTERM");
9692
+ }
9673
9693
  async function runCommand(command, options2 = {}) {
9674
9694
  return new Promise((resolve, reject) => {
9675
9695
  const child = child_process.spawn(command, options2.args ?? [], {
@@ -9730,7 +9750,7 @@ async function runCommand(command, options2 = {}) {
9730
9750
  if (options2.timeoutMs) {
9731
9751
  timeoutId = setTimeout(() => {
9732
9752
  finish(() => {
9733
- child.kill("SIGTERM");
9753
+ terminateCommandProcess(child);
9734
9754
  const error = new Error(
9735
9755
  `Command timed out after ${String(options2.timeoutMs)}ms.`
9736
9756
  );
@@ -11792,12 +11812,17 @@ var ProjectTools = class {
11792
11812
  );
11793
11813
  let updatedCount = 0;
11794
11814
  if (isWindows) {
11795
- for (const scriptPath of scripts.filter((script) => script.endsWith(".ps1"))) {
11815
+ for (const scriptPath of scripts.filter(
11816
+ (script) => script.endsWith(".ps1")
11817
+ )) {
11796
11818
  try {
11797
- await runCommand(`powershell -Command "Unblock-File -Path '${scriptPath}'"`, {
11798
- cwd: workspacePath,
11799
- shell: true
11800
- });
11819
+ await runCommand(
11820
+ `powershell -Command "Unblock-File -Path '${scriptPath}'"`,
11821
+ {
11822
+ cwd: workspacePath,
11823
+ shell: true
11824
+ }
11825
+ );
11801
11826
  updatedCount += 1;
11802
11827
  } catch {
11803
11828
  }
@@ -11879,7 +11904,9 @@ var ProjectTools = class {
11879
11904
  if (directoryNames.length === 1) {
11880
11905
  return directoryNames[0] ?? null;
11881
11906
  }
11882
- const exactMatch = directoryNames.find((directoryName) => directoryName === expectedDirName);
11907
+ const exactMatch = directoryNames.find(
11908
+ (directoryName) => directoryName === expectedDirName
11909
+ );
11883
11910
  if (exactMatch) {
11884
11911
  return exactMatch;
11885
11912
  }
@@ -11912,7 +11939,7 @@ function createProjectTools() {
11912
11939
 
11913
11940
  // src/version.ts
11914
11941
  var SERVICEME_CLI_NAME = "serviceme";
11915
- var SERVICEME_CLI_VERSION = "0.0.4";
11942
+ var SERVICEME_CLI_VERSION = "0.0.6";
11916
11943
 
11917
11944
  // src/bridge/ndjson.ts
11918
11945
  function writeBridgeMessage(message) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serviceme/devtools-cli",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "Unified SERVICEME CLI for automation, project scaffolding, and bridge-based tooling.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "repository": {
@@ -42,8 +42,8 @@
42
42
  "@types/node": "^24",
43
43
  "tsup": "^8.5.1",
44
44
  "typescript": "^5.9.3",
45
- "@serviceme/devtools-core": "0.0.4",
46
- "@serviceme/devtools-protocol": "0.0.4"
45
+ "@serviceme/devtools-core": "0.0.6",
46
+ "@serviceme/devtools-protocol": "0.0.6"
47
47
  },
48
48
  "scripts": {
49
49
  "build": "tsup --config tsup.config.ts",