pythonlib 1.0.1 → 2.0.0

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.
Files changed (150) hide show
  1. package/README.md +3 -1
  2. package/dist/base64-C_am75Sv.d.ts +165 -0
  3. package/dist/base64.d.ts +1 -0
  4. package/dist/base64.js +37 -0
  5. package/dist/chunk-2YTO24B5.js +78 -0
  6. package/dist/chunk-3CLXPGAB.js +237 -0
  7. package/dist/{chunk-H76SKASU.js → chunk-3M3PB4RO.js} +4 -6
  8. package/dist/chunk-5OKGPZBQ.js +1106 -0
  9. package/dist/chunk-5VAHUJNC.js +348 -0
  10. package/dist/chunk-B5AUEOAH.js +193 -0
  11. package/dist/chunk-B5LQJODJ.js +37 -0
  12. package/dist/{chunk-HQ42WNKZ.js → chunk-BCMGGBWG.js} +2 -5
  13. package/dist/chunk-BCVIH2BN.js +175 -0
  14. package/dist/{chunk-EE7SK2GV.js → chunk-D35YI363.js} +15 -12
  15. package/dist/{chunk-7TH4FCVQ.js → chunk-ETBW6XNR.js} +3 -4
  16. package/dist/chunk-FCJ7E4OE.js +250 -0
  17. package/dist/chunk-HSTC277I.js +255 -0
  18. package/dist/chunk-IANXD4D4.js +250 -0
  19. package/dist/{chunk-4KYJT3DR.js → chunk-JAUU3HMH.js} +1 -2
  20. package/dist/chunk-JJKTRIVO.js +262 -0
  21. package/dist/chunk-KKHKTQNN.js +361 -0
  22. package/dist/chunk-KKJHGY4C.js +551 -0
  23. package/dist/chunk-LHPQS75Z.js +192 -0
  24. package/dist/{chunk-LWO6BIAD.js → chunk-LK2L2TFG.js} +5 -6
  25. package/dist/chunk-LLZFLQS6.js +280 -0
  26. package/dist/chunk-LTXTS7RP.js +154 -0
  27. package/dist/{chunk-4QG3772L.js → chunk-LWYBTWBZ.js} +2 -3
  28. package/dist/{chunk-6ZAJ37MR.js → chunk-MFKIEN7N.js} +3 -3
  29. package/dist/{chunk-PZ5AY32C.js → chunk-MLKGABMK.js} +0 -1
  30. package/dist/chunk-OZRS5PC4.js +312 -0
  31. package/dist/chunk-PWA3YQZU.js +346 -0
  32. package/dist/{chunk-6POEDI34.js → chunk-QKJBQKPY.js} +1 -2
  33. package/dist/chunk-RB6BYCIQ.js +141 -0
  34. package/dist/chunk-U4X5DEIP.js +188 -0
  35. package/dist/chunk-UGZ5OY5Z.js +165 -0
  36. package/dist/chunk-WTZSAITC.js +82 -0
  37. package/dist/{collections-CJur5Wg-.d.ts → collections-BthXtkEp.d.ts} +5 -1
  38. package/dist/collections.d.ts +1 -1
  39. package/dist/collections.js +2 -3
  40. package/dist/copy-6ZaZ__ge.d.ts +59 -0
  41. package/dist/copy.d.ts +1 -0
  42. package/dist/copy.js +9 -0
  43. package/dist/{datetime-Bpce8gG2.d.ts → datetime-BM_IjhTq.d.ts} +3 -1
  44. package/dist/datetime.d.ts +1 -1
  45. package/dist/datetime.js +2 -3
  46. package/dist/{functools-NrsZAqJk.d.ts → functools-uIa5g75p.d.ts} +3 -1
  47. package/dist/functools.d.ts +1 -1
  48. package/dist/functools.js +2 -3
  49. package/dist/glob.browser-B6d_YdV5.d.ts +50 -0
  50. package/dist/glob.browser.d.ts +1 -0
  51. package/dist/glob.browser.js +15 -0
  52. package/dist/glob.node-wn5ehtyM.d.ts +80 -0
  53. package/dist/glob.node.d.ts +1 -0
  54. package/dist/glob.node.js +15 -0
  55. package/dist/hashlib-vKP511NY.d.ts +205 -0
  56. package/dist/hashlib.d.ts +1 -0
  57. package/dist/hashlib.js +39 -0
  58. package/dist/index.browser.d.ts +172 -0
  59. package/dist/index.browser.js +304 -0
  60. package/dist/index.d.ts +61 -437
  61. package/dist/index.js +138 -1115
  62. package/dist/{itertools-Sjl1LB_0.d.ts → itertools-T0rwOk2j.d.ts} +2 -4
  63. package/dist/itertools.d.ts +1 -1
  64. package/dist/itertools.js +2 -3
  65. package/dist/{json-DAlvCadU.d.ts → json-DoWhX04T.d.ts} +1 -0
  66. package/dist/json.d.ts +1 -1
  67. package/dist/json.js +2 -3
  68. package/dist/logging.browser-Dux4L5kz.d.ts +185 -0
  69. package/dist/logging.browser.d.ts +1 -0
  70. package/dist/logging.browser.js +63 -0
  71. package/dist/logging.node-CH75bVdE.d.ts +185 -0
  72. package/dist/logging.node.d.ts +1 -0
  73. package/dist/logging.node.js +61 -0
  74. package/dist/{math-DwEGjjQ-.d.ts → math-D2NPMc-x.d.ts} +2 -1
  75. package/dist/math.d.ts +1 -1
  76. package/dist/math.js +2 -3
  77. package/dist/{os-C6Nt7Ijx.d.ts → os.browser-krjSx5kF.d.ts} +32 -54
  78. package/dist/os.browser.d.ts +2 -0
  79. package/dist/{os.js → os.browser.js} +41 -16
  80. package/dist/os.node-CQjch8Ht.d.ts +124 -0
  81. package/dist/os.node.d.ts +2 -0
  82. package/dist/os.node.js +83 -0
  83. package/dist/os.shared-C3x70nhO.d.ts +59 -0
  84. package/dist/pathlib.browser-NC7kKQYe.d.ts +91 -0
  85. package/dist/pathlib.browser.d.ts +1 -0
  86. package/dist/pathlib.browser.js +17 -0
  87. package/dist/pathlib.node-CY3yUFdT.d.ts +331 -0
  88. package/dist/pathlib.node.d.ts +2 -0
  89. package/dist/pathlib.node.js +17 -0
  90. package/dist/{random-BJv_rSpL.d.ts → random-DcS5jtEs.d.ts} +3 -5
  91. package/dist/random.d.ts +1 -1
  92. package/dist/random.js +2 -3
  93. package/dist/{re-B1CHCgyr.d.ts → re-Bo-IOqov.d.ts} +3 -7
  94. package/dist/re.d.ts +1 -1
  95. package/dist/re.js +2 -3
  96. package/dist/set-JQbLAq8B.d.ts +592 -0
  97. package/dist/shutil.browser-Ck5oWhnP.d.ts +113 -0
  98. package/dist/shutil.browser.d.ts +1 -0
  99. package/dist/shutil.browser.js +33 -0
  100. package/dist/shutil.node-C9kwvhAf.d.ts +160 -0
  101. package/dist/shutil.node.d.ts +2 -0
  102. package/dist/shutil.node.js +33 -0
  103. package/dist/string.d.ts +3 -1
  104. package/dist/string.js +2 -3
  105. package/dist/subprocess-CZVYzQ3V.d.ts +214 -0
  106. package/dist/subprocess.d.ts +1 -0
  107. package/dist/subprocess.js +29 -0
  108. package/dist/sys-IL8LgI_W.d.ts +212 -0
  109. package/dist/sys.d.ts +1 -0
  110. package/dist/sys.js +51 -0
  111. package/dist/tempfile.browser-DciOKfNm.d.ts +78 -0
  112. package/dist/tempfile.browser.d.ts +1 -0
  113. package/dist/tempfile.browser.js +19 -0
  114. package/dist/tempfile.node-bVMY60Cu.d.ts +195 -0
  115. package/dist/tempfile.node.d.ts +2 -0
  116. package/dist/tempfile.node.js +23 -0
  117. package/dist/time-CcYhdiSu.d.ts +245 -0
  118. package/dist/time.d.ts +1 -0
  119. package/dist/time.js +49 -0
  120. package/dist/urllib-DJtkj-0f.d.ts +198 -0
  121. package/dist/urllib.d.ts +1 -0
  122. package/dist/urllib.js +37 -0
  123. package/dist/uuid-C0ypmn56.d.ts +160 -0
  124. package/dist/uuid.d.ts +1 -0
  125. package/dist/uuid.js +23 -0
  126. package/package.json +127 -5
  127. package/dist/chunk-4KYJT3DR.js.map +0 -1
  128. package/dist/chunk-4QG3772L.js.map +0 -1
  129. package/dist/chunk-6POEDI34.js.map +0 -1
  130. package/dist/chunk-6ZAJ37MR.js.map +0 -1
  131. package/dist/chunk-7TH4FCVQ.js.map +0 -1
  132. package/dist/chunk-CXKGPD5D.js +0 -313
  133. package/dist/chunk-CXKGPD5D.js.map +0 -1
  134. package/dist/chunk-EE7SK2GV.js.map +0 -1
  135. package/dist/chunk-H76SKASU.js.map +0 -1
  136. package/dist/chunk-HQ42WNKZ.js.map +0 -1
  137. package/dist/chunk-LWO6BIAD.js.map +0 -1
  138. package/dist/chunk-PZ5AY32C.js.map +0 -1
  139. package/dist/collections.js.map +0 -1
  140. package/dist/datetime.js.map +0 -1
  141. package/dist/functools.js.map +0 -1
  142. package/dist/index.js.map +0 -1
  143. package/dist/itertools.js.map +0 -1
  144. package/dist/json.js.map +0 -1
  145. package/dist/math.js.map +0 -1
  146. package/dist/os.d.ts +0 -1
  147. package/dist/os.js.map +0 -1
  148. package/dist/random.js.map +0 -1
  149. package/dist/re.js.map +0 -1
  150. package/dist/string.js.map +0 -1
