@superdoc/cli 0.33.0-next.3 → 0.33.0-next.4
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 +39 -4
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -272490,6 +272490,7 @@ function createSDYjsSingleDocProvider(options) {
|
|
|
272490
272490
|
const ydoc = new Doc({ gc: false });
|
|
272491
272491
|
const providerRoomName = encodeProviderRoomName(rootId);
|
|
272492
272492
|
const stateListeners = new Set;
|
|
272493
|
+
const statelessListeners = new Set;
|
|
272493
272494
|
let currentState = "connecting";
|
|
272494
272495
|
const syncWaiters = createSyncWaitQueue();
|
|
272495
272496
|
let connectionFailure = null;
|
|
@@ -272534,6 +272535,15 @@ function createSDYjsSingleDocProvider(options) {
|
|
|
272534
272535
|
const safeDetail = redactForDiagnostics(rawDetail);
|
|
272535
272536
|
connectionFailure = new CollabV2DiagnosticError(COLLAB_V2_DIAGNOSTICS.COLLAB_V2_PROVIDER_TRANSPORT_FAILED, "provider transport reported a terminal failure", { rootId, detail: safeDetail });
|
|
272536
272537
|
setState("failed");
|
|
272538
|
+
},
|
|
272539
|
+
onStateless: (message) => {
|
|
272540
|
+
if (destroyed || typeof message !== "string")
|
|
272541
|
+
return;
|
|
272542
|
+
for (const listener of Array.from(statelessListeners)) {
|
|
272543
|
+
try {
|
|
272544
|
+
listener(message);
|
|
272545
|
+
} catch {}
|
|
272546
|
+
}
|
|
272537
272547
|
}
|
|
272538
272548
|
});
|
|
272539
272549
|
};
|
|
@@ -272576,6 +272586,24 @@ function createSDYjsSingleDocProvider(options) {
|
|
|
272576
272586
|
stateListeners.add(listener);
|
|
272577
272587
|
return () => stateListeners.delete(listener);
|
|
272578
272588
|
},
|
|
272589
|
+
async sendStateless(message) {
|
|
272590
|
+
if (destroyed) {
|
|
272591
|
+
throw new CollabV2DiagnosticError(COLLAB_V2_DIAGNOSTICS.COLLAB_V2_CONNECTION_DESTROYED, "connection has been destroyed", { rootId });
|
|
272592
|
+
}
|
|
272593
|
+
if (typeof message !== "string") {
|
|
272594
|
+
throw new TypeError("stateless collaboration message must be a string");
|
|
272595
|
+
}
|
|
272596
|
+
if (!transport?.sendStateless) {
|
|
272597
|
+
throw new CollabV2DiagnosticError(COLLAB_V2_DIAGNOSTICS.COLLAB_V2_PROVIDER_CAPABILITY_UNSUPPORTED, "provider transport does not support stateless messages", { rootId });
|
|
272598
|
+
}
|
|
272599
|
+
await transport.sendStateless(message);
|
|
272600
|
+
},
|
|
272601
|
+
subscribeStateless(listener) {
|
|
272602
|
+
if (destroyed)
|
|
272603
|
+
return () => {};
|
|
272604
|
+
statelessListeners.add(listener);
|
|
272605
|
+
return () => statelessListeners.delete(listener);
|
|
272606
|
+
},
|
|
272579
272607
|
disconnect() {
|
|
272580
272608
|
if (destroyed) {
|
|
272581
272609
|
throw new CollabV2DiagnosticError(COLLAB_V2_DIAGNOSTICS.COLLAB_V2_CONNECTION_DESTROYED, "connection has been destroyed", { rootId });
|
|
@@ -272601,6 +272629,7 @@ function createSDYjsSingleDocProvider(options) {
|
|
|
272601
272629
|
rejectPendingSyncWaiters();
|
|
272602
272630
|
setState("destroyed");
|
|
272603
272631
|
stateListeners.clear();
|
|
272632
|
+
statelessListeners.clear();
|
|
272604
272633
|
ydoc.destroy();
|
|
272605
272634
|
connection = null;
|
|
272606
272635
|
connectedRootId = null;
|
|
@@ -274749,7 +274778,7 @@ function createHocuspocusSingleDocAdapter(config) {
|
|
|
274749
274778
|
capabilities: buildSingleDocCapabilities2(),
|
|
274750
274779
|
defaultSyncTimeoutMs: config.defaultSyncTimeoutMs,
|
|
274751
274780
|
hooks: {
|
|
274752
|
-
attach({ ydoc, providerRoomName, onSynced, onDegraded, onFailed }) {
|
|
274781
|
+
attach({ ydoc, providerRoomName, onSynced, onDegraded, onFailed, onStateless }) {
|
|
274753
274782
|
let hasSynced = false;
|
|
274754
274783
|
const provider = new HocuspocusProvider2({
|
|
274755
274784
|
url: config.url,
|
|
@@ -274784,10 +274813,16 @@ function createHocuspocusSingleDocAdapter(config) {
|
|
|
274784
274813
|
}
|
|
274785
274814
|
if (hasSynced)
|
|
274786
274815
|
onDegraded();
|
|
274816
|
+
},
|
|
274817
|
+
onStateless({ payload }) {
|
|
274818
|
+
onStateless(payload);
|
|
274787
274819
|
}
|
|
274788
274820
|
});
|
|
274789
274821
|
activeProvider = provider;
|
|
274790
274822
|
const transport = {
|
|
274823
|
+
sendStateless(message) {
|
|
274824
|
+
provider.sendStateless(message);
|
|
274825
|
+
},
|
|
274791
274826
|
disconnect() {
|
|
274792
274827
|
try {
|
|
274793
274828
|
provider.disconnect();
|
|
@@ -415213,7 +415248,7 @@ var _0x5a3eb8, _0x448561, _0x4cc312 = (_0x4ec52d, _0x961591) => () => (_0x961591
|
|
|
415213
415248
|
}, _0x5e3cef, _0x176e5b, _0x4bffaf, _0x6fc8ae, _0x3cdc8d, _0x3f6b25, _0x279f86, _0x5ef16f, _0x7bbc69, _0x4cad7c, _0x4b2826, _0x198963, _0x2c5abe, _0x380a4a, _0x44fab4, _0x380a1a = 25000, _0x48fff5, _0x53155e = 2147483647, _0x530b5f = 63, _0x1dccbb, _0x505f6b, _0x2b97f7, _0x32c8ee, _0x1086c0, _0x182a7e = "Content control mutations outside the document body are not supported by this adapter.", _0x206267, _0x3e547a, _0xb5453a = 128, _0x2d7cb7 = 16, _0x45c1be, _0x271971, _0x5d1c84, _0x381ba6, _0x16e5ba, _0x10c5fc, _0x2b4f09, _0x8b4090, _0x8c0a0a, _0x189c7a, _0x49d008, _0x7b4e80, _0x169af6, _0x14d803, _0x5b6687, _0x7018c5 = "v2-text:", _0x354944, _0x180938, _0x5d4fc0, _0x264b71, _0x5e8379 = 1638, _0xb54b71 = 255, _0x274294 = 2147483647, _0x5f4849 = 63, _0xcb18ec, _0x48f01e, _0x3c0146 = "tc-comment:", _0x555c03, _0x31e85c, _0x3254e6, _0x143dd9, _0x3f8182, _0xeff8ff, _0x1c2814, _0x5eb952, _0x4ea562 = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", _0x4cb037 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships", _0x2fde13, _0x78cb74 = 32, _0x1a6605, _0x1544bb, _0xee4741, _0x399344, _0x4de648, _0x3ec379 = 256, _0xde0539, _0x403c4d, _0x15c350 = 4096, _0x5e7243 = 256, _0x29abcb, _0x5ab743, _0x14fede, _0x2fb6fb, _0x2d2d50, _0x42f892, _0x385084, _0xf3b9d9, _0x5baf9e, _0x2fda34, _0xe20623, _0x288f55, _0x394274, _0x488849, _0x3afdbf, _0x3357fb, _0x193aae, _0x1fc993 = "v2-range:", _0x251cfa, _0x1f9758, _0x6649de, _0x207251, _0x56a2e4, _0x59bfb2, _0x33b483, _0x408d63, _0x1a366e, _0x41dfdc, _0x508273, _0xfcdf40, _0x42d4d5, _0x35e1cf, _0x7fc793, _0x3cf9b1 = 32, _0x3da5c1, _0x6016e2, _0x37a6fd, _0x5f058d, _0xc9da5b, _0x438989, _0x26171a = "/word/document.xml", _0x2c7b78, _0xc7da05, _0x160054, _0x46b026 = "/word/settings.xml", _0x12682 = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", _0x4b140c, _0x563823, _0x57fe76, _0x40d9e1 = "/word/document.xml", _0x3c4d9b = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", _0x563483, _0x30c1e4, _0x208fed = "/[Content_Types].xml", _0x5a73eb = "/", _0x598651, _0x587499 = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", _0x234a36, _0x48a126, _0x46fbfa = "http://schemas.openxmlformats.org/package/2006/relationships", _0xb1b16b = "http://schemas.openxmlformats.org/package/2006/content-types", _0x24b2cd, _0xeee644 = "/relationships/header", _0x505201 = "/relationships/footer", _0x4eae9b = "/word/_rels/document.xml.rels", _0x358755 = "/[Content_Types].xml", _0x108290 = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", _0x2d473a, _0x1e2f77, _0x499aa7, _0x5bcb32, _0x3c7f7b, _0x380d5b, _0xc8258e, _0xd413a = 9525, _0x14f2a6, _0x233f2f, _0x22a950, _0x26257e, _0x3bf323, _0x4ac8fc, _0x282583 = "/word/_rels/document.xml.rels", _0x3677f1 = "/[Content_Types].xml", _0x56a50d = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"></Relationships>', _0xbc7607 = "/relationships/header", _0x1a1e54 = "/relationships/footer", _0x21681b, _0xb1f8e0, _0x6528ee = "/word/styles.xml", _0x4fe65d, _0x48037b, _0x43ee49, _0x2387bf, _0x510a81 = "/word/document.xml", _0x39647c = "body:/word/document.xml", _0x23baac = "snapshot", _0x109e91 = "superdoc-v2", _0x49e4f1, _0x5bf8ec, _0x4f7895 = "superdoc-v2-full-diff-snapshot", _0x135dfe = "sd-diff-v2/full-snapshot/v1", _0x41427d = "superdoc-v2-full-diff-payload", _0x3cd5f0 = "sd-diff-v2/full-payload/v1", _0x269b1a, _0x5e4225 = "/word/_rels/document.xml.rels", _0x350865 = "/word/document.xml", _0x586fa5 = "/[Content_Types].xml", _0xd2b170, _0x1bbf93, _0x28ce36, _0x4bf084 = "http://schemas.openxmlformats.org/package/2006/relationships", _0x509d4e = "http://schemas.openxmlformats.org/package/2006/content-types", _0x37c9c0 = "http://schemas.openxmlformats.org/drawingml/2006/main", _0x206075 = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", _0x57c711 = "http://schemas.openxmlformats.org/package/2006/metadata/core-properties", _0x12a5b6 = "http://purl.org/dc/terms/", _0x1b0dbe = "http://schemas.openxmlformats.org/officeDocument/2006/extended-properties", _0x3ab8f5, _0x31895d, _0x39d2c5 = "body:/word/document.xml", _0x2a61a3 = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", _0x2215e6 = "http://schemas.microsoft.com/office/word/2010/wordml", _0x40fc97 = "http://schemas.openxmlformats.org/markup-compatibility/2006", _0x498288, _0x4326a1, _0x2a7b04, _0x3d9d52, _0x403b7e = 64, _0x1329c6 = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", _0x1ec1ea, _0x1b8b64, _0x48210c, _0x2b84d6 = "/word/document.xml", _0x77adfd = "/word/numbering.xml", _0x4a6235, _0x38f687, _0x5b2040 = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", _0x262747 = "http://schemas.microsoft.com/office/word/2010/wordml", _0x578b45 = "http://schemas.openxmlformats.org/officeDocument/2006/math", _0x38b464 = "http://schemas.openxmlformats.org/markup-compatibility/2006", _0x11d5aa = "urn:schemas-microsoft-com:vml", _0x4e285a, _0x335ef2, _0x28f43f, _0x3fde5f, _0x54add4, _0x3806ec, _0x30426b, _0x4d6f72, _0x549922, _0x3848c1 = "\x00unresolved", _0x18ddac, _0x360819, _0x5d6ba4, _0x486383, _0x5c34c1, _0x22016f, _0xd7e2af = "/word/numbering.xml", _0x5e0dad = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", _0x193588, _0x17fb20, _0x2d5ba, _0x575f58, _0x94318d, _0x3f20c9, _0x5ac253, _0x456fec, _0x3e7841 = "/word/document.xml", _0x3ffd94, _0x270798, _0x1218e6, _0x8e67c8, _0x4e2e40, _0x500c42, _0x263772 = 100, _0x598d6b = 100, _0x370b3b = 100, _0xf5c360 = 1000, _0x2d14f0 = 500, _0xbef277, _0x2f5947 = "v2-textbox-geometry", _0x1dc316, _0x2fc1dc, _0x122c35, _0xc28aa8, _0x476026 = 100, _0x5ba3a2, _0xc8a170, _0x54fea0, _0x5c3749 = "hl-field:", _0x4390f8 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", _0x34acb3, _0x29a9e2, _0x6adfbd, _0x1fa4c0, _0x3bcc65, _0x45f3fd, _0x5f3361, _0x5b7a10, _0x1cadd7, _0xee78f3 = 9525, _0x149461 = 1000, _0xf5786e, _0x3df739, _0x59bc33, _0x49a6ec = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", _0x2c8b03 = 9525, _0x3758da = 1000, _0x49dc38 = 251659264, _0x55c95b = "{C183D7F6-B498-43B3-948B-1728B52AA6E4}", _0x315bf7 = "http://schemas.microsoft.com/office/drawing/2017/decorative", _0x1ff9af, _0x2539eb, _0x499816, _0x2f858b = 12240, _0x352dcd = 1440, _0x3e1547 = 15, _0x1c1a53, _0x1e8b63 = "http://schemas.microsoft.com/office/word/2010/wordml", _0x5ca24a = "/word/footnotes.xml", _0x2b82eb = "/word/endnotes.xml", _0x317d2b = "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml", _0x362f40 = "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml", _0x55cea6 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes", _0x24e7b5 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes", _0x1d8d81, _0x1b0724, _0x42150f, _0x4f7560, _0x2779bf, _0x3ecb47 = 63, _0x36e5b7 = 1638, _0x43f6f3 = 255, _0x5054dc, _0x3c492b, _0x25ceed, _0x1c996c, _0x315f2, _0x3c43d5, _0x58953f = 9525, _0x372533 = 1024, _0x98daa9, _0x3f2137, _0x24a6da, _0x3aacc1, _0x3b909c, _0x707894, _0x2ef49e, _0x133d81, _0x4a0fe9, _0x32d7bb, _0x56c19f, _0x329ac2 = "Anchored metadata", _0x5dba45 = "http://schemas.microsoft.com/office/word/2012/wordml", _0x5797d5 = 2147483646, _0x9a1bf6, _0xf70682, _0x189ee8 = "all", _0xd6483d, _0x101210, _0x367492, _0x1d0f96 = "[Content_Types].xml", _0x3ee91b = "/[Content_Types].xml", _0x404337 = "/word/document.xml", _0x58d196 = "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml", _0x237c7c = "http://purl.oclc.org/ooxml/wordprocessingml/main", _0x424c2e = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme", _0x28b140 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable", _0x3d4b85 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings", _0x3c3381 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", _0xcb567c = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", _0x540848 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", _0x2d217b, _0x4dd677 = "word/styles.xml", _0x52bd06, _0xb899cb = "word/numbering.xml", _0x41f157 = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", _0x2d68a4, _0x1994f8, _0x250e14, _0x1a8e5f = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"></Relationships>', _0x55f090, _0x5c9124, _0x203474, _0x1571eb, _0x2a8d9c, _0x9db706, _0x3cac4e, _0x2444fc, _0x5709d6;
|
|
415214
415249
|
var init_document_runtime = __esm(() => {
|
|
415215
415250
|
/*!
|
|
415216
|
-
* DOCX Engine v0.12.0-next.
|
|
415251
|
+
* DOCX Engine v0.12.0-next.3
|
|
415217
415252
|
* Proprietary software. Copyright © 2026 Harbour Enterprises, Inc., d/b/a SuperDoc.
|
|
415218
415253
|
* Use governed by the DOCX Engine Proprietary License Agreement.
|
|
415219
415254
|
* No reverse engineering, deobfuscation, redistribution,
|
|
@@ -430915,7 +430950,7 @@ var _0x1a6a3d, _0x493a4c, _0x52c2a2 = "host.request.timeoutMs", _0x5cce59 = 2147
|
|
|
430915
430950
|
var init_document_host = __esm(() => {
|
|
430916
430951
|
init_document_runtime();
|
|
430917
430952
|
/*!
|
|
430918
|
-
* DOCX Engine v0.12.0-next.
|
|
430953
|
+
* DOCX Engine v0.12.0-next.3
|
|
430919
430954
|
* Proprietary software. Copyright © 2026 Harbour Enterprises, Inc., d/b/a SuperDoc.
|
|
430920
430955
|
* Use governed by the DOCX Engine Proprietary License Agreement.
|
|
430921
430956
|
* No reverse engineering, deobfuscation, redistribution,
|
|
@@ -752953,7 +752988,7 @@ var init_host2 = __esm(() => {
|
|
|
752953
752988
|
});
|
|
752954
752989
|
|
|
752955
752990
|
// ../../packages/sdk/langs/node/src/runtime/sdk-version.generated.ts
|
|
752956
|
-
var SDK_VERSION = "2.10.0-next.
|
|
752991
|
+
var SDK_VERSION = "2.10.0-next.4";
|
|
752957
752992
|
|
|
752958
752993
|
// ../../packages/sdk/langs/node/src/runtime/embedded-platform.ts
|
|
752959
752994
|
import { chmodSync, existsSync } from "node:fs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc/cli",
|
|
3
|
-
"version": "0.33.0-next.
|
|
3
|
+
"version": "0.33.0-next.4",
|
|
4
4
|
"description": "Command-line interface for SuperDoc: inspect, convert, and edit .docx files from a terminal or a script.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "AGPL-3.0",
|
|
@@ -29,15 +29,15 @@
|
|
|
29
29
|
"fast-glob": "^3.3.3",
|
|
30
30
|
"happy-dom": "^20.3.4",
|
|
31
31
|
"ws": "^8.18.0",
|
|
32
|
-
"superdoc": "2.13.0-next.
|
|
32
|
+
"superdoc": "2.13.0-next.3",
|
|
33
33
|
"y-websocket": "^3.0.0",
|
|
34
34
|
"yjs": "13.6.31"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@hocuspocus/server": "^2.13.6",
|
|
38
|
-
"@superdoc/sdk": "2.10.0-next.
|
|
38
|
+
"@superdoc/sdk": "2.10.0-next.4",
|
|
39
39
|
"@superdoc/document-api": "0.1.0-alpha.0",
|
|
40
|
-
"@superdoc/docx-engine": "0.12.0-next.
|
|
40
|
+
"@superdoc/docx-engine": "0.12.0-next.3",
|
|
41
41
|
"@types/bun": "^1.3.8",
|
|
42
42
|
"@types/node": "22.19.2",
|
|
43
43
|
"@types/ws": "^8.5.13",
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
53
|
"optionalDependencies": {
|
|
54
|
-
"@superdoc/cli-darwin-arm64": "0.33.0-next.
|
|
55
|
-
"@superdoc/cli-darwin-x64": "0.33.0-next.
|
|
56
|
-
"@superdoc/cli-linux-x64": "0.33.0-next.
|
|
57
|
-
"@superdoc/cli-linux-arm64": "0.33.0-next.
|
|
58
|
-
"@superdoc/cli-windows-x64": "0.33.0-next.
|
|
54
|
+
"@superdoc/cli-darwin-arm64": "0.33.0-next.4",
|
|
55
|
+
"@superdoc/cli-darwin-x64": "0.33.0-next.4",
|
|
56
|
+
"@superdoc/cli-linux-x64": "0.33.0-next.4",
|
|
57
|
+
"@superdoc/cli-linux-arm64": "0.33.0-next.4",
|
|
58
|
+
"@superdoc/cli-windows-x64": "0.33.0-next.4"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"predev": "node scripts/ensure-superdoc-build.js",
|