@aeptus/aexeo-emdash 0.8.16 → 0.8.18
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/CHANGELOG.md +74 -0
- package/INSTALL.md +9 -10
- package/LICENSE +0 -0
- package/README.md +6 -3
- package/dist/adapter.d.ts +32 -1
- package/dist/adapter.d.ts.map +1 -1
- package/dist/admin/Absorbability.d.ts +0 -0
- package/dist/admin/Absorbability.d.ts.map +0 -0
- package/dist/admin/Accessibility.d.ts +0 -0
- package/dist/admin/Accessibility.d.ts.map +0 -0
- package/dist/admin/Citability.d.ts +0 -0
- package/dist/admin/Citability.d.ts.map +0 -0
- package/dist/admin/EntityLegitimacy.d.ts +0 -0
- package/dist/admin/EntityLegitimacy.d.ts.map +0 -0
- package/dist/admin/EntityPresence.d.ts +0 -0
- package/dist/admin/EntityPresence.d.ts.map +0 -0
- package/dist/admin/Facts.d.ts +0 -0
- package/dist/admin/Facts.d.ts.map +0 -0
- package/dist/admin/Findings.d.ts +0 -0
- package/dist/admin/Findings.d.ts.map +0 -0
- package/dist/admin/PillarView.d.ts +0 -0
- package/dist/admin/PillarView.d.ts.map +0 -0
- package/dist/admin/Retrievability.d.ts +0 -0
- package/dist/admin/Retrievability.d.ts.map +0 -0
- package/dist/admin.d.ts +0 -0
- package/dist/admin.d.ts.map +0 -0
- package/dist/admin.js +0 -0
- package/dist/configured.d.ts +0 -0
- package/dist/configured.d.ts.map +1 -1
- package/dist/configured.js +247 -60
- package/dist/data-route.d.ts +0 -0
- package/dist/data-route.d.ts.map +1 -1
- package/dist/evaluator-sandbox.d.ts +0 -0
- package/dist/evaluator-sandbox.d.ts.map +0 -0
- package/dist/evaluator.d.ts +0 -0
- package/dist/evaluator.d.ts.map +0 -0
- package/dist/facts-route.d.ts +0 -0
- package/dist/facts-route.d.ts.map +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -22
- package/dist/indexnow.d.ts +0 -0
- package/dist/indexnow.d.ts.map +0 -0
- package/dist/mcp.d.ts +0 -0
- package/dist/mcp.d.ts.map +0 -0
- package/dist/plugin.d.ts +3 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/presence-check.d.ts +0 -0
- package/dist/presence-check.d.ts.map +0 -0
- package/dist/presence-route.d.ts +0 -0
- package/dist/presence-route.d.ts.map +0 -0
- package/dist/sandbox-entry.d.ts +1 -1
- package/dist/sandbox-entry.d.ts.map +1 -1
- package/dist/sandbox-entry.js +363 -125
- package/dist/sandbox.d.ts +0 -0
- package/dist/sandbox.d.ts.map +1 -1
- package/dist/sidecar.d.ts +0 -0
- package/dist/sidecar.d.ts.map +1 -1
- package/dist/suppressions.d.ts +0 -0
- package/dist/suppressions.d.ts.map +0 -0
- package/dist/types.d.ts +0 -0
- package/dist/types.d.ts.map +0 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +0 -0
- package/dist/wasm-init.d.ts +0 -0
- package/dist/wasm-init.d.ts.map +0 -0
- package/package.json +8 -4
- package/wasm/aexeo_emdash_bridge.d.ts +0 -0
- package/wasm/aexeo_emdash_bridge.js +0 -0
- package/wasm/aexeo_emdash_bridge_bg.d.ts +0 -0
- package/wasm/aexeo_emdash_bridge_bg.js +0 -0
- package/wasm/aexeo_emdash_bridge_bg.wasm +0 -0
- package/wasm/aexeo_emdash_bridge_bg.wasm.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,80 @@ and the project follows [Semantic Versioning](https://semver.org/).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.8.18] - 2026-09-27
|
|
10
|
+
|
|
11
|
+
Updates the EmDash integration to the current plugin and content APIs.
|
|
12
|
+
|
|
13
|
+
**Compatibility target:** EmDash `>=0.41.0 <0.42.0`.
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- **Sandbox access declaration:** replace obsolete capability strings with
|
|
18
|
+
`content:read` and conditional `network:request`, scoped to the configured
|
|
19
|
+
evaluator host. Remove unused schema, artifact, KV, and IndexNow host grants.
|
|
20
|
+
- **Typed `blocks` content:** distinguish EmDash block compositions from
|
|
21
|
+
Portable Text and adapt their editorial strings into the evaluator's text
|
|
22
|
+
format instead of discarding them.
|
|
23
|
+
- **Routes and translations:** use EmDash's `getPublicUrl()` and
|
|
24
|
+
`getTranslations()` APIs for collection patterns, locale paths, trailing
|
|
25
|
+
slash policy, and hreflang alternates. Keep draft and unroutable entries
|
|
26
|
+
under stable collection/ID keys, and link only to URLs the host resolves.
|
|
27
|
+
- **Sandbox save evaluation:** `content:afterSave` now persists and evaluates
|
|
28
|
+
the saved item through the configured sidecar, matching configured mode.
|
|
29
|
+
- **Route migrations:** remove obsolete document and finding entries when a
|
|
30
|
+
document's resolved route changes or a successful refresh no longer finds
|
|
31
|
+
an entry in the selected collections.
|
|
32
|
+
|
|
33
|
+
### Changed
|
|
34
|
+
|
|
35
|
+
- Bump the EmDash peer and development ranges to `0.41.x`; update the README
|
|
36
|
+
and install guide to name the supported range and sandbox save behavior.
|
|
37
|
+
- Add Vitest coverage using EmDash's official plugin runtime test host for
|
|
38
|
+
sandbox hooks, blocks extraction, resolved URLs, and translation alternates.
|
|
39
|
+
|
|
40
|
+
## [0.8.17] - 2026-05-29
|
|
41
|
+
|
|
42
|
+
Hotfix release. Closes the production admin-route regression
|
|
43
|
+
Aeptus reported on 0.8.16 + emdash@0.17.2.
|
|
44
|
+
|
|
45
|
+
### Fixed
|
|
46
|
+
|
|
47
|
+
- **`TypeError: Cannot read properties of undefined (reading 'type')`
|
|
48
|
+
at `/_emdash/api/plugins/aexeo-emdash/admin`.** The legacy
|
|
49
|
+
Block Kit admin route assumed `ctx.input` is always a complete
|
|
50
|
+
`BlockInteraction`. EmDash 0.17 reaches the endpoint with
|
|
51
|
+
empty / partial bodies on admin and widget hydration paths;
|
|
52
|
+
the first `body.type === "page_load"` read crashed on
|
|
53
|
+
undefined.
|
|
54
|
+
Fix: added `normalizeInteraction(input: unknown): BlockInteraction`
|
|
55
|
+
at the top of dispatch in both `configured.ts` (production-hit
|
|
56
|
+
path) and `sandbox-entry.ts` (same bug shape in the sandbox-
|
|
57
|
+
bundled flavor). Defaults follow Aeptus's hardening
|
|
58
|
+
suggestion:
|
|
59
|
+
- Missing / non-object input → `page_load /findings`.
|
|
60
|
+
- `page_load` with missing or empty `page` → `/findings`.
|
|
61
|
+
- `block_action` with missing `action_id` → `""` (falls
|
|
62
|
+
through to `notFound("")` rather than throwing).
|
|
63
|
+
- `form_submit` with missing `values` → `{}` (downstream
|
|
64
|
+
code already guards "no route picked").
|
|
65
|
+
Verified against 10 edge-case inputs (undefined, null, empty
|
|
66
|
+
object, missing/empty page, missing action_id, missing
|
|
67
|
+
values, unknown type, string input, valid payload) — all
|
|
68
|
+
produce the expected default without throwing.
|
|
69
|
+
- **`RouteContext` / `RouteInput` types loosened.** `input`
|
|
70
|
+
goes from `BlockInteraction` to `unknown` because the
|
|
71
|
+
upstream guarantee from emdash 0.17 is genuinely weaker. The
|
|
72
|
+
compile-time shape now lives inside the normalizer's return
|
|
73
|
+
type, where it can be enforced uniformly across both
|
|
74
|
+
handlers.
|
|
75
|
+
|
|
76
|
+
### Bundle deltas
|
|
77
|
+
|
|
78
|
+
- `configured.js` +985 bytes
|
|
79
|
+
- `sandbox-entry.js` +940 bytes
|
|
80
|
+
- `admin.js` unchanged (React admin pages don't include the
|
|
81
|
+
Block Kit admin route)
|
|
82
|
+
|
|
9
83
|
## [0.8.16] - 2026-05-29
|
|
10
84
|
|
|
11
85
|
Plugin-only release confirming source-level compatibility with
|
package/INSTALL.md
CHANGED
|
@@ -31,7 +31,8 @@ when it's actually needed.
|
|
|
31
31
|
(`@astrojs/cloudflare` + `@emdash-cms/cloudflare`'s `sandbox()`
|
|
32
32
|
runner is fine — sandboxed plugins use Worker Loader, configured
|
|
33
33
|
plugins don't, but both adapters import cleanly).
|
|
34
|
-
-
|
|
34
|
+
- EmDash `>=0.41.0 <0.42.0` as a peer dependency. The integration
|
|
35
|
+
coverage targets `0.41.0` with EmDash's official plugin test host.
|
|
35
36
|
|
|
36
37
|
### Install
|
|
37
38
|
|
|
@@ -106,9 +107,8 @@ no sidecar to deploy.
|
|
|
106
107
|
— toast says "Refreshed N routes (M findings across K documents)"
|
|
107
108
|
and the table populates.
|
|
108
109
|
|
|
109
|
-
4. Save a document:
|
|
110
|
-
|
|
111
|
-
are updated. (The dashboard widget also picks up the new score.)
|
|
110
|
+
4. Save a document: `content:afterSave` evaluates that document. Reload
|
|
111
|
+
the findings page to see the updated row and dashboard score.
|
|
112
112
|
|
|
113
113
|
### Production deploy
|
|
114
114
|
|
|
@@ -171,8 +171,8 @@ Pre-flight before bumping:
|
|
|
171
171
|
|
|
172
172
|
1. Look up the plugin version's tested emdash range in our
|
|
173
173
|
[CHANGELOG](./CHANGELOG.md). The latest plugin version's
|
|
174
|
-
`Compatibility` line
|
|
175
|
-
|
|
174
|
+
`Compatibility` line names the supported EmDash range and test-host
|
|
175
|
+
target. If the EmDash version you want is **inside that
|
|
176
176
|
range**, the bump is safe. If it's **above the range**, treat it
|
|
177
177
|
as untested.
|
|
178
178
|
2. If untested, scan the emdash release notes for breaking changes
|
|
@@ -181,7 +181,7 @@ Pre-flight before bumping:
|
|
|
181
181
|
- Hook signatures (`content:afterSave`, etc.)
|
|
182
182
|
- Block Kit element schemas (banner variants, button styles,
|
|
183
183
|
table column formats)
|
|
184
|
-
- Capability
|
|
184
|
+
- Capability names (`content:read`, `network:request`)
|
|
185
185
|
- The `definePlugin` API
|
|
186
186
|
- The `createPlugin` / configured-plugin descriptor contract
|
|
187
187
|
If any of those changed, expect to bump the plugin too.
|
|
@@ -240,9 +240,8 @@ Trade-offs vs. configured mode:
|
|
|
240
240
|
prevents the plugin from ever reading host state directly.
|
|
241
241
|
- **Con**: separate sidecar Worker to deploy and maintain; an
|
|
242
242
|
EVAL_TOKEN to rotate; a Setup admin page to configure. The
|
|
243
|
-
`content:afterSave` hook
|
|
244
|
-
|
|
245
|
-
evaluation is manual-Refresh-only.
|
|
243
|
+
`content:afterSave` hook evaluates through the sidecar after you save
|
|
244
|
+
its URL and token on the Setup page. Refresh still runs a full-site sweep.
|
|
246
245
|
|
|
247
246
|
```js
|
|
248
247
|
// astro.config.mjs (sandboxed mode)
|
package/LICENSE
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
@@ -47,12 +47,15 @@ troubleshooting list, see [INSTALL.md](./INSTALL.md).
|
|
|
47
47
|
answer-pack, external-trust dimensions). Banner appears below 60.
|
|
48
48
|
- **Refresh button**: re-evaluate every document in the configured
|
|
49
49
|
collections (`posts`, `pages` by default).
|
|
50
|
-
- **Auto-evaluate on save**:
|
|
51
|
-
|
|
50
|
+
- **Auto-evaluate on save**: EmDash's `content:afterSave` hook evaluates
|
|
51
|
+
the saved document and updates its findings. Sandboxed installs need a
|
|
52
|
+
configured evaluator sidecar; configured installs run evaluation in-process.
|
|
52
53
|
|
|
53
54
|
## Compatibility
|
|
54
55
|
|
|
55
|
-
-
|
|
56
|
+
- EmDash `>= 0.41.0 < 0.42.0` (peer dependency; current supported range)
|
|
57
|
+
- Runtime integration coverage targets EmDash `0.41.0` via the official
|
|
58
|
+
`@emdash-cms/plugin-test` host.
|
|
56
59
|
- Cloudflare Workers via `@astrojs/cloudflare`. The plugin uses
|
|
57
60
|
Cloudflare-specific APIs and silently no-ops on the Node adapter.
|
|
58
61
|
- WASM eval ships with the package; the consumer's Vite/Wrangler
|
package/dist/adapter.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export interface EmdashContentItem {
|
|
|
5
5
|
slug: string | null;
|
|
6
6
|
status: string;
|
|
7
7
|
locale: string | null;
|
|
8
|
+
translationGroup?: string | null;
|
|
8
9
|
data: Record<string, unknown>;
|
|
9
10
|
seo?: {
|
|
10
11
|
title?: string | null;
|
|
@@ -18,11 +19,41 @@ export interface EmdashContentMeta {
|
|
|
18
19
|
slug: string | null;
|
|
19
20
|
status: string;
|
|
20
21
|
title: string;
|
|
22
|
+
/** Exact URL returned by EmDash, or null when this entry has no public route. */
|
|
23
|
+
publicUrl: string | null;
|
|
24
|
+
}
|
|
25
|
+
export interface ContentUrlApi {
|
|
26
|
+
getPublicUrl(collection: string, id: string): Promise<string | null>;
|
|
27
|
+
getTranslations(collection: string, id: string): Promise<{
|
|
28
|
+
translationGroup: string;
|
|
29
|
+
translations: Array<{
|
|
30
|
+
id: string;
|
|
31
|
+
locale: string | null;
|
|
32
|
+
slug: string | null;
|
|
33
|
+
status: string;
|
|
34
|
+
updatedAt: string;
|
|
35
|
+
}>;
|
|
36
|
+
}>;
|
|
21
37
|
}
|
|
22
38
|
export interface AdaptedContent {
|
|
23
39
|
document: EmdashDocument;
|
|
24
40
|
meta: EmdashContentMeta;
|
|
25
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Adapt a stored content row using EmDash's route resolver. The host API
|
|
44
|
+
* accounts for collection URL patterns, locale prefixes, and slash policy;
|
|
45
|
+
* slug-derived paths are not equivalent to the site's actual public URLs.
|
|
46
|
+
*/
|
|
47
|
+
export declare function adaptContentItemWithContext(content: EmdashContentItem, contentApi: ContentUrlApi, defaultLocale?: string): Promise<AdaptedContent>;
|
|
48
|
+
/**
|
|
49
|
+
* Synchronous adapter for callers that do not have a host content API.
|
|
50
|
+
* It deliberately uses a stable identity route; callers should use
|
|
51
|
+
* adaptContentItemWithContext whenever EmDash can resolve the public URL.
|
|
52
|
+
*/
|
|
26
53
|
export declare function contentItemToEmdashDocument(content: EmdashContentItem): EmdashDocument;
|
|
27
|
-
export declare function adaptContentItem(content: EmdashContentItem
|
|
54
|
+
export declare function adaptContentItem(content: EmdashContentItem, options?: {
|
|
55
|
+
route?: string;
|
|
56
|
+
publicUrl?: string | null;
|
|
57
|
+
defaultLocale?: string;
|
|
58
|
+
}): AdaptedContent;
|
|
28
59
|
//# sourceMappingURL=adapter.d.ts.map
|
package/dist/adapter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAqB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAqB,MAAM,YAAY,CAAC;AAEpE,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,GAAG,CAAC,EAAE;QACJ,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACtB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC3B,CAAC;CACH;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,iFAAiF;IACjF,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC5B,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACrE,eAAe,CACb,UAAU,EAAE,MAAM,EAClB,EAAE,EAAE,MAAM,GACT,OAAO,CAAC;QACT,gBAAgB,EAAE,MAAM,CAAC;QACzB,YAAY,EAAE,KAAK,CAAC;YAClB,EAAE,EAAE,MAAM,CAAC;YACX,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;YACtB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;YACpB,MAAM,EAAE,MAAM,CAAC;YACf,SAAS,EAAE,MAAM,CAAC;SACnB,CAAC,CAAC;KACJ,CAAC,CAAC;CACJ;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,cAAc,CAAC;IACzB,IAAI,EAAE,iBAAiB,CAAC;CACzB;AAED;;;;GAIG;AACH,wBAAsB,2BAA2B,CAC/C,OAAO,EAAE,iBAAiB,EAC1B,UAAU,EAAE,aAAa,EACzB,aAAa,CAAC,EAAE,MAAM,GACrB,OAAO,CAAC,cAAc,CAAC,CA2CzB;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,iBAAiB,GACzB,cAAc,CAEhB;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,iBAAiB,EAC1B,OAAO,GAAE;IACP,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;CACnB,GACL,cAAc,CAgChB"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/admin/Facts.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/admin/Findings.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/admin.d.ts
CHANGED
|
File without changes
|
package/dist/admin.d.ts.map
CHANGED
|
File without changes
|
package/dist/admin.js
CHANGED
|
File without changes
|
package/dist/configured.d.ts
CHANGED
|
File without changes
|
package/dist/configured.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configured.d.ts","sourceRoot":"","sources":["../src/configured.ts"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AA0HrD,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAEhC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAEvC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAEvC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,SAAS,WAAW,EAAE,CAAC;CACvC;AAED,wBAAgB,YAAY,CAAC,OAAO,GAAE,uBAA4B,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"configured.d.ts","sourceRoot":"","sources":["../src/configured.ts"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AA0HrD,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAEhC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAEvC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAEvC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,SAAS,WAAW,EAAE,CAAC;CACvC;AAED,wBAAgB,YAAY,CAAC,OAAO,GAAE,uBAA4B,GAAG,OAAO,CA0H3E;AAID,eAAe,YAAY,CAAC"}
|