@json-to-office/core-docx 4.5.0 → 5.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@json-to-office/core-docx",
3
- "version": "4.5.0",
3
+ "version": "5.4.0",
4
4
  "description": "Core DOCX document generation engine",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -25,8 +25,8 @@
25
25
  "date-fns": "3.6.0",
26
26
  "probe-image-size": "7.2.3",
27
27
  "@json-to-office/quality": "^4.5.0",
28
- "@json-to-office/shared": "^4.4.1",
29
- "@json-to-office/shared-docx": "^4.3.0"
28
+ "@json-to-office/shared-docx": "^5.3.1",
29
+ "@json-to-office/shared": "^5.4.0"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "docx": "9.7.1"
@@ -1,7 +0,0 @@
1
- /**
2
- * Minimal promise pool bounding concurrent async operations. Shared by the
3
- * visual rasterization paths (flattenVisuals, prerasterizeVisuals) to cap
4
- * concurrent service calls.
5
- */
6
- export declare function createLimiter(max: number): <T>(fn: () => Promise<T>) => Promise<T>;
7
- //# sourceMappingURL=promiseLimiter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"promiseLimiter.d.ts","sourceRoot":"","sources":["../../src/utils/promiseLimiter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,MAAM,GACV,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAmBzC"}
@@ -1,45 +0,0 @@
1
- /**
2
- * Shared client for "service-rendered image" components (highcharts, visual).
3
- *
4
- * Both offload rendering to an injected HTTP service: resolve a base URL, POST a
5
- * JSON body with optional dynamic headers, and normalize transport errors — now
6
- * with a request timeout so a wedged service can't hang the render forever.
7
- * Callers decode the response body themselves (highcharts returns base64 text,
8
- * visual returns JSON), so this returns the raw Response on success.
9
- */
10
- /// <reference types="node" />
11
- export type ServiceHeaders = Record<string, string> | ((body: unknown) => Record<string, string> | Promise<Record<string, string>>);
12
- /**
13
- * Resolve a service base URL: per-call override → services config → default.
14
- * Adds an `http://` scheme to a bare host and strips trailing slashes so callers
15
- * can append `${url}/path` without producing a `//path` that breaks routers.
16
- */
17
- export declare function resolveServiceUrl(propsUrl: string | undefined, servicesUrl: string | undefined, defaultUrl: string): string;
18
- export interface PostJsonOptions {
19
- /** Resolved base URL (use resolveServiceUrl). */
20
- url: string;
21
- /** Path appended to the base URL, e.g. '/export' or '/rasterize'. */
22
- path: string;
23
- /** Request body (JSON-serialized). */
24
- body: unknown;
25
- /** Static headers or an async resolver receiving the body. */
26
- headers?: ServiceHeaders;
27
- /** Abort timeout in ms (default 30s). */
28
- timeoutMs?: number;
29
- /** Label used in the timeout message and the non-2xx error. */
30
- serviceLabel: string;
31
- /** Message builder for a connection failure (distinct from a timeout). */
32
- onUnreachable: (url: string, cause: string) => string;
33
- }
34
- /**
35
- * POST a JSON body to `${url}${path}` with a timeout. Returns the Response on a
36
- * 2xx; throws a normalized Error on timeout, connection failure, or non-2xx.
37
- */
38
- /**
39
- * A dependency that did not answer. The code lets a server route tell a
40
- * missing export server apart from a defect in the document or in itself,
41
- * and hand the caller the message that says how to start it.
42
- */
43
- export declare const SERVICE_UNAVAILABLE_CODE = "SERVICE_UNAVAILABLE";
44
- export declare function postJsonToService(opts: PostJsonOptions): Promise<Response>;
45
- //# sourceMappingURL=serviceClient.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"serviceClient.d.ts","sourceRoot":"","sources":["../../src/utils/serviceClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;;AAEH,MAAM,MAAM,cAAc,GACtB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACtB,CAAC,CACC,IAAI,EAAE,OAAO,KACV,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;AAInE;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,UAAU,EAAE,MAAM,GACjB,MAAM,CAIR;AAED,MAAM,WAAW,eAAe;IAC9B,iDAAiD;IACjD,GAAG,EAAE,MAAM,CAAC;IACZ,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,sCAAsC;IACtC,IAAI,EAAE,OAAO,CAAC;IACd,8DAA8D;IAC9D,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,YAAY,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CACvD;AAED;;;GAGG;AACH;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,wBAAwB,CAAC;AAM9D,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,eAAe,GACpB,OAAO,CAAC,QAAQ,CAAC,CAwCnB"}