@forgeax/interface 0.9.4 → 0.9.5
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.
|
@@ -11,6 +11,10 @@ export interface AppHostBootstrapOverrides {
|
|
|
11
11
|
export interface AppHostBootstrapResult {
|
|
12
12
|
host: AppHost;
|
|
13
13
|
control: AppHostControl;
|
|
14
|
+
/** Begins terminal shutdown. A rejection may follow successful owner cleanup:
|
|
15
|
+
* the runtime is not safe to resume using and disposal is not atomic. Resolve
|
|
16
|
+
* an explicit cleanup deferral and retry dispose to finish remaining owners;
|
|
17
|
+
* already retired owners are not restored or cleaned up again. */
|
|
14
18
|
dispose: () => Promise<void>;
|
|
15
19
|
}
|
|
16
20
|
export declare function bootstrapAppHost(overrides?: AppHostBootstrapOverrides): Promise<AppHostBootstrapResult>;
|
|
@@ -8,6 +8,9 @@ export interface InterfaceApplicationStartupOptions {
|
|
|
8
8
|
/** Product-selected initial locale. Persisted locale remains authoritative when omitted. */
|
|
9
9
|
readonly locale?: Locale;
|
|
10
10
|
}
|
|
11
|
+
/** Products retain this owner above their replaceable recovery/runtime subtree.
|
|
12
|
+
* Only the explicit pre-destructive deferrals permit a user-requested retry. */
|
|
13
|
+
export declare function createInterfaceApplicationOwner(): import("@forgeax/app-shell/application").ApplicationRuntimeOwner;
|
|
11
14
|
/**
|
|
12
15
|
* Lets a product replace one shell overlay with its own destination. Interface
|
|
13
16
|
* owns observation, clearing and synchronous reentry; the product owns routing.
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
+
import { ApplicationStartupCleanupError, createApplicationRuntimeOwner } from '@forgeax/app-shell/application';
|
|
2
|
+
import { ExtensionCleanupDeferredError, ExtensionUnloadDeferredError } from '@forgeax/extension-platform/extensions';
|
|
3
|
+
import { PageClosePreparationDeferredError } from './core/page-platform/session';
|
|
1
4
|
import { bootstrapAppHost, } from './appHostBootstrap';
|
|
2
5
|
import { bootStageAppMounted } from './boot/driver';
|
|
3
6
|
import { changeLanguage, initI18n } from './i18n';
|
|
4
7
|
import { useShellStore } from './store';
|
|
8
|
+
/** Products retain this owner above their replaceable recovery/runtime subtree.
|
|
9
|
+
* Only the explicit pre-destructive deferrals permit a user-requested retry. */
|
|
10
|
+
export function createInterfaceApplicationOwner() {
|
|
11
|
+
return createApplicationRuntimeOwner({
|
|
12
|
+
isCleanupDeferred: error => error instanceof ExtensionCleanupDeferredError
|
|
13
|
+
|| error instanceof ExtensionUnloadDeferredError
|
|
14
|
+
|| error instanceof PageClosePreparationDeferredError,
|
|
15
|
+
});
|
|
16
|
+
}
|
|
5
17
|
/**
|
|
6
18
|
* Lets a product replace one shell overlay with its own destination. Interface
|
|
7
19
|
* owns observation, clearing and synchronous reentry; the product owns routing.
|
|
@@ -43,8 +55,9 @@ export async function startInterfaceApplication(overrides = {}, options = {}) {
|
|
|
43
55
|
try {
|
|
44
56
|
await runtime.dispose();
|
|
45
57
|
}
|
|
46
|
-
catch {
|
|
47
|
-
//
|
|
58
|
+
catch (cleanupError) {
|
|
59
|
+
// Transfer unfinished ownership instead of dropping the only disposer.
|
|
60
|
+
throw new ApplicationStartupCleanupError(error, runtime, cleanupError);
|
|
48
61
|
}
|
|
49
62
|
throw error;
|
|
50
63
|
}
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
+
import { ApplicationStartupCleanupError, createApplicationRuntimeOwner } from '@forgeax/app-shell/application';
|
|
2
|
+
import { ExtensionCleanupDeferredError, ExtensionUnloadDeferredError } from '@forgeax/extension-platform/extensions';
|
|
3
|
+
import { PageClosePreparationDeferredError } from './core/page-platform/session.js';
|
|
1
4
|
import { bootstrapAppHost, } from './appHostBootstrap.js';
|
|
2
5
|
import { bootStageAppMounted } from './boot/driver.js';
|
|
3
6
|
import { changeLanguage, initI18n } from './i18n/index.js';
|
|
4
7
|
import { useShellStore } from './store.js';
|
|
8
|
+
/** Products retain this owner above their replaceable recovery/runtime subtree.
|
|
9
|
+
* Only the explicit pre-destructive deferrals permit a user-requested retry. */
|
|
10
|
+
export function createInterfaceApplicationOwner() {
|
|
11
|
+
return createApplicationRuntimeOwner({
|
|
12
|
+
isCleanupDeferred: error => error instanceof ExtensionCleanupDeferredError
|
|
13
|
+
|| error instanceof ExtensionUnloadDeferredError
|
|
14
|
+
|| error instanceof PageClosePreparationDeferredError,
|
|
15
|
+
});
|
|
16
|
+
}
|
|
5
17
|
/**
|
|
6
18
|
* Lets a product replace one shell overlay with its own destination. Interface
|
|
7
19
|
* owns observation, clearing and synchronous reentry; the product owns routing.
|
|
@@ -43,8 +55,9 @@ export async function startInterfaceApplication(overrides = {}, options = {}) {
|
|
|
43
55
|
try {
|
|
44
56
|
await runtime.dispose();
|
|
45
57
|
}
|
|
46
|
-
catch {
|
|
47
|
-
//
|
|
58
|
+
catch (cleanupError) {
|
|
59
|
+
// Transfer unfinished ownership instead of dropping the only disposer.
|
|
60
|
+
throw new ApplicationStartupCleanupError(error, runtime, cleanupError);
|
|
48
61
|
}
|
|
49
62
|
throw error;
|
|
50
63
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forgeax/interface",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "ForgeaX product interface shell and application composition boundary.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"lint:dep": "depcruise -c .dependency-cruiser.cjs src"
|
|
93
93
|
},
|
|
94
94
|
"dependencies": {
|
|
95
|
-
"@forgeax/app-shell": "0.
|
|
95
|
+
"@forgeax/app-shell": "0.90.0",
|
|
96
96
|
"@forgeax/extension-host": "0.3.2",
|
|
97
97
|
"@forgeax/extension-platform": "0.7.0",
|
|
98
98
|
"@forgeax/toolkit": "0.1.2",
|