@astrale-os/shell 0.2.0 → 0.3.1
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/dist/application/apps.d.ts +3 -3
- package/dist/application/apps.d.ts.map +1 -1
- package/dist/application/apps.js +2 -2
- package/dist/application/namespaces.d.ts +4 -4
- package/dist/application/namespaces.d.ts.map +1 -1
- package/dist/application/namespaces.js +4 -4
- package/dist/application/session/open.d.ts +2 -2
- package/dist/application/session/open.d.ts.map +1 -1
- package/dist/application/session/open.js +1 -1
- package/dist/application/session/session.d.ts +2 -2
- package/dist/application/session/session.d.ts.map +1 -1
- package/dist/application/session/token.d.ts +1 -1
- package/dist/application/session/token.d.ts.map +1 -1
- package/dist/application/session/token.js +2 -2
- package/dist/application/spaces.d.ts +2 -2
- package/dist/application/spaces.d.ts.map +1 -1
- package/dist/application/spaces.js +1 -1
- package/dist/application/user.d.ts +3 -3
- package/dist/application/user.d.ts.map +1 -1
- package/dist/application/user.js +1 -1
- package/dist/application/view.d.ts +3 -3
- package/dist/application/view.d.ts.map +1 -1
- package/dist/application/view.js +1 -1
- package/dist/channel/children.d.ts +3 -3
- package/dist/channel/children.d.ts.map +1 -1
- package/dist/channel/listeners.d.ts +1 -1
- package/dist/channel/listeners.d.ts.map +1 -1
- package/dist/channel/message-port.d.ts +1 -1
- package/dist/channel/message-port.d.ts.map +1 -1
- package/dist/channel/observer.d.ts +1 -1
- package/dist/channel/observer.d.ts.map +1 -1
- package/dist/channel/parent.d.ts +3 -3
- package/dist/channel/parent.d.ts.map +1 -1
- package/dist/channel/parent.js +1 -1
- package/dist/channel/transport.d.ts +1 -1
- package/dist/channel/transport.d.ts.map +1 -1
- package/dist/index.d.ts +56 -56
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -20
- package/dist/intent/middleware/capabilities.d.ts +3 -3
- package/dist/intent/middleware/capabilities.d.ts.map +1 -1
- package/dist/intent/middleware/logging.d.ts +1 -1
- package/dist/intent/middleware/logging.d.ts.map +1 -1
- package/dist/intent/middleware/rate-limit.d.ts +2 -2
- package/dist/intent/middleware/rate-limit.d.ts.map +1 -1
- package/dist/intent/pipeline.d.ts +1 -1
- package/dist/intent/pipeline.d.ts.map +1 -1
- package/dist/intent/policy.d.ts +2 -2
- package/dist/intent/policy.d.ts.map +1 -1
- package/dist/intent/request.d.ts +3 -3
- package/dist/intent/request.d.ts.map +1 -1
- package/dist/intent/router.d.ts +6 -6
- package/dist/intent/router.d.ts.map +1 -1
- package/dist/intent/router.js +1 -1
- package/dist/kernel/credential.d.ts +2 -2
- package/dist/kernel/credential.d.ts.map +1 -1
- package/dist/kernel/delegated.d.ts +3 -3
- package/dist/kernel/delegated.d.ts.map +1 -1
- package/dist/kernel/delegated.js +1 -1
- package/dist/kernel/delegation/refresh.d.ts +1 -1
- package/dist/kernel/delegation/refresh.d.ts.map +1 -1
- package/dist/kernel/delegation/refresh.js +1 -1
- package/dist/message/message.d.ts +3 -3
- package/dist/message/message.d.ts.map +1 -1
- package/dist/shell/access.d.ts +2 -2
- package/dist/shell/access.d.ts.map +1 -1
- package/dist/shell/access.js +1 -1
- package/dist/shell/build.d.ts +11 -11
- package/dist/shell/build.d.ts.map +1 -1
- package/dist/shell/build.js +1 -1
- package/dist/shell/config.d.ts +1 -1
- package/dist/shell/config.d.ts.map +1 -1
- package/dist/shell/create.d.ts +2 -2
- package/dist/shell/create.d.ts.map +1 -1
- package/dist/shell/create.js +2 -2
- package/dist/shell/sandboxed/boot.d.ts +4 -4
- package/dist/shell/sandboxed/boot.d.ts.map +1 -1
- package/dist/shell/sandboxed/boot.js +5 -5
- package/dist/shell/sandboxed/guarded.d.ts +2 -2
- package/dist/shell/sandboxed/guarded.d.ts.map +1 -1
- package/dist/shell/sandboxed/pending.d.ts +2 -2
- package/dist/shell/sandboxed/pending.d.ts.map +1 -1
- package/dist/shell/sandboxed/sandboxed.d.ts +2 -2
- package/dist/shell/sandboxed/sandboxed.d.ts.map +1 -1
- package/dist/shell/sandboxed/sandboxed.js +10 -10
- package/dist/shell/shell.d.ts +12 -12
- package/dist/shell/shell.d.ts.map +1 -1
- package/dist/shell/standalone.d.ts +2 -2
- package/dist/shell/standalone.d.ts.map +1 -1
- package/dist/shell/standalone.js +9 -9
- package/dist/window/capabilities.d.ts +1 -1
- package/dist/window/capabilities.d.ts.map +1 -1
- package/dist/window/embed/adapter.d.ts +1 -1
- package/dist/window/embed/adapter.d.ts.map +1 -1
- package/dist/window/embed/iframe.d.ts +1 -1
- package/dist/window/embed/iframe.d.ts.map +1 -1
- package/dist/window/lifecycle/states.d.ts +2 -2
- package/dist/window/lifecycle/states.d.ts.map +1 -1
- package/dist/window/lifecycle/states.js +1 -1
- package/dist/window/lifecycle/transition.d.ts +1 -1
- package/dist/window/lifecycle/transition.d.ts.map +1 -1
- package/dist/window/mount/close.d.ts +6 -6
- package/dist/window/mount/close.d.ts.map +1 -1
- package/dist/window/mount/credential.d.ts +5 -5
- package/dist/window/mount/credential.d.ts.map +1 -1
- package/dist/window/mount/credential.js +1 -1
- package/dist/window/mount/handshake.js +1 -1
- package/dist/window/mount/mount.d.ts +6 -6
- package/dist/window/mount/mount.d.ts.map +1 -1
- package/dist/window/mount/mount.js +5 -5
- package/dist/window/mount/params.d.ts +2 -2
- package/dist/window/mount/params.d.ts.map +1 -1
- package/dist/window/mount/plain.d.ts +5 -5
- package/dist/window/mount/plain.d.ts.map +1 -1
- package/dist/window/mount/plain.js +1 -1
- package/dist/window/window.d.ts +1 -1
- package/dist/window/window.d.ts.map +1 -1
- package/package.json +8 -5
- package/src/application/apps.ts +5 -5
- package/src/application/namespaces.ts +8 -8
- package/src/application/session/open.ts +4 -4
- package/src/application/session/session.ts +2 -2
- package/src/application/session/token.ts +3 -3
- package/src/application/spaces.ts +3 -3
- package/src/application/user.ts +4 -4
- package/src/application/view.ts +3 -3
- package/src/channel/children.ts +3 -3
- package/src/channel/listeners.ts +1 -1
- package/src/channel/message-port.ts +2 -2
- package/src/channel/observer.ts +1 -1
- package/src/channel/parent.ts +4 -4
- package/src/channel/transport.ts +1 -1
- package/src/index.ts +56 -56
- package/src/intent/middleware/capabilities.ts +3 -3
- package/src/intent/middleware/logging.ts +2 -2
- package/src/intent/middleware/rate-limit.ts +2 -2
- package/src/intent/pipeline.ts +1 -1
- package/src/intent/policy.ts +2 -2
- package/src/intent/request.ts +3 -3
- package/src/intent/router.ts +7 -7
- package/src/kernel/credential.ts +2 -2
- package/src/kernel/delegated.ts +4 -4
- package/src/kernel/delegation/refresh.ts +2 -2
- package/src/message/message.ts +3 -3
- package/src/shell/access.ts +3 -3
- package/src/shell/build.ts +13 -13
- package/src/shell/config.ts +1 -1
- package/src/shell/create.ts +4 -4
- package/src/shell/sandboxed/boot.ts +9 -9
- package/src/shell/sandboxed/guarded.ts +2 -2
- package/src/shell/sandboxed/pending.ts +2 -2
- package/src/shell/sandboxed/sandboxed.ts +18 -18
- package/src/shell/shell.ts +12 -12
- package/src/shell/standalone.ts +13 -13
- package/src/window/capabilities.ts +1 -1
- package/src/window/embed/adapter.ts +1 -1
- package/src/window/embed/iframe.ts +2 -2
- package/src/window/lifecycle/states.ts +2 -2
- package/src/window/lifecycle/transition.ts +1 -1
- package/src/window/mount/close.ts +6 -6
- package/src/window/mount/credential.ts +5 -5
- package/src/window/mount/handshake.ts +3 -3
- package/src/window/mount/mount.ts +13 -13
- package/src/window/mount/params.ts +2 -2
- package/src/window/mount/plain.ts +6 -6
- package/src/window/window.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { DelegationToken } from './token'
|
|
1
|
+
import type { DelegationToken } from './token.js'
|
|
2
2
|
|
|
3
|
-
import { REFRESH_WINDOW_MS } from './token'
|
|
3
|
+
import { REFRESH_WINDOW_MS } from './token.js'
|
|
4
4
|
|
|
5
5
|
export type TokenRefreshConfig = {
|
|
6
6
|
readonly token: () => DelegationToken
|
package/src/message/message.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { CtrlMessage } from './ctrl'
|
|
2
|
-
import type { ErrorMessage } from './error'
|
|
3
|
-
import type { IntentMessage } from './intent'
|
|
1
|
+
import type { CtrlMessage } from './ctrl.js'
|
|
2
|
+
import type { ErrorMessage } from './error.js'
|
|
3
|
+
import type { IntentMessage } from './intent.js'
|
|
4
4
|
|
|
5
5
|
export type ShellMessage = IntentMessage | CtrlMessage | ErrorMessage
|
|
6
6
|
|
package/src/shell/access.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { NO_PERMS } from '@astrale-os/kernel-core/permissions'
|
|
2
2
|
|
|
3
|
-
import type { PayloadOf, ReplyOf } from '../message/intent'
|
|
4
|
-
import type { Shell } from './shell'
|
|
3
|
+
import type { PayloadOf, ReplyOf } from '../message/intent.js'
|
|
4
|
+
import type { Shell } from './shell.js'
|
|
5
5
|
|
|
6
|
-
import { requestIntent } from '../intent/request'
|
|
6
|
+
import { requestIntent } from '../intent/request.js'
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* View SDK convenience: ask the user (via the root shell) to grant `perms` on
|
package/src/shell/build.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import type { OsNamespaces } from '../application/namespaces'
|
|
2
|
-
import type { ChildrenChannelController } from '../channel/children'
|
|
3
|
-
import type { MessageObserver } from '../channel/observer'
|
|
4
|
-
import type { ParentChannel } from '../channel/parent'
|
|
5
|
-
import type { IntentPipeline } from '../intent/pipeline'
|
|
6
|
-
import type { LocalIntentHandler } from '../intent/router'
|
|
7
|
-
import type { KernelClient } from '../kernel/client'
|
|
8
|
-
import type { IntentRegistry } from '../message/intent'
|
|
9
|
-
import type { LifecycleController } from '../window/lifecycle/states'
|
|
10
|
-
import type { MountController } from '../window/mount/mount'
|
|
11
|
-
import type { Window } from '../window/window'
|
|
12
|
-
import type { Shell } from './shell'
|
|
1
|
+
import type { OsNamespaces } from '../application/namespaces.js'
|
|
2
|
+
import type { ChildrenChannelController } from '../channel/children.js'
|
|
3
|
+
import type { MessageObserver } from '../channel/observer.js'
|
|
4
|
+
import type { ParentChannel } from '../channel/parent.js'
|
|
5
|
+
import type { IntentPipeline } from '../intent/pipeline.js'
|
|
6
|
+
import type { LocalIntentHandler } from '../intent/router.js'
|
|
7
|
+
import type { KernelClient } from '../kernel/client.js'
|
|
8
|
+
import type { IntentRegistry } from '../message/intent.js'
|
|
9
|
+
import type { LifecycleController } from '../window/lifecycle/states.js'
|
|
10
|
+
import type { MountController } from '../window/mount/mount.js'
|
|
11
|
+
import type { Window } from '../window/window.js'
|
|
12
|
+
import type { Shell } from './shell.js'
|
|
13
13
|
|
|
14
|
-
import { createOsNamespaces } from '../application/namespaces'
|
|
14
|
+
import { createOsNamespaces } from '../application/namespaces.js'
|
|
15
15
|
|
|
16
16
|
export type FacadeDeps = {
|
|
17
17
|
parent: ParentChannel | null
|
package/src/shell/config.ts
CHANGED
package/src/shell/create.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ShellConfig } from './config'
|
|
2
|
-
import type { Shell } from './shell'
|
|
1
|
+
import type { ShellConfig } from './config.js'
|
|
2
|
+
import type { Shell } from './shell.js'
|
|
3
3
|
|
|
4
|
-
import { createSandboxedShell } from './sandboxed/sandboxed'
|
|
5
|
-
import { createStandaloneShell } from './standalone'
|
|
4
|
+
import { createSandboxedShell } from './sandboxed/sandboxed.js'
|
|
5
|
+
import { createStandaloneShell } from './standalone.js'
|
|
6
6
|
|
|
7
7
|
export function createShell(config: ShellConfig): Shell {
|
|
8
8
|
return config.mode === 'standalone' ? createStandaloneShell(config) : createSandboxedShell(config)
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type { FunctionSchema } from '@astrale-os/kernel-client'
|
|
2
2
|
|
|
3
|
-
import type { MessageObserver } from '../../channel/observer'
|
|
4
|
-
import type { ParentChannelController } from '../../channel/parent'
|
|
5
|
-
import type { DelegationToken } from '../../kernel/delegation/token'
|
|
6
|
-
import type { CtrlMessage } from '../../message/ctrl'
|
|
3
|
+
import type { MessageObserver } from '../../channel/observer.js'
|
|
4
|
+
import type { ParentChannelController } from '../../channel/parent.js'
|
|
5
|
+
import type { DelegationToken } from '../../kernel/delegation/token.js'
|
|
6
|
+
import type { CtrlMessage } from '../../message/ctrl.js'
|
|
7
7
|
|
|
8
|
-
import { createMessagePortTransport } from '../../channel/message-port'
|
|
9
|
-
import { createParentChannel } from '../../channel/parent'
|
|
8
|
+
import { createMessagePortTransport } from '../../channel/message-port.js'
|
|
9
|
+
import { createParentChannel } from '../../channel/parent.js'
|
|
10
10
|
import {
|
|
11
11
|
createDelegationKernelFacade,
|
|
12
12
|
type DelegationKernelFacadeController,
|
|
13
|
-
} from '../../kernel/delegated'
|
|
14
|
-
import { createKernelClientAdapter } from '../../kernel/session'
|
|
15
|
-
import { INIT_REQUEST_TYPE, isInitResponse } from '../../message/init'
|
|
13
|
+
} from '../../kernel/delegated.js'
|
|
14
|
+
import { createKernelClientAdapter } from '../../kernel/session.js'
|
|
15
|
+
import { INIT_REQUEST_TYPE, isInitResponse } from '../../message/init.js'
|
|
16
16
|
|
|
17
17
|
export type ChildInitParams = {
|
|
18
18
|
readonly parent: WindowProxy
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ParentChannel, ParentChannelController } from '../../channel/parent'
|
|
2
|
-
import type { KernelClient } from '../../kernel/client'
|
|
1
|
+
import type { ParentChannel, ParentChannelController } from '../../channel/parent.js'
|
|
2
|
+
import type { KernelClient } from '../../kernel/client.js'
|
|
3
3
|
|
|
4
4
|
/** Throw the canonical "call init() first" error while `get()` has no state yet. */
|
|
5
5
|
export function requireInit<T>(get: () => T | null): T {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { IntentRouterController, LocalIntentHandler } from '../../intent/router'
|
|
2
|
-
import type { IntentRegistry } from '../../message/intent'
|
|
1
|
+
import type { IntentRouterController, LocalIntentHandler } from '../../intent/router.js'
|
|
2
|
+
import type { IntentRegistry } from '../../message/intent.js'
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Buffer intent subscriptions made before `init()` resolves — the router is
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import type { ParentChannelController } from '../../channel/parent'
|
|
2
|
-
import type { IntentRouterController, LocalIntentHandler } from '../../intent/router'
|
|
3
|
-
import type { KernelFacadeController } from '../../kernel/credential'
|
|
4
|
-
import type { IntentRegistry } from '../../message/intent'
|
|
5
|
-
import type { MountController } from '../../window/mount/mount'
|
|
6
|
-
import type { Window } from '../../window/window'
|
|
7
|
-
import type { SandboxedConfig } from '../config'
|
|
8
|
-
import type { Shell } from '../shell'
|
|
1
|
+
import type { ParentChannelController } from '../../channel/parent.js'
|
|
2
|
+
import type { IntentRouterController, LocalIntentHandler } from '../../intent/router.js'
|
|
3
|
+
import type { KernelFacadeController } from '../../kernel/credential.js'
|
|
4
|
+
import type { IntentRegistry } from '../../message/intent.js'
|
|
5
|
+
import type { MountController } from '../../window/mount/mount.js'
|
|
6
|
+
import type { Window } from '../../window/window.js'
|
|
7
|
+
import type { SandboxedConfig } from '../config.js'
|
|
8
|
+
import type { Shell } from '../shell.js'
|
|
9
9
|
|
|
10
|
-
import { createChildrenChannel } from '../../channel/children'
|
|
11
|
-
import { createMessageObserver } from '../../channel/observer'
|
|
12
|
-
import { createIntentPipeline } from '../../intent/pipeline'
|
|
13
|
-
import { createIntentRouter } from '../../intent/router'
|
|
14
|
-
import { createLifecycleController } from '../../window/lifecycle/states'
|
|
15
|
-
import { createMountController } from '../../window/mount/mount'
|
|
16
|
-
import { buildShellFacade } from '../build'
|
|
17
|
-
import { performChildInit } from './boot'
|
|
18
|
-
import { guardedKernel, guardedParent, requireInit } from './guarded'
|
|
19
|
-
import { createPendingIntentSubs } from './pending'
|
|
10
|
+
import { createChildrenChannel } from '../../channel/children.js'
|
|
11
|
+
import { createMessageObserver } from '../../channel/observer.js'
|
|
12
|
+
import { createIntentPipeline } from '../../intent/pipeline.js'
|
|
13
|
+
import { createIntentRouter } from '../../intent/router.js'
|
|
14
|
+
import { createLifecycleController } from '../../window/lifecycle/states.js'
|
|
15
|
+
import { createMountController } from '../../window/mount/mount.js'
|
|
16
|
+
import { buildShellFacade } from '../build.js'
|
|
17
|
+
import { performChildInit } from './boot.js'
|
|
18
|
+
import { guardedKernel, guardedParent, requireInit } from './guarded.js'
|
|
19
|
+
import { createPendingIntentSubs } from './pending.js'
|
|
20
20
|
|
|
21
21
|
/** Trusted sender id stamped on intents arriving from the parent channel. */
|
|
22
22
|
const PARENT_SENDER_ID = '<parent>'
|
package/src/shell/shell.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import type { AppsNamespace } from '../application/apps'
|
|
2
|
-
import type { SpacesNamespace } from '../application/spaces'
|
|
3
|
-
import type { UserNamespace } from '../application/user'
|
|
4
|
-
import type { ChildrenChannel } from '../channel/children'
|
|
5
|
-
import type { ObserverHandler } from '../channel/observer'
|
|
6
|
-
import type { ParentChannel } from '../channel/parent'
|
|
7
|
-
import type { IntentMiddleware } from '../intent/pipeline'
|
|
8
|
-
import type { LocalIntentHandler } from '../intent/router'
|
|
9
|
-
import type { KernelClient } from '../kernel/client'
|
|
10
|
-
import type { IntentRegistry } from '../message/intent'
|
|
11
|
-
import type { CloseResult, MountedWindow, MountParams } from '../window/mount/params'
|
|
12
|
-
import type { Window } from '../window/window'
|
|
1
|
+
import type { AppsNamespace } from '../application/apps.js'
|
|
2
|
+
import type { SpacesNamespace } from '../application/spaces.js'
|
|
3
|
+
import type { UserNamespace } from '../application/user.js'
|
|
4
|
+
import type { ChildrenChannel } from '../channel/children.js'
|
|
5
|
+
import type { ObserverHandler } from '../channel/observer.js'
|
|
6
|
+
import type { ParentChannel } from '../channel/parent.js'
|
|
7
|
+
import type { IntentMiddleware } from '../intent/pipeline.js'
|
|
8
|
+
import type { LocalIntentHandler } from '../intent/router.js'
|
|
9
|
+
import type { KernelClient } from '../kernel/client.js'
|
|
10
|
+
import type { IntentRegistry } from '../message/intent.js'
|
|
11
|
+
import type { CloseResult, MountedWindow, MountParams } from '../window/mount/params.js'
|
|
12
|
+
import type { Window } from '../window/window.js'
|
|
13
13
|
|
|
14
14
|
export interface Shell {
|
|
15
15
|
readonly parent: ParentChannel | null
|
package/src/shell/standalone.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import type { MountController } from '../window/mount/mount'
|
|
2
|
-
import type { Window } from '../window/window'
|
|
3
|
-
import type { StandaloneConfig } from './config'
|
|
4
|
-
import type { Shell } from './shell'
|
|
1
|
+
import type { MountController } from '../window/mount/mount.js'
|
|
2
|
+
import type { Window } from '../window/window.js'
|
|
3
|
+
import type { StandaloneConfig } from './config.js'
|
|
4
|
+
import type { Shell } from './shell.js'
|
|
5
5
|
|
|
6
|
-
import { createChildrenChannel } from '../channel/children'
|
|
7
|
-
import { createMessageObserver } from '../channel/observer'
|
|
8
|
-
import { createIntentPipeline } from '../intent/pipeline'
|
|
9
|
-
import { createIntentRouter } from '../intent/router'
|
|
10
|
-
import { createKernelFacade } from '../kernel/credential'
|
|
11
|
-
import { createKernelClientAdapter } from '../kernel/session'
|
|
12
|
-
import { createLifecycleController } from '../window/lifecycle/states'
|
|
13
|
-
import { createMountController } from '../window/mount/mount'
|
|
14
|
-
import { buildShellFacade } from './build'
|
|
6
|
+
import { createChildrenChannel } from '../channel/children.js'
|
|
7
|
+
import { createMessageObserver } from '../channel/observer.js'
|
|
8
|
+
import { createIntentPipeline } from '../intent/pipeline.js'
|
|
9
|
+
import { createIntentRouter } from '../intent/router.js'
|
|
10
|
+
import { createKernelFacade } from '../kernel/credential.js'
|
|
11
|
+
import { createKernelClientAdapter } from '../kernel/session.js'
|
|
12
|
+
import { createLifecycleController } from '../window/lifecycle/states.js'
|
|
13
|
+
import { createMountController } from '../window/mount/mount.js'
|
|
14
|
+
import { buildShellFacade } from './build.js'
|
|
15
15
|
|
|
16
16
|
const DEFAULT_ROOT_WINDOW_ID = 'root'
|
|
17
17
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SandboxProfile } from '../capabilities'
|
|
2
|
-
import type { ShellAdapter, WindowHandle } from './adapter'
|
|
1
|
+
import type { SandboxProfile } from '../capabilities.js'
|
|
2
|
+
import type { ShellAdapter, WindowHandle } from './adapter.js'
|
|
3
3
|
|
|
4
4
|
export type IframeShellAdapterConfig = {
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { WindowState } from '../window'
|
|
1
|
+
import type { WindowState } from '../window.js'
|
|
2
2
|
|
|
3
|
-
import { transition, type LifecycleEvent } from './transition'
|
|
3
|
+
import { transition, type LifecycleEvent } from './transition.js'
|
|
4
4
|
|
|
5
5
|
/** Live per-window lifecycle states, advanced only through the transition machine. */
|
|
6
6
|
export interface LifecycleController {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { ChildrenChannelController } from '../../channel/children'
|
|
2
|
-
import type { TokenRefresher } from '../../kernel/delegation/refresh'
|
|
3
|
-
import type { WindowHandle } from '../embed/adapter'
|
|
4
|
-
import type { LifecycleController } from '../lifecycle/states'
|
|
5
|
-
import type { Window } from '../window'
|
|
6
|
-
import type { CloseResult } from './params'
|
|
1
|
+
import type { ChildrenChannelController } from '../../channel/children.js'
|
|
2
|
+
import type { TokenRefresher } from '../../kernel/delegation/refresh.js'
|
|
3
|
+
import type { WindowHandle } from '../embed/adapter.js'
|
|
4
|
+
import type { LifecycleController } from '../lifecycle/states.js'
|
|
5
|
+
import type { Window } from '../window.js'
|
|
6
|
+
import type { CloseResult } from './params.js'
|
|
7
7
|
|
|
8
8
|
const DEFAULT_CLOSE_TIMEOUT = 3_000
|
|
9
9
|
/** Trusted sender id stamped on the parent's own close-protocol intents. */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { ChildrenChannelController } from '../../channel/children'
|
|
2
|
-
import type { KernelClient } from '../../kernel/client'
|
|
3
|
-
import type { Window } from '../window'
|
|
4
|
-
import type { MountCredential } from './params'
|
|
1
|
+
import type { ChildrenChannelController } from '../../channel/children.js'
|
|
2
|
+
import type { KernelClient } from '../../kernel/client.js'
|
|
3
|
+
import type { Window } from '../window.js'
|
|
4
|
+
import type { MountCredential } from './params.js'
|
|
5
5
|
|
|
6
|
-
import { createTokenRefresher, type TokenRefresher } from '../../kernel/delegation/refresh'
|
|
6
|
+
import { createTokenRefresher, type TokenRefresher } from '../../kernel/delegation/refresh.js'
|
|
7
7
|
|
|
8
8
|
export type AcquiredCredential = { credential: string; expiresAt: number }
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { CtrlMessage } from '../../message/ctrl'
|
|
2
|
-
import type { ShellMessage } from '../../message/message'
|
|
1
|
+
import type { CtrlMessage } from '../../message/ctrl.js'
|
|
2
|
+
import type { ShellMessage } from '../../message/message.js'
|
|
3
3
|
|
|
4
|
-
import { INIT_RESPONSE_TYPE, isInitRequest } from '../../message/init'
|
|
4
|
+
import { INIT_RESPONSE_TYPE, isInitRequest } from '../../message/init.js'
|
|
5
5
|
|
|
6
6
|
export type HandshakeParams = {
|
|
7
7
|
readonly iframe: HTMLIFrameElement
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type { ChildrenChannelController } from '../../channel/children'
|
|
2
|
-
import type { KernelClient } from '../../kernel/client'
|
|
3
|
-
import type { ShellAdapter } from '../embed/adapter'
|
|
4
|
-
import type { LifecycleController } from '../lifecycle/states'
|
|
5
|
-
import type { Window } from '../window'
|
|
6
|
-
import type { MountEntry } from './close'
|
|
7
|
-
import type { CloseResult, MountedWindow, MountParams } from './params'
|
|
8
|
-
|
|
9
|
-
import { createMessagePortTransport } from '../../channel/message-port'
|
|
10
|
-
import { createCloser } from './close'
|
|
11
|
-
import { credentialSource, wireTokenRefresher } from './credential'
|
|
12
|
-
import { runParentHandshake } from './handshake'
|
|
13
|
-
import { mountPlain } from './plain'
|
|
1
|
+
import type { ChildrenChannelController } from '../../channel/children.js'
|
|
2
|
+
import type { KernelClient } from '../../kernel/client.js'
|
|
3
|
+
import type { ShellAdapter } from '../embed/adapter.js'
|
|
4
|
+
import type { LifecycleController } from '../lifecycle/states.js'
|
|
5
|
+
import type { Window } from '../window.js'
|
|
6
|
+
import type { MountEntry } from './close.js'
|
|
7
|
+
import type { CloseResult, MountedWindow, MountParams } from './params.js'
|
|
8
|
+
|
|
9
|
+
import { createMessagePortTransport } from '../../channel/message-port.js'
|
|
10
|
+
import { createCloser } from './close.js'
|
|
11
|
+
import { credentialSource, wireTokenRefresher } from './credential.js'
|
|
12
|
+
import { runParentHandshake } from './handshake.js'
|
|
13
|
+
import { mountPlain } from './plain.js'
|
|
14
14
|
|
|
15
15
|
const DEFAULT_HANDSHAKE_TIMEOUT = 5_000
|
|
16
16
|
const DEFAULT_DELEGATION_TTL = 3_600
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SandboxProfile, WindowCapabilities } from '../capabilities'
|
|
2
|
-
import type { Window } from '../window'
|
|
1
|
+
import type { SandboxProfile, WindowCapabilities } from '../capabilities.js'
|
|
2
|
+
import type { Window } from '../window.js'
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* A PRE-MINTED credential to hand the mounted iframe instead of the shell's
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { ShellAdapter } from '../embed/adapter'
|
|
2
|
-
import type { LifecycleController } from '../lifecycle/states'
|
|
3
|
-
import type { Window } from '../window'
|
|
4
|
-
import type { Closer, MountEntry } from './close'
|
|
5
|
-
import type { MountedWindow, MountParams } from './params'
|
|
1
|
+
import type { ShellAdapter } from '../embed/adapter.js'
|
|
2
|
+
import type { LifecycleController } from '../lifecycle/states.js'
|
|
3
|
+
import type { Window } from '../window.js'
|
|
4
|
+
import type { Closer, MountEntry } from './close.js'
|
|
5
|
+
import type { MountedWindow, MountParams } from './params.js'
|
|
6
6
|
|
|
7
|
-
import { NOOP_REFRESHER } from './credential'
|
|
7
|
+
import { NOOP_REFRESHER } from './credential.js'
|
|
8
8
|
|
|
9
9
|
export type PlainMountDeps = {
|
|
10
10
|
adapter: ShellAdapter
|
package/src/window/window.ts
CHANGED