@dxos/client-services 0.4.9-main.9dad131 → 0.4.9-main.9fa1362
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/lib/browser/{chunk-IBKVU472.mjs → chunk-GPXO7YUM.mjs} +42 -53
- package/dist/lib/browser/{chunk-IBKVU472.mjs.map → chunk-GPXO7YUM.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +1 -3
- package/dist/lib/browser/index.mjs.map +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/packlets/testing/index.mjs +3 -6
- package/dist/lib/browser/packlets/testing/index.mjs.map +3 -3
- package/dist/lib/node/{chunk-IBIGR324.cjs → chunk-TKR6CKUB.cjs} +42 -54
- package/dist/lib/node/{chunk-IBIGR324.cjs.map → chunk-TKR6CKUB.cjs.map} +3 -3
- package/dist/lib/node/index.cjs +37 -39
- package/dist/lib/node/index.cjs.map +1 -1
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/packlets/testing/index.cjs +6 -8
- package/dist/lib/node/packlets/testing/index.cjs.map +3 -3
- package/dist/types/src/packlets/services/diagnostics.d.ts +1 -1
- package/dist/types/src/packlets/services/diagnostics.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-context.d.ts +1 -3
- package/dist/types/src/packlets/services/service-context.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-host.d.ts +1 -5
- package/dist/types/src/packlets/services/service-host.d.ts.map +1 -1
- package/dist/types/src/packlets/testing/test-builder.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/package.json +34 -37
- package/src/packlets/identity/identity-manager.test.ts +0 -2
- package/src/packlets/identity/identity.test.ts +0 -4
- package/src/packlets/services/diagnostics.ts +3 -3
- package/src/packlets/services/service-context.ts +0 -3
- package/src/packlets/services/service-host.ts +5 -18
- package/src/packlets/testing/test-builder.ts +2 -4
- package/src/version.ts +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/packlets/testing/credential-utils.ts", "../../../../../src/packlets/testing/invitation-utils.ts", "../../../../../src/packlets/testing/test-builder.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { createCredential } from '@dxos/credentials';\nimport { type Signer } from '@dxos/crypto';\nimport { PublicKey } from '@dxos/keys';\nimport { type Credential } from '@dxos/protocols/proto/dxos/halo/credentials';\n\nexport const createMockCredential = async ({\n signer,\n issuer,\n}: {\n signer: Signer;\n issuer: PublicKey;\n}): Promise<Credential> =>\n createCredential({\n signer,\n issuer,\n subject: new PublicKey(Buffer.from('test')),\n assertion: {\n '@type': 'example.testing.rpc.MessageWithAny',\n payload: {\n '@type': 'google.protobuf.Any',\n value: Buffer.from('test'),\n },\n },\n });\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Trigger } from '@dxos/async';\nimport { InvitationEncoder, type AuthenticatingInvitation, type CancellableInvitation } from '@dxos/client-protocol';\nimport { invariant } from '@dxos/invariant';\nimport { Invitation } from '@dxos/protocols/proto/dxos/client/services';\nimport { type DeviceProfileDocument } from '@dxos/protocols/proto/dxos/halo/credentials';\n\nimport { ServiceContext } from '../services';\n\n/**\n * Strip secrets from invitation before giving it to the peer.\n */\nexport const sanitizeInvitation = (invitation: Invitation): Invitation => {\n return InvitationEncoder.decode(InvitationEncoder.encode(invitation));\n};\n\nexport type InvitationHost = {\n share(options?: Partial<Invitation>): CancellableInvitation;\n};\n\nexport type InvitationGuest = {\n join(invitation: Invitation | string, deviceProfile?: DeviceProfileDocument): AuthenticatingInvitation;\n};\n\nexport type PerformInvitationCallbacks<T> = {\n onConnecting?: (value: T) => boolean | void;\n onConnected?: (value: T) => boolean | void;\n onReady?: (value: T) => boolean | void;\n onAuthenticating?: (value: T) => boolean | void;\n onSuccess?: (value: T) => boolean | void;\n onCancelled?: (value: T) => boolean | void;\n onTimeout?: (value: T) => boolean | void;\n onError?: (value: T) => boolean | void;\n};\n\nexport type PerformInvitationParams = {\n host: ServiceContext | InvitationHost;\n guest: ServiceContext | InvitationGuest;\n options?: Partial<Invitation>;\n hooks?: {\n host?: PerformInvitationCallbacks<CancellableInvitation>;\n guest?: PerformInvitationCallbacks<AuthenticatingInvitation>;\n };\n guestDeviceProfile?: DeviceProfileDocument;\n};\n\nexport type Result = { invitation?: Invitation; error?: Error };\n\nexport const performInvitation = ({\n host,\n guest,\n options,\n hooks,\n guestDeviceProfile,\n}: PerformInvitationParams): [Promise<Result>, Promise<Result>] => {\n const hostComplete = new Trigger<Result>();\n const guestComplete = new Trigger<Result>();\n const authCode = new Trigger<string>();\n\n const hostObservable = createInvitation(host, options);\n hostObservable.subscribe(\n async (hostInvitation: Invitation) => {\n switch (hostInvitation.state) {\n case Invitation.State.CONNECTING: {\n if (hooks?.host?.onConnecting?.(hostObservable)) {\n break;\n }\n const guestObservable = acceptInvitation(guest, hostInvitation, guestDeviceProfile);\n guestObservable.subscribe(\n async (guestInvitation: Invitation) => {\n switch (guestInvitation.state) {\n case Invitation.State.CONNECTING: {\n if (hooks?.guest?.onConnecting?.(guestObservable)) {\n break;\n }\n invariant(hostInvitation.swarmKey!.equals(guestInvitation.swarmKey!));\n break;\n }\n\n case Invitation.State.CONNECTED: {\n hooks?.guest?.onConnected?.(guestObservable);\n break;\n }\n\n case Invitation.State.READY_FOR_AUTHENTICATION: {\n if (hooks?.guest?.onReady?.(guestObservable)) {\n break;\n }\n await guestObservable.authenticate(await authCode.wait());\n break;\n }\n\n case Invitation.State.AUTHENTICATING: {\n hooks?.guest?.onAuthenticating?.(guestObservable);\n break;\n }\n\n case Invitation.State.SUCCESS: {\n if (hooks?.guest?.onSuccess?.(guestObservable)) {\n break;\n }\n guestComplete.wake({ invitation: guestInvitation });\n break;\n }\n\n case Invitation.State.CANCELLED: {\n if (hooks?.guest?.onCancelled?.(guestObservable)) {\n break;\n }\n guestComplete.wake({ invitation: guestInvitation });\n break;\n }\n\n case Invitation.State.TIMEOUT: {\n if (hooks?.guest?.onTimeout?.(guestObservable)) {\n return;\n }\n guestComplete.wake({ invitation: guestInvitation });\n }\n }\n },\n (error: Error) => {\n if (hooks?.guest?.onError?.(guestObservable)) {\n return;\n }\n guestComplete.wake({ error });\n },\n );\n break;\n }\n\n case Invitation.State.CONNECTED: {\n hooks?.host?.onConnected?.(hostObservable);\n break;\n }\n\n case Invitation.State.READY_FOR_AUTHENTICATION: {\n if (hooks?.host?.onReady?.(hostObservable)) {\n break;\n }\n if (hostInvitation.authCode) {\n authCode.wake(hostInvitation.authCode);\n }\n break;\n }\n\n case Invitation.State.AUTHENTICATING: {\n hooks?.host?.onAuthenticating?.(hostObservable);\n break;\n }\n\n case Invitation.State.SUCCESS: {\n if (hooks?.host?.onSuccess?.(hostObservable)) {\n break;\n }\n hostComplete.wake({ invitation: hostInvitation });\n break;\n }\n\n case Invitation.State.CANCELLED: {\n if (hooks?.host?.onCancelled?.(hostObservable)) {\n break;\n }\n hostComplete.wake({ invitation: hostInvitation });\n break;\n }\n\n case Invitation.State.TIMEOUT: {\n if (hooks?.host?.onTimeout?.(hostObservable)) {\n break;\n }\n hostComplete.wake({ invitation: hostInvitation });\n break;\n }\n }\n },\n (error: Error) => {\n if (hooks?.host?.onError?.(hostObservable)) {\n return;\n }\n hostComplete.wake({ error });\n },\n );\n\n return [hostComplete.wait(), guestComplete.wait()];\n};\n\nconst createInvitation = (\n host: ServiceContext | InvitationHost,\n options?: Partial<Invitation>,\n): CancellableInvitation => {\n options ??= {\n authMethod: Invitation.AuthMethod.NONE,\n ...(options ?? {}),\n };\n\n if (host instanceof ServiceContext) {\n const hostHandler = host.getInvitationHandler({ kind: Invitation.Kind.SPACE, ...options });\n return host.invitations.createInvitation(hostHandler, options);\n }\n\n return host.share(options);\n};\n\nconst acceptInvitation = (\n guest: ServiceContext | InvitationGuest,\n invitation: Invitation,\n guestDeviceProfile?: DeviceProfileDocument,\n): AuthenticatingInvitation => {\n invitation = sanitizeInvitation(invitation);\n\n if (guest instanceof ServiceContext) {\n const guestHandler = guest.getInvitationHandler({ kind: invitation.kind });\n return guest.invitations.acceptInvitation(guestHandler, invitation, guestDeviceProfile);\n }\n\n return guest.join(invitation, guestDeviceProfile);\n};\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { type Config } from '@dxos/config';\nimport { Context } from '@dxos/context';\nimport { createCredentialSignerWithChain, CredentialGenerator } from '@dxos/credentials';\nimport { failUndefined } from '@dxos/debug';\nimport { AutomergeHost, MetadataStore, SnapshotStore, SpaceManager, valueEncoding } from '@dxos/echo-pipeline';\nimport { FeedFactory, FeedStore } from '@dxos/feed-store';\nimport { Keyring } from '@dxos/keyring';\nimport { MemorySignalManager, MemorySignalManagerContext } from '@dxos/messaging';\nimport { MemoryTransportFactory, NetworkManager } from '@dxos/network-manager';\nimport { createStorage, StorageType, type Storage } from '@dxos/random-access-storage';\nimport { BlobStore } from '@dxos/teleport-extension-object-sync';\n\nimport { ClientServicesHost, createDefaultModelFactory, ServiceContext } from '../services';\nimport { DataSpaceManager, type SigningContext } from '../spaces';\n\n//\n// TODO(burdon): Replace with test builder.\n//\n\nexport const createServiceHost = (config: Config, signalManagerContext: MemorySignalManagerContext) => {\n return new ClientServicesHost({\n config,\n signalManager: new MemorySignalManager(signalManagerContext),\n transportFactory: MemoryTransportFactory,\n });\n};\n\nexport const createServiceContext = ({\n signalContext = new MemorySignalManagerContext(),\n storage = createStorage({ type: StorageType.RAM }),\n}: {\n signalContext?: MemorySignalManagerContext;\n storage?: Storage;\n} = {}) => {\n const signalManager = new MemorySignalManager(signalContext);\n const networkManager = new NetworkManager({\n signalManager,\n transportFactory: MemoryTransportFactory,\n });\n\n const modelFactory = createDefaultModelFactory();\n return new ServiceContext(storage, networkManager, signalManager, modelFactory);\n};\n\nexport const createPeers = async (numPeers: number) => {\n const signalContext = new MemorySignalManagerContext();\n\n return await Promise.all(\n Array.from(Array(numPeers)).map(async () => {\n const peer = createServiceContext({ signalContext });\n await peer.open(new Context());\n return peer;\n }),\n );\n};\n\nexport const createIdentity = async (peer: ServiceContext) => {\n await peer.createIdentity();\n return peer;\n};\n\nexport class TestBuilder {\n public readonly signalContext = new MemorySignalManagerContext();\n private readonly _ctx = new Context();\n\n createPeer(peerOptions?: TestPeerOpts): TestPeer {\n const peer = new TestPeer(this.signalContext, peerOptions);\n this._ctx.onDispose(async () => peer.destroy());\n return peer;\n }\n\n async destroy() {\n await this._ctx.dispose();\n }\n}\n\nexport type TestPeerOpts = {\n dataStore?: StorageType;\n};\n\nexport type TestPeerProps = {\n storage?: Storage;\n feedStore?: FeedStore<any>;\n metadataStore?: MetadataStore;\n keyring?: Keyring;\n networkManager?: NetworkManager;\n spaceManager?: SpaceManager;\n dataSpaceManager?: DataSpaceManager;\n snapshotStore?: SnapshotStore;\n signingContext?: SigningContext;\n blobStore?: BlobStore;\n automergeHost?: AutomergeHost;\n};\n\nexport class TestPeer {\n private _props: TestPeerProps = {};\n\n constructor(\n private readonly signalContext: MemorySignalManagerContext,\n private readonly opts: TestPeerOpts = { dataStore: StorageType.RAM },\n ) {}\n\n get props() {\n return this._props;\n }\n\n get storage() {\n return (this._props.storage ??= createStorage({ type: this.opts.dataStore }));\n }\n\n get keyring() {\n return (this._props.keyring ??= new Keyring(this.storage.createDirectory('keyring')));\n }\n\n get feedStore() {\n return (this._props.feedStore ??= new FeedStore({\n factory: new FeedFactory({\n root: this.storage.createDirectory('feeds'),\n signer: this.keyring,\n hypercore: {\n valueEncoding,\n },\n }),\n }));\n }\n\n get metadataStore() {\n return (this._props.metadataStore ??= new MetadataStore(this.storage.createDirectory('metadata')));\n }\n\n get blobStore() {\n return (this._props.blobStore ??= new BlobStore(this.storage.createDirectory('blobs')));\n }\n\n get snapshotStore() {\n return (this._props.snapshotStore ??= new SnapshotStore(this.storage.createDirectory('snapshots')));\n }\n\n get networkManager() {\n return (this._props.networkManager ??= new NetworkManager({\n signalManager: new MemorySignalManager(this.signalContext),\n transportFactory: MemoryTransportFactory,\n }));\n }\n\n get spaceManager() {\n return (this._props.spaceManager ??= new SpaceManager({\n feedStore: this.feedStore,\n networkManager: this.networkManager,\n metadataStore: this.metadataStore,\n modelFactory: createDefaultModelFactory(),\n snapshotStore: this.snapshotStore,\n blobStore: this.blobStore,\n }));\n }\n\n get identity() {\n return this._props.signingContext ?? failUndefined();\n }\n\n get automergeHost() {\n return (this._props.automergeHost ??= new AutomergeHost({ directory: this.storage.createDirectory('automerge') }));\n }\n\n get dataSpaceManager() {\n return (this._props.dataSpaceManager ??= new DataSpaceManager(\n this.spaceManager,\n this.metadataStore,\n this.keyring,\n this.identity,\n this.feedStore,\n this.automergeHost,\n ));\n }\n\n async createIdentity() {\n this._props.signingContext ??= await createSigningContext(this.keyring);\n }\n\n async destroy() {\n await this.storage.reset();\n }\n}\n\nexport const createSigningContext = async (keyring: Keyring): Promise<SigningContext> => {\n const identityKey = await keyring.createKey();\n const deviceKey = await keyring.createKey();\n\n return {\n identityKey,\n deviceKey,\n credentialSigner: createCredentialSignerWithChain(\n keyring,\n {\n credential: await new CredentialGenerator(keyring, identityKey, deviceKey).createDeviceAuthorization(deviceKey),\n },\n deviceKey,\n ),\n recordCredential: async () => {}, // No-op.\n getProfile: () => undefined,\n };\n};\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["createCredential", "PublicKey", "createMockCredential", "signer", "issuer", "createCredential", "subject", "PublicKey", "Buffer", "from", "assertion", "payload", "value", "Trigger", "InvitationEncoder", "invariant", "Invitation", "sanitizeInvitation", "invitation", "InvitationEncoder", "decode", "encode", "performInvitation", "host", "guest", "options", "hooks", "guestDeviceProfile", "hostComplete", "Trigger", "guestComplete", "authCode", "hostObservable", "createInvitation", "subscribe", "hostInvitation", "state", "Invitation", "State", "CONNECTING", "onConnecting", "guestObservable", "acceptInvitation", "guestInvitation", "invariant", "swarmKey", "equals", "CONNECTED", "onConnected", "READY_FOR_AUTHENTICATION", "onReady", "authenticate", "wait", "AUTHENTICATING", "onAuthenticating", "SUCCESS", "onSuccess", "wake", "CANCELLED", "onCancelled", "TIMEOUT", "onTimeout", "error", "onError", "authMethod", "AuthMethod", "NONE", "ServiceContext", "hostHandler", "getInvitationHandler", "kind", "Kind", "SPACE", "invitations", "share", "guestHandler", "join", "Context", "createCredentialSignerWithChain", "CredentialGenerator", "failUndefined", "AutomergeHost", "MetadataStore", "SnapshotStore", "SpaceManager", "valueEncoding", "FeedFactory", "FeedStore", "Keyring", "MemorySignalManager", "MemorySignalManagerContext", "MemoryTransportFactory", "NetworkManager", "createStorage", "StorageType", "BlobStore", "createServiceHost", "config", "signalManagerContext", "ClientServicesHost", "signalManager", "MemorySignalManager", "transportFactory", "MemoryTransportFactory", "createServiceContext", "signalContext", "MemorySignalManagerContext", "storage", "createStorage", "type", "StorageType", "RAM", "networkManager", "NetworkManager", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { createCredential } from '@dxos/credentials';\nimport { type Signer } from '@dxos/crypto';\nimport { PublicKey } from '@dxos/keys';\nimport { type Credential } from '@dxos/protocols/proto/dxos/halo/credentials';\n\nexport const createMockCredential = async ({\n signer,\n issuer,\n}: {\n signer: Signer;\n issuer: PublicKey;\n}): Promise<Credential> =>\n createCredential({\n signer,\n issuer,\n subject: new PublicKey(Buffer.from('test')),\n assertion: {\n '@type': 'example.testing.rpc.MessageWithAny',\n payload: {\n '@type': 'google.protobuf.Any',\n value: Buffer.from('test'),\n },\n },\n });\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Trigger } from '@dxos/async';\nimport { InvitationEncoder, type AuthenticatingInvitation, type CancellableInvitation } from '@dxos/client-protocol';\nimport { invariant } from '@dxos/invariant';\nimport { Invitation } from '@dxos/protocols/proto/dxos/client/services';\nimport { type DeviceProfileDocument } from '@dxos/protocols/proto/dxos/halo/credentials';\n\nimport { ServiceContext } from '../services';\n\n/**\n * Strip secrets from invitation before giving it to the peer.\n */\nexport const sanitizeInvitation = (invitation: Invitation): Invitation => {\n return InvitationEncoder.decode(InvitationEncoder.encode(invitation));\n};\n\nexport type InvitationHost = {\n share(options?: Partial<Invitation>): CancellableInvitation;\n};\n\nexport type InvitationGuest = {\n join(invitation: Invitation | string, deviceProfile?: DeviceProfileDocument): AuthenticatingInvitation;\n};\n\nexport type PerformInvitationCallbacks<T> = {\n onConnecting?: (value: T) => boolean | void;\n onConnected?: (value: T) => boolean | void;\n onReady?: (value: T) => boolean | void;\n onAuthenticating?: (value: T) => boolean | void;\n onSuccess?: (value: T) => boolean | void;\n onCancelled?: (value: T) => boolean | void;\n onTimeout?: (value: T) => boolean | void;\n onError?: (value: T) => boolean | void;\n};\n\nexport type PerformInvitationParams = {\n host: ServiceContext | InvitationHost;\n guest: ServiceContext | InvitationGuest;\n options?: Partial<Invitation>;\n hooks?: {\n host?: PerformInvitationCallbacks<CancellableInvitation>;\n guest?: PerformInvitationCallbacks<AuthenticatingInvitation>;\n };\n guestDeviceProfile?: DeviceProfileDocument;\n};\n\nexport type Result = { invitation?: Invitation; error?: Error };\n\nexport const performInvitation = ({\n host,\n guest,\n options,\n hooks,\n guestDeviceProfile,\n}: PerformInvitationParams): [Promise<Result>, Promise<Result>] => {\n const hostComplete = new Trigger<Result>();\n const guestComplete = new Trigger<Result>();\n const authCode = new Trigger<string>();\n\n const hostObservable = createInvitation(host, options);\n hostObservable.subscribe(\n async (hostInvitation: Invitation) => {\n switch (hostInvitation.state) {\n case Invitation.State.CONNECTING: {\n if (hooks?.host?.onConnecting?.(hostObservable)) {\n break;\n }\n const guestObservable = acceptInvitation(guest, hostInvitation, guestDeviceProfile);\n guestObservable.subscribe(\n async (guestInvitation: Invitation) => {\n switch (guestInvitation.state) {\n case Invitation.State.CONNECTING: {\n if (hooks?.guest?.onConnecting?.(guestObservable)) {\n break;\n }\n invariant(hostInvitation.swarmKey!.equals(guestInvitation.swarmKey!));\n break;\n }\n\n case Invitation.State.CONNECTED: {\n hooks?.guest?.onConnected?.(guestObservable);\n break;\n }\n\n case Invitation.State.READY_FOR_AUTHENTICATION: {\n if (hooks?.guest?.onReady?.(guestObservable)) {\n break;\n }\n await guestObservable.authenticate(await authCode.wait());\n break;\n }\n\n case Invitation.State.AUTHENTICATING: {\n hooks?.guest?.onAuthenticating?.(guestObservable);\n break;\n }\n\n case Invitation.State.SUCCESS: {\n if (hooks?.guest?.onSuccess?.(guestObservable)) {\n break;\n }\n guestComplete.wake({ invitation: guestInvitation });\n break;\n }\n\n case Invitation.State.CANCELLED: {\n if (hooks?.guest?.onCancelled?.(guestObservable)) {\n break;\n }\n guestComplete.wake({ invitation: guestInvitation });\n break;\n }\n\n case Invitation.State.TIMEOUT: {\n if (hooks?.guest?.onTimeout?.(guestObservable)) {\n return;\n }\n guestComplete.wake({ invitation: guestInvitation });\n }\n }\n },\n (error: Error) => {\n if (hooks?.guest?.onError?.(guestObservable)) {\n return;\n }\n guestComplete.wake({ error });\n },\n );\n break;\n }\n\n case Invitation.State.CONNECTED: {\n hooks?.host?.onConnected?.(hostObservable);\n break;\n }\n\n case Invitation.State.READY_FOR_AUTHENTICATION: {\n if (hooks?.host?.onReady?.(hostObservable)) {\n break;\n }\n if (hostInvitation.authCode) {\n authCode.wake(hostInvitation.authCode);\n }\n break;\n }\n\n case Invitation.State.AUTHENTICATING: {\n hooks?.host?.onAuthenticating?.(hostObservable);\n break;\n }\n\n case Invitation.State.SUCCESS: {\n if (hooks?.host?.onSuccess?.(hostObservable)) {\n break;\n }\n hostComplete.wake({ invitation: hostInvitation });\n break;\n }\n\n case Invitation.State.CANCELLED: {\n if (hooks?.host?.onCancelled?.(hostObservable)) {\n break;\n }\n hostComplete.wake({ invitation: hostInvitation });\n break;\n }\n\n case Invitation.State.TIMEOUT: {\n if (hooks?.host?.onTimeout?.(hostObservable)) {\n break;\n }\n hostComplete.wake({ invitation: hostInvitation });\n break;\n }\n }\n },\n (error: Error) => {\n if (hooks?.host?.onError?.(hostObservable)) {\n return;\n }\n hostComplete.wake({ error });\n },\n );\n\n return [hostComplete.wait(), guestComplete.wait()];\n};\n\nconst createInvitation = (\n host: ServiceContext | InvitationHost,\n options?: Partial<Invitation>,\n): CancellableInvitation => {\n options ??= {\n authMethod: Invitation.AuthMethod.NONE,\n ...(options ?? {}),\n };\n\n if (host instanceof ServiceContext) {\n const hostHandler = host.getInvitationHandler({ kind: Invitation.Kind.SPACE, ...options });\n return host.invitations.createInvitation(hostHandler, options);\n }\n\n return host.share(options);\n};\n\nconst acceptInvitation = (\n guest: ServiceContext | InvitationGuest,\n invitation: Invitation,\n guestDeviceProfile?: DeviceProfileDocument,\n): AuthenticatingInvitation => {\n invitation = sanitizeInvitation(invitation);\n\n if (guest instanceof ServiceContext) {\n const guestHandler = guest.getInvitationHandler({ kind: invitation.kind });\n return guest.invitations.acceptInvitation(guestHandler, invitation, guestDeviceProfile);\n }\n\n return guest.join(invitation, guestDeviceProfile);\n};\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { type Config } from '@dxos/config';\nimport { Context } from '@dxos/context';\nimport { createCredentialSignerWithChain, CredentialGenerator } from '@dxos/credentials';\nimport { failUndefined } from '@dxos/debug';\nimport { AutomergeHost, MetadataStore, SnapshotStore, SpaceManager, valueEncoding } from '@dxos/echo-pipeline';\nimport { FeedFactory, FeedStore } from '@dxos/feed-store';\nimport { Keyring } from '@dxos/keyring';\nimport { MemorySignalManager, MemorySignalManagerContext } from '@dxos/messaging';\nimport { MemoryTransportFactory, NetworkManager } from '@dxos/network-manager';\nimport { createStorage, StorageType, type Storage } from '@dxos/random-access-storage';\nimport { BlobStore } from '@dxos/teleport-extension-object-sync';\n\nimport { ClientServicesHost, ServiceContext } from '../services';\nimport { DataSpaceManager, type SigningContext } from '../spaces';\n\n//\n// TODO(burdon): Replace with test builder.\n//\n\nexport const createServiceHost = (config: Config, signalManagerContext: MemorySignalManagerContext) => {\n return new ClientServicesHost({\n config,\n signalManager: new MemorySignalManager(signalManagerContext),\n transportFactory: MemoryTransportFactory,\n });\n};\n\nexport const createServiceContext = ({\n signalContext = new MemorySignalManagerContext(),\n storage = createStorage({ type: StorageType.RAM }),\n}: {\n signalContext?: MemorySignalManagerContext;\n storage?: Storage;\n} = {}) => {\n const signalManager = new MemorySignalManager(signalContext);\n const networkManager = new NetworkManager({\n signalManager,\n transportFactory: MemoryTransportFactory,\n });\n\n return new ServiceContext(storage, networkManager, signalManager);\n};\n\nexport const createPeers = async (numPeers: number) => {\n const signalContext = new MemorySignalManagerContext();\n\n return await Promise.all(\n Array.from(Array(numPeers)).map(async () => {\n const peer = createServiceContext({ signalContext });\n await peer.open(new Context());\n return peer;\n }),\n );\n};\n\nexport const createIdentity = async (peer: ServiceContext) => {\n await peer.createIdentity();\n return peer;\n};\n\nexport class TestBuilder {\n public readonly signalContext = new MemorySignalManagerContext();\n private readonly _ctx = new Context();\n\n createPeer(peerOptions?: TestPeerOpts): TestPeer {\n const peer = new TestPeer(this.signalContext, peerOptions);\n this._ctx.onDispose(async () => peer.destroy());\n return peer;\n }\n\n async destroy() {\n await this._ctx.dispose();\n }\n}\n\nexport type TestPeerOpts = {\n dataStore?: StorageType;\n};\n\nexport type TestPeerProps = {\n storage?: Storage;\n feedStore?: FeedStore<any>;\n metadataStore?: MetadataStore;\n keyring?: Keyring;\n networkManager?: NetworkManager;\n spaceManager?: SpaceManager;\n dataSpaceManager?: DataSpaceManager;\n snapshotStore?: SnapshotStore;\n signingContext?: SigningContext;\n blobStore?: BlobStore;\n automergeHost?: AutomergeHost;\n};\n\nexport class TestPeer {\n private _props: TestPeerProps = {};\n\n constructor(\n private readonly signalContext: MemorySignalManagerContext,\n private readonly opts: TestPeerOpts = { dataStore: StorageType.RAM },\n ) {}\n\n get props() {\n return this._props;\n }\n\n get storage() {\n return (this._props.storage ??= createStorage({ type: this.opts.dataStore }));\n }\n\n get keyring() {\n return (this._props.keyring ??= new Keyring(this.storage.createDirectory('keyring')));\n }\n\n get feedStore() {\n return (this._props.feedStore ??= new FeedStore({\n factory: new FeedFactory({\n root: this.storage.createDirectory('feeds'),\n signer: this.keyring,\n hypercore: {\n valueEncoding,\n },\n }),\n }));\n }\n\n get metadataStore() {\n return (this._props.metadataStore ??= new MetadataStore(this.storage.createDirectory('metadata')));\n }\n\n get blobStore() {\n return (this._props.blobStore ??= new BlobStore(this.storage.createDirectory('blobs')));\n }\n\n get snapshotStore() {\n return (this._props.snapshotStore ??= new SnapshotStore(this.storage.createDirectory('snapshots')));\n }\n\n get networkManager() {\n return (this._props.networkManager ??= new NetworkManager({\n signalManager: new MemorySignalManager(this.signalContext),\n transportFactory: MemoryTransportFactory,\n }));\n }\n\n get spaceManager() {\n return (this._props.spaceManager ??= new SpaceManager({\n feedStore: this.feedStore,\n networkManager: this.networkManager,\n metadataStore: this.metadataStore,\n snapshotStore: this.snapshotStore,\n blobStore: this.blobStore,\n }));\n }\n\n get identity() {\n return this._props.signingContext ?? failUndefined();\n }\n\n get automergeHost() {\n return (this._props.automergeHost ??= new AutomergeHost({ directory: this.storage.createDirectory('automerge') }));\n }\n\n get dataSpaceManager() {\n return (this._props.dataSpaceManager ??= new DataSpaceManager(\n this.spaceManager,\n this.metadataStore,\n this.keyring,\n this.identity,\n this.feedStore,\n this.automergeHost,\n ));\n }\n\n async createIdentity() {\n this._props.signingContext ??= await createSigningContext(this.keyring);\n }\n\n async destroy() {\n await this.storage.reset();\n }\n}\n\nexport const createSigningContext = async (keyring: Keyring): Promise<SigningContext> => {\n const identityKey = await keyring.createKey();\n const deviceKey = await keyring.createKey();\n\n return {\n identityKey,\n deviceKey,\n credentialSigner: createCredentialSignerWithChain(\n keyring,\n {\n credential: await new CredentialGenerator(keyring, identityKey, deviceKey).createDeviceAuthorization(deviceKey),\n },\n deviceKey,\n ),\n recordCredential: async () => {}, // No-op.\n getProfile: () => undefined,\n };\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;AAIA,SAASA,wBAAwB;AAEjC,SAASC,iBAAiB;AAGnB,IAAMC,uBAAuB,OAAO,EACzCC,QACAC,OAAM,MAKNC,iBA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F;",
|
|
6
|
+
"names": ["createCredential", "PublicKey", "createMockCredential", "signer", "issuer", "createCredential", "subject", "PublicKey", "Buffer", "from", "assertion", "payload", "value", "Trigger", "InvitationEncoder", "invariant", "Invitation", "sanitizeInvitation", "invitation", "InvitationEncoder", "decode", "encode", "performInvitation", "host", "guest", "options", "hooks", "guestDeviceProfile", "hostComplete", "Trigger", "guestComplete", "authCode", "hostObservable", "createInvitation", "subscribe", "hostInvitation", "state", "Invitation", "State", "CONNECTING", "onConnecting", "guestObservable", "acceptInvitation", "guestInvitation", "invariant", "swarmKey", "equals", "CONNECTED", "onConnected", "READY_FOR_AUTHENTICATION", "onReady", "authenticate", "wait", "AUTHENTICATING", "onAuthenticating", "SUCCESS", "onSuccess", "wake", "CANCELLED", "onCancelled", "TIMEOUT", "onTimeout", "error", "onError", "authMethod", "AuthMethod", "NONE", "ServiceContext", "hostHandler", "getInvitationHandler", "kind", "Kind", "SPACE", "invitations", "share", "guestHandler", "join", "Context", "createCredentialSignerWithChain", "CredentialGenerator", "failUndefined", "AutomergeHost", "MetadataStore", "SnapshotStore", "SpaceManager", "valueEncoding", "FeedFactory", "FeedStore", "Keyring", "MemorySignalManager", "MemorySignalManagerContext", "MemoryTransportFactory", "NetworkManager", "createStorage", "StorageType", "BlobStore", "createServiceHost", "config", "signalManagerContext", "ClientServicesHost", "signalManager", "MemorySignalManager", "transportFactory", "MemoryTransportFactory", "createServiceContext", "signalContext", "MemorySignalManagerContext", "storage", "createStorage", "type", "StorageType", "RAM", "networkManager", "NetworkManager", "ServiceContext", "createPeers", "numPeers", "Promise", "all", "Array", "from", "map", "peer", "open", "Context", "createIdentity", "TestBuilder", "_ctx", "createPeer", "peerOptions", "TestPeer", "onDispose", "destroy", "dispose", "constructor", "opts", "dataStore", "_props", "props", "keyring", "Keyring", "createDirectory", "feedStore", "FeedStore", "factory", "FeedFactory", "root", "signer", "hypercore", "valueEncoding", "metadataStore", "MetadataStore", "blobStore", "BlobStore", "snapshotStore", "SnapshotStore", "spaceManager", "SpaceManager", "identity", "signingContext", "failUndefined", "automergeHost", "AutomergeHost", "directory", "dataSpaceManager", "DataSpaceManager", "createSigningContext", "reset", "identityKey", "createKey", "deviceKey", "credentialSigner", "createCredentialSignerWithChain", "credential", "CredentialGenerator", "createDeviceAuthorization", "recordCredential", "getProfile", "undefined"]
|
|
7
7
|
}
|
|
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_TKR6CKUB_exports = {};
|
|
30
|
+
__export(chunk_TKR6CKUB_exports, {
|
|
31
31
|
ClientRpcServer: () => ClientRpcServer,
|
|
32
32
|
ClientServicesHost: () => ClientServicesHost,
|
|
33
33
|
DataSpace: () => DataSpace,
|
|
@@ -47,7 +47,6 @@ __export(chunk_IBIGR324_exports, {
|
|
|
47
47
|
SpacesServiceImpl: () => SpacesServiceImpl,
|
|
48
48
|
TrustedKeySetAuthVerifier: () => TrustedKeySetAuthVerifier,
|
|
49
49
|
createAuthProvider: () => createAuthProvider,
|
|
50
|
-
createDefaultModelFactory: () => createDefaultModelFactory,
|
|
51
50
|
createDiagnostics: () => createDiagnostics,
|
|
52
51
|
createStorageObjects: () => createStorageObjects,
|
|
53
52
|
getNetworkPeers: () => getNetworkPeers,
|
|
@@ -61,7 +60,7 @@ __export(chunk_IBIGR324_exports, {
|
|
|
61
60
|
subscribeToSpaces: () => subscribeToSpaces,
|
|
62
61
|
subscribeToSwarmInfo: () => subscribeToSwarmInfo
|
|
63
62
|
});
|
|
64
|
-
module.exports = __toCommonJS(
|
|
63
|
+
module.exports = __toCommonJS(chunk_TKR6CKUB_exports);
|
|
65
64
|
var import_async = require("@dxos/async");
|
|
66
65
|
var import_codec_protobuf = require("@dxos/codec-protobuf");
|
|
67
66
|
var import_feed_store = require("@dxos/feed-store");
|
|
@@ -230,7 +229,6 @@ var import_util8 = require("@dxos/util");
|
|
|
230
229
|
var import_async16 = require("@dxos/async");
|
|
231
230
|
var import_client_protocol5 = require("@dxos/client-protocol");
|
|
232
231
|
var import_context11 = require("@dxos/context");
|
|
233
|
-
var import_document_model = require("@dxos/document-model");
|
|
234
232
|
var import_echo_pipeline3 = require("@dxos/echo-pipeline");
|
|
235
233
|
var import_echo_schema = require("@dxos/echo-schema");
|
|
236
234
|
var import_indexing2 = require("@dxos/indexing");
|
|
@@ -238,11 +236,9 @@ var import_invariant16 = require("@dxos/invariant");
|
|
|
238
236
|
var import_keys11 = require("@dxos/keys");
|
|
239
237
|
var import_log14 = require("@dxos/log");
|
|
240
238
|
var import_messaging = require("@dxos/messaging");
|
|
241
|
-
var import_model_factory = require("@dxos/model-factory");
|
|
242
239
|
var import_network_manager2 = require("@dxos/network-manager");
|
|
243
240
|
var import_protocols15 = require("@dxos/protocols");
|
|
244
241
|
var import_services13 = require("@dxos/protocols/proto/dxos/client/services");
|
|
245
|
-
var import_text_model = require("@dxos/text-model");
|
|
246
242
|
var import_tracing7 = require("@dxos/tracing");
|
|
247
243
|
var import_util9 = require("@dxos/util");
|
|
248
244
|
var import_websocket_rpc = require("@dxos/websocket-rpc");
|
|
@@ -2888,7 +2884,7 @@ var getPlatform = () => {
|
|
|
2888
2884
|
};
|
|
2889
2885
|
}
|
|
2890
2886
|
};
|
|
2891
|
-
var DXOS_VERSION = "0.4.9-main.
|
|
2887
|
+
var DXOS_VERSION = "0.4.9-main.9fa1362";
|
|
2892
2888
|
var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
|
|
2893
2889
|
var DEFAULT_TIMEOUT = 1e3;
|
|
2894
2890
|
var createDiagnostics = async (clientServices, serviceContext, config) => {
|
|
@@ -4459,11 +4455,10 @@ function _ts_decorate6(decorators, target, key, desc) {
|
|
|
4459
4455
|
}
|
|
4460
4456
|
var __dxlog_file15 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/service-context.ts";
|
|
4461
4457
|
var ServiceContext = class {
|
|
4462
|
-
constructor(storage, networkManager, signalManager,
|
|
4458
|
+
constructor(storage, networkManager, signalManager, _runtimeParams) {
|
|
4463
4459
|
this.storage = storage;
|
|
4464
4460
|
this.networkManager = networkManager;
|
|
4465
4461
|
this.signalManager = signalManager;
|
|
4466
|
-
this.modelFactory = modelFactory;
|
|
4467
4462
|
this._runtimeParams = _runtimeParams;
|
|
4468
4463
|
this.initialized = new import_async15.Trigger();
|
|
4469
4464
|
this._handlerFactories = /* @__PURE__ */ new Map();
|
|
@@ -4487,7 +4482,6 @@ var ServiceContext = class {
|
|
|
4487
4482
|
networkManager: this.networkManager,
|
|
4488
4483
|
blobStore: this.blobStore,
|
|
4489
4484
|
metadataStore: this.metadataStore,
|
|
4490
|
-
modelFactory: this.modelFactory,
|
|
4491
4485
|
snapshotStore: this.snapshotStore
|
|
4492
4486
|
});
|
|
4493
4487
|
this.identityManager = new IdentityManager(this.metadataStore, this.keyring, this.feedStore, this.spaceManager, this._runtimeParams);
|
|
@@ -4513,7 +4507,7 @@ var ServiceContext = class {
|
|
|
4513
4507
|
await this._checkStorageVersion();
|
|
4514
4508
|
(0, import_log12.log)("opening...", void 0, {
|
|
4515
4509
|
F: __dxlog_file15,
|
|
4516
|
-
L:
|
|
4510
|
+
L: 151,
|
|
4517
4511
|
S: this,
|
|
4518
4512
|
C: (f, a) => f(...a)
|
|
4519
4513
|
});
|
|
@@ -4521,7 +4515,7 @@ var ServiceContext = class {
|
|
|
4521
4515
|
id: this._instanceId
|
|
4522
4516
|
}), {
|
|
4523
4517
|
F: __dxlog_file15,
|
|
4524
|
-
L:
|
|
4518
|
+
L: 152,
|
|
4525
4519
|
S: this,
|
|
4526
4520
|
C: (f, a) => f(...a)
|
|
4527
4521
|
});
|
|
@@ -4537,13 +4531,13 @@ var ServiceContext = class {
|
|
|
4537
4531
|
id: this._instanceId
|
|
4538
4532
|
}), {
|
|
4539
4533
|
F: __dxlog_file15,
|
|
4540
|
-
L:
|
|
4534
|
+
L: 162,
|
|
4541
4535
|
S: this,
|
|
4542
4536
|
C: (f, a) => f(...a)
|
|
4543
4537
|
});
|
|
4544
4538
|
(0, import_log12.log)("opened", void 0, {
|
|
4545
4539
|
F: __dxlog_file15,
|
|
4546
|
-
L:
|
|
4540
|
+
L: 163,
|
|
4547
4541
|
S: this,
|
|
4548
4542
|
C: (f, a) => f(...a)
|
|
4549
4543
|
});
|
|
@@ -4551,7 +4545,7 @@ var ServiceContext = class {
|
|
|
4551
4545
|
async close() {
|
|
4552
4546
|
(0, import_log12.log)("closing...", void 0, {
|
|
4553
4547
|
F: __dxlog_file15,
|
|
4554
|
-
L:
|
|
4548
|
+
L: 167,
|
|
4555
4549
|
S: this,
|
|
4556
4550
|
C: (f, a) => f(...a)
|
|
4557
4551
|
});
|
|
@@ -4569,7 +4563,7 @@ var ServiceContext = class {
|
|
|
4569
4563
|
await this.indexer.destroy();
|
|
4570
4564
|
(0, import_log12.log)("closed", void 0, {
|
|
4571
4565
|
F: __dxlog_file15,
|
|
4572
|
-
L:
|
|
4566
|
+
L: 180,
|
|
4573
4567
|
S: this,
|
|
4574
4568
|
C: (f, a) => f(...a)
|
|
4575
4569
|
});
|
|
@@ -4583,7 +4577,7 @@ var ServiceContext = class {
|
|
|
4583
4577
|
const factory = this._handlerFactories.get(invitation.kind);
|
|
4584
4578
|
(0, import_invariant14.invariant)(factory, `Unknown invitation kind: ${invitation.kind}`, {
|
|
4585
4579
|
F: __dxlog_file15,
|
|
4586
|
-
L:
|
|
4580
|
+
L: 191,
|
|
4587
4581
|
S: this,
|
|
4588
4582
|
A: [
|
|
4589
4583
|
"factory",
|
|
@@ -4615,7 +4609,7 @@ var ServiceContext = class {
|
|
|
4615
4609
|
async _initialize(ctx) {
|
|
4616
4610
|
(0, import_log12.log)("initializing spaces...", void 0, {
|
|
4617
4611
|
F: __dxlog_file15,
|
|
4618
|
-
L:
|
|
4612
|
+
L: 222,
|
|
4619
4613
|
S: this,
|
|
4620
4614
|
C: (f, a) => f(...a)
|
|
4621
4615
|
});
|
|
@@ -4638,7 +4632,7 @@ var ServiceContext = class {
|
|
|
4638
4632
|
this._handlerFactories.set(import_services12.Invitation.Kind.SPACE, (invitation) => {
|
|
4639
4633
|
(0, import_invariant14.invariant)(this.dataSpaceManager, "dataSpaceManager not initialized yet", {
|
|
4640
4634
|
F: __dxlog_file15,
|
|
4641
|
-
L:
|
|
4635
|
+
L: 246,
|
|
4642
4636
|
S: this,
|
|
4643
4637
|
A: [
|
|
4644
4638
|
"this.dataSpaceManager",
|
|
@@ -4662,7 +4656,7 @@ var ServiceContext = class {
|
|
|
4662
4656
|
details: assertion
|
|
4663
4657
|
}, {
|
|
4664
4658
|
F: __dxlog_file15,
|
|
4665
|
-
L:
|
|
4659
|
+
L: 262,
|
|
4666
4660
|
S: this,
|
|
4667
4661
|
C: (f, a) => f(...a)
|
|
4668
4662
|
});
|
|
@@ -4673,7 +4667,7 @@ var ServiceContext = class {
|
|
|
4673
4667
|
details: assertion
|
|
4674
4668
|
}, {
|
|
4675
4669
|
F: __dxlog_file15,
|
|
4676
|
-
L:
|
|
4670
|
+
L: 266,
|
|
4677
4671
|
S: this,
|
|
4678
4672
|
C: (f, a) => f(...a)
|
|
4679
4673
|
});
|
|
@@ -4684,7 +4678,7 @@ var ServiceContext = class {
|
|
|
4684
4678
|
details: assertion
|
|
4685
4679
|
}, {
|
|
4686
4680
|
F: __dxlog_file15,
|
|
4687
|
-
L:
|
|
4681
|
+
L: 271,
|
|
4688
4682
|
S: this,
|
|
4689
4683
|
C: (f, a) => f(...a)
|
|
4690
4684
|
});
|
|
@@ -4695,7 +4689,7 @@ var ServiceContext = class {
|
|
|
4695
4689
|
} catch (err) {
|
|
4696
4690
|
import_log12.log.catch(err, void 0, {
|
|
4697
4691
|
F: __dxlog_file15,
|
|
4698
|
-
L:
|
|
4692
|
+
L: 277,
|
|
4699
4693
|
S: this,
|
|
4700
4694
|
C: (f, a) => f(...a)
|
|
4701
4695
|
});
|
|
@@ -5118,13 +5112,9 @@ function _ts_decorate8(decorators, target, key, desc) {
|
|
|
5118
5112
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5119
5113
|
}
|
|
5120
5114
|
var __dxlog_file18 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/service-host.ts";
|
|
5121
|
-
var createDefaultModelFactory = () => {
|
|
5122
|
-
return new import_model_factory.ModelFactory().registerModel(import_document_model.DocumentModel).registerModel(import_text_model.TextModel);
|
|
5123
|
-
};
|
|
5124
5115
|
var ClientServicesHost = class {
|
|
5125
5116
|
constructor({
|
|
5126
5117
|
config,
|
|
5127
|
-
modelFactory = createDefaultModelFactory(),
|
|
5128
5118
|
transportFactory,
|
|
5129
5119
|
signalManager,
|
|
5130
5120
|
storage,
|
|
@@ -5138,7 +5128,6 @@ var ClientServicesHost = class {
|
|
|
5138
5128
|
this._opening = false;
|
|
5139
5129
|
this._open = false;
|
|
5140
5130
|
this._storage = storage;
|
|
5141
|
-
this._modelFactory = modelFactory;
|
|
5142
5131
|
this._callbacks = callbacks;
|
|
5143
5132
|
this._runtimeParams = runtimeParams;
|
|
5144
5133
|
if (config) {
|
|
@@ -5209,7 +5198,7 @@ var ClientServicesHost = class {
|
|
|
5209
5198
|
initialize({ config, ...options }) {
|
|
5210
5199
|
(0, import_invariant16.invariant)(!this._open, "service host is open", {
|
|
5211
5200
|
F: __dxlog_file18,
|
|
5212
|
-
L:
|
|
5201
|
+
L: 179,
|
|
5213
5202
|
S: this,
|
|
5214
5203
|
A: [
|
|
5215
5204
|
"!this._open",
|
|
@@ -5218,14 +5207,14 @@ var ClientServicesHost = class {
|
|
|
5218
5207
|
});
|
|
5219
5208
|
(0, import_log14.log)("initializing...", void 0, {
|
|
5220
5209
|
F: __dxlog_file18,
|
|
5221
|
-
L:
|
|
5210
|
+
L: 180,
|
|
5222
5211
|
S: this,
|
|
5223
5212
|
C: (f, a) => f(...a)
|
|
5224
5213
|
});
|
|
5225
5214
|
if (config) {
|
|
5226
5215
|
(0, import_invariant16.invariant)(!this._config, "config already set", {
|
|
5227
5216
|
F: __dxlog_file18,
|
|
5228
|
-
L:
|
|
5217
|
+
L: 183,
|
|
5229
5218
|
S: this,
|
|
5230
5219
|
A: [
|
|
5231
5220
|
"!this._config",
|
|
@@ -5243,7 +5232,7 @@ var ClientServicesHost = class {
|
|
|
5243
5232
|
this._signalManager = signalManager;
|
|
5244
5233
|
(0, import_invariant16.invariant)(!this._networkManager, "network manager already set", {
|
|
5245
5234
|
F: __dxlog_file18,
|
|
5246
|
-
L:
|
|
5235
|
+
L: 199,
|
|
5247
5236
|
S: this,
|
|
5248
5237
|
A: [
|
|
5249
5238
|
"!this._networkManager",
|
|
@@ -5257,7 +5246,7 @@ var ClientServicesHost = class {
|
|
|
5257
5246
|
});
|
|
5258
5247
|
(0, import_log14.log)("initialized", void 0, {
|
|
5259
5248
|
F: __dxlog_file18,
|
|
5260
|
-
L:
|
|
5249
|
+
L: 206,
|
|
5261
5250
|
S: this,
|
|
5262
5251
|
C: (f, a) => f(...a)
|
|
5263
5252
|
});
|
|
@@ -5271,13 +5260,13 @@ var ClientServicesHost = class {
|
|
|
5271
5260
|
id: traceId
|
|
5272
5261
|
}), {
|
|
5273
5262
|
F: __dxlog_file18,
|
|
5274
|
-
L:
|
|
5263
|
+
L: 217,
|
|
5275
5264
|
S: this,
|
|
5276
5265
|
C: (f, a) => f(...a)
|
|
5277
5266
|
});
|
|
5278
5267
|
(0, import_invariant16.invariant)(this._config, "config not set", {
|
|
5279
5268
|
F: __dxlog_file18,
|
|
5280
|
-
L:
|
|
5269
|
+
L: 219,
|
|
5281
5270
|
S: this,
|
|
5282
5271
|
A: [
|
|
5283
5272
|
"this._config",
|
|
@@ -5286,7 +5275,7 @@ var ClientServicesHost = class {
|
|
|
5286
5275
|
});
|
|
5287
5276
|
(0, import_invariant16.invariant)(this._storage, "storage not set", {
|
|
5288
5277
|
F: __dxlog_file18,
|
|
5289
|
-
L:
|
|
5278
|
+
L: 220,
|
|
5290
5279
|
S: this,
|
|
5291
5280
|
A: [
|
|
5292
5281
|
"this._storage",
|
|
@@ -5295,7 +5284,7 @@ var ClientServicesHost = class {
|
|
|
5295
5284
|
});
|
|
5296
5285
|
(0, import_invariant16.invariant)(this._signalManager, "signal manager not set", {
|
|
5297
5286
|
F: __dxlog_file18,
|
|
5298
|
-
L:
|
|
5287
|
+
L: 221,
|
|
5299
5288
|
S: this,
|
|
5300
5289
|
A: [
|
|
5301
5290
|
"this._signalManager",
|
|
@@ -5304,7 +5293,7 @@ var ClientServicesHost = class {
|
|
|
5304
5293
|
});
|
|
5305
5294
|
(0, import_invariant16.invariant)(this._networkManager, "network manager not set", {
|
|
5306
5295
|
F: __dxlog_file18,
|
|
5307
|
-
L:
|
|
5296
|
+
L: 222,
|
|
5308
5297
|
S: this,
|
|
5309
5298
|
A: [
|
|
5310
5299
|
"this._networkManager",
|
|
@@ -5316,13 +5305,13 @@ var ClientServicesHost = class {
|
|
|
5316
5305
|
lockKey: this._resourceLock?.lockKey
|
|
5317
5306
|
}, {
|
|
5318
5307
|
F: __dxlog_file18,
|
|
5319
|
-
L:
|
|
5308
|
+
L: 225,
|
|
5320
5309
|
S: this,
|
|
5321
5310
|
C: (f, a) => f(...a)
|
|
5322
5311
|
});
|
|
5323
5312
|
await this._resourceLock?.acquire();
|
|
5324
5313
|
await this._loggingService.open();
|
|
5325
|
-
this._serviceContext = new ServiceContext(this._storage, this._networkManager, this._signalManager, this.
|
|
5314
|
+
this._serviceContext = new ServiceContext(this._storage, this._networkManager, this._signalManager, this._runtimeParams);
|
|
5326
5315
|
this._serviceRegistry.setServices({
|
|
5327
5316
|
SystemService: this._systemService,
|
|
5328
5317
|
IdentityService: new IdentityServiceImpl((params) => this._createIdentity(params), this._serviceContext.identityManager, this._serviceContext.keyring, (profile) => this._serviceContext.broadcastProfileUpdate(profile)),
|
|
@@ -5350,7 +5339,7 @@ var ClientServicesHost = class {
|
|
|
5350
5339
|
await this._serviceContext.open(ctx);
|
|
5351
5340
|
(0, import_invariant16.invariant)(this.serviceRegistry.services.InvitationsService, void 0, {
|
|
5352
5341
|
F: __dxlog_file18,
|
|
5353
|
-
L:
|
|
5342
|
+
L: 286,
|
|
5354
5343
|
S: this,
|
|
5355
5344
|
A: [
|
|
5356
5345
|
"this.serviceRegistry.services.InvitationsService",
|
|
@@ -5362,7 +5351,7 @@ var ClientServicesHost = class {
|
|
|
5362
5351
|
count: loadedInvitations.invitations?.length
|
|
5363
5352
|
}, {
|
|
5364
5353
|
F: __dxlog_file18,
|
|
5365
|
-
L:
|
|
5354
|
+
L: 289,
|
|
5366
5355
|
S: this,
|
|
5367
5356
|
C: (f, a) => f(...a)
|
|
5368
5357
|
});
|
|
@@ -5384,7 +5373,7 @@ var ClientServicesHost = class {
|
|
|
5384
5373
|
deviceKey
|
|
5385
5374
|
}, {
|
|
5386
5375
|
F: __dxlog_file18,
|
|
5387
|
-
L:
|
|
5376
|
+
L: 306,
|
|
5388
5377
|
S: this,
|
|
5389
5378
|
C: (f, a) => f(...a)
|
|
5390
5379
|
});
|
|
@@ -5392,7 +5381,7 @@ var ClientServicesHost = class {
|
|
|
5392
5381
|
id: traceId
|
|
5393
5382
|
}), {
|
|
5394
5383
|
F: __dxlog_file18,
|
|
5395
|
-
L:
|
|
5384
|
+
L: 307,
|
|
5396
5385
|
S: this,
|
|
5397
5386
|
C: (f, a) => f(...a)
|
|
5398
5387
|
});
|
|
@@ -5406,7 +5395,7 @@ var ClientServicesHost = class {
|
|
|
5406
5395
|
deviceKey
|
|
5407
5396
|
}, {
|
|
5408
5397
|
F: __dxlog_file18,
|
|
5409
|
-
L:
|
|
5398
|
+
L: 318,
|
|
5410
5399
|
S: this,
|
|
5411
5400
|
C: (f, a) => f(...a)
|
|
5412
5401
|
});
|
|
@@ -5422,7 +5411,7 @@ var ClientServicesHost = class {
|
|
|
5422
5411
|
deviceKey
|
|
5423
5412
|
}, {
|
|
5424
5413
|
F: __dxlog_file18,
|
|
5425
|
-
L:
|
|
5414
|
+
L: 325,
|
|
5426
5415
|
S: this,
|
|
5427
5416
|
C: (f, a) => f(...a)
|
|
5428
5417
|
});
|
|
@@ -5433,13 +5422,13 @@ var ClientServicesHost = class {
|
|
|
5433
5422
|
id: traceId
|
|
5434
5423
|
}), {
|
|
5435
5424
|
F: __dxlog_file18,
|
|
5436
|
-
L:
|
|
5425
|
+
L: 330,
|
|
5437
5426
|
S: this,
|
|
5438
5427
|
C: (f, a) => f(...a)
|
|
5439
5428
|
});
|
|
5440
5429
|
(0, import_log14.log)("resetting...", void 0, {
|
|
5441
5430
|
F: __dxlog_file18,
|
|
5442
|
-
L:
|
|
5431
|
+
L: 332,
|
|
5443
5432
|
S: this,
|
|
5444
5433
|
C: (f, a) => f(...a)
|
|
5445
5434
|
});
|
|
@@ -5447,7 +5436,7 @@ var ClientServicesHost = class {
|
|
|
5447
5436
|
await this._storage.reset();
|
|
5448
5437
|
(0, import_log14.log)("reset", void 0, {
|
|
5449
5438
|
F: __dxlog_file18,
|
|
5450
|
-
L:
|
|
5439
|
+
L: 335,
|
|
5451
5440
|
S: this,
|
|
5452
5441
|
C: (f, a) => f(...a)
|
|
5453
5442
|
});
|
|
@@ -5455,7 +5444,7 @@ var ClientServicesHost = class {
|
|
|
5455
5444
|
id: traceId
|
|
5456
5445
|
}), {
|
|
5457
5446
|
F: __dxlog_file18,
|
|
5458
|
-
L:
|
|
5447
|
+
L: 336,
|
|
5459
5448
|
S: this,
|
|
5460
5449
|
C: (f, a) => f(...a)
|
|
5461
5450
|
});
|
|
@@ -5470,7 +5459,7 @@ var ClientServicesHost = class {
|
|
|
5470
5459
|
const automergeIndex = space.automergeSpaceState.rootUrl;
|
|
5471
5460
|
(0, import_invariant16.invariant)(automergeIndex, void 0, {
|
|
5472
5461
|
F: __dxlog_file18,
|
|
5473
|
-
L:
|
|
5462
|
+
L: 351,
|
|
5474
5463
|
S: this,
|
|
5475
5464
|
A: [
|
|
5476
5465
|
"automergeIndex",
|
|
@@ -5526,7 +5515,6 @@ ClientServicesHost = _ts_decorate8([
|
|
|
5526
5515
|
SpacesServiceImpl,
|
|
5527
5516
|
TrustedKeySetAuthVerifier,
|
|
5528
5517
|
createAuthProvider,
|
|
5529
|
-
createDefaultModelFactory,
|
|
5530
5518
|
createDiagnostics,
|
|
5531
5519
|
createStorageObjects,
|
|
5532
5520
|
getNetworkPeers,
|
|
@@ -5540,4 +5528,4 @@ ClientServicesHost = _ts_decorate8([
|
|
|
5540
5528
|
subscribeToSpaces,
|
|
5541
5529
|
subscribeToSwarmInfo
|
|
5542
5530
|
});
|
|
5543
|
-
//# sourceMappingURL=chunk-
|
|
5531
|
+
//# sourceMappingURL=chunk-TKR6CKUB.cjs.map
|