@swiftuijs/twill-shell 0.2.0 → 0.3.1
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/README.md +51 -16
- package/dist/cwd.d.ts.map +1 -1
- package/dist/cwd.js +7 -9
- package/dist/cwd.js.map +1 -1
- package/dist/environment.d.ts.map +1 -1
- package/dist/environment.js +29 -29
- package/dist/environment.js.map +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +64 -60
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +222 -166
- package/dist/index.js.map +1 -1
- package/dist/values.d.ts.map +1 -1
- package/dist/values.js +153 -177
- package/dist/values.js.map +1 -1
- package/package.json +9 -10
package/dist/index.js
CHANGED
|
@@ -1,168 +1,224 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { cwdSnapshot } from "./cwd.js";
|
|
2
|
+
import { Command, Environment, Input, Output, settings } from "./values.js";
|
|
3
|
+
import { environmentSnapshot } from "./environment.js";
|
|
4
|
+
import { OutputLimitError, ProcessAbortError, ProcessError, ProcessExitError, ProcessIOError, ProcessLaunchError, ProcessTeardownError, ProcessTimeoutError } from "./errors.js";
|
|
5
|
+
import childProcess from "node:child_process";
|
|
6
|
+
import { performance } from "node:perf_hooks";
|
|
7
|
+
import { addAbortListener } from "node:events";
|
|
8
|
+
//#region src/index.twill
|
|
9
|
+
var Capture = class {
|
|
10
|
+
reader;
|
|
11
|
+
policy;
|
|
12
|
+
chunks = [];
|
|
13
|
+
size = 0;
|
|
14
|
+
constructor(reader, policy, channel, pid, fail, failed) {
|
|
15
|
+
this.reader = reader;
|
|
16
|
+
this.policy = policy;
|
|
17
|
+
this.onData = (chunk) => {
|
|
18
|
+
if (failed()) return;
|
|
19
|
+
if (this.size + chunk.length > policy.limit) {
|
|
20
|
+
fail(new OutputLimitError(channel, policy.limit, pid));
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
this.size += chunk.length;
|
|
24
|
+
this.chunks.push(chunk);
|
|
25
|
+
};
|
|
26
|
+
this.onError = (cause) => fail(pid === void 0 ? new ProcessLaunchError(cause) : new ProcessIOError(channel, pid, cause));
|
|
27
|
+
reader.on("data", this.onData).on("error", this.onError);
|
|
28
|
+
}
|
|
29
|
+
onData;
|
|
30
|
+
onError;
|
|
31
|
+
value() {
|
|
32
|
+
const bytes = this.chunks.length === 1 ? this.chunks[0] : Buffer.concat(this.chunks, this.size);
|
|
33
|
+
return this.policy.kind === "text" ? bytes.toString("utf8") : bytes;
|
|
34
|
+
}
|
|
35
|
+
detach() {
|
|
36
|
+
this.reader.off("data", this.onData).off("error", this.onError);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
var stdio = (policy) => policy.kind === "inherit" ? "inherit" : policy.kind === "discard" ? "ignore" : "pipe";
|
|
40
|
+
var emptyOptions = Object.freeze({});
|
|
41
|
+
function run(cmd, options = emptyOptions) {
|
|
42
|
+
return new Promise((resolve, reject) => {
|
|
43
|
+
const config = settings(cmd, options);
|
|
44
|
+
const { signal } = config;
|
|
45
|
+
const submitted = config.timeoutMs === void 0 ? void 0 : performance.now();
|
|
46
|
+
if (signal?.aborted) {
|
|
47
|
+
reject(new ProcessAbortError(void 0, signal.reason));
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
let child;
|
|
51
|
+
const input = typeof config.input === "string" ? config.input : config.input instanceof Uint8Array ? Buffer.from(Buffer.from(config.input.buffer, config.input.byteOffset, config.input.byteLength)) : void 0;
|
|
52
|
+
try {
|
|
53
|
+
child = childProcess.spawn(cmd.executable, cmd.arguments, {
|
|
54
|
+
shell: false,
|
|
55
|
+
cwd: config.cwd === void 0 ? void 0 : cwdSnapshot(config.cwd),
|
|
56
|
+
env: config.environment === void 0 ? void 0 : environmentSnapshot(config.environment),
|
|
57
|
+
stdio: [
|
|
58
|
+
typeof config.input === "object" && !(config.input instanceof Uint8Array) ? config.input.kind === "inherit" ? "inherit" : "ignore" : "pipe",
|
|
59
|
+
stdio(config.output),
|
|
60
|
+
stdio(config.error)
|
|
61
|
+
]
|
|
62
|
+
});
|
|
63
|
+
} catch (cause) {
|
|
64
|
+
reject(new ProcessLaunchError(cause));
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
let primary;
|
|
68
|
+
let closed = false, settled = false, inputClosed = child.stdin === null;
|
|
69
|
+
let status;
|
|
70
|
+
let timeout;
|
|
71
|
+
let grace;
|
|
72
|
+
let forced;
|
|
73
|
+
let stdout, stderr;
|
|
74
|
+
let abortListener;
|
|
75
|
+
const failed = () => primary !== void 0;
|
|
76
|
+
const clearTimers = () => {
|
|
77
|
+
clearTimeout(timeout);
|
|
78
|
+
clearTimeout(grace);
|
|
79
|
+
clearTimeout(forced);
|
|
80
|
+
};
|
|
81
|
+
const destroyIO = () => {
|
|
82
|
+
child.stdin?.destroy();
|
|
83
|
+
child.stdout?.destroy();
|
|
84
|
+
child.stderr?.destroy();
|
|
85
|
+
};
|
|
86
|
+
const cleanup = () => {
|
|
87
|
+
clearTimers();
|
|
88
|
+
abortListener?.[Symbol.dispose]();
|
|
89
|
+
child.off("error", onError).off("exit", onExit).off("close", onClose);
|
|
90
|
+
child.stdin?.off("error", onInputError).off("close", onInputClose);
|
|
91
|
+
stdout?.detach();
|
|
92
|
+
stderr?.detach();
|
|
93
|
+
};
|
|
94
|
+
const captured = (capture, stream) => {
|
|
95
|
+
try {
|
|
96
|
+
return capture?.value();
|
|
97
|
+
} catch (cause) {
|
|
98
|
+
const error = new ProcessIOError(stream, child.pid, cause);
|
|
99
|
+
if (primary) primary.cleanupErrors.push(error);
|
|
100
|
+
else primary = error;
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
const finish = () => {
|
|
105
|
+
if (settled || !closed || !inputClosed) return;
|
|
106
|
+
settled = true;
|
|
107
|
+
cleanup();
|
|
108
|
+
const standardOutput = captured(stdout, "stdout"), standardError = captured(stderr, "stderr");
|
|
109
|
+
if (primary) {
|
|
110
|
+
Object.assign(primary, {
|
|
111
|
+
terminationStatus: status,
|
|
112
|
+
standardOutput,
|
|
113
|
+
standardError
|
|
114
|
+
});
|
|
115
|
+
reject(primary);
|
|
116
|
+
} else {
|
|
117
|
+
const result = Object.freeze({
|
|
118
|
+
processIdentifier: child.pid,
|
|
119
|
+
terminationStatus: status,
|
|
120
|
+
standardOutput,
|
|
121
|
+
standardError
|
|
122
|
+
});
|
|
123
|
+
if (config.check && (status.kind !== "exited" || status.code !== 0)) reject(new ProcessExitError(result));
|
|
124
|
+
else resolve(result);
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
const secondary = (error) => primary.cleanupErrors.push(error);
|
|
128
|
+
const kill = (signal) => {
|
|
129
|
+
const errors = primary.cleanupErrors.length;
|
|
130
|
+
try {
|
|
131
|
+
if (!child.kill(signal) && child.exitCode === null && child.signalCode === null && child.pid !== void 0 && primary.cleanupErrors.length === errors) secondary(new ProcessError("Subprocess termination signal failed", child.pid));
|
|
132
|
+
} catch (cause) {
|
|
133
|
+
secondary(new ProcessError("Subprocess termination signal failed", child.pid, { cause }));
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
const fail = (error) => {
|
|
137
|
+
if (settled) return;
|
|
138
|
+
if (primary) {
|
|
139
|
+
secondary(error);
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
primary = error;
|
|
143
|
+
clearTimeout(timeout);
|
|
144
|
+
if (child.pid === void 0 || child.exitCode !== null || child.signalCode !== null) {
|
|
145
|
+
destroyIO();
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
kill("SIGTERM");
|
|
149
|
+
grace = setTimeout(() => {
|
|
150
|
+
if (closed) return;
|
|
151
|
+
kill("SIGKILL");
|
|
152
|
+
destroyIO();
|
|
153
|
+
forced = setTimeout(() => {
|
|
154
|
+
if (closed) return;
|
|
155
|
+
const alive = child.exitCode === null && child.signalCode === null;
|
|
156
|
+
secondary(alive ? new ProcessTeardownError(child.pid) : new ProcessError("Subprocess I/O did not close", child.pid));
|
|
157
|
+
Object.assign(primary, {
|
|
158
|
+
unresolvedProcessIdentifier: alive ? child.pid : void 0,
|
|
159
|
+
standardOutput: captured(stdout, "stdout"),
|
|
160
|
+
standardError: captured(stderr, "stderr")
|
|
161
|
+
});
|
|
162
|
+
settled = true;
|
|
163
|
+
cleanup();
|
|
164
|
+
child.unref();
|
|
165
|
+
reject(primary);
|
|
166
|
+
}, config.killTimeoutMs);
|
|
167
|
+
forced.unref();
|
|
168
|
+
}, config.gracePeriodMs);
|
|
169
|
+
grace.unref();
|
|
170
|
+
};
|
|
171
|
+
const onAbort = () => {
|
|
172
|
+
if (!closed) fail(new ProcessAbortError(child.pid, signal.reason));
|
|
173
|
+
};
|
|
174
|
+
const onError = (cause) => fail(child.pid === void 0 ? new ProcessLaunchError(cause) : new ProcessError("Subprocess process control failed", child.pid, { cause }));
|
|
175
|
+
const onExit = () => {
|
|
176
|
+
if (primary) destroyIO();
|
|
177
|
+
};
|
|
178
|
+
const onClose = (code, signal) => {
|
|
179
|
+
closed = true;
|
|
180
|
+
clearTimers();
|
|
181
|
+
if (child.pid !== void 0) status = Object.freeze(signal !== null ? {
|
|
182
|
+
kind: "signaled",
|
|
183
|
+
signal
|
|
184
|
+
} : {
|
|
185
|
+
kind: "exited",
|
|
186
|
+
code
|
|
187
|
+
});
|
|
188
|
+
finish();
|
|
189
|
+
};
|
|
190
|
+
const onInputError = (cause) => fail(child.pid === void 0 ? new ProcessLaunchError(cause) : new ProcessIOError("stdin", child.pid, cause));
|
|
191
|
+
const onInputClose = () => {
|
|
192
|
+
inputClosed = true;
|
|
193
|
+
finish();
|
|
194
|
+
};
|
|
195
|
+
child.on("error", onError).once("exit", onExit).once("close", onClose);
|
|
196
|
+
if (child.stdout) stdout = new Capture(child.stdout, config.output, "stdout", child.pid, fail, failed);
|
|
197
|
+
if (child.stderr) stderr = new Capture(child.stderr, config.error, "stderr", child.pid, fail, failed);
|
|
198
|
+
if (child.stdin) {
|
|
199
|
+
child.stdin.on("error", onInputError).once("close", onInputClose);
|
|
200
|
+
try {
|
|
201
|
+
child.stdin.end(input);
|
|
202
|
+
} catch (cause) {
|
|
203
|
+
fail(new ProcessIOError("stdin", child.pid, cause));
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
if (signal) {
|
|
207
|
+
if (signal.aborted) onAbort();
|
|
208
|
+
else try {
|
|
209
|
+
abortListener = addAbortListener(signal, onAbort);
|
|
210
|
+
} catch (cause) {
|
|
211
|
+
fail(new ProcessError("Subprocess cancellation setup failed", child.pid, { cause }));
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
if (config.timeoutMs !== void 0 && !primary) {
|
|
215
|
+
timeout = setTimeout(() => fail(new ProcessTimeoutError(config.timeoutMs, child.pid)), Math.max(0, config.timeoutMs - (performance.now() - submitted)));
|
|
216
|
+
timeout.unref();
|
|
217
|
+
}
|
|
218
|
+
});
|
|
16
219
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (signal?.aborted) {
|
|
22
|
-
reject(new ProcessAbortError(undefined, signal.reason));
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
const input = typeof config.input === 'string'
|
|
26
|
-
? Buffer.from(config.input)
|
|
27
|
-
: config.input instanceof Uint8Array
|
|
28
|
-
? Buffer.from(config.input.buffer, config.input.byteOffset, config.input.byteLength)
|
|
29
|
-
: undefined;
|
|
30
|
-
const inputPolicy = typeof config.input === 'object' && !(config.input instanceof Uint8Array)
|
|
31
|
-
? config.input
|
|
32
|
-
: undefined;
|
|
33
|
-
let backend, job;
|
|
34
|
-
try {
|
|
35
|
-
backend = loadBackend();
|
|
36
|
-
job = backend.start({
|
|
37
|
-
executable: command.executable,
|
|
38
|
-
arguments: command.arguments,
|
|
39
|
-
cwd: cwdSnapshot(config.cwd),
|
|
40
|
-
environment: environmentSnapshot(config.environment),
|
|
41
|
-
input,
|
|
42
|
-
inheritInput: inputPolicy?.kind === 'inherit',
|
|
43
|
-
outputLimit: 'limit' in config.output ? config.output.limit : undefined,
|
|
44
|
-
errorLimit: 'limit' in config.error ? config.error.limit : undefined,
|
|
45
|
-
discardOutput: config.output.kind === 'discard',
|
|
46
|
-
discardError: config.error.kind === 'discard',
|
|
47
|
-
timeoutMs: config.timeoutMs,
|
|
48
|
-
gracePeriodMs: config.gracePeriodMs,
|
|
49
|
-
killTimeoutMs: config.killTimeoutMs,
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
catch (error) {
|
|
53
|
-
reject(new ProcessLaunchError(error));
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
let abortReason, setupFailure;
|
|
57
|
-
let listener;
|
|
58
|
-
const abort = () => {
|
|
59
|
-
abortReason = signal.reason;
|
|
60
|
-
backend.cancel(job.id, false);
|
|
61
|
-
};
|
|
62
|
-
if (signal) {
|
|
63
|
-
if (signal.aborted)
|
|
64
|
-
abort();
|
|
65
|
-
else {
|
|
66
|
-
try {
|
|
67
|
-
listener = addAbortListener(signal, abort);
|
|
68
|
-
}
|
|
69
|
-
catch (error) {
|
|
70
|
-
setupFailure = error;
|
|
71
|
-
backend.cancel(job.id, true);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
const failure = (value, pid) => {
|
|
76
|
-
switch (value.kind) {
|
|
77
|
-
case 'launch':
|
|
78
|
-
return new ProcessLaunchError(cause(value));
|
|
79
|
-
case 'abort':
|
|
80
|
-
return new ProcessAbortError(pid, abortReason);
|
|
81
|
-
case 'timeout':
|
|
82
|
-
return new ProcessTimeoutError(config.timeoutMs, pid);
|
|
83
|
-
case 'io':
|
|
84
|
-
return new ProcessIOError(value.stream, pid, cause(value));
|
|
85
|
-
case 'limit': {
|
|
86
|
-
const policy = value.stream === 'stdout' ? config.output : config.error;
|
|
87
|
-
return new OutputLimitError(value.stream, policy.limit, pid);
|
|
88
|
-
}
|
|
89
|
-
case 'teardown':
|
|
90
|
-
return new ProcessTeardownError(pid, cause(value));
|
|
91
|
-
case 'setup':
|
|
92
|
-
return new ProcessError('Subprocess cancellation setup failed', pid, {
|
|
93
|
-
cause: setupFailure,
|
|
94
|
-
});
|
|
95
|
-
default:
|
|
96
|
-
return new ProcessError(value.message, pid, { cause: cause(value) });
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
const complete = (outcome) => {
|
|
100
|
-
listener?.[Symbol.dispose]();
|
|
101
|
-
const pid = outcome.processIdentifier;
|
|
102
|
-
const terminationStatus = outcome.windowsSignal !== undefined
|
|
103
|
-
? Object.freeze({ kind: 'signaled', signal: outcome.windowsSignal })
|
|
104
|
-
: outcome.signal !== undefined
|
|
105
|
-
? Object.freeze({
|
|
106
|
-
kind: 'signaled',
|
|
107
|
-
signal: Object.keys(constants.signals).find((key) => constants.signals[key] === outcome.signal) ?? outcome.signal,
|
|
108
|
-
})
|
|
109
|
-
: outcome.code !== undefined
|
|
110
|
-
? Object.freeze({ kind: 'exited', code: outcome.code })
|
|
111
|
-
: undefined;
|
|
112
|
-
let primary = outcome.failure ? failure(outcome.failure, pid) : undefined;
|
|
113
|
-
const secondary = outcome.cleanupErrors.map((value) => failure(value, pid));
|
|
114
|
-
if (setupFailure !== undefined && outcome.failure?.kind !== 'setup') {
|
|
115
|
-
const error = new ProcessError('Subprocess cancellation setup failed', pid, {
|
|
116
|
-
cause: setupFailure,
|
|
117
|
-
});
|
|
118
|
-
if (primary)
|
|
119
|
-
secondary.push(error);
|
|
120
|
-
else
|
|
121
|
-
primary = error;
|
|
122
|
-
}
|
|
123
|
-
const capture = (bytes, policy, stream) => {
|
|
124
|
-
try {
|
|
125
|
-
return policy.kind === 'text' ? bytes?.toString('utf8') : bytes;
|
|
126
|
-
}
|
|
127
|
-
catch (error) {
|
|
128
|
-
const value = new ProcessIOError(stream, pid, error);
|
|
129
|
-
if (primary)
|
|
130
|
-
secondary.push(value);
|
|
131
|
-
else
|
|
132
|
-
primary = value;
|
|
133
|
-
return undefined;
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
const standardOutput = capture(outcome.standardOutput, config.output, 'stdout');
|
|
137
|
-
const standardError = capture(outcome.standardError, config.error, 'stderr');
|
|
138
|
-
if (primary) {
|
|
139
|
-
primary.cleanupErrors.push(...secondary);
|
|
140
|
-
Object.assign(primary, {
|
|
141
|
-
terminationStatus,
|
|
142
|
-
standardOutput,
|
|
143
|
-
standardError,
|
|
144
|
-
unresolvedProcessIdentifier: outcome.unresolvedProcessIdentifier,
|
|
145
|
-
});
|
|
146
|
-
reject(primary);
|
|
147
|
-
}
|
|
148
|
-
else {
|
|
149
|
-
const result = Object.freeze({
|
|
150
|
-
processIdentifier: pid,
|
|
151
|
-
terminationStatus: terminationStatus,
|
|
152
|
-
standardOutput,
|
|
153
|
-
standardError,
|
|
154
|
-
});
|
|
155
|
-
if (config.check && (terminationStatus.kind !== 'exited' || terminationStatus.code !== 0))
|
|
156
|
-
reject(new ProcessExitError(result));
|
|
157
|
-
else
|
|
158
|
-
resolve(result);
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
|
-
job.promise.then(complete).catch((error) => {
|
|
162
|
-
listener?.[Symbol.dispose]();
|
|
163
|
-
reject(new ProcessError('Native subprocess operation failed', undefined, { cause: error }));
|
|
164
|
-
});
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
export const Subprocess = Object.freeze({ run });
|
|
220
|
+
var Subprocess = Object.freeze({ run });
|
|
221
|
+
//#endregion
|
|
222
|
+
export { Command, Environment, Input, Output, OutputLimitError, ProcessAbortError, ProcessError, ProcessExitError, ProcessIOError, ProcessLaunchError, ProcessTeardownError, ProcessTimeoutError, Subprocess };
|
|
223
|
+
|
|
168
224
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.twill"],"mappings":";;;;;;;;AA4DA,IAAM,UAAN,MAAa;CAIQ;CACA;CAJF,SAAmB,CAAA;CAC5B,OAAO;CACf,YACmB,QACA,QACjB,SACA,KACA,MACA,QAAqB;EALJ,KAAA,SAAA;EACA,KAAA,SAAA;EAMjB,KAAK,UAAU,UAAiB;GAC9B,IAAI,OAAM,GAAI;GACd,IAAI,KAAK,OAAO,MAAM,SAAS,OAAO,OAAO;IAC3C,KAAK,IAAI,iBAAiB,SAAS,OAAO,OAAO,GAAG,CAAC;IACrD;GACF;GACA,KAAK,QAAQ,MAAM;GACnB,KAAK,OAAO,KAAK,KAAK;EACxB;EACA,KAAK,WAAW,UACd,KACE,QAAQ,KAAA,IAAY,IAAI,mBAAmB,KAAK,IAAI,IAAI,eAAe,SAAS,KAAK,KAAK,CAAC;EAE/F,OAAO,GAAG,QAAQ,KAAK,MAAM,CAAC,CAAC,GAAG,SAAS,KAAK,OAAO;CACzD;CACiB;CACA;CACjB,QAAK;EACH,MAAM,QACJ,KAAK,OAAO,WAAW,IAAI,KAAK,OAAO,KAAM,OAAO,OAAO,KAAK,QAAQ,KAAK,IAAI;EACnF,OAAO,KAAK,OAAO,SAAS,SAAS,MAAM,SAAS,MAAM,IAAI;CAChE;CACA,SAAM;EACJ,KAAK,OAAO,IAAI,QAAQ,KAAK,MAAM,CAAC,CAAC,IAAI,SAAS,KAAK,OAAO;CAChE;AACF;AACA,IAAM,SAAS,WACb,OAAO,SAAS,YAAY,YAAY,OAAO,SAAS,YAAY,WAAW;AACjF,IAAM,eAAe,OAAO,OAAO,CAAA,CAAE;AAIrC,SAAS,IACP,KACA,UAAiC,cAAqC;CAEtE,O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