@stim-cli/metro 1.13.0 → 1.15.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.
- package/dist/index.mjs +8 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -19,6 +19,10 @@ function registerOnce(dir, replaces = []) {
|
|
|
19
19
|
replaces
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
|
+
const ANSI_ESCAPE = new RegExp([String.raw`\u001b\][^\u0007\u001b]*(?:\u0007|\u001b\\)`, String.raw`\u001b\[[0-?]*[ -/]*[@-~]`].join("|"), "g");
|
|
23
|
+
function stripAnsi(text) {
|
|
24
|
+
return text.replace(ANSI_ESCAPE, "");
|
|
25
|
+
}
|
|
22
26
|
function isPlainObject(value) {
|
|
23
27
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
24
28
|
}
|
|
@@ -145,7 +149,10 @@ function ndjsonReporter({ dir } = {}) {
|
|
|
145
149
|
ensured = true;
|
|
146
150
|
}
|
|
147
151
|
const target = path.join(logDir, file);
|
|
148
|
-
const line = JSON.stringify(
|
|
152
|
+
const line = JSON.stringify({
|
|
153
|
+
...record,
|
|
154
|
+
msg: stripAnsi(record.msg)
|
|
155
|
+
}) + "\n";
|
|
149
156
|
const unchecked = uncheckedBytes.get(file);
|
|
150
157
|
if (unchecked === void 0 || unchecked >= LOG_ROTATE_BYTES / 8) {
|
|
151
158
|
uncheckedBytes.set(file, 0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stim-cli/metro",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"description": "Metro integration for Stim: shared transforms across worktrees and structured logs.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@stim-cli/cache": "^1.
|
|
28
|
-
"@stim-cli/core": "^1.
|
|
27
|
+
"@stim-cli/cache": "^1.15.0",
|
|
28
|
+
"@stim-cli/core": "^1.15.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"metro-cache": "*"
|