Skip to content

Commit

Permalink
chore(release): v0.16.0-dev.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jost-s committed Apr 9, 2024
1 parent f6fddc0 commit fe861fc
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 32 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
### Added
### Removed
### Changed
### Fixed

## 2024-04-09: v0.16.0-dev.2
### Changed
- Upgrade to latest JS client.
- Set allowed origins for admin websockets in Tryorama conductors and when attaching app websockets.
- Pass origin when connecting admin and app websockets.
### Fixed

## 2024-02-28: v0.16.0-dev.1
### Changed
Expand Down
11 changes: 0 additions & 11 deletions docs/tryorama.allowed_origin.md

This file was deleted.

9 changes: 0 additions & 9 deletions docs/tryorama.md
Original file line number Diff line number Diff line change
Expand Up @@ -984,15 +984,6 @@ Description
</th></tr></thead>
<tbody><tr><td>

[ALLOWED\_ORIGIN](./tryorama.allowed_origin.md)


</td><td>


</td></tr>
<tr><td>

[DEFAULT\_PARTIAL\_PLAYER\_CONFIG](./tryorama.default_partial_player_config.md)


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@holochain/tryorama",
"description": "Toolset to manage Holochain conductors and facilitate running test scenarios",
"version": "0.16.0-dev.1",
"version": "0.16.0-dev.2",
"author": "Holochain Foundation",
"license": "MIT",
"keywords": [
Expand Down
5 changes: 4 additions & 1 deletion ts/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ import {

const BOOTSTRAP_SERVER_STARTUP_STRING = "HC BOOTSTRAP - ADDR: ";
const SIGNALING_SERVER_STARTUP_STRING = "HC SIGNAL - ADDR: ";
export const ALLOWED_ORIGIN = "tryorama-interface";
/**
* @internal
*/
export const _ALLOWED_ORIGIN = "tryorama-interface";

/**
* Spawn a signalling server to enable connections between conductors.
Expand Down
10 changes: 5 additions & 5 deletions ts/src/local/conductor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { v4 as uuidv4 } from "uuid";

import { makeLogger } from "../logger.js";
import { AgentsAppsOptions, AppOptions, IConductor } from "../types.js";
import { ALLOWED_ORIGIN } from "../common.js";
import { _ALLOWED_ORIGIN } from "../common.js";

const logger = makeLogger("Local Conductor");

Expand Down Expand Up @@ -276,7 +276,7 @@ export class Conductor implements IConductor {
private async connectAdminWs() {
this._adminWs = await AdminWebsocket.connect({
url: this.adminApiUrl,
wsClientOptions: { origin: ALLOWED_ORIGIN },
wsClientOptions: { origin: _ALLOWED_ORIGIN },
defaultTimeout: this.timeout,
});
logger.debug(`connected to Admin API @ ${this.adminApiUrl.href}\n`);
Expand All @@ -291,7 +291,7 @@ export class Conductor implements IConductor {
async attachAppInterface(request?: AttachAppInterfaceRequest) {
request = request ?? {
port: await getPort({ port: portNumbers(30000, 40000) }),
allowed_origins: ALLOWED_ORIGIN,
allowed_origins: _ALLOWED_ORIGIN,
};
logger.debug(`attaching App API to port ${request.port}\n`);
const { port } = await this.adminWs().attachAppInterface(request);
Expand All @@ -310,7 +310,7 @@ export class Conductor implements IConductor {
appApiUrl.port = port.toString();
const appWs = await AppWebsocket.connect({
url: appApiUrl,
wsClientOptions: { origin: ALLOWED_ORIGIN },
wsClientOptions: { origin: _ALLOWED_ORIGIN },
defaultTimeout: this.timeout,
});

Expand Down Expand Up @@ -342,7 +342,7 @@ export class Conductor implements IConductor {
appApiUrl.port = port.toString();
const appAgentWs = await AppAgentWebsocket.connect(appId, {
url: appApiUrl,
wsClientOptions: { origin: ALLOWED_ORIGIN },
wsClientOptions: { origin: _ALLOWED_ORIGIN },
defaultTimeout: this.timeout,
});

Expand Down
4 changes: 2 additions & 2 deletions ts/src/trycp/conductor/conductor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ import {
TRYCP_SUCCESS_RESPONSE,
} from "../types.js";
import { deserializeZomeResponsePayload } from "../util.js";
import { ALLOWED_ORIGIN } from "../../common.js";
import { _ALLOWED_ORIGIN } from "../../common.js";

const logger = makeLogger("TryCP conductor");
const HOLO_SIGNALING_SERVER = new URL("wss://signal.holo.host");
Expand Down Expand Up @@ -555,7 +555,7 @@ export class TryCpConductor implements IConductor {
*/
const attachAppInterface = async (request?: AttachAppInterfaceRequest) => {
request = {
allowed_origins: request?.allowed_origins ?? ALLOWED_ORIGIN,
allowed_origins: request?.allowed_origins ?? _ALLOWED_ORIGIN,
port:
request?.port ?? (await getPort({ port: portNumbers(30000, 40000) })),
};
Expand Down

0 comments on commit fe861fc

Please sign in to comment.