@forumone/throughline-email 0.2.5 → 0.2.6
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
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @forumone/throughline-email
|
|
2
2
|
|
|
3
|
+
## 0.2.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9131065: Three helpers that existed once per package now exist once
|
|
8
|
+
- **`unwrapRelationshipId`** had four definitions — three private to `approvals`, one exported from `email` — differing only in a null guard that `typeof value === 'string'` already covers. One deliberate change comes with the move: none of the four handled a _numeric_ id, so on Postgres at `depth: 0` they returned `null` for a relationship that was populated fine. No caller reads at depth 0 today, so this fixes nothing and stops a shared helper being wrong for the first caller that does.
|
|
9
|
+
- **`deniedEnvelope`** had three identical definitions, one per server with an access predicate. The role predicates stay where they are: what counts as an audit reader is not what counts as a forms author, and collapsing those would put one package's policy in another's file.
|
|
10
|
+
- **The MCP handler rebuilt `createNamedLogger` inline**, forty lines from the real one in the same package.
|
|
11
|
+
|
|
12
|
+
Nothing else in the duplication audit survived checking. `createFakePayload` has six definitions and three distinct implementations — a query engine, a two-line map read, and a stateful form store — which share a name and nothing else; merging them means building a fake that does all three jobs. `createFakeInngest` has one definition and three importers. The six MCP endpoint stanzas are real duplication that should be deleted rather than merged, once hosts move to `@payloadcms/plugin-mcp`.
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [9131065]
|
|
15
|
+
- @forumone/throughline-core@0.6.0
|
|
16
|
+
|
|
3
17
|
## 0.2.5
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { unwrapRelationshipId } from '@forumone/throughline-core';
|
|
1
2
|
import type { ApprovalTargetKind } from '../templates/index.js';
|
|
2
3
|
/**
|
|
3
4
|
* Maps a collection slug to the human-friendly noun the templates render.
|
|
@@ -6,7 +7,6 @@ import type { ApprovalTargetKind } from '../templates/index.js';
|
|
|
6
7
|
* better than dropping the noun entirely).
|
|
7
8
|
*/
|
|
8
9
|
export declare function targetKindFromCollection(slug: string): ApprovalTargetKind;
|
|
9
|
-
export declare function unwrapRelationshipId(value: unknown): string | null;
|
|
10
10
|
/**
|
|
11
11
|
* Defensive normalizer for the `notifiedApprovers` json field. Older
|
|
12
12
|
* snapshots stored an array of strings; the post-C7 fixup wraps each
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_shared.d.ts","sourceRoot":"","sources":["../../src/functions/_shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAO/D;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAEzE;AAED
|
|
1
|
+
{"version":3,"file":"_shared.d.ts","sourceRoot":"","sources":["../../src/functions/_shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAEjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAO/D;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAEzE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,CAWxD;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAInD"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { unwrapRelationshipId } from '@forumone/throughline-core';
|
|
1
2
|
const COLLECTION_TO_KIND = {
|
|
2
3
|
pages: 'page',
|
|
3
4
|
posts: 'post',
|
|
@@ -11,14 +12,6 @@ const COLLECTION_TO_KIND = {
|
|
|
11
12
|
export function targetKindFromCollection(slug) {
|
|
12
13
|
return COLLECTION_TO_KIND[slug] ?? 'item';
|
|
13
14
|
}
|
|
14
|
-
export function unwrapRelationshipId(value) {
|
|
15
|
-
if (typeof value === 'string')
|
|
16
|
-
return value;
|
|
17
|
-
if (value && typeof value === 'object' && 'id' in value) {
|
|
18
|
-
return String(value.id);
|
|
19
|
-
}
|
|
20
|
-
return null;
|
|
21
|
-
}
|
|
22
15
|
/**
|
|
23
16
|
* Defensive normalizer for the `notifiedApprovers` json field. Older
|
|
24
17
|
* snapshots stored an array of strings; the post-C7 fixup wraps each
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_shared.js","sourceRoot":"","sources":["../../src/functions/_shared.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"_shared.js","sourceRoot":"","sources":["../../src/functions/_shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAIjE,MAAM,kBAAkB,GAAuC;IAC7D,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,MAAM;CACd,CAAA;AAED;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CAAC,IAAY;IACnD,OAAO,kBAAkB,CAAC,IAAI,CAAC,IAAI,MAAM,CAAA;AAC3C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,KAAc;IAC5C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,EAAE,CAAA;IACpC,MAAM,GAAG,GAAa,EAAE,CAAA;IACxB,KAAK,MAAM,KAAK,IAAI,KAAK,EAAE,CAAC;QAC1B,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QACjB,CAAC;aAAM,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,IAAI,IAAI,KAAK,EAAE,CAAC;YAC/D,GAAG,CAAC,IAAI,CAAC,MAAM,CAAE,KAAyB,CAAC,EAAE,CAAC,CAAC,CAAA;QACjD,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,GAAW;IACzC,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAA;IAC1B,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;QAAE,OAAO,GAAG,CAAA;IAC5C,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;AAC9F,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forumone/throughline-email",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "Transactional email system for the Throughline framework. Resend wrapper, themeable React Email templates, and Inngest functions that subscribe to the approval-workflow notification events.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@react-email/render": "^1.3.2",
|
|
51
51
|
"resend": "^6.1.4",
|
|
52
52
|
"zod": "^3.23.0",
|
|
53
|
-
"@forumone/throughline-core": "0.
|
|
53
|
+
"@forumone/throughline-core": "0.6.0",
|
|
54
54
|
"@forumone/throughline-plugin-contract": "0.3.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|