tandem-editor 0.1.0 → 0.1.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/dist/cli/index.js +1 -1
- package/dist/server/index.js +23 -20
- package/dist/server/index.js.map +1 -1
- package/package.json +1 -1
- package/sample/welcome.md +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -211,7 +211,7 @@ var init_start = __esm({
|
|
|
211
211
|
});
|
|
212
212
|
|
|
213
213
|
// src/cli/index.ts
|
|
214
|
-
var version = true ? "0.1.
|
|
214
|
+
var version = true ? "0.1.1" : "0.0.0-dev";
|
|
215
215
|
var args = process.argv.slice(2);
|
|
216
216
|
if (args.includes("--help") || args.includes("-h")) {
|
|
217
217
|
console.log(`tandem v${version}
|
package/dist/server/index.js
CHANGED
|
@@ -108,24 +108,12 @@ async function startHocuspocus(port) {
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
|
+
await hocuspocusInstance.listen();
|
|
111
112
|
const internal = hocuspocusInstance.server?.httpServer;
|
|
112
113
|
if (internal) {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
internal.removeListener("error", onError);
|
|
117
|
-
return result;
|
|
118
|
-
}),
|
|
119
|
-
new Promise((_, reject) => {
|
|
120
|
-
onError = (err) => reject(err);
|
|
121
|
-
internal.once("error", onError);
|
|
122
|
-
})
|
|
123
|
-
]);
|
|
124
|
-
} else {
|
|
125
|
-
console.error(
|
|
126
|
-
"[Tandem] Warning: could not access Hocuspocus internal httpServer \u2014 bind failures may not be caught. Hocuspocus internals may have changed."
|
|
127
|
-
);
|
|
128
|
-
await hocuspocusInstance.listen();
|
|
114
|
+
internal.on("error", (err) => {
|
|
115
|
+
console.error(`[Tandem] Hocuspocus httpServer error: ${err.message}`);
|
|
116
|
+
});
|
|
129
117
|
}
|
|
130
118
|
return hocuspocusInstance;
|
|
131
119
|
}
|
|
@@ -4541,9 +4529,24 @@ function injectTutorialAnnotations(doc) {
|
|
|
4541
4529
|
}
|
|
4542
4530
|
|
|
4543
4531
|
// src/server/index.ts
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4532
|
+
var isProduction = process.env.TANDEM_OPEN_BROWSER === "1";
|
|
4533
|
+
var SUPPRESSED_PATTERNS = [/^\[mammoth\]/, /Invalid access/i, /^\s*add yjs type/i];
|
|
4534
|
+
var originalStderrWrite = process.stderr.write.bind(process.stderr);
|
|
4535
|
+
if (isProduction) {
|
|
4536
|
+
const filteredError = (...args) => {
|
|
4537
|
+
const msg = args.map(String).join(" ");
|
|
4538
|
+
if (SUPPRESSED_PATTERNS.some((p) => p.test(msg))) return;
|
|
4539
|
+
originalStderrWrite(msg + "\n");
|
|
4540
|
+
};
|
|
4541
|
+
console.log = filteredError;
|
|
4542
|
+
console.warn = filteredError;
|
|
4543
|
+
console.info = filteredError;
|
|
4544
|
+
console.error = filteredError;
|
|
4545
|
+
} else {
|
|
4546
|
+
console.log = console.error;
|
|
4547
|
+
console.warn = console.error;
|
|
4548
|
+
console.info = console.error;
|
|
4549
|
+
}
|
|
4547
4550
|
var transportMode = (process.env.TANDEM_TRANSPORT || "http").toLowerCase();
|
|
4548
4551
|
var wsPort = parseInt(process.env.TANDEM_PORT || String(DEFAULT_WS_PORT), 10);
|
|
4549
4552
|
var mcpPort = parseInt(process.env.TANDEM_MCP_PORT || String(DEFAULT_MCP_PORT), 10);
|
|
@@ -4659,7 +4662,7 @@ async function main() {
|
|
|
4659
4662
|
console.error(` WebSocket: ws://localhost:${wsPort}`);
|
|
4660
4663
|
console.error(` Health: http://localhost:${mcpPort}/health`);
|
|
4661
4664
|
console.error("");
|
|
4662
|
-
console.error(" Open Claude Code
|
|
4665
|
+
console.error(" Open Claude Code and ask Claude to review a document.");
|
|
4663
4666
|
console.error("");
|
|
4664
4667
|
} else {
|
|
4665
4668
|
(async () => {
|