From e7d17405b17a445c36250469061403cef65e1e5b Mon Sep 17 00:00:00 2001 From: ThetaSinner Date: Sat, 27 Apr 2024 00:07:21 +0100 Subject: [PATCH 1/2] Bump the JS client to 0.17-12 --- .github/workflows/test.yml | 2 +- CHANGELOG.md | 5 +- docs/tryorama.adminapiresponse.md | 4 +- docs/tryorama.conductor.connectappagentws.md | 71 ------------------- docs/tryorama.conductor.connectappws.md | 18 ++++- docs/tryorama.conductor.md | 16 +---- docs/tryorama.createtrycpconductor.md | 2 +- docs/tryorama.enableandgetagentapp.md | 4 +- docs/tryorama.getcallablecell.md | 4 +- docs/tryorama.iappagentwebsocket.md | 13 ---- docs/tryorama.iappwebsocket.md | 2 +- docs/tryorama.iconductor.connectappagentws.md | 11 --- docs/tryorama.iconductor.connectappws.md | 2 +- docs/tryorama.iconductor.md | 19 +---- docs/tryorama.iplayer.appagentws.md | 11 --- docs/tryorama.iplayer.md | 4 +- docs/tryorama.md | 21 +++--- ...orama.requestadmininterfacemessage.data.md | 2 +- docs/tryorama.requestadmininterfacemessage.md | 2 +- ...yorama.requestadmininterfacemessagetype.md | 19 +++++ docs/tryorama.requestappinfo.data.md | 13 ---- docs/tryorama.requestappinfo.md | 17 ----- docs/tryorama.requestconnectappinterface.md | 17 +++++ docs/tryorama.trycpconductor.adminws.md | 5 +- ...yorama.trycpconductor.connectappagentws.md | 70 ------------------ ...rama.trycpconductor.connectappinterface.md | 16 ++++- docs/tryorama.trycpconductor.connectappws.md | 20 +++++- ...yorama.trycpconductor.installagentsapps.md | 4 +- docs/tryorama.trycpconductor.installapp.md | 4 +- docs/tryorama.trycpconductor.md | 16 +---- flake.lock | 20 +++--- package-lock.json | 12 ++-- package.json | 4 +- ts/src/trycp/types.ts | 3 + ts/test/local/scenario.ts | 1 - 35 files changed, 145 insertions(+), 309 deletions(-) delete mode 100644 docs/tryorama.conductor.connectappagentws.md delete mode 100644 docs/tryorama.iappagentwebsocket.md delete mode 100644 docs/tryorama.iconductor.connectappagentws.md delete mode 100644 docs/tryorama.iplayer.appagentws.md delete mode 100644 docs/tryorama.requestappinfo.data.md delete mode 100644 docs/tryorama.trycpconductor.connectappagentws.md diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 550f733d..6095d275 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -70,7 +70,7 @@ jobs: run: nix develop -c $SHELL -c "npm ci" - name: Run tests - run: nix develop --override-input versions/holochain "github:holochain/holochain/holochain-0.3.0-beta-dev.48" -c $SHELL -c "npm t" + run: nix develop -c $SHELL -c "npm t" - name: Setup tmate session if build or test run failed if: ${{ failure() }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 23911b6b..31cea2e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,11 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Changed ### Fixed -## 2024-04-26: v0.16.0-dev.4 +## 2024-04-27: v0.16.0-dev.5 +### Changed +- Update the version of the JS client to v0.17.0-dev.12. +## 2024-04-26: v0.16.0-dev.4 ### Changed - **BREAKING** Integrated the updated JS client which adds app websocket authentication and merges the `AppAgentWebsocket` with the `AppWebsocket`. This affects tests when opening app websockets directly but using the 'players' API, this detail diff --git a/docs/tryorama.adminapiresponse.md b/docs/tryorama.adminapiresponse.md index e491efdd..99b7917f 100644 --- a/docs/tryorama.adminapiresponse.md +++ b/docs/tryorama.adminapiresponse.md @@ -9,7 +9,7 @@ All possible responses from the Admin API. **Signature:** ```typescript -export type AdminApiResponse = AdminApiResponseAgentInfo | AdminApiResponseAgentInfoAdded | AdminApiResponseAgentPubKeyGenerated | AdminApiResponseAppDisabled | AdminApiResponseAppEnabled | AdminApiResponseAppInstalled | AdminApiResponseAppInterfaceAttached | AdminApiResponseAppInterfacesListed | AdminApiResponseAppStarted | AdminApiResponseAppUninstalled | AdminApiResponseAppsListed | AdminApiResponseCellIdsListed | AdminApiResponseCloneCellDeleted | AdminApiResponseCoordinatorsUpdated | AdminApiResponseDnasDefinitionReturned | AdminApiResponseDnasListed | AdminApiResponseDnaRegistered | AdminApiResponseFullStateDumped | AdminApiResponseNetworkStatsDumped | AdminApiResponseStateDumped | AdminApiResponseStorageInfo | AdminApiResponseZomeCallCapabilityGranted; +export type AdminApiResponse = AdminApiResponseAgentInfo | AdminApiResponseAgentInfoAdded | AdminApiResponseAgentPubKeyGenerated | AdminApiResponseAppDisabled | AdminApiResponseAppEnabled | AdminApiResponseAppInstalled | AdminApiResponseAppInterfaceAttached | AdminApiResponseAppInterfacesListed | AdminApiResponseAppStarted | AdminApiResponseAppUninstalled | AdminApiResponseAppsListed | AdminApiResponseCellIdsListed | AdminApiResponseCloneCellDeleted | AdminApiResponseCoordinatorsUpdated | AdminApiResponseDnasDefinitionReturned | AdminApiResponseDnasListed | AdminApiResponseDnaRegistered | AdminApiResponseFullStateDumped | AdminApiResponseNetworkStatsDumped | AdminApiResponseStateDumped | AdminApiResponseStorageInfo | AdminApiResponseAppAuthenticationTokenIssued | AdminApiResponseZomeCallCapabilityGranted; ``` -**References:** [AdminApiResponseAgentInfo](./tryorama.adminapiresponseagentinfo.md), [AdminApiResponseAgentInfoAdded](./tryorama.adminapiresponseagentinfoadded.md), [AdminApiResponseAgentPubKeyGenerated](./tryorama.adminapiresponseagentpubkeygenerated.md), [AdminApiResponseAppDisabled](./tryorama.adminapiresponseappdisabled.md), [AdminApiResponseAppEnabled](./tryorama.adminapiresponseappenabled.md), [AdminApiResponseAppInstalled](./tryorama.adminapiresponseappinstalled.md), [AdminApiResponseAppInterfaceAttached](./tryorama.adminapiresponseappinterfaceattached.md), [AdminApiResponseAppInterfacesListed](./tryorama.adminapiresponseappinterfaceslisted.md), [AdminApiResponseAppStarted](./tryorama.adminapiresponseappstarted.md), [AdminApiResponseAppUninstalled](./tryorama.adminapiresponseappuninstalled.md), [AdminApiResponseAppsListed](./tryorama.adminapiresponseappslisted.md), [AdminApiResponseCellIdsListed](./tryorama.adminapiresponsecellidslisted.md), [AdminApiResponseCloneCellDeleted](./tryorama.adminapiresponseclonecelldeleted.md), [AdminApiResponseCoordinatorsUpdated](./tryorama.adminapiresponsecoordinatorsupdated.md), [AdminApiResponseDnasDefinitionReturned](./tryorama.adminapiresponsednasdefinitionreturned.md), [AdminApiResponseDnasListed](./tryorama.adminapiresponsednaslisted.md), [AdminApiResponseDnaRegistered](./tryorama.adminapiresponsednaregistered.md), [AdminApiResponseFullStateDumped](./tryorama.adminapiresponsefullstatedumped.md), [AdminApiResponseNetworkStatsDumped](./tryorama.adminapiresponsenetworkstatsdumped.md), [AdminApiResponseStateDumped](./tryorama.adminapiresponsestatedumped.md), [AdminApiResponseStorageInfo](./tryorama.adminapiresponsestorageinfo.md), [AdminApiResponseZomeCallCapabilityGranted](./tryorama.adminapiresponsezomecallcapabilitygranted.md) +**References:** [AdminApiResponseAgentInfo](./tryorama.adminapiresponseagentinfo.md), [AdminApiResponseAgentInfoAdded](./tryorama.adminapiresponseagentinfoadded.md), [AdminApiResponseAgentPubKeyGenerated](./tryorama.adminapiresponseagentpubkeygenerated.md), [AdminApiResponseAppDisabled](./tryorama.adminapiresponseappdisabled.md), [AdminApiResponseAppEnabled](./tryorama.adminapiresponseappenabled.md), [AdminApiResponseAppInstalled](./tryorama.adminapiresponseappinstalled.md), [AdminApiResponseAppInterfaceAttached](./tryorama.adminapiresponseappinterfaceattached.md), [AdminApiResponseAppInterfacesListed](./tryorama.adminapiresponseappinterfaceslisted.md), [AdminApiResponseAppStarted](./tryorama.adminapiresponseappstarted.md), [AdminApiResponseAppUninstalled](./tryorama.adminapiresponseappuninstalled.md), [AdminApiResponseAppsListed](./tryorama.adminapiresponseappslisted.md), [AdminApiResponseCellIdsListed](./tryorama.adminapiresponsecellidslisted.md), [AdminApiResponseCloneCellDeleted](./tryorama.adminapiresponseclonecelldeleted.md), [AdminApiResponseCoordinatorsUpdated](./tryorama.adminapiresponsecoordinatorsupdated.md), [AdminApiResponseDnasDefinitionReturned](./tryorama.adminapiresponsednasdefinitionreturned.md), [AdminApiResponseDnasListed](./tryorama.adminapiresponsednaslisted.md), [AdminApiResponseDnaRegistered](./tryorama.adminapiresponsednaregistered.md), [AdminApiResponseFullStateDumped](./tryorama.adminapiresponsefullstatedumped.md), [AdminApiResponseNetworkStatsDumped](./tryorama.adminapiresponsenetworkstatsdumped.md), [AdminApiResponseStateDumped](./tryorama.adminapiresponsestatedumped.md), [AdminApiResponseStorageInfo](./tryorama.adminapiresponsestorageinfo.md), [AdminApiResponseAppAuthenticationTokenIssued](./tryorama.adminapiresponseappauthenticationtokenissued.md), [AdminApiResponseZomeCallCapabilityGranted](./tryorama.adminapiresponsezomecallcapabilitygranted.md) diff --git a/docs/tryorama.conductor.connectappagentws.md b/docs/tryorama.conductor.connectappagentws.md deleted file mode 100644 index d2edddd8..00000000 --- a/docs/tryorama.conductor.connectappagentws.md +++ /dev/null @@ -1,71 +0,0 @@ - - -[Home](./index.md) > [@holochain/tryorama](./tryorama.md) > [Conductor](./tryorama.conductor.md) > [connectAppAgentWs](./tryorama.conductor.connectappagentws.md) - -## Conductor.connectAppAgentWs() method - -Connect a web socket for a specific app and agent to the App API, - -**Signature:** - -```typescript -connectAppAgentWs(port: number, appId: string): Promise; -``` - -## Parameters - - - - -
- -Parameter - - - - -Type - - - - -Description - - -
- -port - - - - -number - - - - -The websocket port to connect to. - - -
- -appId - - - - -string - - - - -The app id to make requests to. - - -
-**Returns:** - -Promise<AppAgentWebsocket> - -An app agent websocket. - diff --git a/docs/tryorama.conductor.connectappws.md b/docs/tryorama.conductor.connectappws.md index 56401c28..71a5b1be 100644 --- a/docs/tryorama.conductor.connectappws.md +++ b/docs/tryorama.conductor.connectappws.md @@ -9,7 +9,7 @@ Connect a web socket to the App API, **Signature:** ```typescript -connectAppWs(port: number): Promise; +connectAppWs(token: AppAuthenticationToken, port: number): Promise; ``` ## Parameters @@ -32,6 +32,22 @@ Description +token + + + + +AppAuthenticationToken + + + + +A token to authenticate the connection. + + + + + port diff --git a/docs/tryorama.conductor.md b/docs/tryorama.conductor.md index 595a41a8..0ca0c160 100644 --- a/docs/tryorama.conductor.md +++ b/docs/tryorama.conductor.md @@ -61,21 +61,7 @@ Attach a web socket to the App API. -[connectAppAgentWs(port, appId)](./tryorama.conductor.connectappagentws.md) - - - - - - - -Connect a web socket for a specific app and agent to the App API, - - - - - -[connectAppWs(port)](./tryorama.conductor.connectappws.md) +[connectAppWs(token, port)](./tryorama.conductor.connectappws.md) diff --git a/docs/tryorama.createtrycpconductor.md b/docs/tryorama.createtrycpconductor.md index 1ebed896..7bfb0ce7 100644 --- a/docs/tryorama.createtrycpconductor.md +++ b/docs/tryorama.createtrycpconductor.md @@ -58,7 +58,7 @@ options -_(Optional)_ +_(Optional)_ Options to configure how the conductor will be started and run. diff --git a/docs/tryorama.enableandgetagentapp.md b/docs/tryorama.enableandgetagentapp.md index d3f4e0ce..2e5b5e43 100644 --- a/docs/tryorama.enableandgetagentapp.md +++ b/docs/tryorama.enableandgetagentapp.md @@ -9,7 +9,7 @@ Enable an app and build an agent app object. **Signature:** ```typescript -enableAndGetAgentApp: (adminWs: IAdminWebsocket, appWs: IAppWebsocket | IAppAgentWebsocket, appInfo: AppInfo) => Promise +enableAndGetAgentApp: (adminWs: IAdminWebsocket, appWs: IAppWebsocket, appInfo: AppInfo) => Promise ``` ## Parameters @@ -53,7 +53,7 @@ appWs -[IAppWebsocket](./tryorama.iappwebsocket.md) \| [IAppAgentWebsocket](./tryorama.iappagentwebsocket.md) +[IAppWebsocket](./tryorama.iappwebsocket.md) diff --git a/docs/tryorama.getcallablecell.md b/docs/tryorama.getcallablecell.md index 094c097e..7da7d6fa 100644 --- a/docs/tryorama.getcallablecell.md +++ b/docs/tryorama.getcallablecell.md @@ -9,7 +9,7 @@ Create curried version of `callZome` function for a specific cell. **Signature:** ```typescript -getCallableCell: (appWs: IAppWebsocket | IAppAgentWebsocket, cell: ClonedCell | ProvisionedCell) => { +getCallableCell: (appWs: IAppWebsocket, cell: ClonedCell | ProvisionedCell) => { callZome: (request: CellZomeCallRequest, timeout?: number) => Promise; cell_id: import("@holochain/client").CellId; clone_id: string; @@ -50,7 +50,7 @@ appWs -[IAppWebsocket](./tryorama.iappwebsocket.md) \| [IAppAgentWebsocket](./tryorama.iappagentwebsocket.md) +[IAppWebsocket](./tryorama.iappwebsocket.md) diff --git a/docs/tryorama.iappagentwebsocket.md b/docs/tryorama.iappagentwebsocket.md deleted file mode 100644 index dcebb55a..00000000 --- a/docs/tryorama.iappagentwebsocket.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [@holochain/tryorama](./tryorama.md) > [IAppAgentWebsocket](./tryorama.iappagentwebsocket.md) - -## IAppAgentWebsocket type - -AppAgentWebsocket interface for local and TryCP conductors. - -**Signature:** - -```typescript -export type IAppAgentWebsocket = Pick; -``` diff --git a/docs/tryorama.iappwebsocket.md b/docs/tryorama.iappwebsocket.md index 0ded1865..8975154c 100644 --- a/docs/tryorama.iappwebsocket.md +++ b/docs/tryorama.iappwebsocket.md @@ -9,5 +9,5 @@ AppWebsocket interface for local and TryCP conductors. **Signature:** ```typescript -export type IAppWebsocket = Pick; +export type IAppWebsocket = Pick; ``` diff --git a/docs/tryorama.iconductor.connectappagentws.md b/docs/tryorama.iconductor.connectappagentws.md deleted file mode 100644 index 1c384ccb..00000000 --- a/docs/tryorama.iconductor.connectappagentws.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@holochain/tryorama](./tryorama.md) > [IConductor](./tryorama.iconductor.md) > [connectAppAgentWs](./tryorama.iconductor.connectappagentws.md) - -## IConductor.connectAppAgentWs property - -**Signature:** - -```typescript -connectAppAgentWs: (port: number, appId: InstalledAppId) => Promise; -``` diff --git a/docs/tryorama.iconductor.connectappws.md b/docs/tryorama.iconductor.connectappws.md index e36e0aac..d62465b7 100644 --- a/docs/tryorama.iconductor.connectappws.md +++ b/docs/tryorama.iconductor.connectappws.md @@ -7,5 +7,5 @@ **Signature:** ```typescript -connectAppWs: (port: number) => Promise; +connectAppWs: (token: AppAuthenticationToken, port: number) => Promise; ``` diff --git a/docs/tryorama.iconductor.md b/docs/tryorama.iconductor.md index d5c9f383..e9471994 100644 --- a/docs/tryorama.iconductor.md +++ b/docs/tryorama.iconductor.md @@ -51,23 +51,6 @@ Description - - - -[connectAppAgentWs](./tryorama.iconductor.connectappagentws.md) - - - - - - - -(port: number, appId: InstalledAppId) => Promise<[IAppAgentWebsocket](./tryorama.iappagentwebsocket.md)> - - - - - @@ -79,7 +62,7 @@ Description -(port: number) => Promise<[IAppWebsocket](./tryorama.iappwebsocket.md)> +(token: AppAuthenticationToken, port: number) => Promise<[IAppWebsocket](./tryorama.iappwebsocket.md)> diff --git a/docs/tryorama.iplayer.appagentws.md b/docs/tryorama.iplayer.appagentws.md deleted file mode 100644 index 5aa076bd..00000000 --- a/docs/tryorama.iplayer.appagentws.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@holochain/tryorama](./tryorama.md) > [IPlayer](./tryorama.iplayer.md) > [appAgentWs](./tryorama.iplayer.appagentws.md) - -## IPlayer.appAgentWs property - -**Signature:** - -```typescript -appAgentWs: AppAgentWebsocket | IAppAgentWebsocket; -``` diff --git a/docs/tryorama.iplayer.md b/docs/tryorama.iplayer.md index b7034dbd..dfe44842 100644 --- a/docs/tryorama.iplayer.md +++ b/docs/tryorama.iplayer.md @@ -38,7 +38,7 @@ Description -[appAgentWs](./tryorama.iplayer.appagentws.md) +[appWs](./tryorama.iplayer.appws.md) @@ -46,7 +46,7 @@ Description -AppAgentWebsocket \| [IAppAgentWebsocket](./tryorama.iappagentwebsocket.md) +AppWebsocket \| [IAppWebsocket](./tryorama.iappwebsocket.md) diff --git a/docs/tryorama.md b/docs/tryorama.md index a69ac269..ce80944c 100644 --- a/docs/tryorama.md +++ b/docs/tryorama.md @@ -345,6 +345,16 @@ Description + + + +[AdminApiResponseAppAuthenticationTokenIssued](./tryorama.adminapiresponseappauthenticationtokenissued.md) + + + + + + @@ -1138,17 +1148,6 @@ Options for using the conductor factory. AdminWebsocket interface for local and TryCP conductors. - - - -[IAppAgentWebsocket](./tryorama.iappagentwebsocket.md) - - - - -AppAgentWebsocket interface for local and TryCP conductors. - - diff --git a/docs/tryorama.requestadmininterfacemessage.data.md b/docs/tryorama.requestadmininterfacemessage.data.md index a2d7d9ec..7a9b013c 100644 --- a/docs/tryorama.requestadmininterfacemessage.data.md +++ b/docs/tryorama.requestadmininterfacemessage.data.md @@ -7,5 +7,5 @@ **Signature:** ```typescript -data?: AddAgentInfoRequest | AgentInfoRequest | AttachAppInterfaceRequest | DeleteCloneCellRequest | DisableAppRequest | DumpFullStateRequest | DumpNetworkStatsRequest | DumpStateRequest | EnableAppRequest | GetDnaDefinitionRequest | GrantZomeCallCapabilityRequest | InstallAppRequest | ListAppsRequest | RegisterDnaRequest | StartAppRequest | StorageInfoRequest | UninstallAppRequest | UpdateCoordinatorsRequest; +data?: AddAgentInfoRequest | AgentInfoRequest | AttachAppInterfaceRequest | DeleteCloneCellRequest | DisableAppRequest | DumpFullStateRequest | DumpNetworkStatsRequest | DumpStateRequest | EnableAppRequest | GetDnaDefinitionRequest | GrantZomeCallCapabilityRequest | InstallAppRequest | ListAppsRequest | RegisterDnaRequest | StartAppRequest | StorageInfoRequest | UninstallAppRequest | UpdateCoordinatorsRequest | IssueAppAuthenticationTokenRequest; ``` diff --git a/docs/tryorama.requestadmininterfacemessage.md b/docs/tryorama.requestadmininterfacemessage.md index e1fe2924..dcbdc32c 100644 --- a/docs/tryorama.requestadmininterfacemessage.md +++ b/docs/tryorama.requestadmininterfacemessage.md @@ -45,7 +45,7 @@ Description -AddAgentInfoRequest \| AgentInfoRequest \| AttachAppInterfaceRequest \| DeleteCloneCellRequest \| DisableAppRequest \| DumpFullStateRequest \| DumpNetworkStatsRequest \| DumpStateRequest \| EnableAppRequest \| GetDnaDefinitionRequest \| GrantZomeCallCapabilityRequest \| InstallAppRequest \| ListAppsRequest \| RegisterDnaRequest \| StartAppRequest \| StorageInfoRequest \| UninstallAppRequest \| UpdateCoordinatorsRequest +AddAgentInfoRequest \| AgentInfoRequest \| AttachAppInterfaceRequest \| DeleteCloneCellRequest \| DisableAppRequest \| DumpFullStateRequest \| DumpNetworkStatsRequest \| DumpStateRequest \| EnableAppRequest \| GetDnaDefinitionRequest \| GrantZomeCallCapabilityRequest \| InstallAppRequest \| ListAppsRequest \| RegisterDnaRequest \| StartAppRequest \| StorageInfoRequest \| UninstallAppRequest \| UpdateCoordinatorsRequest \| IssueAppAuthenticationTokenRequest diff --git a/docs/tryorama.requestadmininterfacemessagetype.md b/docs/tryorama.requestadmininterfacemessagetype.md index 3cb24268..e85b0dbb 100644 --- a/docs/tryorama.requestadmininterfacemessagetype.md +++ b/docs/tryorama.requestadmininterfacemessagetype.md @@ -300,6 +300,25 @@ null _(Optional)_ + + + +[issue\_app\_authentication\_token?](./tryorama.requestadmininterfacemessagetype.issue_app_authentication_token.md) + + + + + + + +null + + + + +_(Optional)_ + + diff --git a/docs/tryorama.requestappinfo.data.md b/docs/tryorama.requestappinfo.data.md deleted file mode 100644 index 93892573..00000000 --- a/docs/tryorama.requestappinfo.data.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [@holochain/tryorama](./tryorama.md) > [RequestAppInfo](./tryorama.requestappinfo.md) > [data](./tryorama.requestappinfo.data.md) - -## RequestAppInfo.data property - -**Signature:** - -```typescript -data: { - installed_app_id: string; - }; -``` diff --git a/docs/tryorama.requestappinfo.md b/docs/tryorama.requestappinfo.md index ca953bd6..6c36f831 100644 --- a/docs/tryorama.requestappinfo.md +++ b/docs/tryorama.requestappinfo.md @@ -37,23 +37,6 @@ Description -[data](./tryorama.requestappinfo.data.md) - - - - - - - -{ installed\_app\_id: string; } - - - - - - - - [type](./tryorama.requestappinfo.type.md) diff --git a/docs/tryorama.requestconnectappinterface.md b/docs/tryorama.requestconnectappinterface.md index 0a42439d..50cd8f4f 100644 --- a/docs/tryorama.requestconnectappinterface.md +++ b/docs/tryorama.requestconnectappinterface.md @@ -51,6 +51,23 @@ number + + + +[token](./tryorama.requestconnectappinterface.token.md) + + + + + + + +AppAuthenticationToken + + + + + diff --git a/docs/tryorama.trycpconductor.adminws.md b/docs/tryorama.trycpconductor.adminws.md index 186eb8f6..b3457d9d 100644 --- a/docs/tryorama.trycpconductor.adminws.md +++ b/docs/tryorama.trycpconductor.adminws.md @@ -26,7 +26,7 @@ adminWs(): { getDnaDefinition: (dnaHash: GetDnaDefinitionRequest) => Promise; grantSigningKey: (cellId: CellId, functions: GrantedFunctions, signingKey: AgentPubKey) => Promise; grantZomeCallCapability: (request: GrantZomeCallCapabilityRequest) => Promise; - installApp: (data: InstallAppRequest) => Promise; + installApp: (data: InstallAppRequest) => Promise; listAppInterfaces: () => Promise; listApps: (request: ListAppsRequest) => Promise; listCellIds: () => Promise; @@ -36,11 +36,12 @@ adminWs(): { storageInfo: (request: StorageInfoRequest) => Promise; uninstallApp: (request: UninstallAppRequest) => Promise; updateCoordinators: (request: UpdateCoordinatorsRequest) => Promise; + issueAppAuthenticationToken: (request: IssueAppAuthenticationTokenRequest) => Promise; }; ``` **Returns:** -{ addAgentInfo: (request: AddAgentInfoRequest) => Promise<void>; agentInfo: (req: AgentInfoRequest) => Promise<import("@holochain/client").AgentInfoResponse>; attachAppInterface: (request?: AttachAppInterfaceRequest) => Promise<{ port: number; }>; authorizeSigningCredentials: (cellId: CellId, functions?: GrantedFunctions) => Promise<void>; deleteCloneCell: (request: DeleteCloneCellRequest) => Promise<void>; disableApp: (request: DisableAppRequest) => Promise<null>; dumpFullState: (request: DumpFullStateRequest) => Promise<FullStateDump>; dumpNetworkStats: (request: DumpNetworkStatsRequest) => Promise<string>; dumpState: (request: DumpStateRequest) => Promise<\[FullStateDump, string\]>; enableApp: (request: EnableAppRequest) => Promise<import("@holochain/client").EnableAppResponse>; generateAgentPubKey: () => Promise<AgentPubKey>; getDnaDefinition: (dnaHash: GetDnaDefinitionRequest) => Promise<DnaDefinition>; grantSigningKey: (cellId: CellId, functions: GrantedFunctions, signingKey: AgentPubKey) => Promise<CapSecret>; grantZomeCallCapability: (request: GrantZomeCallCapabilityRequest) => Promise<void>; installApp: (data: InstallAppRequest) => Promise<AppInfo>; listAppInterfaces: () => Promise<import("@holochain/client").ListAppInterfacesResponse>; listApps: (request: ListAppsRequest) => Promise<import("@holochain/client").ListAppsResponse>; listCellIds: () => Promise<import("@holochain/client").ListCellIdsResponse>; listDnas: () => Promise<import("@holochain/client").ListDnasResponse>; registerDna: (request: RegisterDnaRequest & DnaSource) => Promise<DnaHash>; startApp: (request: StartAppRequest) => Promise<boolean>; storageInfo: (request: StorageInfoRequest) => Promise<import("@holochain/client").StorageInfo>; uninstallApp: (request: UninstallAppRequest) => Promise<null>; updateCoordinators: (request: UpdateCoordinatorsRequest) => Promise<void>; } +{ addAgentInfo: (request: AddAgentInfoRequest) => Promise<void>; agentInfo: (req: AgentInfoRequest) => Promise<import("@holochain/client").AgentInfoResponse>; attachAppInterface: (request?: AttachAppInterfaceRequest) => Promise<{ port: number; }>; authorizeSigningCredentials: (cellId: CellId, functions?: GrantedFunctions) => Promise<void>; deleteCloneCell: (request: DeleteCloneCellRequest) => Promise<void>; disableApp: (request: DisableAppRequest) => Promise<null>; dumpFullState: (request: DumpFullStateRequest) => Promise<FullStateDump>; dumpNetworkStats: (request: DumpNetworkStatsRequest) => Promise<string>; dumpState: (request: DumpStateRequest) => Promise<\[FullStateDump, string\]>; enableApp: (request: EnableAppRequest) => Promise<import("@holochain/client").EnableAppResponse>; generateAgentPubKey: () => Promise<AgentPubKey>; getDnaDefinition: (dnaHash: GetDnaDefinitionRequest) => Promise<DnaDefinition>; grantSigningKey: (cellId: CellId, functions: GrantedFunctions, signingKey: AgentPubKey) => Promise<CapSecret>; grantZomeCallCapability: (request: GrantZomeCallCapabilityRequest) => Promise<void>; installApp: (data: InstallAppRequest) => Promise<import("@holochain/client").AppInfo>; listAppInterfaces: () => Promise<import("@holochain/client").ListAppInterfacesResponse>; listApps: (request: ListAppsRequest) => Promise<import("@holochain/client").ListAppsResponse>; listCellIds: () => Promise<import("@holochain/client").ListCellIdsResponse>; listDnas: () => Promise<import("@holochain/client").ListDnasResponse>; registerDna: (request: RegisterDnaRequest & DnaSource) => Promise<DnaHash>; startApp: (request: StartAppRequest) => Promise<boolean>; storageInfo: (request: StorageInfoRequest) => Promise<import("@holochain/client").StorageInfo>; uninstallApp: (request: UninstallAppRequest) => Promise<null>; updateCoordinators: (request: UpdateCoordinatorsRequest) => Promise<void>; issueAppAuthenticationToken: (request: IssueAppAuthenticationTokenRequest) => Promise<import("@holochain/client").IssueAppAuthenticationTokenResponse>; } The Admin API web socket. diff --git a/docs/tryorama.trycpconductor.connectappagentws.md b/docs/tryorama.trycpconductor.connectappagentws.md deleted file mode 100644 index 5bd8b59d..00000000 --- a/docs/tryorama.trycpconductor.connectappagentws.md +++ /dev/null @@ -1,70 +0,0 @@ - - -[Home](./index.md) > [@holochain/tryorama](./tryorama.md) > [TryCpConductor](./tryorama.trycpconductor.md) > [connectAppAgentWs](./tryorama.trycpconductor.connectappagentws.md) - -## TryCpConductor.connectAppAgentWs() method - -**Signature:** - -```typescript -connectAppAgentWs(port: number, appId: InstalledAppId): Promise<{ - appInfo: (request: AppInfoRequest) => Promise; - callZome: (request: CallZomeRequest | CallZomeRequestSigned) => Promise; - createCloneCell: (request: CreateCloneCellRequest) => Promise; - enableCloneCell: (request: DisableCloneCellRequest) => Promise; - disableCloneCell: (request: DisableCloneCellRequest) => Promise; - networkInfo: (request: NetworkInfoRequest) => Promise; - }>; -``` - -## Parameters - - - - -
- -Parameter - - - - -Type - - - - -Description - - -
- -port - - - - -number - - - - - -
- -appId - - - - -InstalledAppId - - - - - -
-**Returns:** - -Promise<{ appInfo: (request: AppInfoRequest) => Promise<import("@holochain/client").AppInfoResponse>; callZome: <T>(request: CallZomeRequest \| CallZomeRequestSigned) => Promise<T>; createCloneCell: (request: CreateCloneCellRequest) => Promise<import("@holochain/client").ClonedCell>; enableCloneCell: (request: DisableCloneCellRequest) => Promise<import("@holochain/client").ClonedCell>; disableCloneCell: (request: DisableCloneCellRequest) => Promise<void>; networkInfo: (request: NetworkInfoRequest) => Promise<import("@holochain/client").NetworkInfoResponse>; }> - diff --git a/docs/tryorama.trycpconductor.connectappinterface.md b/docs/tryorama.trycpconductor.connectappinterface.md index 77750f96..79515899 100644 --- a/docs/tryorama.trycpconductor.connectappinterface.md +++ b/docs/tryorama.trycpconductor.connectappinterface.md @@ -9,7 +9,7 @@ Connect a web socket to the App API. **Signature:** ```typescript -connectAppInterface(port: number): Promise; +connectAppInterface(token: AppAuthenticationToken, port: number): Promise; ``` ## Parameters @@ -32,6 +32,20 @@ Description +token + + + + +AppAuthenticationToken + + + + + + + + port diff --git a/docs/tryorama.trycpconductor.connectappws.md b/docs/tryorama.trycpconductor.connectappws.md index e9a3f6cf..792013f1 100644 --- a/docs/tryorama.trycpconductor.connectappws.md +++ b/docs/tryorama.trycpconductor.connectappws.md @@ -9,8 +9,8 @@ Get all [App API methods](https://github.com/holochain/holochain-client-js/blob/ **Signature:** ```typescript -connectAppWs(port: number): Promise<{ - appInfo: (request: AppInfoRequest) => Promise; +connectAppWs(_token: AppAuthenticationToken, port: number): Promise<{ + appInfo: () => Promise; callZome: (request: CallZomeRequest | CallZomeRequestSigned) => Promise; createCloneCell: (request: CreateCloneCellRequest) => Promise; enableCloneCell: (request: EnableCloneCellRequest) => Promise; @@ -39,6 +39,20 @@ Description +\_token + + + + +AppAuthenticationToken + + + + + + + + port @@ -54,7 +68,7 @@ number **Returns:** -Promise<{ appInfo: (request: AppInfoRequest) => Promise<import("@holochain/client").AppInfoResponse>; callZome: <T>(request: CallZomeRequest \| CallZomeRequestSigned) => Promise<T>; createCloneCell: (request: CreateCloneCellRequest) => Promise<import("@holochain/client").ClonedCell>; enableCloneCell: (request: EnableCloneCellRequest) => Promise<import("@holochain/client").ClonedCell>; disableCloneCell: (request: DisableCloneCellRequest) => Promise<void>; networkInfo: (request: NetworkInfoRequest) => Promise<import("@holochain/client").NetworkInfoResponse>; }> +Promise<{ appInfo: () => Promise<import("@holochain/client").AppInfoResponse>; callZome: <T>(request: CallZomeRequest \| CallZomeRequestSigned) => Promise<T>; createCloneCell: (request: CreateCloneCellRequest) => Promise<import("@holochain/client").ClonedCell>; enableCloneCell: (request: EnableCloneCellRequest) => Promise<import("@holochain/client").ClonedCell>; disableCloneCell: (request: DisableCloneCellRequest) => Promise<void>; networkInfo: (request: NetworkInfoRequest) => Promise<import("@holochain/client").NetworkInfoResponse>; }> The App API web socket. diff --git a/docs/tryorama.trycpconductor.installagentsapps.md b/docs/tryorama.trycpconductor.installagentsapps.md index 44fbcc3b..7e230f93 100644 --- a/docs/tryorama.trycpconductor.installagentsapps.md +++ b/docs/tryorama.trycpconductor.installagentsapps.md @@ -9,7 +9,7 @@ Install a hApp bundle into the conductor. **Signature:** ```typescript -installAgentsApps(options: AgentsAppsOptions): Promise; +installAgentsApps(options: AgentsAppsOptions): Promise; ``` ## Parameters @@ -49,7 +49,7 @@ Apps to install for each agent, with agent pub keys etc. **Returns:** -Promise<AppInfo\[\]> +Promise<import("@holochain/client").AppInfo\[\]> The installed app infos. diff --git a/docs/tryorama.trycpconductor.installapp.md b/docs/tryorama.trycpconductor.installapp.md index 15b1fa34..9494f75c 100644 --- a/docs/tryorama.trycpconductor.installapp.md +++ b/docs/tryorama.trycpconductor.installapp.md @@ -9,7 +9,7 @@ Install a hApp bundle into the conductor. **Signature:** ```typescript -installApp(appBundleSource: AppBundleSource, options?: AppOptions): Promise; +installApp(appBundleSource: AppBundleSource, options?: AppOptions): Promise; ``` ## Parameters @@ -65,7 +65,7 @@ _(Optional)_ [AppOptions](./tryorama.appoptions.md) for the hApp bundle (optiona **Returns:** -Promise<AppInfo> +Promise<import("@holochain/client").AppInfo> The installed app info. diff --git a/docs/tryorama.trycpconductor.md b/docs/tryorama.trycpconductor.md index 5f76201b..911fcfaf 100644 --- a/docs/tryorama.trycpconductor.md +++ b/docs/tryorama.trycpconductor.md @@ -158,19 +158,7 @@ Create conductor configuration. -[connectAppAgentWs(port, appId)](./tryorama.trycpconductor.connectappagentws.md) - - - - - - - - - - - -[connectAppInterface(port)](./tryorama.trycpconductor.connectappinterface.md) +[connectAppInterface(token, port)](./tryorama.trycpconductor.connectappinterface.md) @@ -184,7 +172,7 @@ Connect a web socket to the App API. -[connectAppWs(port)](./tryorama.trycpconductor.connectappws.md) +[connectAppWs(\_token, port)](./tryorama.trycpconductor.connectappws.md) diff --git a/flake.lock b/flake.lock index 4b5770cd..5819d0b1 100644 --- a/flake.lock +++ b/flake.lock @@ -141,16 +141,16 @@ "holochain": { "flake": false, "locked": { - "lastModified": 1713315590, - "narHash": "sha256-hWeNAq+F1rAoYulPFqpQOo0cjeMZVvKXLohnP0MOc9Y=", + "lastModified": 1714046698, + "narHash": "sha256-vGOWRJXR64qXRe4MCg13xNyww904KPFvYZIQyRhuPsU=", "owner": "holochain", "repo": "holochain", - "rev": "d8715775f359211b7031f4bdca1cc89db679ed10", + "rev": "b48562aa081b1dd177ec43035650262fbdb40d0e", "type": "github" }, "original": { "owner": "holochain", - "ref": "holochain-0.3.0-beta-dev.46", + "ref": "holochain-0.3.0-beta-dev.48", "repo": "holochain", "type": "github" } @@ -190,11 +190,11 @@ ] }, "locked": { - "lastModified": 1714145446, - "narHash": "sha256-NPmI5FgbdO9FgXUIBiH8t8RjhHss99mU+kpHMrAO1Qw=", + "lastModified": 1714172196, + "narHash": "sha256-frE3cULICMy3cBLmn1NmeJdR7Lw3tqb4rPbitrxU3y4=", "owner": "holochain", "repo": "holochain", - "rev": "7989ee097a9ccf1221fe6ece70d0cefd8f47f15c", + "rev": "95709523c94e8f02ebce5fa11cf2cf507d6e7400", "type": "github" }, "original": { @@ -386,11 +386,11 @@ }, "locked": { "dir": "versions/weekly", - "lastModified": 1714145446, - "narHash": "sha256-NPmI5FgbdO9FgXUIBiH8t8RjhHss99mU+kpHMrAO1Qw=", + "lastModified": 1714172196, + "narHash": "sha256-frE3cULICMy3cBLmn1NmeJdR7Lw3tqb4rPbitrxU3y4=", "owner": "holochain", "repo": "holochain", - "rev": "7989ee097a9ccf1221fe6ece70d0cefd8f47f15c", + "rev": "95709523c94e8f02ebce5fa11cf2cf507d6e7400", "type": "github" }, "original": { diff --git a/package-lock.json b/package-lock.json index bc487c1a..1d187f1d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@holochain/tryorama", - "version": "0.16.0-dev.3", + "version": "0.16.0-dev.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@holochain/tryorama", - "version": "0.16.0-dev.3", + "version": "0.16.0-dev.4", "license": "MIT", "dependencies": { - "@holochain/client": "^0.17.0-dev.11", + "@holochain/client": "^0.17.0-dev.12", "get-port": "^6.1.2", "lodash": "^4.17.21", "uuid": "^8.3.2", @@ -547,9 +547,9 @@ } }, "node_modules/@holochain/client": { - "version": "0.17.0-dev.11", - "resolved": "https://registry.npmjs.org/@holochain/client/-/client-0.17.0-dev.11.tgz", - "integrity": "sha512-8YSW4k6UbA6a1oHxZxspVBRKQufE5GAy+Vm2k6Zl/tEVd7JbvNrjl/uyBKSLu62mJpgvmUf4q4OGihc169yETw==", + "version": "0.17.0-dev.12", + "resolved": "https://registry.npmjs.org/@holochain/client/-/client-0.17.0-dev.12.tgz", + "integrity": "sha512-aEOkD4wtFeHAv5AiEkBfsiGeAujCyQf1yfvmtcdERnv73zgZhxCiZ0ZrEi46kdJhRHMXX/1Qkqo6VY8afrepfQ==", "dependencies": { "@bitgo/blake2b": "^3.2.4", "@holochain/serialization": "^0.1.0-beta-rc.3", diff --git a/package.json b/package.json index 342fb83d..3ee9f94b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@holochain/tryorama", "description": "Toolset to manage Holochain conductors and facilitate running test scenarios", - "version": "0.16.0-dev.4", + "version": "0.16.0-dev.5", "author": "Holochain Foundation", "license": "MIT", "keywords": [ @@ -43,7 +43,7 @@ "prepublishOnly": "npm run build" }, "dependencies": { - "@holochain/client": "^0.17.0-dev.11", + "@holochain/client": "^0.17.0-dev.12", "get-port": "^6.1.2", "lodash": "^4.17.21", "uuid": "^8.3.2", diff --git a/ts/src/trycp/types.ts b/ts/src/trycp/types.ts index 3d438e80..5551b4fb 100644 --- a/ts/src/trycp/types.ts +++ b/ts/src/trycp/types.ts @@ -595,6 +595,9 @@ export interface AdminApiResponseStorageInfo { data: StorageInfoResponse; } +/** + * @public + */ export interface AdminApiResponseAppAuthenticationTokenIssued { type: { app_authentication_token_issued: null }; data: IssueAppAuthenticationTokenResponse; diff --git a/ts/test/local/scenario.ts b/ts/test/local/scenario.ts index d4b0a1fe..93fcfb82 100644 --- a/ts/test/local/scenario.ts +++ b/ts/test/local/scenario.ts @@ -170,7 +170,6 @@ test("Local Scenario - Conductor maintains data after shutdown and restart", asy const readContent = await bobCaller("read", createEntryHash); t.equal(readContent, content); - await bob.conductor.shutDown(); t.throws(bob.conductor.adminWs); From 4b8c227da8b2ecfc26092b7de26185032a5ca4a4 Mon Sep 17 00:00:00 2001 From: ThetaSinner Date: Sat, 27 Apr 2024 00:08:22 +0100 Subject: [PATCH 2/2] Update lock --- package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1d187f1d..b3fff7e2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@holochain/tryorama", - "version": "0.16.0-dev.4", + "version": "0.16.0-dev.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@holochain/tryorama", - "version": "0.16.0-dev.4", + "version": "0.16.0-dev.5", "license": "MIT", "dependencies": { "@holochain/client": "^0.17.0-dev.12",