@memberjunction/server-bootstrap 6.1.0-edge.5 → 6.1.0-edge.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/README.md +1 -1
- package/dist/generated/mj-class-registrations.d.ts +1 -1
- package/dist/generated/mj-class-registrations.d.ts.map +1 -1
- package/dist/generated/mj-class-registrations.js +20 -15
- package/dist/generated/mj-class-registrations.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +118 -164
- package/dist/index.js.map +1 -1
- package/package.json +118 -117
- package/dist/host-import.d.ts +0 -27
- package/dist/host-import.d.ts.map +0 -1
- package/dist/host-import.js +0 -170
- package/dist/host-import.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -14,89 +14,38 @@
|
|
|
14
14
|
* See BaseServerMiddleware for details.
|
|
15
15
|
*/
|
|
16
16
|
import { serve } from '@memberjunction/server';
|
|
17
|
-
import {
|
|
17
|
+
import { MJ_SERVER_EXTENSIONS_EXPORT, describeServerExtensionMount, extractServerExtensionsFromPackageJson, normalizeServerExtensionConfigs, } from '@memberjunction/server-extensions-core';
|
|
18
|
+
import { FindWorkspacePackageDir, LoadDynamicPackages, resolvePackageJsonFromHost } from '@memberjunction/dynamic-packages';
|
|
19
|
+
import path from 'node:path';
|
|
18
20
|
import { cosmiconfigSync } from 'cosmiconfig';
|
|
19
21
|
import { readFileSync } from 'node:fs';
|
|
20
|
-
|
|
22
|
+
/** Process ID MJAPI identifies itself with to the dynamic-package loader (entry `Processes` filters match it). */
|
|
23
|
+
export const MJAPI_PROCESS_ID = 'mjapi';
|
|
21
24
|
/**
|
|
22
|
-
*
|
|
25
|
+
* Loads the host's generated packages (`codeGeneration.packages`) and the installed Open Apps'
|
|
26
|
+
* server packages (`dynamicPackages.server[]`, written by `mj app install`) through the shared,
|
|
27
|
+
* process-agnostic loader in @memberjunction/dynamic-packages — the same loader the `mj` CLI,
|
|
28
|
+
* the MCP/A2A servers and the test bootstraps use, so an app's entity subclasses register in
|
|
29
|
+
* every process, not only here. Generated packages load first, apps after, so an app's
|
|
30
|
+
* @RegisterClass wins via the ClassFactory's load-order priority.
|
|
23
31
|
*
|
|
24
|
-
*
|
|
25
|
-
* This function uses the mj.config.cjs to determine which packages to load.
|
|
32
|
+
* What stays MJAPI-specific is what happens AFTER a package is loaded:
|
|
26
33
|
*
|
|
27
|
-
*
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
// These imports trigger class registration via @RegisterClass decorators
|
|
40
|
-
const packageTypes = ['entities', 'actions', 'angularForms', 'graphqlResolvers'];
|
|
41
|
-
for (const pkgType of packageTypes) {
|
|
42
|
-
const pkgConfig = packages[pkgType];
|
|
43
|
-
if (pkgConfig?.name) {
|
|
44
|
-
const pkgName = pkgConfig.name;
|
|
45
|
-
try {
|
|
46
|
-
// Dynamic import to trigger side effects (class registration)
|
|
47
|
-
await importFromHost(pkgName, configResult.configFilePath);
|
|
48
|
-
console.log(` Loaded generated package: ${pkgName}`);
|
|
49
|
-
}
|
|
50
|
-
catch (error) {
|
|
51
|
-
// Not finding a package is expected in some cases (e.g., no forms generated yet).
|
|
52
|
-
// isResolutionFailure (not a bare code check) because ts-node's ESM shim throws
|
|
53
|
-
// resolution failures with no code at all. Only claim "not found" when THIS package
|
|
54
|
-
// is the error's QUOTED subject ("Cannot find package '<name>'") — a missing
|
|
55
|
-
// TRANSITIVE dependency of a package that WAS found quotes the transitive name
|
|
56
|
-
// instead (this package's name still appears UNQUOTED in the imported-from path,
|
|
57
|
-
// which is why a bare includes(pkgName) check is not enough); its message is the
|
|
58
|
-
// true cause and must reach the operator via the warn path.
|
|
59
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
60
|
-
if (isResolutionFailure(error) && message.includes(`'${pkgName}'`)) {
|
|
61
|
-
console.log(` Generated package not found (may not exist yet): ${pkgName}`);
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
console.warn(` Error loading generated package ${pkgName}:`, error);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
console.log('');
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Imports the server packages of installed Open Apps, declared in
|
|
73
|
-
* `mj.config.cjs` under `dynamicPackages.server[]` by `mj app install`.
|
|
74
|
-
*
|
|
75
|
-
* Importing each package triggers its `@RegisterClass` decorators; if an entry
|
|
76
|
-
* declares a `StartupExport`, that named export is invoked after import. This is
|
|
77
|
-
* called AFTER {@link discoverAndLoadGeneratedPackages} (and after the bootstrap
|
|
78
|
-
* manifests imported at module load), so an app's registrations land last and
|
|
79
|
-
* therefore win via the ClassFactory's load-order priority — letting an app
|
|
80
|
-
* override a base class.
|
|
81
|
-
*
|
|
82
|
-
* It ALSO collects each package's exported `RESOLVER_PATHS` (absolute paths to the
|
|
83
|
-
* package's generated resolver files) and returns them. This is required for the app's
|
|
84
|
-
* GraphQL mutations/queries to actually enter the live schema: side-effect-importing a
|
|
85
|
-
* resolver class only registers type-graphql metadata, but `buildSchema` includes a
|
|
86
|
-
* resolver ONLY if it is PASSED in. `serve()` builds its resolver set by globbing the
|
|
87
|
-
* paths it is given — so the caller must hand these paths to `serve()`, or the app's
|
|
88
|
-
* entity-specific mutations (e.g. `CreateXxx`) never appear in the API. The app's own
|
|
89
|
-
* `packages/MJAPI/src/generated/generated.ts` does NOT regenerate the app's entities, so
|
|
90
|
-
* the package is the only source of these resolvers.
|
|
34
|
+
* - Each package's exported `RESOLVER_PATHS` (absolute paths to its generated resolver files)
|
|
35
|
+
* are collected and returned. This is required for the app's GraphQL mutations/queries to
|
|
36
|
+
* actually enter the live schema: side-effect-importing a resolver class only registers
|
|
37
|
+
* type-graphql metadata, but `buildSchema` includes a resolver ONLY if it is PASSED in.
|
|
38
|
+
* `serve()` builds its resolver set by globbing the paths it is given — so the caller must
|
|
39
|
+
* hand these paths to `serve()`, or the app's entity-specific mutations (e.g. `CreateXxx`)
|
|
40
|
+
* never appear in the API. The app's own `packages/MJAPI/src/generated/generated.ts` does
|
|
41
|
+
* NOT regenerate the app's entities, so the package is the only source of these resolvers.
|
|
42
|
+
* - Each package's server-extension declarations (`MJ_SERVER_EXTENSIONS` export, falling back
|
|
43
|
+
* to `package.json` `memberjunction.serverExtensions`) are collected so `serve()` can mount
|
|
44
|
+
* Open App routes (webhooks, anonymous checkout, …) without the operator copying those
|
|
45
|
+
* blocks into the host `mj.config.cjs`. Host `serverExtensions[]` still overlays by DriverClass.
|
|
91
46
|
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* can mount Open App routes (webhooks, anonymous checkout, …) without the operator
|
|
95
|
-
* copying those blocks into the host `mj.config.cjs`. Host `serverExtensions[]` still
|
|
96
|
-
* overlays by DriverClass.
|
|
97
|
-
*
|
|
98
|
-
* Mirrors the generated-package loader's robustness contract: no-op when the
|
|
99
|
-
* section is absent, per-package try/catch, tolerate `ERR_MODULE_NOT_FOUND`
|
|
47
|
+
* The loader's robustness contract is unchanged from the loader that used to live here: no-op
|
|
48
|
+
* when nothing is configured, per-package try/catch, tolerate a package that cannot be resolved
|
|
100
49
|
* (e.g. before `npm install`), warn on anything else, and never crash boot.
|
|
101
50
|
*
|
|
102
51
|
* @param configResult - The loaded MemberJunction configuration
|
|
@@ -105,98 +54,105 @@ async function discoverAndLoadGeneratedPackages(configResult) {
|
|
|
105
54
|
* Open App server packages are installed — the common case).
|
|
106
55
|
*/
|
|
107
56
|
async function loadDynamicAppPackages(configResult) {
|
|
108
|
-
const
|
|
109
|
-
|
|
57
|
+
const report = await LoadDynamicPackages({
|
|
58
|
+
processId: MJAPI_PROCESS_ID,
|
|
59
|
+
tier: 'server',
|
|
60
|
+
config: configResult.config,
|
|
61
|
+
configFilePath: configResult.configFilePath,
|
|
62
|
+
});
|
|
110
63
|
const resolverPaths = [];
|
|
111
64
|
const serverExtensions = [];
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
console.log('Loading Open App server packages...');
|
|
117
|
-
for (const entry of serverPackages) {
|
|
118
|
-
const pkgName = entry?.PackageName;
|
|
119
|
-
if (!pkgName || entry.Enabled === false) {
|
|
120
|
-
continue;
|
|
65
|
+
for (const loaded of report.Loaded) {
|
|
66
|
+
if (loaded.Source === 'generated') {
|
|
67
|
+
continue; // the host's own generated resolvers are globbed from the standard locations below
|
|
121
68
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
69
|
+
const added = collectResolverPaths(loaded, resolverPaths);
|
|
70
|
+
const extensions = collectServerExtensions(loaded, configResult.configFilePath);
|
|
71
|
+
serverExtensions.push(...extensions);
|
|
72
|
+
if (added > 0 || extensions.length > 0) {
|
|
73
|
+
console.log(` ${loaded.Entry.PackageName}:` +
|
|
74
|
+
`${added > 0 ? ` +${added} resolver path${added === 1 ? '' : 's'}` : ''}` +
|
|
75
|
+
`${extensions.length > 0 ? ` +${extensions.length} server extension${extensions.length === 1 ? '' : 's'}` : ''}`);
|
|
76
|
+
}
|
|
77
|
+
for (const ext of extensions) {
|
|
78
|
+
// Inventory is the consent surface: these routes mount BEFORE auth.
|
|
79
|
+
console.log(` ${describeServerExtensionMount(ext)}`);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if (report.Loaded.length > 0) {
|
|
83
|
+
console.log('');
|
|
84
|
+
}
|
|
85
|
+
return { resolverPaths, serverExtensions };
|
|
86
|
+
}
|
|
87
|
+
/** Appends the package's exported `RESOLVER_PATHS` strings to `into`; returns how many were added. */
|
|
88
|
+
function collectResolverPaths(loaded, into) {
|
|
89
|
+
const pkgResolverPaths = loaded.Module.RESOLVER_PATHS;
|
|
90
|
+
let added = 0;
|
|
91
|
+
if (Array.isArray(pkgResolverPaths)) {
|
|
92
|
+
for (const p of pkgResolverPaths) {
|
|
93
|
+
if (typeof p === 'string' && p.length > 0) {
|
|
94
|
+
into.push(p);
|
|
95
|
+
added++;
|
|
140
96
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return added;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* `package.json` of a package the loader imported by path from an Open App's own repository
|
|
103
|
+
* (`mj-app.json` beside the config). No resolution anchor can see such a package — that is why
|
|
104
|
+
* the loader fell back to its on-disk location — so the host-anchored lookup above returns null
|
|
105
|
+
* for it and its `memberjunction.serverExtensions` would never mount.
|
|
106
|
+
*/
|
|
107
|
+
function workspacePackageJson(loaded) {
|
|
108
|
+
const home = loaded.WorkspaceHome;
|
|
109
|
+
if (!home) {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
const dir = FindWorkspacePackageDir(home.RepoDir, home.SourceDirectory, loaded.Entry.PackageName);
|
|
113
|
+
return dir ? path.join(dir, 'package.json') : null;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Server extensions: runtime export wins; package.json is the static fallback for packages that
|
|
117
|
+
* declare metadata without a named export. Isolated in its own try so a collect failure still
|
|
118
|
+
* leaves the package's resolvers registered.
|
|
119
|
+
*/
|
|
120
|
+
function collectServerExtensions(loaded, configFilePath) {
|
|
121
|
+
const pkgName = loaded.Entry.PackageName;
|
|
122
|
+
try {
|
|
123
|
+
// Read the export by property access rather than `in`: the loader hands back whatever
|
|
124
|
+
// `import()` produced, and a wrapped/proxied namespace (vitest's mocks are one) can answer
|
|
125
|
+
// `get` for an export while answering `has` with false.
|
|
126
|
+
const exported = loaded.Module[MJ_SERVER_EXTENSIONS_EXPORT];
|
|
127
|
+
let extensions = exported === undefined
|
|
128
|
+
? []
|
|
129
|
+
: normalizeServerExtensionConfigs(exported, {
|
|
130
|
+
source: pkgName,
|
|
131
|
+
onInvalid: (message) => console.warn(` ${message}`),
|
|
132
|
+
});
|
|
133
|
+
if (extensions.length === 0) {
|
|
134
|
+
const pkgJsonPath = resolvePackageJsonFromHost(pkgName, configFilePath) ?? workspacePackageJson(loaded);
|
|
135
|
+
if (pkgJsonPath) {
|
|
136
|
+
const pkgJson = JSON.parse(readFileSync(pkgJsonPath, 'utf8'));
|
|
137
|
+
extensions = extractServerExtensionsFromPackageJson(pkgJson, {
|
|
138
|
+
source: `${pkgName} package.json`,
|
|
148
139
|
onInvalid: (message) => console.warn(` ${message}`),
|
|
149
140
|
});
|
|
150
|
-
if (extensions.length === 0) {
|
|
151
|
-
const pkgJsonPath = resolvePackageJsonFromHost(pkgName, configResult.configFilePath);
|
|
152
|
-
if (pkgJsonPath) {
|
|
153
|
-
const pkgJson = JSON.parse(readFileSync(pkgJsonPath, 'utf8'));
|
|
154
|
-
extensions = extractServerExtensionsFromPackageJson(pkgJson, {
|
|
155
|
-
source: `${pkgName} package.json`,
|
|
156
|
-
onInvalid: (message) => console.warn(` ${message}`),
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
catch (collectError) {
|
|
162
|
-
console.warn(` Error collecting serverExtensions from ${pkgName}:`, collectError);
|
|
163
|
-
}
|
|
164
|
-
if (extensions.length > 0) {
|
|
165
|
-
serverExtensions.push(...extensions);
|
|
166
|
-
}
|
|
167
|
-
console.log(` Loaded Open App server package: ${pkgName}` +
|
|
168
|
-
`${entry.StartupExport ? ` (ran ${entry.StartupExport})` : ''}` +
|
|
169
|
-
`${added > 0 ? ` (+${added} resolver path${added === 1 ? '' : 's'})` : ''}` +
|
|
170
|
-
`${extensions.length > 0 ? ` (+${extensions.length} server extension${extensions.length === 1 ? '' : 's'})` : ''}`);
|
|
171
|
-
for (const ext of extensions) {
|
|
172
|
-
// Inventory is the consent surface: these routes mount BEFORE auth.
|
|
173
|
-
console.log(` ${describeServerExtensionMount(ext)}`);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
catch (error) {
|
|
177
|
-
// isResolutionFailure (not a bare code check) because ts-node's ESM shim throws
|
|
178
|
-
// resolution failures with no code at all. The quoted-name guard keeps a missing
|
|
179
|
-
// TRANSITIVE dependency on the warn path with its true cause: resolution errors QUOTE
|
|
180
|
-
// the missing name, and a transitive failure quotes the transitive dep — this
|
|
181
|
-
// package's name only appears unquoted in the imported-from path.
|
|
182
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
183
|
-
if (isResolutionFailure(error) && message.includes(`'${pkgName}'`)) {
|
|
184
|
-
console.log(` Open App server package not found (run 'npm install'?): ${pkgName}`);
|
|
185
|
-
}
|
|
186
|
-
else {
|
|
187
|
-
console.warn(` Error loading Open App server package ${pkgName}:`, error);
|
|
188
141
|
}
|
|
189
142
|
}
|
|
143
|
+
return extensions;
|
|
144
|
+
}
|
|
145
|
+
catch (collectError) {
|
|
146
|
+
console.warn(` Error collecting serverExtensions from ${pkgName}:`, collectError);
|
|
147
|
+
return [];
|
|
190
148
|
}
|
|
191
|
-
console.log('');
|
|
192
|
-
return { resolverPaths, serverExtensions };
|
|
193
149
|
}
|
|
194
150
|
/**
|
|
195
151
|
* Creates and starts a MemberJunction API server with minimal configuration.
|
|
196
152
|
*
|
|
197
153
|
* This is the primary entry point for MJ 3.0 applications. It:
|
|
198
154
|
* 1. Loads configuration from mj.config.cjs (or specified path)
|
|
199
|
-
* 2. Auto-discovers and imports generated packages (triggering @RegisterClass decorators)
|
|
155
|
+
* 2. Auto-discovers and imports generated + installed Open App packages (triggering @RegisterClass decorators)
|
|
200
156
|
* 3. Middleware is discovered via ClassFactory from @RegisterClass(BaseServerMiddleware, key) classes
|
|
201
157
|
* 4. Builds the GraphQL schema with all registered resolvers
|
|
202
158
|
* 5. Starts the server with proper lifecycle hooks
|
|
@@ -243,16 +199,14 @@ export async function createMJServer(options = {}) {
|
|
|
243
199
|
hasUserConfig: configSearchResult && !configSearchResult.isEmpty,
|
|
244
200
|
configFilePath: configSearchResult?.filepath
|
|
245
201
|
};
|
|
246
|
-
//
|
|
247
|
-
//
|
|
248
|
-
|
|
249
|
-
//
|
|
250
|
-
//
|
|
251
|
-
//
|
|
252
|
-
//
|
|
253
|
-
//
|
|
254
|
-
// into the schema below (loading the classes alone does NOT put their mutations/queries
|
|
255
|
-
// in the GraphQL schema — type-graphql only includes resolvers passed to serve()).
|
|
202
|
+
// Load the host's generated packages and the installed Open App server packages
|
|
203
|
+
// (dynamicPackages.server[] from `mj app install`) — generated first, apps after, so an
|
|
204
|
+
// app's @RegisterClass wins via ClassFactory load-order priority. Without this, `mj app
|
|
205
|
+
// install` writes the section but nothing consumes it — the app's server classes never
|
|
206
|
+
// load. The returned resolver paths are the app packages' generated resolver files, which
|
|
207
|
+
// must be globbed into the schema below (loading the classes alone does NOT put their
|
|
208
|
+
// mutations/queries in the GraphQL schema — type-graphql only includes resolvers passed
|
|
209
|
+
// to serve()).
|
|
256
210
|
const { resolverPaths: dynamicResolverPaths, serverExtensions: dynamicServerExtensions } = await loadDynamicAppPackages(configResult);
|
|
257
211
|
// Build resolver paths - auto-discover standard locations if not provided
|
|
258
212
|
// This enables truly minimal MJAPI files without needing to specify paths
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,EAAmB,MAAM,wBAAwB,CAAC;AAChE,OAAO,EACL,4BAA4B,EAC5B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;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