@memberjunction/server-bootstrap-lite 4.0.0 → 4.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/README.md
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# @memberjunction/server-bootstrap-lite
|
|
2
|
+
|
|
3
|
+
Lightweight class registrations manifest for MemberJunction server-side tools. Excludes heavy and ESM-incompatible dependencies (communication providers, storage, bizapps actions) that are unnecessary for CLI tools, CodeGen, MCP Server, and similar lightweight applications.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
This package provides a pre-built class registration manifest that imports and registers all core `@memberjunction/*` classes needed for server-side operation, but intentionally excludes heavyweight packages that are only needed for the full MJAPI server.
|
|
8
|
+
|
|
9
|
+
```mermaid
|
|
10
|
+
graph TD
|
|
11
|
+
A["server-bootstrap-lite"] --> B["Core Entity Classes"]
|
|
12
|
+
A --> C["Core Action Classes"]
|
|
13
|
+
A --> D["AI Engine Classes"]
|
|
14
|
+
A --> E["Metadata Sync"]
|
|
15
|
+
|
|
16
|
+
F["server-bootstrap<br/>(Full)"] --> A
|
|
17
|
+
F --> G["Communication Providers"]
|
|
18
|
+
F --> H["Storage Providers"]
|
|
19
|
+
F --> I["BizApps Actions"]
|
|
20
|
+
F --> J["Skip Integration"]
|
|
21
|
+
|
|
22
|
+
K["CLI Tools / CodeGen"] --> A
|
|
23
|
+
L["MJAPI Server"] --> F
|
|
24
|
+
|
|
25
|
+
style A fill:#2d6a9f,stroke:#1a4971,color:#fff
|
|
26
|
+
style F fill:#7c5295,stroke:#563a6b,color:#fff
|
|
27
|
+
style K fill:#2d8659,stroke:#1a5c3a,color:#fff
|
|
28
|
+
style L fill:#b8762f,stroke:#8a5722,color:#fff
|
|
29
|
+
style G fill:#b8762f,stroke:#8a5722,color:#fff
|
|
30
|
+
style H fill:#b8762f,stroke:#8a5722,color:#fff
|
|
31
|
+
style I fill:#b8762f,stroke:#8a5722,color:#fff
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Installation
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm install @memberjunction/server-bootstrap-lite
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## When to Use
|
|
41
|
+
|
|
42
|
+
Use `server-bootstrap-lite` instead of `server-bootstrap` for:
|
|
43
|
+
|
|
44
|
+
| Application | Use Lite? | Why |
|
|
45
|
+
|-------------|-----------|-----|
|
|
46
|
+
| MJCLI | Yes | Does not need communication/storage providers |
|
|
47
|
+
| CodeGen (CodeGenLib, MJCodeGenAPI) | Yes | Only needs entity metadata and class registration |
|
|
48
|
+
| MCP Server | Yes | Lightweight integration, no email/SMS needed |
|
|
49
|
+
| A2A Server | Yes | Agent-to-agent, no UI or storage dependencies |
|
|
50
|
+
| Custom CLI tools | Yes | Minimal footprint for scripting |
|
|
51
|
+
| MJAPI Server | No | Needs full manifest with all providers |
|
|
52
|
+
| MJ Explorer | No | Needs ng-bootstrap for Angular manifests |
|
|
53
|
+
|
|
54
|
+
## Usage
|
|
55
|
+
|
|
56
|
+
```typescript
|
|
57
|
+
// Import for side effects -- triggers all class registrations
|
|
58
|
+
import '@memberjunction/server-bootstrap-lite';
|
|
59
|
+
|
|
60
|
+
// Or import the manifest metadata
|
|
61
|
+
import {
|
|
62
|
+
CLASS_REGISTRATIONS,
|
|
63
|
+
CLASS_REGISTRATIONS_MANIFEST_LOADED,
|
|
64
|
+
CLASS_REGISTRATIONS_COUNT,
|
|
65
|
+
CLASS_REGISTRATIONS_PACKAGES
|
|
66
|
+
} from '@memberjunction/server-bootstrap-lite';
|
|
67
|
+
|
|
68
|
+
console.log(`Registered ${CLASS_REGISTRATIONS_COUNT} classes from ${CLASS_REGISTRATIONS_PACKAGES.length} packages`);
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Exports
|
|
72
|
+
|
|
73
|
+
| Export | Type | Description |
|
|
74
|
+
|--------|------|-------------|
|
|
75
|
+
| `CLASS_REGISTRATIONS` | `object[]` | Array of class instances that create static import paths |
|
|
76
|
+
| `CLASS_REGISTRATIONS_MANIFEST_LOADED` | `boolean` | Always `true`, confirms manifest was loaded |
|
|
77
|
+
| `CLASS_REGISTRATIONS_COUNT` | `number` | Total number of registered classes |
|
|
78
|
+
| `CLASS_REGISTRATIONS_PACKAGES` | `string[]` | List of package names included in the manifest |
|
|
79
|
+
|
|
80
|
+
## How It Works
|
|
81
|
+
|
|
82
|
+
Modern bundlers (ESBuild, Vite) use tree-shaking to eliminate unused code. MemberJunction's `@RegisterClass` decorators rely on dynamic class instantiation via `MJGlobal.ClassFactory`, which bundlers cannot detect. The manifest system prevents tree-shaking by creating explicit static import paths for every decorated class.
|
|
83
|
+
|
|
84
|
+
This "lite" variant includes a curated subset of the full manifest, excluding packages that:
|
|
85
|
+
- Require ESM-incompatible native modules
|
|
86
|
+
- Pull in heavy communication SDKs (email, SMS, push)
|
|
87
|
+
- Include cloud storage providers
|
|
88
|
+
- Contain business application-specific actions
|
|
89
|
+
|
|
90
|
+
## Dependencies
|
|
91
|
+
|
|
92
|
+
The lite manifest includes core MemberJunction packages for:
|
|
93
|
+
- Entity class registration
|
|
94
|
+
- Action class registration
|
|
95
|
+
- AI engine and model drivers
|
|
96
|
+
- Metadata synchronization
|
|
97
|
+
- Core business logic
|
|
98
|
+
|
|
99
|
+
See the full `server-bootstrap` package for the complete manifest including all providers.
|
|
100
|
+
|
|
101
|
+
## License
|
|
102
|
+
|
|
103
|
+
ISC
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
3
|
* Generated by mj codegen manifest
|
|
4
4
|
* App: @memberjunction/server-bootstrap-lite
|
|
5
|
-
* Dependency tree:
|
|
5
|
+
* Dependency tree: 709 packages walked, 46 contain @RegisterClass
|
|
6
6
|
*
|
|
7
7
|
* This file imports every @RegisterClass decorated class by name and places
|
|
8
8
|
* them in an exported array, creating a static code path that prevents
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
3
|
* Generated by mj codegen manifest
|
|
4
4
|
* App: @memberjunction/server-bootstrap-lite
|
|
5
|
-
* Dependency tree:
|
|
5
|
+
* Dependency tree: 709 packages walked, 46 contain @RegisterClass
|
|
6
6
|
*
|
|
7
7
|
* This file imports every @RegisterClass decorated class by name and places
|
|
8
8
|
* them in an exported array, creating a static code path that prevents
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/server-bootstrap-lite",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "MemberJunction Server Bootstrap (Lite) - Class registrations manifest without ESM-incompatible dependencies (communication, storage)",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -31,32 +31,32 @@
|
|
|
31
31
|
"author": "MemberJunction",
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@memberjunction/actions": "4.
|
|
35
|
-
"@memberjunction/actions-apollo": "4.
|
|
36
|
-
"@memberjunction/actions-base": "4.
|
|
37
|
-
"@memberjunction/actions-bizapps-accounting": "4.
|
|
38
|
-
"@memberjunction/actions-bizapps-crm": "4.
|
|
39
|
-
"@memberjunction/actions-bizapps-formbuilders": "4.
|
|
40
|
-
"@memberjunction/actions-bizapps-lms": "4.
|
|
41
|
-
"@memberjunction/actions-bizapps-social": "4.
|
|
42
|
-
"@memberjunction/ai-agent-manager": "4.
|
|
43
|
-
"@memberjunction/ai-agents": "4.
|
|
44
|
-
"@memberjunction/ai-core-plus": "4.
|
|
45
|
-
"@memberjunction/ai-engine-base": "4.
|
|
46
|
-
"@memberjunction/ai-provider-bundle": "4.
|
|
47
|
-
"@memberjunction/ai-reranker": "4.
|
|
48
|
-
"@memberjunction/core": "4.
|
|
49
|
-
"@memberjunction/core-actions": "4.
|
|
50
|
-
"@memberjunction/core-entities": "4.
|
|
51
|
-
"@memberjunction/core-entities-server": "4.
|
|
52
|
-
"@memberjunction/data-context-server": "4.
|
|
53
|
-
"@memberjunction/doc-utils": "4.
|
|
54
|
-
"@memberjunction/encryption": "4.
|
|
55
|
-
"@memberjunction/scheduling-actions": "4.
|
|
56
|
-
"@memberjunction/scheduling-engine": "4.
|
|
57
|
-
"@memberjunction/scheduling-engine-base": "4.
|
|
58
|
-
"@memberjunction/templates": "4.
|
|
59
|
-
"@memberjunction/testing-engine": "4.
|
|
34
|
+
"@memberjunction/actions": "4.2.0",
|
|
35
|
+
"@memberjunction/actions-apollo": "4.2.0",
|
|
36
|
+
"@memberjunction/actions-base": "4.2.0",
|
|
37
|
+
"@memberjunction/actions-bizapps-accounting": "4.2.0",
|
|
38
|
+
"@memberjunction/actions-bizapps-crm": "4.2.0",
|
|
39
|
+
"@memberjunction/actions-bizapps-formbuilders": "4.2.0",
|
|
40
|
+
"@memberjunction/actions-bizapps-lms": "4.2.0",
|
|
41
|
+
"@memberjunction/actions-bizapps-social": "4.2.0",
|
|
42
|
+
"@memberjunction/ai-agent-manager": "4.2.0",
|
|
43
|
+
"@memberjunction/ai-agents": "4.2.0",
|
|
44
|
+
"@memberjunction/ai-core-plus": "4.2.0",
|
|
45
|
+
"@memberjunction/ai-engine-base": "4.2.0",
|
|
46
|
+
"@memberjunction/ai-provider-bundle": "4.2.0",
|
|
47
|
+
"@memberjunction/ai-reranker": "4.2.0",
|
|
48
|
+
"@memberjunction/core": "4.2.0",
|
|
49
|
+
"@memberjunction/core-actions": "4.2.0",
|
|
50
|
+
"@memberjunction/core-entities": "4.2.0",
|
|
51
|
+
"@memberjunction/core-entities-server": "4.2.0",
|
|
52
|
+
"@memberjunction/data-context-server": "4.2.0",
|
|
53
|
+
"@memberjunction/doc-utils": "4.2.0",
|
|
54
|
+
"@memberjunction/encryption": "4.2.0",
|
|
55
|
+
"@memberjunction/scheduling-actions": "4.2.0",
|
|
56
|
+
"@memberjunction/scheduling-engine": "4.2.0",
|
|
57
|
+
"@memberjunction/scheduling-engine-base": "4.2.0",
|
|
58
|
+
"@memberjunction/templates": "4.2.0",
|
|
59
|
+
"@memberjunction/testing-engine": "4.2.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@types/node": "^24.10.11",
|