alemonjs 2.1.89 → 2.1.90

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.
@@ -17,14 +17,309 @@ import { setPlatformChild, forwardFromPlatform } from './ipc-bridge.js';
17
17
  const initRequire = () => { };
18
18
  initRequire.resolve = () => '';
19
19
  const require$1 = module$1?.createRequire?.(import.meta.url) ?? initRequire;
20
- function startPlatformAdapterWithFallback() {
20
+ const createInitialState = () => ({
21
+ phase: 'idle',
22
+ protocolVersion: 'legacy',
23
+ transportMode: 'unknown',
24
+ restartCount: 0,
25
+ consecutiveFailures: 0,
26
+ legacyReadyMode: false,
27
+ bootTimings: {},
28
+ lastError: null
29
+ });
30
+ let platformManager = null;
31
+ let platformState = createInitialState();
32
+ let platformProcessConfig = null;
33
+ let platformBootstrapPath = '';
34
+ let platformEntryPath = '';
35
+ const normalizeErrorMessage = (error) => {
36
+ if (error instanceof Error) {
37
+ return error.message;
38
+ }
39
+ return typeof error === 'string' ? error : 'Unknown process adapter error';
40
+ };
41
+ const isDebugEnabled = () => process.env.NODE_ENV === 'development';
42
+ const debugLog = (message, data = {}) => {
43
+ if (!isDebugEnabled()) {
44
+ return;
45
+ }
46
+ logger.debug?.({
47
+ message,
48
+ data
49
+ });
50
+ };
51
+ const clearTimer = (timer) => {
52
+ if (timer) {
53
+ clearTimeout(timer);
54
+ }
55
+ };
56
+ const clearManagerTimers = (manager) => {
57
+ clearTimer(manager?.controlTimer);
58
+ clearTimer(manager?.transportTimer);
59
+ clearTimer(manager?.appTimer);
60
+ clearTimer(manager?.legacyTransportTimer);
61
+ if (manager) {
62
+ manager.controlTimer = undefined;
63
+ manager.transportTimer = undefined;
64
+ manager.appTimer = undefined;
65
+ manager.legacyTransportTimer = undefined;
66
+ }
67
+ };
68
+ const buildConfig = () => {
21
69
  const values = getConfigValue();
22
70
  const pro = values?.process ?? {};
23
- const CONFIG = {
24
- RESTART_DELAY: pro?.restart_delay ?? 3000,
25
- FORK_TIMEOUT: pro?.fork_timeout ?? 6000,
26
- FORK_RESTART_DELAY: pro?.fork_restart_delay ?? 5000
71
+ return {
72
+ restartDelay: Number(pro?.restart_delay ?? 3000),
73
+ controlReadyTimeout: Number(pro?.control_ready_timeout ?? 10000),
74
+ transportReadyTimeout: Number(pro?.transport_ready_timeout ?? 15000),
75
+ appReadyTimeout: Number(pro?.app_ready_timeout ?? 30000),
76
+ maxRestartDelay: Number(pro?.max_restart_delay ?? 30000),
77
+ legacyTransportGraceMs: Number(pro?.legacy_transport_grace_ms ?? 50)
78
+ };
79
+ };
80
+ const resetBootState = () => {
81
+ platformState = {
82
+ ...platformState,
83
+ phase: 'booting',
84
+ protocolVersion: 'legacy',
85
+ transportMode: 'unknown',
86
+ legacyReadyMode: false,
87
+ startedAt: Date.now(),
88
+ lastReadyAt: undefined,
89
+ lastTransportReadyAt: undefined,
90
+ lastAppReadyAt: undefined,
91
+ bootTimings: {},
92
+ lastError: null
93
+ };
94
+ };
95
+ const updateTransportBinding = (transportMode) => {
96
+ if (transportMode === 'ipc' && platformManager?.child) {
97
+ setPlatformChild(platformManager.child);
98
+ }
99
+ else {
100
+ setPlatformChild(null);
101
+ }
102
+ };
103
+ const markFailure = (error) => {
104
+ platformState = {
105
+ ...platformState,
106
+ phase: 'failed',
107
+ lastError: error ? normalizeErrorMessage(error) : platformState.lastError,
108
+ consecutiveFailures: platformState.consecutiveFailures + 1
109
+ };
110
+ };
111
+ const markTransportReady = (transport, legacyReadyMode = false) => {
112
+ const now = Date.now();
113
+ if (!platformManager) {
114
+ return;
115
+ }
116
+ platformManager.transportReady = true;
117
+ clearTimer(platformManager.transportTimer);
118
+ clearTimer(platformManager.legacyTransportTimer);
119
+ platformManager.transportTimer = undefined;
120
+ platformManager.legacyTransportTimer = undefined;
121
+ platformState = {
122
+ ...platformState,
123
+ phase: platformState.lastAppReadyAt ? 'app_ready' : 'transport_ready',
124
+ transportMode: transport,
125
+ lastTransportReadyAt: now,
126
+ legacyReadyMode,
127
+ consecutiveFailures: 0,
128
+ bootTimings: {
129
+ ...platformState.bootTimings,
130
+ readyToTransportReadyMs: platformState.lastReadyAt ? now - platformState.lastReadyAt : undefined,
131
+ transportReadyToAppReadyMs: platformState.lastAppReadyAt ? platformState.lastAppReadyAt - now : platformState.bootTimings.transportReadyToAppReadyMs
132
+ }
133
+ };
134
+ updateTransportBinding(transport);
135
+ if (legacyReadyMode) {
136
+ debugLog('platform adapter fallback to legacy transport ready');
137
+ }
138
+ };
139
+ const scheduleRestart = (reason) => {
140
+ if (!platformProcessConfig || !platformBootstrapPath || !platformEntryPath) {
141
+ return;
142
+ }
143
+ const baseDelay = platformProcessConfig.restartDelay;
144
+ const delay = Math.min(baseDelay * 2 ** Math.max(platformState.consecutiveFailures - 1, 0), platformProcessConfig.maxRestartDelay);
145
+ platformState = {
146
+ ...platformState,
147
+ restartCount: platformState.restartCount + 1
27
148
  };
149
+ debugLog('schedule platform adapter restart', { reason, delay });
150
+ setTimeout(() => {
151
+ void startPlatformAdapterWithFallback();
152
+ }, delay);
153
+ };
154
+ const cleanupManager = (manager) => {
155
+ clearManagerTimers(manager);
156
+ if (manager?.child) {
157
+ manager.child.removeAllListeners();
158
+ }
159
+ setPlatformChild(null);
160
+ if (platformManager === manager) {
161
+ platformManager = null;
162
+ }
163
+ };
164
+ const startByImport = async () => {
165
+ try {
166
+ const importPath = platformEntryPath.startsWith('file://') ? platformEntryPath : `file://${platformEntryPath}`;
167
+ const mod = await import(importPath);
168
+ const run = typeof mod.default === 'function' ? mod.default : typeof mod.main === 'function' ? mod.main : null;
169
+ if (typeof run !== 'function') {
170
+ throw new Error('Platform entry must export a callable default or main function');
171
+ }
172
+ await run();
173
+ platformState = {
174
+ ...platformState,
175
+ phase: 'app_ready',
176
+ protocolVersion: 'legacy',
177
+ transportMode: 'import',
178
+ consecutiveFailures: 0,
179
+ lastTransportReadyAt: Date.now(),
180
+ lastAppReadyAt: Date.now()
181
+ };
182
+ debugLog('platform adapter started via import fallback');
183
+ }
184
+ catch (error) {
185
+ logger?.error?.({
186
+ code: ResultCode.Fail,
187
+ message: 'import 启动平台连接失败',
188
+ data: error
189
+ });
190
+ markFailure(error);
191
+ scheduleRestart('import_fallback_failed');
192
+ }
193
+ };
194
+ const handleControlReady = (manager, message) => {
195
+ const protocolVersion = message.protocolVersion === 'v2' ? 'v2' : 'legacy';
196
+ const now = Date.now();
197
+ manager.protocolVersion = protocolVersion;
198
+ clearTimer(manager.controlTimer);
199
+ manager.controlTimer = undefined;
200
+ platformState = {
201
+ ...platformState,
202
+ phase: 'control_ready',
203
+ protocolVersion,
204
+ legacyReadyMode: protocolVersion === 'legacy',
205
+ lastReadyAt: now,
206
+ bootTimings: {
207
+ ...platformState.bootTimings,
208
+ forkToReadyMs: platformState.startedAt ? now - platformState.startedAt : undefined
209
+ }
210
+ };
211
+ manager.child?.send?.({ type: 'start' });
212
+ if (protocolVersion === 'v2') {
213
+ manager.transportTimer = setTimeout(() => {
214
+ logger?.warn?.({
215
+ code: ResultCode.Fail,
216
+ message: '平台连接进程未在规定时间内建立通讯层,准备降级/重启',
217
+ data: null
218
+ });
219
+ manager.isKilling = true;
220
+ manager.fallbackToImportOnExit = Boolean(process.env.port);
221
+ markFailure('transport_ready_timeout');
222
+ try {
223
+ manager.child?.kill();
224
+ }
225
+ catch {
226
+ cleanupManager(manager);
227
+ if (manager.fallbackToImportOnExit) {
228
+ void startByImport();
229
+ }
230
+ else {
231
+ scheduleRestart('transport_ready_timeout');
232
+ }
233
+ }
234
+ }, platformProcessConfig?.transportReadyTimeout ?? 15000);
235
+ manager.appTimer = setTimeout(() => {
236
+ logger?.warn?.({
237
+ code: ResultCode.Warn,
238
+ message: '平台连接进程业务初始化较慢,尚未收到 app_ready',
239
+ data: null
240
+ });
241
+ }, platformProcessConfig?.appReadyTimeout ?? 30000);
242
+ }
243
+ else {
244
+ const legacyTransportMode = process.env.__ALEMON_DIRECT_SOCK ? 'direct' : 'ipc';
245
+ manager.legacyTransportTimer = setTimeout(() => {
246
+ if (!manager.transportReady) {
247
+ markTransportReady(legacyTransportMode, true);
248
+ }
249
+ }, platformProcessConfig?.legacyTransportGraceMs ?? 50);
250
+ }
251
+ };
252
+ const handleMessage = (manager, message) => {
253
+ const data = typeof message === 'string' ? JSON.parse(message) : message;
254
+ if (data?.type === 'ready') {
255
+ handleControlReady(manager, data);
256
+ return;
257
+ }
258
+ if (data?.type === 'transport_ready') {
259
+ markTransportReady(data.transport ?? 'unknown');
260
+ return;
261
+ }
262
+ if (data?.type === 'app_ready') {
263
+ const now = Date.now();
264
+ manager.appReady = true;
265
+ clearTimer(manager.appTimer);
266
+ manager.appTimer = undefined;
267
+ platformState = {
268
+ ...platformState,
269
+ phase: 'app_ready',
270
+ lastAppReadyAt: now,
271
+ bootTimings: {
272
+ ...platformState.bootTimings,
273
+ transportReadyToAppReadyMs: platformState.lastTransportReadyAt ? now - platformState.lastTransportReadyAt : platformState.bootTimings.transportReadyToAppReadyMs
274
+ }
275
+ };
276
+ return;
277
+ }
278
+ if (data?.type === 'boot_error') {
279
+ platformState = {
280
+ ...platformState,
281
+ lastError: normalizeErrorMessage(data.error?.message ?? data.error)
282
+ };
283
+ logger?.warn?.({
284
+ code: ResultCode.Fail,
285
+ message: `平台连接进程启动阶段失败: ${String(data.stage ?? 'unknown')}`,
286
+ data: data.error ?? null
287
+ });
288
+ return;
289
+ }
290
+ if (data?.type === 'ipc:data') {
291
+ forwardFromPlatform(data.data);
292
+ }
293
+ };
294
+ const getPlatformAdapterState = () => ({
295
+ ...platformState,
296
+ bootTimings: { ...platformState.bootTimings }
297
+ });
298
+ function restartPlatformAdapter() {
299
+ if (!platformManager?.child) {
300
+ void startPlatformAdapterWithFallback();
301
+ return;
302
+ }
303
+ if (platformManager.restartRequested) {
304
+ return;
305
+ }
306
+ platformManager.restartRequested = true;
307
+ platformManager.isKilling = true;
308
+ platformState = {
309
+ ...platformState,
310
+ phase: 'stopping'
311
+ };
312
+ clearManagerTimers(platformManager);
313
+ try {
314
+ platformManager.child.kill();
315
+ }
316
+ catch {
317
+ cleanupManager(platformManager);
318
+ scheduleRestart('manual_restart');
319
+ }
320
+ }
321
+ function startPlatformAdapterWithFallback() {
322
+ platformProcessConfig = buildConfig();
28
323
  const platformPath = process.env.platform;
29
324
  if (!platformPath) {
30
325
  logger?.error?.({
@@ -32,188 +327,119 @@ function startPlatformAdapterWithFallback() {
32
327
  message: '未配置平台连接路径',
33
328
  data: null
34
329
  });
35
- return;
330
+ platformState = {
331
+ ...platformState,
332
+ phase: 'failed',
333
+ lastError: 'missing platform path'
334
+ };
335
+ return Promise.resolve();
36
336
  }
37
- let modulePath = '';
38
- let isForkFailed = false;
39
- let imported = false;
40
337
  try {
41
- modulePath = require$1.resolve(platformPath);
338
+ platformEntryPath = require$1.resolve(platformPath);
339
+ platformBootstrapPath = require$1.resolve('../../platform-bootstrap.js');
42
340
  }
43
- catch {
341
+ catch (error) {
44
342
  logger?.warn?.({
45
343
  code: ResultCode.Fail,
46
344
  message: '平台连接包未支持 require',
47
- data: null
345
+ data: error
48
346
  });
49
- return;
347
+ markFailure(error);
348
+ return Promise.resolve();
50
349
  }
51
- const startByImport = async () => {
52
- if (imported) {
53
- return;
54
- }
55
- imported = true;
56
- isForkFailed = true;
57
- try {
58
- const importPath = modulePath.startsWith('file://') ? modulePath : `file://${modulePath}`;
59
- const mod = await import(importPath);
60
- if (typeof mod.default === 'function') {
61
- await mod.default();
62
- logger?.debug?.({
63
- code: ResultCode.Ok,
64
- message: '通过 import 启动平台连接完成',
65
- data: null
66
- });
67
- }
68
- else {
69
- logger?.warn?.({
70
- code: ResultCode.Fail,
71
- message: '通过 import 启动平台连接,但未找到默认导出函数',
72
- data: null
73
- });
74
- }
75
- }
76
- catch (error) {
77
- logger?.error?.({
78
- code: ResultCode.Fail,
79
- message: 'import 启动平台连接失败',
80
- data: error
81
- });
82
- }
350
+ if (platformManager?.child && platformManager.child.exitCode === null && !platformManager.child.killed) {
351
+ return Promise.resolve();
352
+ }
353
+ resetBootState();
354
+ const manager = {
355
+ isKilling: false,
356
+ restartRequested: false,
357
+ transportReady: false,
358
+ appReady: false,
359
+ protocolVersion: 'legacy',
360
+ fallbackToImportOnExit: false
83
361
  };
84
- const startByFork = () => {
85
- if (imported) {
86
- return;
362
+ platformManager = manager;
363
+ manager.controlTimer = setTimeout(() => {
364
+ logger?.error?.({
365
+ code: ResultCode.Fail,
366
+ message: '平台连接进程未及时发送 ready,正在重启',
367
+ data: null
368
+ });
369
+ manager.isKilling = true;
370
+ markFailure('control_ready_timeout');
371
+ try {
372
+ manager.child?.kill();
87
373
  }
88
- if (isForkFailed) {
89
- return;
374
+ catch {
375
+ cleanupManager(manager);
376
+ scheduleRestart('control_ready_timeout');
90
377
  }
91
- const manager = {
92
- restarted: false,
93
- ready: false,
94
- isKilling: false
95
- };
96
- const cleanup = () => {
97
- if (manager.timer) {
98
- clearTimeout(manager.timer);
99
- manager.timer = undefined;
100
- }
101
- if (manager.child) {
102
- manager.child.removeAllListeners();
103
- }
104
- setPlatformChild(null);
105
- };
106
- const restart = () => {
107
- if (manager.restarted || imported) {
378
+ }, platformProcessConfig.controlReadyTimeout);
379
+ try {
380
+ manager.child = childProcess.fork(platformBootstrapPath, [], {
381
+ execArgv: process.execArgv,
382
+ env: {
383
+ ...process.env,
384
+ __ALEMON_IPC: '1',
385
+ __ALEMON_PLATFORM_ENTRY: platformEntryPath
386
+ },
387
+ serialization: 'advanced'
388
+ });
389
+ manager.child.on('exit', (code, signal) => {
390
+ const fallbackToImportOnExit = manager.fallbackToImportOnExit;
391
+ cleanupManager(manager);
392
+ if (fallbackToImportOnExit) {
393
+ void startByImport();
108
394
  return;
109
395
  }
110
- manager.restarted = true;
111
- cleanup();
112
- setTimeout(() => {
113
- if (!imported && !isForkFailed) {
114
- startByFork();
115
- }
116
- }, CONFIG.RESTART_DELAY);
117
- };
118
- const handleForkFailure = (error) => {
119
- if (imported) {
396
+ if (manager.isKilling || manager.restartRequested) {
397
+ scheduleRestart(manager.restartRequested ? 'manual_restart' : 'timeout_or_kill');
120
398
  return;
121
399
  }
122
- isForkFailed = true;
123
- cleanup();
124
- if (!process.env.port) {
400
+ logger?.warn?.({
401
+ code: ResultCode.Fail,
402
+ message: `平台连接子进程已退出,code=${code}, signal=${signal},稍后自动重启`,
403
+ data: null
404
+ });
405
+ markFailure(`exit:${code ?? 'null'}:${signal ?? 'null'}`);
406
+ scheduleRestart('unexpected_exit');
407
+ });
408
+ manager.child.on('message', message => {
409
+ try {
410
+ handleMessage(manager, message);
411
+ }
412
+ catch (error) {
125
413
  logger?.error?.({
126
414
  code: ResultCode.Fail,
127
- message: 'fork 启动平台连接失败,当前为纯 IPC 模式(未配置 port),无法降级到 WebSocket,已终止平台连接',
415
+ message: '平台连接进程通信数据格式错误',
128
416
  data: error
129
417
  });
130
- return;
131
418
  }
132
- logger?.warn?.({
419
+ });
420
+ manager.child.on('error', error => {
421
+ logger?.error?.({
133
422
  code: ResultCode.Fail,
134
- message: 'fork 启动平台连接失败,将尝试 import 加载',
423
+ message: '平台连接子进程发生错误',
135
424
  data: error
136
425
  });
137
- void startByImport();
138
- };
139
- const checkTimeout = () => {
140
- if (!manager.ready && !imported) {
141
- logger?.warn?.({
142
- code: ResultCode.Fail,
143
- message: '平台连接未及时响应(未发送 ready 消息),降级为 import 加载, 请升级对应的平台连接包以提高进程稳定性',
144
- data: null
145
- });
146
- manager.isKilling = true;
147
- try {
148
- manager.child?.kill();
149
- }
150
- catch {
151
- }
152
- handleForkFailure();
153
- }
154
- };
155
- try {
156
- manager.child = childProcess.fork(modulePath, [], {
157
- execArgv: process.execArgv,
158
- env: { ...process.env, __ALEMON_IPC: '1' },
159
- serialization: 'advanced'
160
- });
161
- manager.timer = setTimeout(checkTimeout, CONFIG.FORK_TIMEOUT);
162
- manager.child.on('exit', (code, signal) => {
163
- cleanup();
164
- if (manager.isKilling) {
165
- return;
166
- }
167
- if (!imported) {
168
- logger?.warn?.({
169
- code: ResultCode.Fail,
170
- message: `平台连接子进程已退出,code=${code}, signal=${signal},${CONFIG.FORK_RESTART_DELAY / 1000}秒后自动重启`,
171
- data: null
172
- });
173
- restart();
174
- }
175
- });
176
- manager.child.on('message', (message) => {
177
- try {
178
- const data = typeof message === 'string' ? JSON.parse(message) : message;
179
- if (data?.type === 'ready') {
180
- if (manager.ready) {
181
- return;
182
- }
183
- manager.ready = true;
184
- if (manager.timer) {
185
- clearTimeout(manager.timer);
186
- manager.timer = undefined;
187
- }
188
- setPlatformChild(manager.child);
189
- logger?.debug?.({
190
- code: ResultCode.Ok,
191
- message: '平台连接已就绪(IPC)',
192
- data: null
193
- });
194
- manager.child?.send?.({ type: 'start' });
195
- }
196
- else if (data?.type === 'ipc:data') {
197
- forwardFromPlatform(data.data);
198
- }
199
- }
200
- catch (error) {
201
- logger?.error?.({
202
- code: ResultCode.Fail,
203
- message: '平台连接进程通信数据格式错误',
204
- data: error
205
- });
206
- }
207
- });
208
- manager.child.on('error', error => {
209
- handleForkFailure(error);
210
- });
211
- }
212
- catch (error) {
213
- handleForkFailure(error);
214
- }
215
- };
216
- startByFork();
426
+ platformState = {
427
+ ...platformState,
428
+ lastError: normalizeErrorMessage(error)
429
+ };
430
+ });
431
+ }
432
+ catch (error) {
433
+ cleanupManager(manager);
434
+ logger?.warn?.({
435
+ code: ResultCode.Fail,
436
+ message: 'fork 启动平台连接失败',
437
+ data: error
438
+ });
439
+ markFailure(error);
440
+ scheduleRestart('fork_error');
441
+ }
442
+ return Promise.resolve();
217
443
  }
218
444
 
219
- export { startPlatformAdapterWithFallback };
445
+ export { getPlatformAdapterState, restartPlatformAdapter, startPlatformAdapterWithFallback };
@@ -0,0 +1,22 @@
1
+ export type AdapterPhase = 'idle' | 'booting' | 'control_ready' | 'transport_ready' | 'app_ready' | 'stopping' | 'failed';
2
+ export type AdapterProtocolVersion = 'legacy' | 'v2';
3
+ export type AdapterTransportMode = 'unknown' | 'ipc' | 'direct' | 'ws' | 'import';
4
+ export type AdapterBootTimings = {
5
+ forkToReadyMs?: number;
6
+ readyToTransportReadyMs?: number;
7
+ transportReadyToAppReadyMs?: number;
8
+ };
9
+ export type ProcessAdapterState = {
10
+ phase: AdapterPhase;
11
+ protocolVersion: AdapterProtocolVersion;
12
+ transportMode: AdapterTransportMode;
13
+ restartCount: number;
14
+ consecutiveFailures: number;
15
+ legacyReadyMode: boolean;
16
+ startedAt?: number;
17
+ lastReadyAt?: number;
18
+ lastTransportReadyAt?: number;
19
+ lastAppReadyAt?: number;
20
+ bootTimings: AdapterBootTimings;
21
+ lastError?: string | null;
22
+ };
@@ -0,0 +1 @@
1
+
package/lib/global.d.ts CHANGED
@@ -9,6 +9,7 @@ declare global {
9
9
  var __options: StartOptions;
10
10
  var __sandbox: boolean | undefined;
11
11
  var __client_loaded: boolean | undefined;
12
+ var __platform_bootstrap_loaded: boolean | undefined;
12
13
  var __publicIp: string | undefined;
13
14
  var logger: LoggerUtils;
14
15
  var alemonjsCore: {
@@ -46,6 +47,8 @@ declare global {
46
47
  platform?: string;
47
48
  port?: string;
48
49
  input?: string;
50
+ __ALEMON_PLATFORM_ENTRY?: string;
51
+ __ALEMON_DIRECT_SOCK?: string;
49
52
  NODE_ENV?: 'development' | 'production';
50
53
  }
51
54
  }
package/lib/index.js CHANGED
@@ -49,6 +49,8 @@ export { expendMiddleware } from './application/runtime/event-processor-middlewa
49
49
  export { expendSubscribe, expendSubscribeCreate, expendSubscribeMount, expendSubscribeUnmount } from './application/runtime/event-processor-subscribe.js';
50
50
  export { finishCurrentTrace, getCurrentAppName, getCurrentEvent, getCurrentNext, getCurrentPhase, markEventSendAttempt, markEventSendFailure, markEventSendSuccess, recordEventSendResults, withEventContext, withProcessorTrace } from './application/runtime/hook-event-context.js';
51
51
  export { getConfig, getConfigValue, onWatchConfigValue } from './common/config.js';
52
+ export { getModuleAdapterState, restartModuleAdapter, startModuleAdapter } from './core/process/module.js';
53
+ export { getPlatformAdapterState, restartPlatformAdapter, startPlatformAdapterWithFallback } from './core/process/platform.js';
52
54
  export { loadChildren, loadChildrenFile } from './application/runtime/load-modules/loadChild.js';
53
55
  export { loadModels, run } from './application/runtime/load-modules/load.js';
54
56
  export { normalizeRoutePath, parseMessageText } from './application/router/parser.js';
package/lib/main.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export { start } from './core/start.js';
2
+ export { restartModuleAdapter, restartPlatformAdapter, getModuleAdapterState, getPlatformAdapterState } from './core/index.js';
package/lib/main.js CHANGED
@@ -1 +1,3 @@
1
1
  export { start } from './core/start.js';
2
+ export { getModuleAdapterState, restartModuleAdapter } from './core/process/module.js';
3
+ export { getPlatformAdapterState, restartPlatformAdapter } from './core/process/platform.js';