@memberjunction/react-runtime 6.2.0-edge.7 → 6.2.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/.turbo/turbo-build.log +12 -12
- package/CHANGELOG.md +547 -0
- package/dist/runtime.umd.js +165 -156
- package/package.json +7 -7
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @memberjunction/react-runtime@6.2.0
|
|
2
|
+
> @memberjunction/react-runtime@6.2.0 build /home/runner/work/MJ/MJ/packages/React/runtime
|
|
3
3
|
> npm run build:node && npm run build:umd
|
|
4
4
|
|
|
5
5
|
npm warn Unknown env config "enable-pre-post-scripts". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
|
|
@@ -8,7 +8,7 @@ npm warn Unknown env config "npm-globalconfig". This will stop working in the ne
|
|
|
8
8
|
npm warn Unknown env config "link-workspace-packages". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
|
|
9
9
|
npm warn Unknown env config "_jsr-registry". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
|
|
10
10
|
|
|
11
|
-
> @memberjunction/react-runtime@6.2.0
|
|
11
|
+
> @memberjunction/react-runtime@6.2.0 build:node
|
|
12
12
|
> tsc && tsc-alias -f
|
|
13
13
|
|
|
14
14
|
npm warn Unknown env config "enable-pre-post-scripts". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
|
|
@@ -17,26 +17,26 @@ npm warn Unknown env config "npm-globalconfig". This will stop working in the ne
|
|
|
17
17
|
npm warn Unknown env config "link-workspace-packages". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
|
|
18
18
|
npm warn Unknown env config "_jsr-registry". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
|
|
19
19
|
|
|
20
|
-
> @memberjunction/react-runtime@6.2.0
|
|
20
|
+
> @memberjunction/react-runtime@6.2.0 build:umd
|
|
21
21
|
> webpack --config webpack.umd.config.cjs
|
|
22
22
|
|
|
23
23
|
Browserslist: browsers data (caniuse-lite) is 10 months old. Please run:
|
|
24
24
|
npx update-browserslist-db@latest
|
|
25
25
|
Why you should do it regularly: https://github.com/browserslist/update-db#readme
|
|
26
26
|
[BABEL] Note: The code generator has deoptimised the styling of /home/runner/work/MJ/MJ/packages/MJCoreEntities/dist/generated/entities/__mj.js as it exceeds the max of 500KB.
|
|
27
|
-
asset [1m[33mruntime.umd.js[39m[22m [1m[33m6.
|
|
28
|
-
orphan modules
|
|
27
|
+
asset [1m[33mruntime.umd.js[39m[22m [1m[33m6.34 MiB[39m[22m [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m [1m[33m[big][39m[22m (name: main) 1 related asset
|
|
28
|
+
orphan modules 15.2 MiB [1m[33m[orphan][39m[22m 1135 modules
|
|
29
29
|
runtime modules 1010 bytes 5 modules
|
|
30
|
-
cacheable modules 14.
|
|
30
|
+
cacheable modules 14.8 MiB
|
|
31
31
|
modules by path [1m../../../node_modules/.pnpm/[39m[22m 747 KiB
|
|
32
32
|
modules by path [1m../../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/[39m[22m 33.5 KiB 19 modules
|
|
33
33
|
modules by path [1m../../../node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/...(truncated)[39m[22m 12.7 KiB 2 modules
|
|
34
34
|
+ 5 modules
|
|
35
|
-
modules by path [1m../../MJCoreEntities/dist/[39m[22m
|
|
36
|
-
[1m../../MJCoreEntities/dist/index.js +
|
|
35
|
+
modules by path [1m../../MJCoreEntities/dist/[39m[22m 7.07 MiB
|
|
36
|
+
[1m../../MJCoreEntities/dist/index.js + 87 modules[39m[22m 7.05 MiB [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
37
37
|
[1m../../MJCoreEntities/dist/engines/UserViewEngine.js[39m[22m 19.6 KiB [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
38
38
|
[1m./dist/index.js + 44 modules[39m[22m 800 KiB [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
39
|
-
[1m../../MJCore/dist/index.js + 127 modules[39m[22m 3.
|
|
40
|
-
[1m../../MJGlobal/dist/index.js + 33 modules[39m[22m
|
|
41
|
-
[1m../../GraphQLDataProvider/dist/index.mjs +
|
|
42
|
-
webpack 5.105.0 compiled [1m[32msuccessfully[39m[22m in
|
|
39
|
+
[1m../../MJCore/dist/index.js + 127 modules[39m[22m 3.56 MiB [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
40
|
+
[1m../../MJGlobal/dist/index.js + 33 modules[39m[22m 751 KiB [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
41
|
+
[1m../../GraphQLDataProvider/dist/index.mjs + 172 modules[39m[22m 1.92 MiB [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
42
|
+
webpack 5.105.0 compiled [1m[32msuccessfully[39m[22m in 90531 ms
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,552 @@
|
|
|
1
1
|
# @memberjunction/react-runtime
|
|
2
2
|
|
|
3
|
+
## 6.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 4c0eaec: Local embeddings move to `@huggingface/transformers` 4.3.1 and can switch models safely; EmbeddingGemma 2 is available as an opt-in model.
|
|
8
|
+
- `MJ_DEFAULT_LOCAL_EMBEDDING_MODEL` names the local model every process embeds with (default: the highest-PowerRank active local model). Agent note, example, tag and query indexes leave out vectors from other models, a save re-embeds such a row, and the new "Re-embed Local Vectors" action moves them all.
|
|
9
|
+
- Embedding calls take an optional `inputType` (`'query' | 'document'`); Cohere and Bedrock map it natively, and catalog prefixes come from `ModelConfiguration.Embedding`. `LocalEmbedding` batches, honors `dimensions`, truncates to the catalog's `MaxInputTokens`, and sizes ONNX Runtime's thread pool to the CPUs the process may use (in a 2-CPU container, queries were about 10× faster).
|
|
10
|
+
- A failed embed now returns `null` from `AIEngine.EmbedText` instead of an empty vector.
|
|
11
|
+
|
|
12
|
+
**Upgrade notes:**
|
|
13
|
+
- After upgrading, run `mj ai actions run -n "Re-embed Local Vectors" --param "Force=true"`, then restart the MJ server processes. The new runtime changes all-mpnet-base-v2's vectors (about 0.95 cosine on Linux x64) under the same model ID, and long texts are now truncated at `MaxInputTokens` (256 tokens for all-MiniLM-L6-v2, matching sentence-transformers).
|
|
14
|
+
- A `MJ_DEFAULT_LOCAL_EMBEDDING_MODEL` that names no active local model turns local embedding off, with an error. An inactive model is no longer picked as the default.
|
|
15
|
+
- TagEngine embeds with the default local model whenever one exists, even if the "Tag Semantic Matching" prompt names a hosted model.
|
|
16
|
+
- `LocalEmbedding` honors a vector index's `Dimensions`: a value above the model's size now fails instead of being ignored.
|
|
17
|
+
- The GraphQL `EmbedText` mutation's `modelSize: 'medium'` now means the default local model.
|
|
18
|
+
- `LocalEmbedding` no longer reads the `useQuantized` / `localURL` settings or `TRANSFORMERS_LOCAL_URL`; it always loads the 8-bit weights.
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- 9160fd9: Interactive components get their declared libraries **and their child components** on mobile, the same way the Angular react bridge supplies them.
|
|
23
|
+
|
|
24
|
+
**The gap.** An agent-authored component declares its libraries in the spec, and the compiler turns
|
|
25
|
+
each declaration into a binding — `const _ = libraries['_']`. The mobile runtime context carried no
|
|
26
|
+
libraries at all, so every component that used one (which is most of them) was refused up front with
|
|
27
|
+
"this component uses external libraries that only run on desktop". A component asking for `lodash`
|
|
28
|
+
was being sent to the desktop over a dependency that could have been sitting in the bundle.
|
|
29
|
+
|
|
30
|
+
**The seam is the one the web already uses.** `RuntimeContext.libraries`, keyed by
|
|
31
|
+
`globalVariable` — the same field `AngularReactAdapterService` fills from `LibraryLoader`'s CDN
|
|
32
|
+
loads, merged by the compiler as `{ ...context.libraries }`. Mobile fills it from ordinary npm
|
|
33
|
+
dependencies, pinned to the exact versions `__mj.ComponentLibrary` declares. Imports are lazy, so a
|
|
34
|
+
component that declares nothing evaluates nothing.
|
|
35
|
+
|
|
36
|
+
**Filling the map is not sufficient, and the reason is a scoping detail.** The compiler emits the
|
|
37
|
+
`const _ = …` bindings _inside_ `DestructureWrapperUserComponent` but splices the component's source
|
|
38
|
+
one scope out, so a component body referencing `_` reads a free variable. On the web that resolves
|
|
39
|
+
because the UMD `<script>` already defined `window._` — the component is reading the global, not the
|
|
40
|
+
runtime's map. Mobile therefore also publishes each library onto `globalThis` under its declared
|
|
41
|
+
global name, which is the same act a UMD bundle performs, in the module system Hermes has. Existing
|
|
42
|
+
globals are never overwritten, mirroring `LibraryLoader`'s own guard.
|
|
43
|
+
|
|
44
|
+
**react-runtime: the browser check now tests for a DOM.** `loadRequiredLibraries` gated CDN loading
|
|
45
|
+
on `typeof window === 'undefined'`. React Native defines `window` but has no `document`, so Hermes
|
|
46
|
+
went down the script-loading path and threw
|
|
47
|
+
`Failed to resolve dependencies: Library 'lodash' not found` for every component that declared one.
|
|
48
|
+
It now tests for `document.createElement`, which is the capability it actually needs; browsers are
|
|
49
|
+
unaffected, and DOM-less hosts fall through to the runtime context as intended.
|
|
50
|
+
|
|
51
|
+
**Thirteen libraries, and honesty about the rest.** Provided: lodash, dayjs, moment, luxon, mathjs,
|
|
52
|
+
simple-statistics, chroma-js, uuid, axios, marked, d3, topojson-client, xlsx. Declined: everything
|
|
53
|
+
DOM- or canvas-bound (Chart.js, ApexCharts, AG Grid, Ant Design, Leaflet, Mapbox GL, GSAP,
|
|
54
|
+
SortableJS, Popper, Emotion, DOMPurify, html2canvas, jsPDF, geo-maps) — shimming those renders
|
|
55
|
+
nothing and reports no error, which is worse than declining. The fallback card now names the library
|
|
56
|
+
and why, instead of the blanket "uses external libraries", and a spec is refused only for the
|
|
57
|
+
libraries it actually cannot get rather than for having any.
|
|
58
|
+
|
|
59
|
+
***
|
|
60
|
+
|
|
61
|
+
## Child components
|
|
62
|
+
|
|
63
|
+
**Mobile called `loadComponent`; the Angular bridge calls `loadHierarchy`.** That one-word
|
|
64
|
+
difference was the whole gap. `loadComponent` compiles a single spec, so a component built out of
|
|
65
|
+
sub-components — the shape `metadata/components/CLAUDE.md` prescribes for anything non-trivial — had
|
|
66
|
+
nothing to render its children with, and `AssessSpec` refused any spec declaring `dependencies`
|
|
67
|
+
rather than producing a component with holes in it.
|
|
68
|
+
|
|
69
|
+
Mobile now makes the same call `MJReactComponent.loadComponentWithManager()` makes, with the same
|
|
70
|
+
options (`defaultNamespace: 'Global'`, `defaultVersion`, `returnType: 'both'`), and passes
|
|
71
|
+
`result.components` — the flat, unwrapped map of every loaded descendant — as the `components` prop,
|
|
72
|
+
which is where the compiler's generated child bindings read them from. The `libraries` map is passed
|
|
73
|
+
as a prop alongside it, as the bridge does, for components that read `libraries.d3` rather than the
|
|
74
|
+
bare global.
|
|
75
|
+
|
|
76
|
+
**Libraries are resolved for the whole tree, not the root.** `loadHierarchy` compiles each component
|
|
77
|
+
against _its own_ `spec.libraries`, so a parent using lodash whose child uses d3 needs both loaded
|
|
78
|
+
before any of it compiles. `CollectHierarchyLibraries` walks the tree once up front.
|
|
79
|
+
|
|
80
|
+
**`generateComponentHierarchyHash` moved into the runtime.** It derives the registry version key for
|
|
81
|
+
a spec with no explicit `version`, and it lived as a private method on the Angular component — so a
|
|
82
|
+
second host had to reimplement it, and two implementations of a registry key is how two surfaces
|
|
83
|
+
silently compile two copies of the same component. `MJReactComponent` now delegates to the runtime's
|
|
84
|
+
copy.
|
|
85
|
+
|
|
86
|
+
**What mobile still declines, and why it is not "dependencies".** A child whose code the spec does
|
|
87
|
+
not carry: `location: 'registry'` without inline `code` needs a component-registry fetch this app
|
|
88
|
+
cannot perform, and a child with no code at all cannot compile. The fallback names the missing part.
|
|
89
|
+
|
|
90
|
+
***
|
|
91
|
+
|
|
92
|
+
## The rest of the prop contract
|
|
93
|
+
|
|
94
|
+
`MJReactComponent` hands a component eight things. Mobile was supplying three. The remaining gaps
|
|
95
|
+
closed here, each by moving the implementation rather than writing a second one:
|
|
96
|
+
|
|
97
|
+
**`utilities` — was `{}`.** `RuntimeUtilities` (452 lines, zero `@angular/*` imports) moves from
|
|
98
|
+
`@memberjunction/ng-react` to `@memberjunction/react-runtime`. It builds `md`, `rv`, `rq`, `ai`,
|
|
99
|
+
`geoDataEngine` and `ml` over MJ core — the data surface the component contract promises, and not an
|
|
100
|
+
Angular concept. A native host previously had to reimplement it or pass `{}`, which meant any
|
|
101
|
+
component with data requirements could not read a row. The `@RegisterClass` registration moves with it
|
|
102
|
+
unchanged and ng-react now imports the factory instead of owning it.
|
|
103
|
+
|
|
104
|
+
**And the override now works where it never did.** `createRuntimeUtilities` consulted
|
|
105
|
+
`ClassFactory` only when `typeof window === 'undefined'`, returning `new RuntimeUtilities()`
|
|
106
|
+
directly otherwise — so the `@RegisterClass` registration was inert on every browser and React
|
|
107
|
+
Native host. The base class still built working utilities, which is exactly why this went
|
|
108
|
+
unnoticed: nothing broke, a documented extension point simply did nothing. The guard is removed.
|
|
109
|
+
For an app that registers no subclass this changes nothing — with a null key `CreateInstance`
|
|
110
|
+
matches the base's own registration and constructs the same class the fallback would have — and for
|
|
111
|
+
one that does, substitution finally happens. A jsdom test pins it: it fails against the old guard.
|
|
112
|
+
|
|
113
|
+
**`styles` — was `undefined`**, which `buildComponentProps` turns into the runtime's frozen default
|
|
114
|
+
palette, and silently discarded the spec's `styleOverrides` (the mechanism that keeps "make the
|
|
115
|
+
charts blue" out of generated code as a hardcoded literal). `BuildStylesFromTheme` now accepts a
|
|
116
|
+
`ThemeTokenReader` as well as an element, so React Native — which holds the same `--mj-*` token
|
|
117
|
+
values but has no stylesheet to read them from — feeds them through the _identical_ mapping instead
|
|
118
|
+
of a copy. Mobile then applies `ApplyStyleOverrides` on top, as the bridge does.
|
|
119
|
+
|
|
120
|
+
**`savedUserSettings` / `onSaveUserSettings` — were absent**, so every sort order, selected tab and
|
|
121
|
+
collapsed panel reset on each open while the same component remembered them on the web. Mobile now
|
|
122
|
+
uses the same four `react-runtime` helpers and the same `UserInfoEngine` (`MJ: User Settings`)
|
|
123
|
+
storage, which means the same key: settings saved on a desktop open on a phone. A mobile-only key
|
|
124
|
+
format would have quietly given each user two profiles.
|
|
125
|
+
|
|
126
|
+
**`callbacks.OpenEntityRecord` — was `key.GetValueByIndex(0)`.** Components routinely identify a
|
|
127
|
+
record by something that is _not_ its primary key, because that is what their query returned. The
|
|
128
|
+
Angular component did the full resolution inline; `resolveEntityRecordKey` now lives in the runtime
|
|
129
|
+
and does it for both — coercing the three shapes a component may pass, then running a view to
|
|
130
|
+
translate a non-primary-key field. `NotifyEvent` was missing entirely and is now accepted.
|
|
131
|
+
|
|
132
|
+
**`CreateSimpleNotification` — was `console.log`.** It now renders above the component that raised
|
|
133
|
+
it, dismissed by tap rather than a timer so a failed-save message cannot vanish unread.
|
|
134
|
+
|
|
135
|
+
**Error boundary** now matches the bridge's options (`logErrors`, `recovery: 'retry'`).
|
|
136
|
+
|
|
137
|
+
## Manifest scoping
|
|
138
|
+
|
|
139
|
+
`@memberjunction/react-runtime` is excluded from all four class-registration manifests
|
|
140
|
+
(`ng-bootstrap`, `ng-bootstrap-lite`, `server-bootstrap`, `server-bootstrap-lite`). Moving a
|
|
141
|
+
`@RegisterClass` into it made the package eagerly reachable from every bootstrap's dependency walk,
|
|
142
|
+
which would have pulled `@babel/standalone` (~3 MB) out of Explorer's lazy ng-react chunk and into
|
|
143
|
+
its initial bundle, and into the server bundle besides. `RuntimeUtilities` stays where it was
|
|
144
|
+
behaviourally: registered lazily through `ng-react` via the existing `lazy-feature-config` entry.
|
|
145
|
+
|
|
146
|
+
## Still not at parity
|
|
147
|
+
|
|
148
|
+
`utilities` is not wrapped for data capture (the bridge's fallback-snapshot support), and component
|
|
149
|
+
methods (`print` / `refresh` / `invokeMethod`) are not exposed to the host.
|
|
150
|
+
|
|
151
|
+
***
|
|
152
|
+
|
|
153
|
+
## Registry-backed child components, and Hermes's async limit
|
|
154
|
+
|
|
155
|
+
Two things were still stopping real agent-authored components from rendering, both found by
|
|
156
|
+
running the deployment's actual component registry rather than hand-written samples.
|
|
157
|
+
|
|
158
|
+
**Children named instead of inlined.** A spec routinely references `DataGrid`, `OpenRecordButton`,
|
|
159
|
+
`SingleRecordView` by name with no code — that is what `metadata/components/CLAUDE.md` prescribes
|
|
160
|
+
for anything non-trivial. `loadHierarchy` fetches those itself, but it _compiles each child as it
|
|
161
|
+
fetches it_, and a component's library bindings are emitted at the top of its factory — so a
|
|
162
|
+
registry child's libraries are unknowable until it is too late to load them. `hierarchy-resolver.ts`
|
|
163
|
+
walks the tree first through the same `ComponentMetadataEngine.FindComponent` the runtime will use,
|
|
164
|
+
purely to learn the library set; the specs it reads come back from `ComponentManager`'s own fetch
|
|
165
|
+
cache, so the second read is free. `AssessSpec` no longer refuses children — it cannot judge them
|
|
166
|
+
synchronously, and refusing them declined the majority of real components over a lookup the app can
|
|
167
|
+
perform.
|
|
168
|
+
|
|
169
|
+
**`async` in runtime-compiled code.** Hermes compiles the app's own modules ahead of time, where
|
|
170
|
+
async is fully supported. Components take the other path — compiled at runtime, executed through
|
|
171
|
+
`new Function` — and Hermes's runtime compiler rejects async outright: `async functions are
|
|
172
|
+
unsupported`. A component doing `const rows = await utilities.rv.RunView(…)` therefore failed to
|
|
173
|
+
compile, with an error naming neither cause nor remedy. Mobile now compiles with
|
|
174
|
+
`transform-async-to-generator`. Hermes accepts the generators that produces; it is only `async`
|
|
175
|
+
syntax it refuses.
|
|
176
|
+
|
|
177
|
+
`transform-regenerator` was tried and rejected on evidence: it would also remove the generators, but
|
|
178
|
+
in this Babel version it miscompiles real component code (`Property name expected type of string but
|
|
179
|
+
got undefined`) — measured across the registry, it broke 12 components that otherwise transpile
|
|
180
|
+
cleanly. The narrower transform is both sufficient and safe. A test asserts it stays out.
|
|
181
|
+
|
|
182
|
+
Measured against this deployment's 118 registered components: 73 have a fully resolvable hierarchy
|
|
183
|
+
and declare only libraries the native runtime can provide. The other 45 declare Chart.js, ApexCharts
|
|
184
|
+
or ECharts — which the DOM host below now serves.
|
|
185
|
+
|
|
186
|
+
***
|
|
187
|
+
|
|
188
|
+
## Canvas and DOM components: a second renderer rather than a refusal
|
|
189
|
+
|
|
190
|
+
Chart.js and ApexCharts are the two most-declared libraries in the component registry, and both draw
|
|
191
|
+
into an `HTMLCanvasElement`. AG Grid, antd and Leaflet mount DOM nodes. None of that fails natively
|
|
192
|
+
for want of effort — React Native has no canvas and no DOM. Reimplementing each library's
|
|
193
|
+
configuration surface against `react-native-svg` would mean being subtly wrong forever against a
|
|
194
|
+
moving target.
|
|
195
|
+
|
|
196
|
+
A WebView is a browser, so a component that needs one gets one. `dom-host/` renders the component in
|
|
197
|
+
a real document using the **same** react-runtime UMD bundle the Playwright test harness loads, the
|
|
198
|
+
**same** CDN URLs recorded in `MJ: Component Libraries`, and the same compile path. That is parity by
|
|
199
|
+
construction rather than parity by imitation.
|
|
200
|
+
|
|
201
|
+
`AssessSpec` is no longer a yes/no gate: it returns a `RenderMode`. Components that can run natively
|
|
202
|
+
still do — faster, native scrolling, the app's typography — and only the ones that genuinely need a
|
|
203
|
+
browser take the other path. Which renderer is used is not a difference in what a component
|
|
204
|
+
_receives_: both get the same `utilities`, `styles`, `savedUserSettings` and callbacks.
|
|
205
|
+
|
|
206
|
+
**The page holds no credential.** It cannot call `RunView` — it has no provider and no token, and
|
|
207
|
+
giving it one would put the app's session inside a document that just executed third-party library
|
|
208
|
+
code. `utilities` and callbacks are proxied over a closed, named-method bridge to the native side,
|
|
209
|
+
which owns the one authenticated provider. A component can ask for what the signed-in user could
|
|
210
|
+
already read, and nothing else.
|
|
211
|
+
|
|
212
|
+
**The UMD bundle is now minified, and 55% smaller.** It was 11 MB with minification disabled — for
|
|
213
|
+
a real reason, not indifference: `MJGlobal.ClassFactory` keys every registration on `class.name`,
|
|
214
|
+
and terser's default mangling renames classes, so distinct classes collapse onto one identifier and
|
|
215
|
+
their registrations collide. `keep_classnames` / `keep_fnames` remove the cause rather than the
|
|
216
|
+
symptom; everything else still minifies, taking it to 5.1 MB. That size is now a first-render wait
|
|
217
|
+
on a phone rather than a number on disk, which is why it was worth fixing properly.
|
|
218
|
+
|
|
219
|
+
A test evaluates the built bundle in a `vm` sandbox and asserts both that it initialises and that
|
|
220
|
+
its class names survived — verified to fail when plain mangling is restored, so re-enabling it
|
|
221
|
+
cannot pass silently here and break wherever a component is actually rendered.
|
|
222
|
+
|
|
223
|
+
The first DOM-hosted render still needs a connection; the WebView caches the bundle afterwards.
|
|
224
|
+
|
|
225
|
+
**Routing happens after resolution, not before.** `AssessSpec` is synchronous, so it can only see
|
|
226
|
+
the spec it is handed — and a dashboard whose parent uses lodash while a registry-backed child draws
|
|
227
|
+
a Chart.js canvas looks native-renderable right up until the child fails. The component that most
|
|
228
|
+
needs the DOM host is exactly the one whose canvas library is buried a level down. The hierarchy is
|
|
229
|
+
therefore resolved first and the renderer chosen against the resolved tree.
|
|
230
|
+
|
|
231
|
+
The resolver also returns the tree with every registry child's code **inlined**, because the DOM host
|
|
232
|
+
page has no provider: a child it still had to fetch would throw inside the WebView. The native
|
|
233
|
+
renderer gets the same inlined spec, which costs nothing and means both paths reason about one thing.
|
|
234
|
+
|
|
235
|
+
***
|
|
236
|
+
|
|
237
|
+
## A crash no longer costs the reader the data
|
|
238
|
+
|
|
239
|
+
By the time most components throw, the fetching has succeeded — the failure is in the drawing.
|
|
240
|
+
Replacing the whole thing with "this component ran into an error" discards rows the reader came for
|
|
241
|
+
and could still read perfectly well.
|
|
242
|
+
|
|
243
|
+
`utilities` is wrapped so every view and query result is recorded, and a component that fails after
|
|
244
|
+
loading shows those rows instead of a dead card, under an explanation that does not pretend anything
|
|
245
|
+
worked. `MJReactComponent` captures for the same reason and calls it a fallback snapshot; the
|
|
246
|
+
difference here is that it is _shown_, because on a phone there is no second pane to offer it in.
|
|
247
|
+
|
|
248
|
+
In the DOM host the capture is nearly free — every data call already funnels through the one bridge
|
|
249
|
+
handler — and only a page that never mounted is treated as failed, so a component that reports an
|
|
250
|
+
error after rendering is not replaced by a table it did not ask for.
|
|
251
|
+
|
|
252
|
+
Rendering goes through the Data artifact view, so captured rows and query-builder output cannot
|
|
253
|
+
drift into describing a row differently.
|
|
254
|
+
|
|
255
|
+
**Verified on both platforms.** The DOM host, its bridge, the canvas chart, registry-resolved
|
|
256
|
+
children and the drill-down all behave identically on Android and iOS. `react-native-webview` is a
|
|
257
|
+
native module, so the app needs a rebuild rather than a Metro reload.
|
|
258
|
+
|
|
259
|
+
**Deliberately not built:** the rest of the host-facing method API (`validate`, `isDirty`, `reset`,
|
|
260
|
+
`scrollTo`, `focus`, `invokeMethod`). Those exist on the web so an Angular container can drive an
|
|
261
|
+
embedded component; mobile has no such container, and adding the surface with no caller would be
|
|
262
|
+
speculative. `getCurrentDataState`'s purpose — a fallback when the component cannot show its own
|
|
263
|
+
data — is served above.
|
|
264
|
+
|
|
265
|
+
- 80905a1: Rename public class members and exported functions to PascalCase, per MJ's naming convention,
|
|
266
|
+
**without breaking a single consumer**.
|
|
267
|
+
|
|
268
|
+
Every renamed symbol keeps its old name beside the new one as a `@deprecated` stub that forwards to
|
|
269
|
+
it — a delegating method or function, a getter/setter pair for a property, and for Angular a
|
|
270
|
+
readable accessor pair for an `@Input` and a second `@Output` sharing the same `EventEmitter`, so a
|
|
271
|
+
template still binding the old name keeps receiving events. Old names still compile, still resolve,
|
|
272
|
+
and still behave identically; the deprecation tag rides through to the published `.d.ts`, so editors
|
|
273
|
+
point callers at the replacement. Where a package re-exports through an explicit `export { … }`
|
|
274
|
+
list, the new name is added alongside the old, so the correct name is actually on the public surface
|
|
275
|
+
rather than merely declared.
|
|
276
|
+
|
|
277
|
+
The rename is deliberately refused wherever a mechanical stub would not be equivalent, because
|
|
278
|
+
several of those shapes change a type contract while still compiling in the package that declares
|
|
279
|
+
them:
|
|
280
|
+
- an **optional** property or parameter property — TypeScript has no optional accessor, so a stub
|
|
281
|
+
would promote `foo?` to a required member and break every object literal that omits it;
|
|
282
|
+
- a class that is a **data shape** (no methods, or `@ObjectType`/`@InputType`) — object literals are
|
|
283
|
+
assigned to it, and an accessor stub changes what they must supply;
|
|
284
|
+
- a property whose **subclass redeclares it**, since TypeScript forbids a property overriding an
|
|
285
|
+
accessor (TS2610);
|
|
286
|
+
- a name whose PascalCase form is **already bound** in that file or class;
|
|
287
|
+
- decorated members, `get`/`set` pairs behind a decorator, generators, destructured parameters,
|
|
288
|
+
overload sets and abstract members.
|
|
289
|
+
|
|
290
|
+
**One wire-visible consequence, for version skew only.** `BaseInfo.toJSON` walks `_`-prefixed
|
|
291
|
+
backing fields and emits them through their public getter, preferring the PascalCase one. Renaming
|
|
292
|
+
the 23 field aliases in `MJCore/src/generic` therefore changes what `AllMetadata` carries:
|
|
293
|
+
`EntityInfo.spCreate` and friends now serialize as `SpCreate`. A same-version client is unaffected —
|
|
294
|
+
`copyInitData` accepts a value through a settable accessor, so either spelling lands on the right
|
|
295
|
+
field. An OLDER client against a newer server has no such path in its `copyInitData` and drops those
|
|
296
|
+
fields silently. Same-version deployments, which is the supported configuration, see no change.
|
|
297
|
+
|
|
298
|
+
Each package was verified against its own pre-change baseline rather than against zero, because
|
|
299
|
+
several packages in this repo do not typecheck cleanly to begin with. Angular packages were verified
|
|
300
|
+
with `ngc`, not `tsc`: a plain typecheck does not compile templates, and an earlier write-only
|
|
301
|
+
`@Input` alias passed `tsc` while breaking six template reads.
|
|
302
|
+
|
|
303
|
+
- 36a3f9e: Security hardening across SQL filter construction, expression sandboxing, token verification, fail-closed endpoints, and client URL/selector screening:
|
|
304
|
+
- **Pure AST transform evaluation (`@memberjunction/global`)**: Replace `new Function` in `FieldTransformEngine` with an Acorn-based AST interpreter (`SafeTransformAstEvaluator`) that blocks prototype climbs, ambient global callback smuggling, and dynamic code generation, while supporting standard string/array transform methods (`split`, `slice`, `join`, `substring`, `replace`, `padStart`, `padEnd`, etc.). Harden `SafeExpressionEvaluator` against higher-order callback smuggling.
|
|
305
|
+
- **SQL filter & token hardening (`@memberjunction/server`, `@memberjunction/external-change-detection`, `@memberjunction/metadata-sync`)**: Enforce strict UUID shape validation and SQL string escaping on `ExtraFilter` interpolations across resolvers and REST handlers, reject non-primitive/non-literal primary key and lookup filter values in `MetadataSync`, perform non-short-circuiting constant-time access-token lookups in `GetDataResolver` with full token redaction from error messages, derive a domain-separated HS256 media-access signing subkey from `MJ_BASE_ENCRYPTION_KEY`, and default `SetupRESTEndpoints` to disabled (`enabled: false`).
|
|
306
|
+
- **Fail-closed registry auth (`@memberjunction/component-registry-server`)**: Refuse requests by default in `ComponentRegistryAPIServer.checkAPIKey` until overridden by a subclass, and protect both `/components` and `/feedback` routes when `requireAuth` is enabled.
|
|
307
|
+
- **Client URL-scheme & DOM selector screening (`@memberjunction/ng-core-entity-forms`, `@memberjunction/ng-conversations`, `@memberjunction/react-runtime`)**: Screen media and subresource URLs to `http:` / `https:` (rejecting `javascript:`, `data:`, `blob:`, and scheme-relative `//` targets) across viewer, open-in-tab, download, session-state rehydration, and dynamic `<script>` / `<link>` loaders, and replace interpolated `document.querySelector` URL lookups with direct attribute comparison.
|
|
308
|
+
|
|
309
|
+
- Updated dependencies [0d81c53]
|
|
310
|
+
- Updated dependencies [1419ba7]
|
|
311
|
+
- Updated dependencies [a709bb6]
|
|
312
|
+
- Updated dependencies [39b35f1]
|
|
313
|
+
- Updated dependencies [d17de94]
|
|
314
|
+
- Updated dependencies [e97d95c]
|
|
315
|
+
- Updated dependencies [38c4a81]
|
|
316
|
+
- Updated dependencies [e51296c]
|
|
317
|
+
- Updated dependencies [a50948e]
|
|
318
|
+
- Updated dependencies [2552b1e]
|
|
319
|
+
- Updated dependencies [25bb295]
|
|
320
|
+
- Updated dependencies [432cb73]
|
|
321
|
+
- Updated dependencies [3080e83]
|
|
322
|
+
- Updated dependencies [4c6a28b]
|
|
323
|
+
- Updated dependencies [c93c0f8]
|
|
324
|
+
- Updated dependencies [6c36fb6]
|
|
325
|
+
- Updated dependencies [0eeb89d]
|
|
326
|
+
- Updated dependencies [ecf36eb]
|
|
327
|
+
- Updated dependencies [cc36de5]
|
|
328
|
+
- Updated dependencies [9cb815b]
|
|
329
|
+
- Updated dependencies [709de1a]
|
|
330
|
+
- Updated dependencies [c159e2f]
|
|
331
|
+
- Updated dependencies [29129bd]
|
|
332
|
+
- Updated dependencies [1d6e3e8]
|
|
333
|
+
- Updated dependencies [d2db108]
|
|
334
|
+
- Updated dependencies [dfe40a4]
|
|
335
|
+
- Updated dependencies [d43d86e]
|
|
336
|
+
- Updated dependencies [a3539d2]
|
|
337
|
+
- Updated dependencies [dde482c]
|
|
338
|
+
- Updated dependencies [db39145]
|
|
339
|
+
- Updated dependencies [41274aa]
|
|
340
|
+
- Updated dependencies [91cba84]
|
|
341
|
+
- Updated dependencies [b14c72f]
|
|
342
|
+
- Updated dependencies [29b16ee]
|
|
343
|
+
- Updated dependencies [a6a4656]
|
|
344
|
+
- Updated dependencies [c671f85]
|
|
345
|
+
- Updated dependencies [49f26d9]
|
|
346
|
+
- Updated dependencies [660ef45]
|
|
347
|
+
- Updated dependencies [5e4205c]
|
|
348
|
+
- Updated dependencies [0cc6b08]
|
|
349
|
+
- Updated dependencies [7be1684]
|
|
350
|
+
- Updated dependencies [21f9e15]
|
|
351
|
+
- Updated dependencies [1090caa]
|
|
352
|
+
- Updated dependencies [c8c48e1]
|
|
353
|
+
- Updated dependencies [f2248d5]
|
|
354
|
+
- Updated dependencies [81aea34]
|
|
355
|
+
- Updated dependencies [7384dd6]
|
|
356
|
+
- Updated dependencies [6849b00]
|
|
357
|
+
- Updated dependencies [67f6c85]
|
|
358
|
+
- Updated dependencies [ac9b00b]
|
|
359
|
+
- Updated dependencies [eb3a8d3]
|
|
360
|
+
- Updated dependencies [5465489]
|
|
361
|
+
- Updated dependencies [3bace5a]
|
|
362
|
+
- Updated dependencies [88e6902]
|
|
363
|
+
- Updated dependencies [6dc3aa9]
|
|
364
|
+
- Updated dependencies [c87f87a]
|
|
365
|
+
- Updated dependencies [f4cd5fb]
|
|
366
|
+
- Updated dependencies [e1fd4c1]
|
|
367
|
+
- Updated dependencies [4248fb3]
|
|
368
|
+
- Updated dependencies [e1dd673]
|
|
369
|
+
- Updated dependencies [f3c6161]
|
|
370
|
+
- Updated dependencies [c6b4b85]
|
|
371
|
+
- Updated dependencies [d29b5c2]
|
|
372
|
+
- Updated dependencies [59e32e0]
|
|
373
|
+
- Updated dependencies [d122a41]
|
|
374
|
+
- Updated dependencies [0a7c255]
|
|
375
|
+
- Updated dependencies [0adaf76]
|
|
376
|
+
- Updated dependencies [5ee02db]
|
|
377
|
+
- Updated dependencies [0ff7523]
|
|
378
|
+
- Updated dependencies [0ff7523]
|
|
379
|
+
- Updated dependencies [d86bcbc]
|
|
380
|
+
- Updated dependencies [307da67]
|
|
381
|
+
- Updated dependencies [42df19d]
|
|
382
|
+
- Updated dependencies [4283a82]
|
|
383
|
+
- Updated dependencies [d6b39c4]
|
|
384
|
+
- Updated dependencies [5f0baf7]
|
|
385
|
+
- Updated dependencies [f65fec7]
|
|
386
|
+
- Updated dependencies [ef43cf3]
|
|
387
|
+
- Updated dependencies [6e6e3f1]
|
|
388
|
+
- Updated dependencies [ea4080e]
|
|
389
|
+
- Updated dependencies [9b5b489]
|
|
390
|
+
- Updated dependencies [cb205de]
|
|
391
|
+
- Updated dependencies [b44c7cf]
|
|
392
|
+
- Updated dependencies [0c634ba]
|
|
393
|
+
- Updated dependencies [a6f8c1c]
|
|
394
|
+
- Updated dependencies [08f8966]
|
|
395
|
+
- Updated dependencies [48c9cd2]
|
|
396
|
+
- Updated dependencies [56d7614]
|
|
397
|
+
- Updated dependencies [223669e]
|
|
398
|
+
- Updated dependencies [683f652]
|
|
399
|
+
- Updated dependencies [914e6ff]
|
|
400
|
+
- Updated dependencies [a8be410]
|
|
401
|
+
- Updated dependencies [7316ac3]
|
|
402
|
+
- Updated dependencies [2274f42]
|
|
403
|
+
- Updated dependencies [7e57b48]
|
|
404
|
+
- Updated dependencies [35ed364]
|
|
405
|
+
- Updated dependencies [9ce7cf4]
|
|
406
|
+
- Updated dependencies [0fb3649]
|
|
407
|
+
- Updated dependencies [131f3c4]
|
|
408
|
+
- Updated dependencies [902d086]
|
|
409
|
+
- Updated dependencies [62c91ea]
|
|
410
|
+
- Updated dependencies [705ab4e]
|
|
411
|
+
- Updated dependencies [5df9486]
|
|
412
|
+
- Updated dependencies [a7da50b]
|
|
413
|
+
- Updated dependencies [0f04590]
|
|
414
|
+
- Updated dependencies [dd34a5c]
|
|
415
|
+
- Updated dependencies [5fed75a]
|
|
416
|
+
- Updated dependencies [4c0eaec]
|
|
417
|
+
- Updated dependencies [1cb1d52]
|
|
418
|
+
- Updated dependencies [f26084f]
|
|
419
|
+
- Updated dependencies [db39145]
|
|
420
|
+
- Updated dependencies [f48dffc]
|
|
421
|
+
- Updated dependencies [41c2c08]
|
|
422
|
+
- Updated dependencies [630bb88]
|
|
423
|
+
- Updated dependencies [e69634e]
|
|
424
|
+
- Updated dependencies [6779eed]
|
|
425
|
+
- Updated dependencies [b73e3bc]
|
|
426
|
+
- Updated dependencies [08be974]
|
|
427
|
+
- Updated dependencies [29b6ec3]
|
|
428
|
+
- Updated dependencies [44faf83]
|
|
429
|
+
- Updated dependencies [17cc774]
|
|
430
|
+
- Updated dependencies [dae1d31]
|
|
431
|
+
- Updated dependencies [bfd67c6]
|
|
432
|
+
- Updated dependencies [80905a1]
|
|
433
|
+
- Updated dependencies [4c97994]
|
|
434
|
+
- Updated dependencies [397ae9a]
|
|
435
|
+
- Updated dependencies [08b3d7b]
|
|
436
|
+
- Updated dependencies [7e72c86]
|
|
437
|
+
- Updated dependencies [dbc3462]
|
|
438
|
+
- Updated dependencies [a17a228]
|
|
439
|
+
- Updated dependencies [6b08ebf]
|
|
440
|
+
- Updated dependencies [5fed75a]
|
|
441
|
+
- Updated dependencies [ee1f0d9]
|
|
442
|
+
- Updated dependencies [ce758af]
|
|
443
|
+
- Updated dependencies [89a5b59]
|
|
444
|
+
- Updated dependencies [1ea4085]
|
|
445
|
+
- Updated dependencies [aee2d53]
|
|
446
|
+
- Updated dependencies [279b93e]
|
|
447
|
+
- Updated dependencies [8420f36]
|
|
448
|
+
- Updated dependencies [f0c78c3]
|
|
449
|
+
- Updated dependencies [4ef13d6]
|
|
450
|
+
- Updated dependencies [25f7b82]
|
|
451
|
+
- Updated dependencies [8b90b41]
|
|
452
|
+
- Updated dependencies [104125c]
|
|
453
|
+
- Updated dependencies [7e57b48]
|
|
454
|
+
- Updated dependencies [7e57b48]
|
|
455
|
+
- Updated dependencies [d296edd]
|
|
456
|
+
- Updated dependencies [66fd011]
|
|
457
|
+
- Updated dependencies [6a5fb64]
|
|
458
|
+
- Updated dependencies [0e93e1f]
|
|
459
|
+
- Updated dependencies [509d2aa]
|
|
460
|
+
- Updated dependencies [68f5c01]
|
|
461
|
+
- Updated dependencies [196160a]
|
|
462
|
+
- Updated dependencies [5513c2a]
|
|
463
|
+
- Updated dependencies [90829e3]
|
|
464
|
+
- Updated dependencies [5986939]
|
|
465
|
+
- Updated dependencies [4d647e6]
|
|
466
|
+
- Updated dependencies [c35f7e5]
|
|
467
|
+
- Updated dependencies [8c120db]
|
|
468
|
+
- Updated dependencies [9a2d7cc]
|
|
469
|
+
- Updated dependencies [3ab85f9]
|
|
470
|
+
- Updated dependencies [aac148b]
|
|
471
|
+
- Updated dependencies [0cc6b08]
|
|
472
|
+
- Updated dependencies [8d1a373]
|
|
473
|
+
- Updated dependencies [17a4137]
|
|
474
|
+
- Updated dependencies [b4afc13]
|
|
475
|
+
- Updated dependencies [36a3f9e]
|
|
476
|
+
- Updated dependencies [539dfe3]
|
|
477
|
+
- Updated dependencies [c65f754]
|
|
478
|
+
- Updated dependencies [49d0d3c]
|
|
479
|
+
- Updated dependencies [5931f0d]
|
|
480
|
+
- Updated dependencies [d046715]
|
|
481
|
+
- Updated dependencies [60bd774]
|
|
482
|
+
- Updated dependencies [0a348e2]
|
|
483
|
+
- Updated dependencies [33226e0]
|
|
484
|
+
- Updated dependencies [ac18db8]
|
|
485
|
+
- Updated dependencies [35da130]
|
|
486
|
+
- Updated dependencies [5b41d48]
|
|
487
|
+
- Updated dependencies [4b9542c]
|
|
488
|
+
- Updated dependencies [28c92e0]
|
|
489
|
+
- Updated dependencies [5f707d1]
|
|
490
|
+
- Updated dependencies [369e229]
|
|
491
|
+
- Updated dependencies [ba00ac7]
|
|
492
|
+
- Updated dependencies [8a5d2c0]
|
|
493
|
+
- Updated dependencies [d13cf6b]
|
|
494
|
+
- Updated dependencies [aca4317]
|
|
495
|
+
- Updated dependencies [d52f9ba]
|
|
496
|
+
- Updated dependencies [d0a8dbf]
|
|
497
|
+
- Updated dependencies [ec97ad4]
|
|
498
|
+
- Updated dependencies [b1b6d3d]
|
|
499
|
+
- Updated dependencies [0e5a4cd]
|
|
500
|
+
- Updated dependencies [b968642]
|
|
501
|
+
- Updated dependencies [af57e8d]
|
|
502
|
+
- Updated dependencies [68a7e3b]
|
|
503
|
+
- Updated dependencies [718b01c]
|
|
504
|
+
- Updated dependencies [57fea6a]
|
|
505
|
+
- Updated dependencies [374b1a4]
|
|
506
|
+
- Updated dependencies [2c590b0]
|
|
507
|
+
- Updated dependencies [1ba9315]
|
|
508
|
+
- Updated dependencies [b8a9e5e]
|
|
509
|
+
- Updated dependencies [e8258a1]
|
|
510
|
+
- Updated dependencies [2854a2e]
|
|
511
|
+
- Updated dependencies [03c085c]
|
|
512
|
+
- Updated dependencies [28df136]
|
|
513
|
+
- Updated dependencies [b0b2cc9]
|
|
514
|
+
- Updated dependencies [dc38250]
|
|
515
|
+
- Updated dependencies [49e0bd8]
|
|
516
|
+
- @memberjunction/core-entities@6.2.0
|
|
517
|
+
- @memberjunction/global@6.2.0
|
|
518
|
+
- @memberjunction/core@6.2.0
|
|
519
|
+
- @memberjunction/graphql-dataprovider@6.2.0
|
|
520
|
+
- @memberjunction/ai-vectors-memory@6.2.0
|
|
521
|
+
- @memberjunction/interactive-component-types@6.2.0
|
|
522
|
+
|
|
523
|
+
## 6.2.0-edge.8
|
|
524
|
+
|
|
525
|
+
### Patch Changes
|
|
526
|
+
|
|
527
|
+
- Updated dependencies [6c36fb6]
|
|
528
|
+
- Updated dependencies [9cb815b]
|
|
529
|
+
- Updated dependencies [d2db108]
|
|
530
|
+
- Updated dependencies [c671f85]
|
|
531
|
+
- Updated dependencies [6849b00]
|
|
532
|
+
- Updated dependencies [59e32e0]
|
|
533
|
+
- Updated dependencies [5f0baf7]
|
|
534
|
+
- Updated dependencies [a6f8c1c]
|
|
535
|
+
- Updated dependencies [56d7614]
|
|
536
|
+
- Updated dependencies [9ce7cf4]
|
|
537
|
+
- Updated dependencies [902d086]
|
|
538
|
+
- Updated dependencies [62c91ea]
|
|
539
|
+
- Updated dependencies [dd34a5c]
|
|
540
|
+
- Updated dependencies [e69634e]
|
|
541
|
+
- Updated dependencies [539dfe3]
|
|
542
|
+
- Updated dependencies [ac18db8]
|
|
543
|
+
- @memberjunction/core@6.2.0-edge.8
|
|
544
|
+
- @memberjunction/core-entities@6.2.0-edge.8
|
|
545
|
+
- @memberjunction/global@6.2.0-edge.8
|
|
546
|
+
- @memberjunction/graphql-dataprovider@6.2.0-edge.8
|
|
547
|
+
- @memberjunction/ai-vectors-memory@6.2.0-edge.8
|
|
548
|
+
- @memberjunction/interactive-component-types@6.2.0-edge.8
|
|
549
|
+
|
|
3
550
|
## 6.2.0-edge.7
|
|
4
551
|
|
|
5
552
|
### Minor Changes
|