@uipath/common 1.198.0-preview.87 → 1.198.0-preview.90

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/index.js CHANGED
@@ -11961,6 +11961,22 @@ async function readStdin() {
11961
11961
  process.stdin.on("error", reject);
11962
11962
  });
11963
11963
  }
11964
+ async function readStdinWithTimeout(timeoutMs) {
11965
+ let timer;
11966
+ const timeout = new Promise((resolve2) => {
11967
+ timer = setTimeout(() => {
11968
+ process.stdin.unref?.();
11969
+ resolve2(null);
11970
+ }, timeoutMs);
11971
+ });
11972
+ try {
11973
+ return await Promise.race([readStdin(), timeout]);
11974
+ } finally {
11975
+ if (timer) {
11976
+ clearTimeout(timer);
11977
+ }
11978
+ }
11979
+ }
11964
11980
  // src/telemetry/browser-context-storage.ts
11965
11981
  class BrowserContextStorage {
11966
11982
  contextStack = [];
@@ -12079,6 +12095,7 @@ export {
12079
12095
  redactProperty,
12080
12096
  redactProperties,
12081
12097
  recordCommandFailureTelemetry,
12098
+ readStdinWithTimeout,
12082
12099
  readStdin,
12083
12100
  readRegistryValue,
12084
12101
  processContext,
@@ -12194,4 +12211,4 @@ export {
12194
12211
  ATTACHMENT_INSTRUCTIONS
12195
12212
  };
12196
12213
 
12197
- //# debugId=F5AE253A6C21651164756E2164756E21
12214
+ //# debugId=B8317EE6AFDCF8C264756E2164756E21
package/dist/stdin.d.ts CHANGED
@@ -1 +1,8 @@
1
1
  export declare function readStdin(): Promise<string | null>;
2
+ /**
3
+ * `readStdin()` with a deadline. A non-TTY pipe that stays open but never sends
4
+ * data (or EOF) would otherwise block forever; on expiry this unrefs stdin so
5
+ * it can't keep the process alive and resolves `null`. Returns `null` on
6
+ * timeout, TTY, or empty input.
7
+ */
8
+ export declare function readStdinWithTimeout(timeoutMs: number): Promise<string | null>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/common",
3
3
  "license": "MIT",
4
- "version": "1.198.0-preview.87",
4
+ "version": "1.198.0-preview.90",
5
5
  "description": "Common infrastructure needed by uip tools.",
6
6
  "repository": {
7
7
  "type": "git",
@@ -67,5 +67,5 @@
67
67
  "mihaigirleanu",
68
68
  "vlad-uipath"
69
69
  ],
70
- "gitHead": "b84a7a78e1a325c3dd3b39efd3018c49b38c789f"
70
+ "gitHead": "7fa615fb10f91f98f796a038ea70569336611f42"
71
71
  }