@mj-biz-apps/common-activity-sync 5.45.0 → 5.46.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/attachments.d.ts.map +1 -1
- package/dist/attachments.js +4 -3
- package/dist/attachments.js.map +1 -1
- package/dist/content-capture.js +4 -3
- package/dist/content-capture.js.map +1 -1
- package/dist/host-slot.d.ts +27 -0
- package/dist/host-slot.d.ts.map +1 -0
- package/dist/host-slot.js +32 -0
- package/dist/host-slot.js.map +1 -0
- package/dist/providers/MessageTransport.js +12 -11
- package/dist/providers/MessageTransport.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachments.d.ts","sourceRoot":"","sources":["../src/attachments.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;
|
|
1
|
+
{"version":3,"file":"attachments.d.ts","sourceRoot":"","sources":["../src/attachments.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,6FAA6F;AAC7F,MAAM,WAAW,oBAAoB;IACjC,kBAAkB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACpC,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;AAED,2FAA2F;AAC3F,MAAM,WAAW,mBAAmB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC7B,wDAAwD;IACxD,KAAK,EAAE,OAAO,CAAC;IACf,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,4FAA4F;AAC5F,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,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
19
|
+
import { HostSlot } from './host-slot.js';
|
|
19
20
|
/**
|
|
20
21
|
* Turn the deciding rule plus the item's flag into an instruction.
|
|
21
22
|
*
|
|
@@ -130,7 +131,7 @@ export function AttachmentSkipReport(externalID, selection) {
|
|
|
130
131
|
* A sink passed to the CONSTRUCTOR still wins, for the same reason it does there: tests and the demo
|
|
131
132
|
* supply their own, and a process-wide registration must not reach in and replace it.
|
|
132
133
|
*/
|
|
133
|
-
|
|
134
|
+
const hostFileSink = HostSlot('__mj_BizApps_ActivitySync_FileSink__');
|
|
134
135
|
/**
|
|
135
136
|
* Register the sink this host stores attachment bytes through. Pass null to clear it.
|
|
136
137
|
*
|
|
@@ -138,10 +139,10 @@ let hostFileSink = null;
|
|
|
138
139
|
* process must not end up with two, and there is no sensible way to merge them.
|
|
139
140
|
*/
|
|
140
141
|
export function RegisterActivityFileSink(sink) {
|
|
141
|
-
hostFileSink
|
|
142
|
+
hostFileSink.Set(sink);
|
|
142
143
|
}
|
|
143
144
|
/** The registered sink, or null when this host stores no attachment bytes. */
|
|
144
145
|
export function HostActivityFileSink() {
|
|
145
|
-
return hostFileSink;
|
|
146
|
+
return hostFileSink.Get();
|
|
146
147
|
}
|
|
147
148
|
//# sourceMappingURL=attachments.js.map
|
package/dist/attachments.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachments.js","sourceRoot":"","sources":["../src/attachments.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;
|
|
1
|
+
{"version":3,"file":"attachments.js","sourceRoot":"","sources":["../src/attachments.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAiC1C;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CAC/B,IAA6C,EAC7C,IAAkC;IAElC,MAAM,MAAM,GAAG,IAAI,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACjD,o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AAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAClF,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACvC,IAAI,MAAM;QAAE,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,wDAAwD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEtH,OAAO,WAAW,UAAU,8BAA8B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;AACpF,CAAC;AAED;;;;;;;;;;;GAWG;AACH;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,YAAY,GAAG,QAAQ,CAAmB,sCAAsC,CAAC,CAAC;AAExF;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CAAC,IAA6B;IAClE,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,oBAAoB;IAChC,OAAO,YAAY,CAAC,GAAG,EAAE,CAAC;AAC9B,CAAC"}
|
package/dist/content-capture.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { HostSlot } from './host-slot.js';
|
|
2
|
+
const hostCipher = HostSlot('__mj_BizApps_ActivitySync_ContentCipher__');
|
|
2
3
|
/**
|
|
3
4
|
* Register the cipher this host protects captured content with. Pass null to clear it.
|
|
4
5
|
*
|
|
@@ -6,11 +7,11 @@ let hostCipher = null;
|
|
|
6
7
|
* twice in one process must not end up with two.
|
|
7
8
|
*/
|
|
8
9
|
export function RegisterActivityContentCipher(cipher) {
|
|
9
|
-
hostCipher
|
|
10
|
+
hostCipher.Set(cipher);
|
|
10
11
|
}
|
|
11
12
|
/** The registered cipher, or null on a host that cannot encrypt. */
|
|
12
13
|
export function HostActivityContentCipher() {
|
|
13
|
-
return hostCipher;
|
|
14
|
+
return hostCipher.Get();
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* The plaintext a capture plan calls for, or null when it calls for nothing.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-capture.js","sourceRoot":"","sources":["../src/content-capture.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"content-capture.js","sourceRoot":"","sources":["../src/content-capture.ts"],"names":[],"mappings":"AAsCA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAmC1C,MAAM,UAAU,GAAG,QAAQ,CAAwB,2CAA2C,CAAC,CAAC;AAEhG;;;;;GAKG;AACH,MAAM,UAAU,6BAA6B,CAAC,MAAoC;IAC9E,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAC3B,CAAC;AAED,oEAAoE;AACpE,MAAM,UAAU,yBAAyB;IACrC,OAAO,UAAU,CAAC,GAAG,EAAE,CAAC;AAC5B,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAoC,EAAE,IAAoB;IACvF,IAAI,OAAO,KAAK,MAAM;QAAE,OAAO,IAAI,CAAC;IACpC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,cAAc,CAAC;IACvD,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,OAAO,CAAC;IAC1C,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC;IAC/B,OAAO,IAAI,CAAC,CAAC,CAAC,GAAG,OAAO,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;AACpD,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview One process-wide slot for a host registration.
|
|
3
|
+
*
|
|
4
|
+
* The registries in this package — transport factory, file sink, content cipher, live-mailbox
|
|
5
|
+
* attestation — used to hold their value in a module-scoped `let`. That is per COPY of this package,
|
|
6
|
+
* not per process. A host that resolves two copies (two consumers disagreeing on a version, npm
|
|
7
|
+
* nesting one under the other) would register into one copy and read from the other, and the engine
|
|
8
|
+
* would see nothing registered. None has fragmented yet only because every consumer takes a caret
|
|
9
|
+
* range, which dedupes; one exact pin anywhere would recreate it (bc-aidp-next-golive#258).
|
|
10
|
+
*
|
|
11
|
+
* The slot lives in MJ's global object store, so every copy reads and writes the same one. Same
|
|
12
|
+
* shape as MJ's own field-transform registry, which is kept there for the same reason.
|
|
13
|
+
*
|
|
14
|
+
* @module @mj-biz-apps/common-activity-sync
|
|
15
|
+
*/
|
|
16
|
+
export interface HostSlot<T> {
|
|
17
|
+
Get(): T | null;
|
|
18
|
+
Set(value: T | null): void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A slot keyed on `key` in the global object store.
|
|
22
|
+
*
|
|
23
|
+
* The key is the identity: two copies of this package agree on it and nothing else, so it must never
|
|
24
|
+
* change between versions a host could load side by side.
|
|
25
|
+
*/
|
|
26
|
+
export declare function HostSlot<T>(key: string): HostSlot<T>;
|
|
27
|
+
//# sourceMappingURL=host-slot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-slot.d.ts","sourceRoot":"","sources":["../src/host-slot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,MAAM,WAAW,QAAQ,CAAC,CAAC;IACvB,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;IAChB,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;CAC9B;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,CAQpD"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview One process-wide slot for a host registration.
|
|
3
|
+
*
|
|
4
|
+
* The registries in this package — transport factory, file sink, content cipher, live-mailbox
|
|
5
|
+
* attestation — used to hold their value in a module-scoped `let`. That is per COPY of this package,
|
|
6
|
+
* not per process. A host that resolves two copies (two consumers disagreeing on a version, npm
|
|
7
|
+
* nesting one under the other) would register into one copy and read from the other, and the engine
|
|
8
|
+
* would see nothing registered. None has fragmented yet only because every consumer takes a caret
|
|
9
|
+
* range, which dedupes; one exact pin anywhere would recreate it (bc-aidp-next-golive#258).
|
|
10
|
+
*
|
|
11
|
+
* The slot lives in MJ's global object store, so every copy reads and writes the same one. Same
|
|
12
|
+
* shape as MJ's own field-transform registry, which is kept there for the same reason.
|
|
13
|
+
*
|
|
14
|
+
* @module @mj-biz-apps/common-activity-sync
|
|
15
|
+
*/
|
|
16
|
+
import { GetGlobalObjectStore } from '@memberjunction/global';
|
|
17
|
+
/**
|
|
18
|
+
* A slot keyed on `key` in the global object store.
|
|
19
|
+
*
|
|
20
|
+
* The key is the identity: two copies of this package agree on it and nothing else, so it must never
|
|
21
|
+
* change between versions a host could load side by side.
|
|
22
|
+
*/
|
|
23
|
+
export function HostSlot(key) {
|
|
24
|
+
const store = () => (GetGlobalObjectStore() ?? globalThis);
|
|
25
|
+
return {
|
|
26
|
+
Get: () => store()[key] ?? null,
|
|
27
|
+
Set: (value) => {
|
|
28
|
+
store()[key] = value;
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=host-slot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-slot.js","sourceRoot":"","sources":["../src/host-slot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAO9D;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAI,GAAW;IACnC,MAAM,KAAK,GAAG,GAAG,EAAE,CAAC,CAAC,oBAAoB,EAAE,IAAI,UAAU,CAAuC,CAAC;IACjG,OAAO;QACH,GAAG,EAAE,GAAG,EAAE,CAAE,KAAK,EAAE,CAAC,GAAG,CAA0B,IAAI,IAAI;QACzD,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE;YACX,KAAK,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QACzB,CAAC;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { HostSlot } from '../host-slot.js';
|
|
1
2
|
/**
|
|
2
3
|
* THE HOST REGISTRY, and why a constructor parameter was not enough.
|
|
3
4
|
*
|
|
@@ -6,14 +7,14 @@
|
|
|
6
7
|
* plugins with no arguments. So through the engine, the only path that matters in production, no
|
|
7
8
|
* factory could ever arrive. The seam was described, exported, and unreachable.
|
|
8
9
|
*
|
|
9
|
-
* A
|
|
10
|
-
* owns the Communication and Credentials engines and registers once at
|
|
11
|
-
* asks for one at Configure time.
|
|
10
|
+
* A process-wide registry (see `host-slot.ts`) is the shape that fits the constraint rather than
|
|
11
|
+
* fighting it: the host owns the Communication and Credentials engines and registers once at
|
|
12
|
+
* bootstrap, and the provider asks for one at Configure time.
|
|
12
13
|
*
|
|
13
14
|
* A transport or factory passed to the CONSTRUCTOR still wins. Tests and the demo supply their own,
|
|
14
15
|
* and a process-wide registration must not be able to reach in and replace it.
|
|
15
16
|
*/
|
|
16
|
-
|
|
17
|
+
const hostFactory = HostSlot('__mj_BizApps_ActivitySync_TransportFactory__');
|
|
17
18
|
/**
|
|
18
19
|
* Register the factory this host serves transports from. Pass null to clear it.
|
|
19
20
|
*
|
|
@@ -21,13 +22,13 @@ let hostFactory = null;
|
|
|
21
22
|
* reload) must not end up with two, and there is no sensible way to merge them.
|
|
22
23
|
*/
|
|
23
24
|
export function RegisterActivityTransportFactory(factory) {
|
|
24
|
-
hostFactory
|
|
25
|
+
hostFactory.Set(factory);
|
|
25
26
|
}
|
|
26
27
|
/** The registered factory, or null when this host serves none. */
|
|
27
28
|
export function HostActivityTransportFactory() {
|
|
28
|
-
return hostFactory;
|
|
29
|
+
return hostFactory.Get();
|
|
29
30
|
}
|
|
30
|
-
|
|
31
|
+
const hostLivePolicy = HostSlot('__mj_BizApps_ActivitySync_LiveMailboxPolicy__');
|
|
31
32
|
/**
|
|
32
33
|
* Record that this host is scoped, and may therefore read real mailboxes. Pass null to revoke.
|
|
33
34
|
*
|
|
@@ -56,7 +57,7 @@ let hostLivePolicy = null;
|
|
|
56
57
|
*/
|
|
57
58
|
export function AllowLiveMailboxFetch(attestation) {
|
|
58
59
|
if (attestation === null) {
|
|
59
|
-
hostLivePolicy
|
|
60
|
+
hostLivePolicy.Set(null);
|
|
60
61
|
return;
|
|
61
62
|
}
|
|
62
63
|
// `Confirmed: true` is a literal type, so TypeScript rejects `false` at a typed call site and
|
|
@@ -89,14 +90,14 @@ export function AllowLiveMailboxFetch(attestation) {
|
|
|
89
90
|
'legitimate decision; recording it as a bare flag is not.');
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
|
-
hostLivePolicy
|
|
93
|
+
hostLivePolicy.Set(attestation);
|
|
93
94
|
}
|
|
94
95
|
/** The recorded attestation, or null when this host has not opted in. */
|
|
95
96
|
export function HostLiveMailboxPolicy() {
|
|
96
|
-
return hostLivePolicy;
|
|
97
|
+
return hostLivePolicy.Get();
|
|
97
98
|
}
|
|
98
99
|
/** Whether this host has attested that its app registration is scoped. */
|
|
99
100
|
export function HostAllowsLiveMailboxFetch() {
|
|
100
|
-
return hostLivePolicy !== null;
|
|
101
|
+
return hostLivePolicy.Get() !== null;
|
|
101
102
|
}
|
|
102
103
|
//# sourceMappingURL=MessageTransport.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageTransport.js","sourceRoot":"","sources":["../../src/providers/MessageTransport.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MessageTransport.js","sourceRoot":"","sources":["../../src/providers/MessageTransport.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AA4D3C;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,GAAG,QAAQ,CAA2B,8CAA8C,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CACnG,CAAC;QACN,CAAC;IACL,CAAC;SAAM,CAAC;QACJ,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,IAAI,EAAE,EAAE,CAAC;YACpC,MAAM,IAAI,KAAK,CACX,qFAAqF;gBACjF,oFAAoF;gBACpF,0DAA0D,CACjE,CAAC;QACN,CAAC;IACL,CAAC;IACD,cAAc,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AACpC,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,qBAAqB;IACjC,OAAO,cAAc,CAAC,GAAG,EAAE,CAAC;AAChC,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,0BAA0B;IACtC,OAAO,cAAc,CAAC,GAAG,EAAE,KAAK,IAAI,CAAC;AACzC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mj-biz-apps/common-activity-sync",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.46.1",
|
|
5
5
|
"description": "Activity Sync Engine contracts for BizApps Common — provider plugin base class, qualification cascade, and the in-process extension contract that lets downstream apps enrich an Activity inside its own write transaction.",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"vitest": "^3.2.4"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@mj-biz-apps/common-entities": "5.
|
|
21
|
+
"@mj-biz-apps/common-entities": "5.46.1"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"@memberjunction/communication-types": "^6.1.0-edge.6",
|