@@ -0,0 +1 @@
1
+ export { c as copy, a as copy2, g as copyFile, h as copyFileObj, e as copyMode, f as copyStat, b as copytree, d as diskUsage, i as getTerminalSize, j as makeArchive, m as move, r as rmtree, u as unpackArchive, w as which } from './shutil.browser-Ck5oWhnP.js';
@@ -0,0 +1,33 @@
1
+ import {
2
+ copy,
3
+ copy2,
4
+ copyFile,
5
+ copyFileObj,
6
+ copyMode,
7
+ copyStat,
8
+ copytree,
9
+ diskUsage,
10
+ getTerminalSize,
11
+ makeArchive,
12
+ move,
13
+ rmtree,
14
+ unpackArchive,
15
+ which
16
+ } from "./chunk-WTZSAITC.js";
17
+ import "./chunk-MLKGABMK.js";
18
+ export {
19
+ copy,
20
+ copy2,
21
+ copyFile,
22
+ copyFileObj,
23
+ copyMode,
24
+ copyStat,
25
+ copytree,
26
+ diskUsage,
27
+ getTerminalSize,
28
+ makeArchive,
29
+ move,
30
+ rmtree,
31
+ unpackArchive,
32
+ which
33
+ };
@@ -0,0 +1,160 @@
1
+ import { ReadStream, WriteStream } from 'node:fs';
2
+
3
+ /**
4
+ * Python shutil module for TypeScript
5
+ *
6
+ * Provides high-level file operations with async API.
7
+ *
8
+ * @see {@link https://docs.python.org/3/library/shutil.html | Python shutil documentation}
9
+ * @module
10
+ */
11
+
12
+ /**
13
+ * Copy the file src to the file or directory dst.
14
+ *
15
+ * @param src - Source file path
16
+ * @param dst - Destination file or directory path
17
+ * @returns The path to the newly created file
18
+ */
19
+ declare function copy(src: string, dst: string): Promise<string>;
20
+ /**
21
+ * Copy the file src to the file or directory dst, preserving metadata.
22
+ *
23
+ * @param src - Source file path
24
+ * @param dst - Destination file or directory path
25
+ * @returns The path to the newly created file
26
+ */
27
+ declare function copy2(src: string, dst: string): Promise<string>;
28
+ /**
29
+ * Recursively copy an entire directory tree.
30
+ *
31
+ * @param src - Source directory path
32
+ * @param dst - Destination directory path
33
+ * @param options - Options object
34
+ * @returns The destination directory path
35
+ */
36
+ declare function copytree(src: string, dst: string, options?: {
37
+ symlinkss?: boolean;
38
+ ignore?: (dir: string, names: string[]) => string[];
39
+ copyFunction?: (src: string, dst: string) => Promise<void>;
40
+ dirsExistOk?: boolean;
41
+ }): Promise<string>;
42
+ /**
43
+ * Recursively move a file or directory to another location.
44
+ *
45
+ * @param src - Source path
46
+ * @param dst - Destination path
47
+ * @returns The destination path
48
+ */
49
+ declare function move(src: string, dst: string): Promise<string>;
50
+ /**
51
+ * Recursively delete a directory tree.
52
+ *
53
+ * @param path - Directory path to delete
54
+ * @param options - Options object
55
+ */
56
+ declare function rmtree(path: string, options?: {
57
+ ignoreErrors?: boolean;
58
+ }): Promise<void>;
59
+ /**
60
+ * Return the path to an executable which would be run if the given cmd was called.
61
+ *
62
+ * @param cmd - Command name to find
63
+ * @param path - Optional PATH string to search (defaults to process.env.PATH)
64
+ * @returns Path to the executable, or null if not found
65
+ */
66
+ declare function which(cmd: string, path?: string): Promise<string | null>;
67
+ /**
68
+ * Disk usage statistics.
69
+ */
70
+ interface DiskUsage {
71
+ total: number;
72
+ used: number;
73
+ free: number;
74
+ }
75
+ /**
76
+ * Return disk usage statistics for the given path.
77
+ *
78
+ * @param path - Path to check
79
+ * @returns Object with total, used, and free bytes
80
+ */
81
+ declare function diskUsage(path: string): Promise<DiskUsage>;
82
+ /**
83
+ * Return the size of the terminal window.
84
+ *
85
+ * @returns Object with columns and lines
86
+ */
87
+ declare function getTerminalSize(): {
88
+ columns: number;
89
+ lines: number;
90
+ };
91
+ /**
92
+ * Copy file mode bits from src to dst.
93
+ *
94
+ * @param src - Source path
95
+ * @param dst - Destination path
96
+ */
97
+ declare function copymode(src: string, dst: string): Promise<void>;
98
+ /**
99
+ * Copy all stat info (mode bits, atime, mtime, flags) from src to dst.
100
+ *
101
+ * @param src - Source path
102
+ * @param dst - Destination path
103
+ */
104
+ declare function copystat(src: string, dst: string): Promise<void>;
105
+ /**
106
+ * Copy a file's content (but not metadata) to another file.
107
+ *
108
+ * @param src - Source file path
109
+ * @param dst - Destination file path
110
+ */
111
+ declare function copyfile(src: string, dst: string): Promise<void>;
112
+ /**
113
+ * Copy data from a file-like object to another file-like object.
114
+ *
115
+ * @param fsrc - Source readable stream
116
+ * @param fdst - Destination writable stream
117
+ * @param length - Number of bytes to copy (optional, copies all if not specified)
118
+ */
119
+ declare function copyfileobj(fsrc: ReadStream | NodeJS.ReadableStream, fdst: WriteStream | NodeJS.WritableStream, length?: number): void;
120
+ /**
121
+ * Create an archive file from a directory.
122
+ *
123
+ * Not implemented - requires external tools (tar, zip).
124
+ *
125
+ * @param baseName - Name of the archive file (without extension)
126
+ * @param format - Archive format ('zip', 'tar', 'gztar', 'bztar', 'xztar')
127
+ * @param rootDir - Directory to archive
128
+ * @returns Path to the created archive
129
+ */
130
+ declare function makeArchive(_baseName: string, _format: string, _rootDir: string): string;
131
+ /**
132
+ * Unpack an archive file.
133
+ *
134
+ * Not implemented - requires external tools (tar, unzip).
135
+ *
136
+ * @param filename - Path to the archive
137
+ * @param extractDir - Directory to extract to (optional)
138
+ */
139
+ declare function unpackArchive(_filename: string, _extractDir?: string): void;
140
+
141
+ type shutilModule_DiskUsage = DiskUsage;
142
+ declare const shutilModule_copy: typeof copy;
143
+ declare const shutilModule_copy2: typeof copy2;
144
+ declare const shutilModule_copyfile: typeof copyfile;
145
+ declare const shutilModule_copyfileobj: typeof copyfileobj;
146
+ declare const shutilModule_copymode: typeof copymode;
147
+ declare const shutilModule_copystat: typeof copystat;
148
+ declare const shutilModule_copytree: typeof copytree;
149
+ declare const shutilModule_diskUsage: typeof diskUsage;
150
+ declare const shutilModule_getTerminalSize: typeof getTerminalSize;
151
+ declare const shutilModule_makeArchive: typeof makeArchive;
152
+ declare const shutilModule_move: typeof move;
153
+ declare const shutilModule_rmtree: typeof rmtree;
154
+ declare const shutilModule_unpackArchive: typeof unpackArchive;
155
+ declare const shutilModule_which: typeof which;
156
+ declare namespace shutilModule {
157
+ export { type shutilModule_DiskUsage as DiskUsage, shutilModule_copy as copy, shutilModule_copy2 as copy2, shutilModule_copyfile as copyfile, shutilModule_copyfileobj as copyfileobj, shutilModule_copymode as copymode, shutilModule_copystat as copystat, shutilModule_copytree as copytree, shutilModule_diskUsage as diskUsage, shutilModule_getTerminalSize as getTerminalSize, shutilModule_makeArchive as makeArchive, shutilModule_move as move, shutilModule_rmtree as rmtree, shutilModule_unpackArchive as unpackArchive, shutilModule_which as which };
158
+ }
159
+
160
+ export { type DiskUsage as D, copy2 as a, copytree as b, copy as c, diskUsage as d, copymode as e, copystat as f, getTerminalSize as g, copyfile as h, copyfileobj as i, makeArchive as j, move as m, rmtree as r, shutilModule as s, unpackArchive as u, which as w };
@@ -0,0 +1,2 @@
1
+ import 'node:fs';
2
+ export { D as DiskUsage, c as copy, a as copy2, h as copyfile, i as copyfileobj, e as copymode, f as copystat, b as copytree, d as diskUsage, g as getTerminalSize, j as makeArchive, m as move, r as rmtree, u as unpackArchive, w as which } from './shutil.node-C9kwvhAf.js';
@@ -0,0 +1,33 @@
1
+ import {
2
+ copy,
3
+ copy2,
4
+ copyfile,
5
+ copyfileobj,
6
+ copymode,
7
+ copystat,
8
+ copytree,
9
+ diskUsage,
10
+ getTerminalSize,
11
+ makeArchive,
12
+ move,
13
+ rmtree,
14
+ unpackArchive,
15
+ which
16
+ } from "./chunk-B5AUEOAH.js";
17
+ import "./chunk-MLKGABMK.js";
18
+ export {
19
+ copy,
20
+ copy2,
21
+ copyfile,
22
+ copyfileobj,
23
+ copymode,
24
+ copystat,
25
+ copytree,
26
+ diskUsage,
27
+ getTerminalSize,
28
+ makeArchive,
29
+ move,
30
+ rmtree,
31
+ unpackArchive,
32
+ which
33
+ };
package/dist/string.d.ts CHANGED
@@ -1,9 +1,11 @@
1
1
  /**
2
2
  * Python string module for TypeScript
3
3
  *
4
- * Provides string constants and utility classes matching Python's string module.
4
+ * Provides string constants and utility classes matching Python's string module,
5
+ * including ascii_letters, digits, punctuation, and the Template class.
5
6
  *
6
7
  * @see {@link https://docs.python.org/3/library/string.html | Python string documentation}
8
+ * @module
7
9
  */
