@superdoc/sdk 2.23.0 → 2.23.1-next.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/agent/execution-context.cjs +5 -2
- package/dist/agent/execution-context.js +5 -2
- package/dist/runtime/sdk-version.generated.cjs +1 -1
- package/dist/runtime/sdk-version.generated.d.ts +1 -1
- package/dist/runtime/sdk-version.generated.js +1 -1
- package/package.json +7 -7
- package/tools/generation-receipt.json +3 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var documentEvidence = require('../runtime/document-evidence.cjs');
|
|
4
|
+
var guards = require('../guards.cjs');
|
|
4
5
|
var errors = require('../runtime/errors.cjs');
|
|
5
6
|
var docSnapshot = require('./doc-snapshot.cjs');
|
|
6
7
|
var operationCatalog = require('./operation-catalog.cjs');
|
|
@@ -226,9 +227,11 @@ class ExecutionContext {
|
|
|
226
227
|
]
|
|
227
228
|
: [args, options]);
|
|
228
229
|
this.executedOperations.push({ operationId, result });
|
|
229
|
-
if (result
|
|
230
|
+
if (guards.isRecord(result) && result.success === false)
|
|
230
231
|
throw new errors.SuperDocCliError('Document operation did not apply.', {
|
|
231
|
-
code: result.failure
|
|
232
|
+
code: guards.isRecord(result.failure) && typeof result.failure.code === 'string'
|
|
233
|
+
? result.failure.code
|
|
234
|
+
: 'APPLY_FAILED',
|
|
232
235
|
details: result,
|
|
233
236
|
});
|
|
234
237
|
if (documentEvidence.supportsDocumentFacts(this.source)) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { getDocumentRevisionReader, supportsDocumentFacts, requiresSummaryCounts, forwardDocumentEvidence, getMutationRevision, } from '../runtime/document-evidence.js';
|
|
2
|
+
import { isRecord } from '../guards.js';
|
|
2
3
|
import { SuperDocCliError } from '../runtime/errors.js';
|
|
3
4
|
import { buildDocumentSnapshot, buildMutationSnapshot, buildExecutionSummary, resolveSnapshotSelector, } from './doc-snapshot.js';
|
|
4
5
|
import { getOperationCatalogEntry } from './operation-catalog.js';
|
|
@@ -223,9 +224,11 @@ export class ExecutionContext {
|
|
|
223
224
|
]
|
|
224
225
|
: [args, options]);
|
|
225
226
|
this.executedOperations.push({ operationId, result });
|
|
226
|
-
if (result
|
|
227
|
+
if (isRecord(result) && result.success === false)
|
|
227
228
|
throw new SuperDocCliError('Document operation did not apply.', {
|
|
228
|
-
code: result.failure
|
|
229
|
+
code: isRecord(result.failure) && typeof result.failure.code === 'string'
|
|
230
|
+
? result.failure.code
|
|
231
|
+
: 'APPLY_FAILED',
|
|
229
232
|
details: result,
|
|
230
233
|
});
|
|
231
234
|
if (supportsDocumentFacts(this.source)) {
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
// AUTO-GENERATED by scripts/embed-version.mjs — DO NOT EDIT.
|
|
4
4
|
// Source of truth: package.json. Regenerated on every SDK build so the
|
|
5
5
|
// SDK retains its own version identity when bundled into another package.
|
|
6
|
-
const SDK_VERSION = '2.23.
|
|
6
|
+
const SDK_VERSION = '2.23.1-next.1';
|
|
7
7
|
|
|
8
8
|
exports.SDK_VERSION = SDK_VERSION;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.23.
|
|
1
|
+
export declare const SDK_VERSION = "2.23.1-next.1";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// AUTO-GENERATED by scripts/embed-version.mjs — DO NOT EDIT.
|
|
2
2
|
// Source of truth: package.json. Regenerated on every SDK build so the
|
|
3
3
|
// SDK retains its own version identity when bundled into another package.
|
|
4
|
-
export const SDK_VERSION = '2.23.
|
|
4
|
+
export const SDK_VERSION = '2.23.1-next.1';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc/sdk",
|
|
3
|
-
"version": "2.23.
|
|
3
|
+
"version": "2.23.1-next.1",
|
|
4
4
|
"description": "Node SDK for SuperDoc, wrapping the SuperDoc CLI to read and edit .docx files from JavaScript and TypeScript.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "AGPL-3.0",
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
"typescript": "^5.9.2"
|
|
39
39
|
},
|
|
40
40
|
"optionalDependencies": {
|
|
41
|
-
"@superdoc/sdk-darwin-arm64": "2.23.
|
|
42
|
-
"@superdoc/sdk-darwin-x64": "2.23.
|
|
43
|
-
"@superdoc/sdk-linux-x64": "2.23.
|
|
44
|
-
"@superdoc/sdk-linux-arm64": "2.23.
|
|
45
|
-
"@superdoc/sdk-windows-x64": "2.23.
|
|
41
|
+
"@superdoc/sdk-darwin-arm64": "2.23.1-next.1",
|
|
42
|
+
"@superdoc/sdk-darwin-x64": "2.23.1-next.1",
|
|
43
|
+
"@superdoc/sdk-linux-x64": "2.23.1-next.1",
|
|
44
|
+
"@superdoc/sdk-linux-arm64": "2.23.1-next.1",
|
|
45
|
+
"@superdoc/sdk-windows-x64": "2.23.1-next.1"
|
|
46
46
|
},
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"audit:publish": "node ../../../../scripts/audit-publish-artifact.mjs dist --label sdk-node-dist",
|
|
53
53
|
"typecheck": "tsc --noEmit",
|
|
54
54
|
"typecheck:consumer": "tsc --noEmit --strict --skipLibCheck --target ES2022 --module NodeNext --moduleResolution NodeNext ../../../../tests/consumer-typecheck/src/sdk-per-open-collaboration-auth.mts ../../../../tests/consumer-typecheck/src/sdk-replace-file.mts ../../../../tests/consumer-typecheck/src/sdk-retained-paragraph.mts ../../../../tests/consumer-typecheck/src/sdk-state-directory.mts ../../../../tests/consumer-typecheck/src/sdk-agent-evidence.mts ../../../../tests/consumer-typecheck/src/sdk-custom-actions.mts ../../../../tests/consumer-typecheck/src/sd4807-sdk-inspect.mts ../../../../tests/consumer-typecheck/src/sdk-tracked-only-policy.mts ../../../../tests/consumer-typecheck/src/sdk-tracked-review-route.mts ../../../../tests/consumer-typecheck/src/sd5266-sdk-placeholder-null.mts ../../../../tests/consumer-typecheck/src/sdk-schema-types.mts",
|
|
55
|
-
"test:agent-actions": "bun test src/__tests__/actions.test.ts src/__tests__/agent-runtime.test.ts src/__tests__/custom-actions.test.ts src/__tests__/textbox-snapshot.test.ts",
|
|
55
|
+
"test:agent-actions": "bun test src/__tests__/actions.test.ts src/__tests__/agent-runtime.test.ts src/__tests__/execution-context.test.ts src/__tests__/custom-actions.test.ts src/__tests__/textbox-snapshot.test.ts",
|
|
56
56
|
"test:document-host": "bun test src/__tests__/diff-direct-styles.e2e.test.ts src/__tests__/default-cli-optimization.e2e.test.ts src/runtime/__tests__/host-spawn-args.test.ts src/runtime/__tests__/document-rpc.test.ts src/__tests__/tracked-review-route.test.ts src/__tests__/structured-document-rpc.e2e.test.ts src/__tests__/request-timeout-ms.e2e.test.ts src/__tests__/agent-evidence.e2e.test.ts src/__tests__/agent-apply.e2e.test.ts src/__tests__/find-text.e2e.test.ts src/__tests__/custom-actions.e2e.test.ts",
|
|
57
57
|
"smoke:product-action": "node scripts/product-action-smoke.mjs"
|
|
58
58
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"formatVersion": 1,
|
|
3
3
|
"contractHash": "32dbab4c9dbd876ba853d0651199b963871ac514f441674adf937e71091686e6",
|
|
4
4
|
"documentApiSourceHash": "10dd2593185780e2adc4aa61c0f1949dcba48eb9369bd0d560e21363d8f26803",
|
|
5
|
-
"generatorHash": "
|
|
5
|
+
"generatorHash": "907e23981f7b89041391eeacddba90af12403d6084207464c25728d06c034146",
|
|
6
6
|
"inputs": {
|
|
7
7
|
"apps/cli/src/host/sdk-policy.ts": "8820bc2cb4694bd665cbfacbb55c262a5df5cde4ed2a1a8d0735c09c6a5e6dd8",
|
|
8
8
|
"packages/sdk/codegen/src/artifacts.mjs": "aecab7eca4694cbcf2366ddd9cabc033abddad2ff8fb0960d505580dbaf4d8b7",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"packages/sdk/codegen/src/model/schema.mjs": "29cb1167413280907ad324d8a1fcb54dc70cce829df00c1a755f43040d01cf3b",
|
|
16
16
|
"packages/sdk/codegen/src/shared.mjs": "a411e7ea4fab43b5b08b00294c746ff7063ceddbae66ece8d8c5990f131e0f7c",
|
|
17
17
|
"packages/sdk/codegen/src/targets.mjs": "62c5ae3e3813e07b37e62487d973bac60ef6bea558a01f3ace2e0c6e8374e147",
|
|
18
|
-
"packages/sdk/langs/node/package.json": "
|
|
18
|
+
"packages/sdk/langs/node/package.json": "2127c449062f14eccaca4e1dc9184f86f960b78fee021a306d017630c35cc6cc",
|
|
19
19
|
"packages/sdk/langs/node/scripts/embed-prompts.mjs": "1b1641bf89cad962a4ff11d93f301fe5a4e32fe856cd3c9586106d8aaab4ad80",
|
|
20
20
|
"packages/sdk/langs/node/scripts/embed-tools.mjs": "4cd8b0605b088421ea1fdf8e4e19c70f571f4e3352309a1480491600122e7bb3",
|
|
21
21
|
"packages/sdk/langs/node/scripts/embed-version.mjs": "95e2ff3a7c15cb38130e12f04c8a96c901a5e55d9960610ebefa37178fd19cde",
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
},
|
|
187
187
|
"packages/sdk/langs/node/src/runtime/sdk-version.generated.ts": {
|
|
188
188
|
"id": "node-sdk-version",
|
|
189
|
-
"sha256": "
|
|
189
|
+
"sha256": "b165f2237830249b5d290b6d8c6e88399b6fc035f9148d01627c5ac00ee3c5c8",
|
|
190
190
|
"consumers": [
|
|
191
191
|
"node"
|
|
192
192
|
]
|