@dxos/client-services 0.6.4 → 0.6.5-staging.435ed25
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-GB7WWT66.mjs → chunk-DSH22AVR.mjs} +6 -5
- package/dist/lib/browser/chunk-DSH22AVR.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{packlets/testing → testing}/index.mjs +1 -1
- package/dist/lib/browser/{packlets/testing → testing}/index.mjs.map +1 -1
- package/dist/lib/node/{chunk-6XNQ7GM4.cjs → chunk-RRNREEUV.cjs} +9 -8
- package/dist/lib/node/chunk-RRNREEUV.cjs.map +7 -0
- package/dist/lib/node/index.cjs +44 -44
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{packlets/testing → testing}/index.cjs +8 -8
- package/dist/lib/node/{packlets/testing → testing}/index.cjs.map +1 -1
- package/dist/types/src/packlets/identity/identity-service.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/version.d.ts +1 -1
- package/dist/types/src/version.d.ts.map +1 -1
- package/package.json +59 -38
- package/src/packlets/identity/identity-service.ts +1 -0
- package/src/testing/index.ts +5 -0
- package/src/version.ts +1 -5
- package/dist/lib/browser/chunk-GB7WWT66.mjs.map +0 -7
- package/dist/lib/node/chunk-6XNQ7GM4.cjs.map +0 -7
- package/testing.d.ts +0 -11
- package/testing.js +0 -5
|
@@ -30,7 +30,7 @@ __export(testing_exports, {
|
|
|
30
30
|
sanitizeInvitation: () => sanitizeInvitation
|
|
31
31
|
});
|
|
32
32
|
module.exports = __toCommonJS(testing_exports);
|
|
33
|
-
var
|
|
33
|
+
var import_chunk_RRNREEUV = require("../chunk-RRNREEUV.cjs");
|
|
34
34
|
var import_credentials = require("@dxos/credentials");
|
|
35
35
|
var import_keys = require("@dxos/keys");
|
|
36
36
|
var import_async = require("@dxos/async");
|
|
@@ -227,7 +227,7 @@ var createInvitation = async (host, options) => {
|
|
|
227
227
|
authMethod: import_services.Invitation.AuthMethod.NONE,
|
|
228
228
|
...options ?? {}
|
|
229
229
|
};
|
|
230
|
-
if (host instanceof
|
|
230
|
+
if (host instanceof import_chunk_RRNREEUV.ServiceContext) {
|
|
231
231
|
return host.invitationsManager.createInvitation({
|
|
232
232
|
kind: import_services.Invitation.Kind.SPACE,
|
|
233
233
|
...options
|
|
@@ -237,7 +237,7 @@ var createInvitation = async (host, options) => {
|
|
|
237
237
|
};
|
|
238
238
|
var acceptInvitation = (guest, invitation, guestDeviceProfile) => {
|
|
239
239
|
invitation = sanitizeInvitation(invitation);
|
|
240
|
-
if (guest instanceof
|
|
240
|
+
if (guest instanceof import_chunk_RRNREEUV.ServiceContext) {
|
|
241
241
|
return guest.invitationsManager.acceptInvitation({
|
|
242
242
|
invitation,
|
|
243
243
|
deviceProfile: guestDeviceProfile
|
|
@@ -247,7 +247,7 @@ var acceptInvitation = (guest, invitation, guestDeviceProfile) => {
|
|
|
247
247
|
};
|
|
248
248
|
var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/testing/test-builder.ts";
|
|
249
249
|
var createServiceHost = (config, signalManagerContext) => {
|
|
250
|
-
return new
|
|
250
|
+
return new import_chunk_RRNREEUV.ClientServicesHost({
|
|
251
251
|
config,
|
|
252
252
|
signalManager: new import_messaging.MemorySignalManager(signalManagerContext),
|
|
253
253
|
transportFactory: import_network_manager.MemoryTransportFactory
|
|
@@ -263,7 +263,7 @@ var createServiceContext = async ({ signalContext = new import_messaging.MemoryS
|
|
|
263
263
|
});
|
|
264
264
|
const level = (0, import_testing.createTestLevel)();
|
|
265
265
|
await level.open();
|
|
266
|
-
return new
|
|
266
|
+
return new import_chunk_RRNREEUV.ServiceContext(storage, level, networkManager, signalManager, {
|
|
267
267
|
invitationConnectionDefaultParams: {
|
|
268
268
|
controlHeartbeatInterval: 200
|
|
269
269
|
},
|
|
@@ -370,12 +370,12 @@ var TestPeer = class {
|
|
|
370
370
|
});
|
|
371
371
|
}
|
|
372
372
|
get dataSpaceManager() {
|
|
373
|
-
return this._props.dataSpaceManager ??= new
|
|
373
|
+
return this._props.dataSpaceManager ??= new import_chunk_RRNREEUV.DataSpaceManager(this.spaceManager, this.metadataStore, this.keyring, this.identity, this.feedStore, this.echoHost, this.invitationsManager, this._opts.dataSpaceParams);
|
|
374
374
|
}
|
|
375
375
|
get invitationsManager() {
|
|
376
|
-
return this._props.invitationsManager ??= new
|
|
376
|
+
return this._props.invitationsManager ??= new import_chunk_RRNREEUV.InvitationsManager(new import_chunk_RRNREEUV.InvitationsHandler(this.networkManager), (invitation) => {
|
|
377
377
|
if (invitation.kind === import_services2.Invitation.Kind.SPACE) {
|
|
378
|
-
return new
|
|
378
|
+
return new import_chunk_RRNREEUV.SpaceInvitationProtocol(this.dataSpaceManager, this.identity, this.keyring, invitation.spaceKey);
|
|
379
379
|
} else {
|
|
380
380
|
throw new Error("not implemented");
|
|
381
381
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../src/packlets/testing/credential-utils.ts", "../../../../src/packlets/testing/invitation-utils.ts", "../../../../src/packlets/testing/test-builder.ts"],
|
|
4
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 codeInputDelay?: number;\n};\n\nexport type Result = { invitation?: Invitation; error?: Error };\n\nexport const performInvitation = ({\n host,\n guest,\n options,\n hooks,\n guestDeviceProfile,\n codeInputDelay,\n}: PerformInvitationParams): [Promise<Result>, Promise<Result>] => {\n let guestError = false;\n let guestConnected = false;\n const hostComplete = new Trigger<Result>();\n const guestComplete = new Trigger<Result>();\n const authCode = new Trigger<string>();\n\n void createInvitation(host, options).then((hostObservable) => {\n hostObservable.subscribe(\n async (hostInvitation: Invitation) => {\n switch (hostInvitation.state) {\n case Invitation.State.CONNECTING: {\n if (guestConnected) {\n break;\n }\n guestConnected = true;\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 const code = await authCode.wait();\n if (codeInputDelay == null) {\n await guestObservable.authenticate(code);\n } else {\n setTimeout(async () => {\n if (!guestError) {\n await guestObservable.authenticate(code);\n }\n }, codeInputDelay);\n }\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 guestError = true;\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\n return [hostComplete.wait(), guestComplete.wait()];\n};\n\nconst createInvitation = async (\n host: ServiceContext | InvitationHost,\n options?: Partial<Invitation>,\n): Promise<CancellableInvitation> => {\n options ??= {\n authMethod: Invitation.AuthMethod.NONE,\n ...(options ?? {}),\n };\n\n if (host instanceof ServiceContext) {\n return host.invitationsManager.createInvitation({\n kind: Invitation.Kind.SPACE,\n ...options,\n });\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 return guest.invitationsManager.acceptInvitation({\n invitation,\n deviceProfile: guestDeviceProfile,\n });\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 { EchoHost } from '@dxos/echo-db';\nimport { MetadataStore, SnapshotStore, SpaceManager, valueEncoding } from '@dxos/echo-pipeline';\nimport { FeedFactory, FeedStore } from '@dxos/feed-store';\nimport { Keyring } from '@dxos/keyring';\nimport { type LevelDB } from '@dxos/kv-store';\nimport { createTestLevel } from '@dxos/kv-store/testing';\nimport { MemorySignalManager, MemorySignalManagerContext } from '@dxos/messaging';\nimport { MemoryTransportFactory, SwarmNetworkManager } from '@dxos/network-manager';\nimport { Invitation } from '@dxos/protocols/proto/dxos/client/services';\nimport { createStorage, StorageType, type Storage } from '@dxos/random-access-storage';\nimport { BlobStore } from '@dxos/teleport-extension-object-sync';\n\nimport { InvitationsHandler, InvitationsManager, SpaceInvitationProtocol } from '../invitations';\nimport { ClientServicesHost, ServiceContext, type ServiceContextRuntimeParams } from '../services';\nimport { DataSpaceManager, type DataSpaceManagerRuntimeParams, 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 = async ({\n signalContext = new MemorySignalManagerContext(),\n storage = createStorage({ type: StorageType.RAM }),\n runtimeParams,\n}: {\n signalContext?: MemorySignalManagerContext;\n storage?: Storage;\n runtimeParams?: ServiceContextRuntimeParams;\n} = {}) => {\n const signalManager = new MemorySignalManager(signalContext);\n const networkManager = new SwarmNetworkManager({\n signalManager,\n transportFactory: MemoryTransportFactory,\n });\n const level = createTestLevel();\n await level.open();\n\n return new ServiceContext(storage, level, networkManager, signalManager, {\n invitationConnectionDefaultParams: { controlHeartbeatInterval: 200 },\n ...runtimeParams,\n });\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 = await 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 dataSpaceParams?: DataSpaceManagerRuntimeParams;\n};\n\nexport type TestPeerProps = {\n storage?: Storage;\n level?: LevelDB;\n feedStore?: FeedStore<any>;\n metadataStore?: MetadataStore;\n keyring?: Keyring;\n networkManager?: SwarmNetworkManager;\n spaceManager?: SpaceManager;\n dataSpaceManager?: DataSpaceManager;\n snapshotStore?: SnapshotStore;\n signingContext?: SigningContext;\n blobStore?: BlobStore;\n echoHost?: EchoHost;\n invitationsManager?: InvitationsManager;\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 level() {\n return (this._props.level ??= createTestLevel());\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 SwarmNetworkManager({\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 echoHost() {\n return (this._props.echoHost ??= new EchoHost({ kv: this.level }));\n }\n\n get dataSpaceManager(): 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.echoHost,\n this.invitationsManager,\n this._opts.dataSpaceParams,\n ));\n }\n\n get invitationsManager() {\n return (this._props.invitationsManager ??= new InvitationsManager(\n new InvitationsHandler(this.networkManager),\n (invitation) => {\n if (invitation.kind === Invitation.Kind.SPACE) {\n return new SpaceInvitationProtocol(this.dataSpaceManager, this.identity!, this.keyring, invitation.spaceKey!);\n } else {\n throw new Error('not implemented');\n }\n },\n this.metadataStore,\n ));\n }\n\n async createIdentity() {\n this._props.signingContext ??= await createSigningContext(this.keyring);\n }\n\n async destroy() {\n await this.level.close();\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
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,yBAAiC;AAEjC,kBAA0B;ACF1B,mBAAwB;AACxB,6BAA6F;AAC7F,uBAA0B;AAC1B,sBAA2B;AC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uB,IAAIiF,yCAC7C,IAAIC,yCAAmB,KAAK1D,cAAc,GAC1C,CAAChF,eAAAA;AACC,UAAIA,WAAWyD,SAASlC,iBAAAA,WAAWmC,KAAKC,OAAO;AAC7C,eAAO,IAAIgF,8CAAwB,KAAKL,kBAAkB,KAAKN,UAAW,KAAKlB,SAAS9G,WAAW4I,QAAQ;MAC7G,OAAO;AACL,cAAM,IAAIC,MAAM,iBAAA;MAClB;IACF,GACA,KAAKrB,aAAa;EAEtB;EAEA,MAAMzB,iBAAiB;AACrB,SAAKa,OAAOqB,mBAAmB,MAAMa,qBAAqB,KAAKhC,OAAO;EACxE;EAEA,MAAMR,UAAU;AACd,UAAM,KAAKpB,MAAM6D,MAAK;AACtB,UAAM,KAAKrE,QAAQsE,MAAK;EAC1B;AACF;AAEO,IAAMF,uBAAuB,OAAOhC,YAAAA;AACzC,QAAMmC,cAAc,MAAMnC,QAAQoC,UAAS;AAC3C,QAAMC,YAAY,MAAMrC,QAAQoC,UAAS;AAEzC,SAAO;IACLD;IACAE;IACAC,sBAAkBC,qDAChBvC,SACA;MACEwC,YAAY,MAAM,IAAIC,wCAAoBzC,SAASmC,aAAaE,SAAAA,EAAWK,0BAA0BL,SAAAA;IACvG,GACAA,SAAAA;IAEFM,kBAAkB,YAAA;IAAa;IAC/BC,YAAY,MAAMC;EACpB;AACF;",
|
|
6
6
|
"names": ["import_credentials", "import_services", "createMockCredential", "signer", "issuer", "createCredential", "subject", "PublicKey", "Buffer", "from", "assertion", "payload", "value", "sanitizeInvitation", "invitation", "InvitationEncoder", "decode", "encode", "performInvitation", "host", "guest", "options", "hooks", "guestDeviceProfile", "codeInputDelay", "guestError", "guestConnected", "hostComplete", "Trigger", "guestComplete", "authCode", "createInvitation", "then", "hostObservable", "subscribe", "hostInvitation", "state", "Invitation", "State", "CONNECTING", "onConnecting", "guestObservable", "acceptInvitation", "guestInvitation", "invariant", "swarmKey", "equals", "CONNECTED", "onConnected", "READY_FOR_AUTHENTICATION", "onReady", "code", "wait", "authenticate", "setTimeout", "AUTHENTICATING", "onAuthenticating", "SUCCESS", "onSuccess", "wake", "CANCELLED", "onCancelled", "TIMEOUT", "onTimeout", "error", "onError", "authMethod", "AuthMethod", "NONE", "ServiceContext", "invitationsManager", "kind", "Kind", "SPACE", "share", "deviceProfile", "join", "createServiceHost", "config", "signalManagerContext", "ClientServicesHost", "signalManager", "MemorySignalManager", "transportFactory", "MemoryTransportFactory", "createServiceContext", "signalContext", "MemorySignalManagerContext", "storage", "createStorage", "type", "StorageType", "RAM", "runtimeParams", "networkManager", "SwarmNetworkManager", "level", "createTestLevel", "open", "invitationConnectionDefaultParams", "controlHeartbeatInterval", "createPeers", "numPeers", "Promise", "all", "Array", "map", "peer", "Context", "createIdentity", "TestBuilder", "_ctx", "createPeer", "peerOptions", "TestPeer", "onDispose", "destroy", "dispose", "constructor", "_signalContext", "_opts", "dataStore", "_props", "props", "keyring", "Keyring", "createDirectory", "feedStore", "FeedStore", "factory", "FeedFactory", "root", "hypercore", "valueEncoding", "metadataStore", "MetadataStore", "blobStore", "BlobStore", "snapshotStore", "SnapshotStore", "spaceManager", "SpaceManager", "identity", "signingContext", "failUndefined", "echoHost", "EchoHost", "kv", "dataSpaceManager", "DataSpaceManager", "dataSpaceParams", "InvitationsManager", "InvitationsHandler", "SpaceInvitationProtocol", "spaceKey", "Error", "createSigningContext", "close", "reset", "identityKey", "createKey", "deviceKey", "credentialSigner", "createCredentialSignerWithChain", "credential", "CredentialGenerator", "createDeviceAuthorization", "recordCredential", "getProfile", "undefined"]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity-service.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/identity/identity-service.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAIzC,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AAE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AAqB,GAAG,OAAO,CAAC,aAAa,CAAC;YAO9D,mBAAmB;IAO3B,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,aAAa,CAAC;IAI9E,aAAa,IAAI,MAAM,CAAC,qBAAqB,CAAC;IAS9C,OAAO,CAAC,YAAY;IAYd,aAAa,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,aAAa,CAAC;IAQ/D,gBAAgB,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,uBAAuB,GAAG,OAAO,CAAC,YAAY,CAAC;YAYjF,+BAA+B;CA6C9C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/testing/index.ts"],"names":[],"mappings":"AAIA,cAAc,qBAAqB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const DXOS_VERSION = "0.6.
|
|
1
|
+
export declare const DXOS_VERSION = "0.6.5-staging.435ed25";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/version.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,0BAA0B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,20 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/client-services",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.5-staging.435ed25",
|
|
4
4
|
"description": "DXOS client services implementation",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"author": "DXOS.org",
|
|
9
|
-
"
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"browser": "./dist/lib/browser/index.mjs",
|
|
12
|
+
"node": {
|
|
13
|
+
"default": "./dist/lib/node/index.cjs"
|
|
14
|
+
},
|
|
15
|
+
"types": "./dist/types/src/index.d.ts"
|
|
16
|
+
},
|
|
17
|
+
"./testing": {
|
|
18
|
+
"browser": "./dist/lib/browser/testing/index.mjs",
|
|
19
|
+
"node": {
|
|
20
|
+
"default": "./dist/lib/node/testing/index.cjs"
|
|
21
|
+
},
|
|
22
|
+
"types": "./dist/types/src/testing/index.d.ts"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
10
25
|
"browser": {
|
|
11
26
|
"jsondown": false,
|
|
12
27
|
"./src/packlets/locks/node.ts": "./src/packlets/locks/browser.ts",
|
|
13
28
|
"./src/packlets/diagnostics/diagnostics-broadcast.ts": "./src/packlets/diagnostics/browser-diagnostics-broadcast.ts",
|
|
14
|
-
"./dist/lib/node/index.cjs": "./dist/lib/browser/index.mjs",
|
|
15
29
|
"./testing.js": "./dist/lib/browser/packlets/testing/index.mjs"
|
|
16
30
|
},
|
|
17
31
|
"types": "dist/types/src/index.d.ts",
|
|
32
|
+
"typesVersions": {
|
|
33
|
+
"*": {
|
|
34
|
+
"testing": [
|
|
35
|
+
"dist/types/src/testing/index.d.ts"
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
},
|
|
18
39
|
"files": [
|
|
19
40
|
"testing.d.ts",
|
|
20
41
|
"testing.js",
|
|
@@ -23,45 +44,45 @@
|
|
|
23
44
|
],
|
|
24
45
|
"dependencies": {
|
|
25
46
|
"platform": "^1.3.6",
|
|
26
|
-
"@dxos/async": "0.6.
|
|
27
|
-
"@dxos/
|
|
28
|
-
"@dxos/
|
|
29
|
-
"@dxos/
|
|
30
|
-
"@dxos/
|
|
31
|
-
"@dxos/
|
|
32
|
-
"@dxos/
|
|
33
|
-
"@dxos/
|
|
34
|
-
"@dxos/
|
|
35
|
-
"@dxos/echo-
|
|
36
|
-
"@dxos/echo-
|
|
37
|
-
"@dxos/echo-
|
|
38
|
-
"@dxos/echo-
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/keys": "0.6.
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/lock-file": "0.6.
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/network-manager": "0.6.
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/teleport": "0.6.
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/teleport-extension-gossip": "0.6.
|
|
55
|
-
"@dxos/teleport-extension-object-sync": "0.6.
|
|
56
|
-
"@dxos/timeframe": "0.6.
|
|
57
|
-
"@dxos/tracing": "0.6.
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/
|
|
47
|
+
"@dxos/async": "0.6.5-staging.435ed25",
|
|
48
|
+
"@dxos/client-protocol": "0.6.5-staging.435ed25",
|
|
49
|
+
"@dxos/config": "0.6.5-staging.435ed25",
|
|
50
|
+
"@dxos/automerge": "0.6.5-staging.435ed25",
|
|
51
|
+
"@dxos/context": "0.6.5-staging.435ed25",
|
|
52
|
+
"@dxos/crypto": "0.6.5-staging.435ed25",
|
|
53
|
+
"@dxos/credentials": "0.6.5-staging.435ed25",
|
|
54
|
+
"@dxos/debug": "0.6.5-staging.435ed25",
|
|
55
|
+
"@dxos/feed-store": "0.6.5-staging.435ed25",
|
|
56
|
+
"@dxos/echo-pipeline": "0.6.5-staging.435ed25",
|
|
57
|
+
"@dxos/echo-db": "0.6.5-staging.435ed25",
|
|
58
|
+
"@dxos/echo-schema": "0.6.5-staging.435ed25",
|
|
59
|
+
"@dxos/echo-protocol": "0.6.5-staging.435ed25",
|
|
60
|
+
"@dxos/invariant": "0.6.5-staging.435ed25",
|
|
61
|
+
"@dxos/indexing": "0.6.5-staging.435ed25",
|
|
62
|
+
"@dxos/kv-store": "0.6.5-staging.435ed25",
|
|
63
|
+
"@dxos/keyring": "0.6.5-staging.435ed25",
|
|
64
|
+
"@dxos/keys": "0.6.5-staging.435ed25",
|
|
65
|
+
"@dxos/log": "0.6.5-staging.435ed25",
|
|
66
|
+
"@dxos/lock-file": "0.6.5-staging.435ed25",
|
|
67
|
+
"@dxos/messaging": "0.6.5-staging.435ed25",
|
|
68
|
+
"@dxos/network-manager": "0.6.5-staging.435ed25",
|
|
69
|
+
"@dxos/node-std": "0.6.5-staging.435ed25",
|
|
70
|
+
"@dxos/protocols": "0.6.5-staging.435ed25",
|
|
71
|
+
"@dxos/random-access-storage": "0.6.5-staging.435ed25",
|
|
72
|
+
"@dxos/rpc": "0.6.5-staging.435ed25",
|
|
73
|
+
"@dxos/teleport": "0.6.5-staging.435ed25",
|
|
74
|
+
"@dxos/codec-protobuf": "0.6.5-staging.435ed25",
|
|
75
|
+
"@dxos/teleport-extension-gossip": "0.6.5-staging.435ed25",
|
|
76
|
+
"@dxos/teleport-extension-object-sync": "0.6.5-staging.435ed25",
|
|
77
|
+
"@dxos/timeframe": "0.6.5-staging.435ed25",
|
|
78
|
+
"@dxos/tracing": "0.6.5-staging.435ed25",
|
|
79
|
+
"@dxos/websocket-rpc": "0.6.5-staging.435ed25",
|
|
80
|
+
"@dxos/util": "0.6.5-staging.435ed25"
|
|
60
81
|
},
|
|
61
82
|
"devDependencies": {
|
|
62
83
|
"@types/platform": "^1.3.4",
|
|
63
84
|
"@types/readable-stream": "^2.3.9",
|
|
64
|
-
"@dxos/signal": "0.6.
|
|
85
|
+
"@dxos/signal": "0.6.5-staging.435ed25"
|
|
65
86
|
},
|
|
66
87
|
"publishConfig": {
|
|
67
88
|
"access": "public"
|
|
@@ -92,6 +92,7 @@ export class IdentityServiceImpl extends Resource implements IdentityService {
|
|
|
92
92
|
return this._getIdentity()!;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
// TODO(burdon): Rename createPresentation?
|
|
95
96
|
async signPresentation({ presentation, nonce }: SignPresentationRequest): Promise<Presentation> {
|
|
96
97
|
invariant(this._identityManager.identity, 'Identity not initialized.');
|
|
97
98
|
|
package/src/version.ts
CHANGED