8
10
  /** The lowercase letters 'abcdefghijklmnopqrstuvwxyz' */
9
11
  declare const asciiLowercase = "abcdefghijklmnopqrstuvwxyz";
package/dist/string.js CHANGED
@@ -11,8 +11,8 @@ import {
11
11
  punctuation,
12
12
  string,
13
13
  whitespace
14
- } from "./chunk-4QG3772L.js";
15
- import "./chunk-PZ5AY32C.js";
14
+ } from "./chunk-LWYBTWBZ.js";
15
+ import "./chunk-MLKGABMK.js";
16
16
  export {
17
17
  Template,
18
18
  asciiLetters,
@@ -27,4 +27,3 @@ export {
27
27
  string,
28
28
  whitespace
29
29
  };
30
- //# sourceMappingURL=string.js.map
@@ -0,0 +1,214 @@
1
+ /**
2
+ * Python subprocess module for TypeScript
3
+ *
4
+ * Provides functions to spawn new processes and connect to their I/O.
5
+ *
6
+ * @see {@link https://docs.python.org/3/library/subprocess.html | Python subprocess documentation}
7
+ * @module
8
+ */
9
+ /**
10
+ * Special constant to indicate that a pipe should be created.
11
+ */
12
+ declare const PIPE: "pipe";
13
+ /**
14
+ * Special constant to indicate that the subprocess's stderr should be redirected to stdout.
15
+ */
16
+ declare const STDOUT: "stdout";
17
+ /**
18
+ * Special constant to indicate that output should be discarded.
19
+ */
20
+ declare const DEVNULL: "devnull";
21
+ /**
22
+ * Result of a completed process.
23
+ */
24
+ interface CompletedProcess {
25
+ /** The arguments used to launch the process */
26
+ args: string[];
27
+ /** Exit status of the process */
28
+ returncode: number;
29
+ /** Captured stdout (if PIPE was used) */
30
+ stdout: string | null;
31
+ /** Captured stderr (if PIPE was used) */
32
+ stderr: string | null;
33
+ }
34
+ /**
35
+ * Options for subprocess functions.
36
+ */
37
+ interface SubprocessOptions {
38
+ /** Working directory for the command */
39
+ cwd?: string;
40
+ /** Environment variables */
41
+ env?: Record<string, string>;
42
+ /** Input to send to stdin */
43
+ input?: string | Uint8Array;
44
+ /** How to handle stdout */
45
+ stdout?: typeof PIPE | typeof DEVNULL | null;
46
+ /** How to handle stderr */
47
+ stderr?: typeof PIPE | typeof STDOUT | typeof DEVNULL | null;
48
+ /** Timeout in milliseconds */
49
+ timeout?: number;
50
+ /** Shell to use (if true, uses default shell) */
51
+ shell?: boolean | string;
52
+ /** Encoding for text mode (default: utf-8) */
53
+ encoding?: BufferEncoding;
54
+ /** Whether to capture output as text (default: true) */
55
+ text?: boolean;
56
+ /** Whether to raise CalledProcessError on non-zero exit */
57
+ check?: boolean;
58
+ }
59
+ /**
60
+ * Error thrown when a subprocess returns a non-zero exit code.
61
+ */
62
+ declare class CalledProcessError extends Error {
63
+ readonly returncode: number;
64
+ readonly cmd: string[];
65
+ readonly stdout: string | null;
66
+ readonly stderr: string | null;
67
+ constructor(returncode: number, cmd: string[], stdout?: string | null, stderr?: string | null);
68
+ }
69
+ /**
70
+ * Error thrown when a subprocess times out.
71
+ */
72
+ declare class TimeoutExpired extends Error {
73
+ readonly cmd: string[];
74
+ readonly timeout: number;
75
+ readonly stdout: string | null;
76
+ readonly stderr: string | null;
77
+ constructor(cmd: string[], timeout: number, stdout?: string | null, stderr?: string | null);
78
+ }
79
+ /**
80
+ * Run a command and wait for it to complete.
81
+ *
82
+ * @param args - Command and arguments (or a single string if shell=true)
83
+ * @param options - Subprocess options
84
+ * @returns CompletedProcess with exit code and captured output
85
+ *
86
+ * @example
87
+ * ```typescript
88
+ * // Run a simple command
89
+ * const result = run(["ls", "-la"])
90
+ *
91
+ * // Run with shell
92
+ * const result = run("echo hello && echo world", { shell: true })
93
+ *
94
+ * // Capture output
95
+ * const result = run(["git", "status"], { stdout: PIPE })
96
+ * console.log(result.stdout)
97
+ *
98
+ * // Check for errors
99
+ * const result = run(["false"], { check: true }) // Throws CalledProcessError
100
+ * ```
101
+ */
102
+ declare function run(args: string[] | string, options?: SubprocessOptions): CompletedProcess;
103
+ /**
104
+ * Run a command and return its exit code.
105
+ *
106
+ * @param args - Command and arguments
107
+ * @param options - Subprocess options
108
+ * @returns Exit code
109
+ */
110
+ declare function call(args: string[] | string, options?: SubprocessOptions): number;
111
+ /**
112
+ * Run a command and raise CalledProcessError if it returns non-zero.
113
+ *
114
+ * @param args - Command and arguments
115
+ * @param options - Subprocess options
116
+ * @returns Exit code (always 0 if no exception)
117
+ */
118
+ declare function checkCall(args: string[] | string, options?: SubprocessOptions): number;
119
+ /**
120
+ * Run a command and return its output, raising CalledProcessError if it returns non-zero.
121
+ *
122
+ * @param args - Command and arguments
123
+ * @param options - Subprocess options
124
+ * @returns Captured stdout
125
+ */
126
+ declare function checkOutput(args: string[] | string, options?: SubprocessOptions): string;
127
+ /**
128
+ * Get the output of a shell command (convenience function).
129
+ *
130
+ * @param cmd - Shell command to run
131
+ * @returns Command output as string
132
+ */
133
+ declare function getoutput(cmd: string): string;
134
+ /**
135
+ * Get the exit status and output of a shell command.
136
+ *
137
+ * @param cmd - Shell command to run
138
+ * @returns Tuple of [exit_status, output]
139
+ */
140
+ declare function getstatusoutput(cmd: string): [number, string];
141
+ /**
142
+ * A subprocess.Popen-like class for more control over process execution.
143
+ */
144
+ declare class Popen {
145
+ readonly args: string[];
146
+ private readonly process;
147
+ private _returncode;
148
+ private _stdout;
149
+ private _stderr;
150
+ constructor(args: string[] | string, options?: SubprocessOptions);
151
+ /**
152
+ * Wait for the process to complete.
153
+ */
154
+ wait(): Promise<number>;
155
+ /**
156
+ * Get the exit code (or null if still running).
157
+ */
158
+ poll(): number | null;
159
+ /**
160
+ * Communicate with the process and return stdout/stderr.
161
+ */
162
+ communicate(input?: string | Uint8Array): Promise<[string | null, string | null]>;
163
+ /**
164
+ * Send a signal to the process.
165
+ */
166
+ send_signal(signal: number | NodeJS.Signals): boolean;
167
+ /**
168
+ * Terminate the process.
169
+ */
170
+ terminate(): boolean;
171
+ /**
172
+ * Kill the process.
173
+ */
174
+ kill(): boolean;
175
+ /**
176
+ * The process ID.
177
+ */
178
+ get pid(): number | undefined;
179
+ /**
180
+ * The exit code (or null if still running).
181
+ */
182
+ get returncode(): number | null;
183
+ /**
184
+ * The captured stdout.
185
+ */
186
+ get stdout(): string | null;
187
+ /**
188
+ * The captured stderr.
189
+ */
190
+ get stderr(): string | null;
191
+ }
192
+
193
+ type subprocessModule_CalledProcessError = CalledProcessError;
194
+ declare const subprocessModule_CalledProcessError: typeof CalledProcessError;
195
+ type subprocessModule_CompletedProcess = CompletedProcess;
196
+ declare const subprocessModule_DEVNULL: typeof DEVNULL;
197
+ declare const subprocessModule_PIPE: typeof PIPE;
198
+ type subprocessModule_Popen = Popen;
199
+ declare const subprocessModule_Popen: typeof Popen;
200
+ declare const subprocessModule_STDOUT: typeof STDOUT;
201
+ type subprocessModule_SubprocessOptions = SubprocessOptions;
202
+ type subprocessModule_TimeoutExpired = TimeoutExpired;
203
+ declare const subprocessModule_TimeoutExpired: typeof TimeoutExpired;
204
+ declare const subprocessModule_call: typeof call;
205
+ declare const subprocessModule_checkCall: typeof checkCall;
206
+ declare const subprocessModule_checkOutput: typeof checkOutput;
207
+ declare const subprocessModule_getoutput: typeof getoutput;
208
+ declare const subprocessModule_getstatusoutput: typeof getstatusoutput;
209
+ declare const subprocessModule_run: typeof run;
210
+ declare namespace subprocessModule {
211
+ export { subprocessModule_CalledProcessError as CalledProcessError, type subprocessModule_CompletedProcess as CompletedProcess, subprocessModule_DEVNULL as DEVNULL, subprocessModule_PIPE as PIPE, subprocessModule_Popen as Popen, subprocessModule_STDOUT as STDOUT, type subprocessModule_SubprocessOptions as SubprocessOptions, subprocessModule_TimeoutExpired as TimeoutExpired, subprocessModule_call as call, subprocessModule_checkCall as checkCall, subprocessModule_checkOutput as checkOutput, subprocessModule_getoutput as getoutput, subprocessModule_getstatusoutput as getstatusoutput, subprocessModule_run as run };
212
+ }
213
+
214
+ export { type CompletedProcess as C, DEVNULL as D, PIPE as P, STDOUT as S, TimeoutExpired as T, type SubprocessOptions as a, CalledProcessError as b, call as c, checkCall as d, checkOutput as e, getstatusoutput as f, getoutput as g, Popen as h, run as r, subprocessModule as s };
@@ -0,0 +1 @@
1
+ export { b as CalledProcessError, C as CompletedProcess, D as DEVNULL, P as PIPE, h as Popen, S as STDOUT, a as SubprocessOptions, T as TimeoutExpired, c as call, d as checkCall, e as checkOutput, g as getoutput, f as getstatusoutput, r as run } from './subprocess-CZVYzQ3V.js';
@@ -0,0 +1,29 @@
1
+ import {
2
+ CalledProcessError,
3
+ DEVNULL,
4
+ PIPE,
5
+ Popen,
6
+ STDOUT,
7
+ TimeoutExpired,
8
+ call,
9
+ checkCall,
10
+ checkOutput,
11
+ getoutput,
12
+ getstatusoutput,
13
+ run
14
+ } from "./chunk-LLZFLQS6.js";
15
+ import "./chunk-MLKGABMK.js";
16
+ export {
17
+ CalledProcessError,
18
+ DEVNULL,
19
+ PIPE,
20
+ Popen,
21
+ STDOUT,
22
+ TimeoutExpired,
23
+ call,
24
+ checkCall,
25
+ checkOutput,
26
+ getoutput,
27
+ getstatusoutput,
28
+ run
29
+ };