@antelopejs/interface-dms 0.14.2 → 0.14.3-next.945.ge4702b6

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/README.md CHANGED
@@ -64,7 +64,7 @@ export class SalesPage extends PageController("sales", {
64
64
  | `@antelopejs/interface-api-util` | `>=0.3.0 <0.4.0` | `0.3.0` |
65
65
  | `@antelopejs/interface-core` | `>=0.5.1 <0.6.0` | `0.5.1` |
66
66
  | `@antelopejs/interface-data-api` | `>=0.8.0 <0.9.0` | `0.8.0` |
67
- | `@antelopejs/interface-database` | `>=0.4.0 <0.5.0` | `0.4.0` |
67
+ | `@antelopejs/interface-database` | `>=0.4.0 <0.5.0` | `0.4.1` |
68
68
  | `@antelopejs/interface-database-decorators` | `>=0.5.2 <0.6.0` | `0.5.2` |
69
69
  | `@antelopejs/interface-file-storage` | `>=0.1.4 <0.2.0` | `0.1.4` |
70
70
 
@@ -8,7 +8,7 @@ mode: reference
8
8
 
9
9
  The `html-render` domain of `@antelopejs/interface-dms` turns a named template and a props object into an HTML string. You declare a template once with `RegisterHtmlTemplate`. It records the name in a process-wide registry and returns a typed reference. Pass that reference to `GenerateHtml` to get the rendered HTML.
10
10
 
11
- The backend process does not render anything itself. `GenerateHtml` sends an HTTP `POST` to the render endpoint configured on the DMS (`htmlRender.renderEndpoint`), authenticated with a signed service token, and returns the HTML the endpoint sends back. The backend owns the template names and the props types. The markup lives with the renderer behind that endpoint.
11
+ The backend process does not render anything itself. `GenerateHtml` sends an HTTP `POST` to the dashboard's `/api/html/render`, or to `htmlRender.renderEndpoint` when the DMS configures one, authenticated with a signed service token, and returns the HTML the endpoint sends back. The backend owns the template names and the props types. The markup lives with the renderer behind that endpoint.
12
12
 
13
13
  The interface produces HTML and nothing else. Your code delivers that HTML, as a transactional email, a file or a response body.
14
14
 
@@ -148,7 +148,7 @@ export async function renderInvoice(
148
148
  }
149
149
  ```
150
150
 
151
- The call sends `{ templateName, props }` as JSON to `htmlRender.renderEndpoint`. It carries a service token signed with `htmlRender.serviceSecret` in the `x-dms-service-token` header, and it reads the `html` field of the JSON response.
151
+ The call sends `{ templateName, props }` as JSON to the render endpoint. It carries a service token signed with `htmlRender.serviceSecret` in the `x-dms-service-token` header, and it reads the `html` field of the JSON response.
152
152
 
153
153
  `GenerateHtml` does not look the name up in the registry before the call. It sends whatever name the reference carries. When the render endpoint does not know the name, the promise rejects. The backend runs no missing-template check of its own.
154
154
 
@@ -284,7 +284,7 @@ Types the `htmlRender` block of the DMS module configuration in `antelope.config
284
284
 
285
285
  | Option | Type | Description |
286
286
  | ------ | ---- | ----------- |
287
- | `renderEndpoint` | `string` | The absolute URL `GenerateHtml` posts to. Default `http://localhost:3001/api/html/render`. |
287
+ | `renderEndpoint` | `string` | The absolute URL `GenerateHtml` posts to. Default `/api/html/render` on the dashboard's current origin: the one `ajs dms dev` serves, else the DMS's `clientBaseUrl`. |
288
288
  | `serviceSecret` | `string` | The secret that signs the service token of each render call. Default `"dev"`. The DMS refuses a production start when the value is empty or `"dev"`. |
289
289
  | `serviceTokenLifetime` | `number` | The lifetime of that service token, in milliseconds. The frontend render server rejects a token valid for more than five minutes. Default `300000` (five minutes). |
290
290
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antelopejs/interface-dms",
3
- "version": "0.14.2",
3
+ "version": "0.14.3-next.945.ge4702b6",
4
4
  "description": "Public AntelopeJS interfaces of the DMS: pages, components, permissions, tenancy, auth, notifications and HTML rendering.",
5
5
  "keywords": [
6
6
  "antelopejs",
@@ -28,19 +28,7 @@
28
28
  ],
29
29
  "main": "dist/index.js",
30
30
  "types": "dist/index.d.ts",
31
- "packageManager": "pnpm@10.2.0",
32
31
  "antelopeJs": {},
33
- "scripts": {
34
- "build": "rimraf dist && tsc",
35
- "typecheck": "tsc --noEmit",
36
- "test": "pnpm run build && node --test tests/*.test.mjs",
37
- "prepack": "pnpm run build && pnpm run check:exports && pnpm run check:proxies",
38
- "check:exports": "node scripts/check-exports.mjs",
39
- "check:proxies": "node scripts/check-proxies.mjs",
40
- "release": "release-it",
41
- "knip": "knip --dependencies",
42
- "knip:all": "knip"
43
- },
44
32
  "dependencies": {
45
33
  "randomstring": "^1.3.1",
46
34
  "zod": "^3.25.0",
@@ -142,5 +130,16 @@
142
130
  "access": "public",
143
131
  "provenance": true,
144
132
  "registry": "https://registry.npmjs.org/"
133
+ },
134
+ "gitHead": "e4702b64395f584cc5a1fe6b4f9e2e560ebe5f7d",
135
+ "scripts": {
136
+ "build": "rimraf dist && tsc",
137
+ "typecheck": "tsc --noEmit",
138
+ "test": "pnpm run build && node --test tests/*.test.mjs",
139
+ "check:exports": "node scripts/check-exports.mjs",
140
+ "check:proxies": "node scripts/check-proxies.mjs",
141
+ "release": "release-it",
142
+ "knip": "knip --dependencies",
143
+ "knip:all": "knip"
145
144
  }
146
- }
145
+ }