Skip to content

Commit

Permalink
Merge branch 'main' into release-automation
Browse files Browse the repository at this point in the history
  • Loading branch information
pklaschka committed Dec 10, 2024
2 parents 346f13e + 01a56b5 commit 6d238b3
Show file tree
Hide file tree
Showing 25 changed files with 306 additions and 156 deletions.
2 changes: 1 addition & 1 deletion backend-deno/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This library provides a framework for building Telestion services in Deno.
## Usage

```typescript
import {startService} from 'https://deno.land/x/telestion/mod.ts';
import {startService} from 'jsr:@wuespace/telestion';

const {nc} = await startService();
```
Expand Down
3 changes: 0 additions & 3 deletions backend-deno/cucumber/deps.ts

This file was deleted.

2 changes: 1 addition & 1 deletion backend-deno/cucumber/step-registry.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { resolve } from "./deps.ts";
import { resolve } from "@std/path";

/**
* A step definition
Expand Down
4 changes: 2 additions & 2 deletions backend-deno/cucumber/steps/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { startService } from "../../mod.ts";
import { startService } from "jsr:@wuespace/telestion";
import { Given, Then } from "../step-registry.ts";
import { assertEquals } from "./deps.ts";
import { assertEquals } from "@std/assert";

Given('I have an environment variable named {string} with value {string}', (_ctx, key, value) => {
Deno.env.set(key, value);
Expand Down
5 changes: 0 additions & 5 deletions backend-deno/cucumber/steps/deps.ts

This file was deleted.

3 changes: 2 additions & 1 deletion backend-deno/cucumber/steps/nats.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { ConnectionOptions, NatsConnection } from "@nats-io/nats-core";
import { Given, Then } from "../step-registry.ts";
import { ConnectionOptions, NatsConnection, assert, assertEquals } from "./deps.ts";
import { assert, assertEquals } from "@std/assert";

/**
* A mock NATS client that can be used to test services that use NATS.
Expand Down
4 changes: 2 additions & 2 deletions backend-deno/cucumber/steps/start.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { startService } from "../../mod.ts";
import { startService } from "jsr:@wuespace/telestion";
import { Then, When } from "../step-registry.ts";
import { assert, assertRejects } from "./deps.ts";
import { assert, assertRejects } from "@std/assert";

When("I start the service", async (ctx) => {
if (!ctx.nats) {
Expand Down
4 changes: 3 additions & 1 deletion backend-deno/cucumber/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
* MIT License (MIT)
*/

import { AssertionError, parseArgs, resolve } from "./deps.ts";
import { parseArgs } from "@std/cli";
import { getStep, importStepDefinitions } from "./step-registry.ts";
import { resolve } from "@std/path";
import { AssertionError } from "@std/assert";

/// Determine steps and features folder from command line arguments

Expand Down
23 changes: 23 additions & 0 deletions backend-deno/deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "@wuespace/telestion",
"license": "MIT",
"version": "1.0.0-alpha.4",
"exports": "./mod.ts",
"publish": {
"include": [
"mod.ts",
"README.md",
"LICENSE"
]
},
"imports": {
"@nats-io/nats-core": "jsr:@nats-io/[email protected]",
"@nats-io/transport-deno": "jsr:@nats-io/[email protected]",
"@std/assert": "jsr:@std/assert@^1.0.8",
"@std/cli": "jsr:@std/cli@^1.0.7",
"@std/jsonc": "jsr:@std/jsonc@^1.0.1",
"@std/path": "jsr:@std/path@^1.0.8",
"jsr:@wuespace/telestion": "./mod.ts",
"zod": "npm:zod@^3.23.8"
}
}
117 changes: 117 additions & 0 deletions backend-deno/deno.lock

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

5 changes: 3 additions & 2 deletions backend-deno/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
services:
backend-deno:
image: denoland/deno:1.39.0
command: [ "test", "--allow-all", "/app/cucumber/test.ts", "--",
image: denoland/deno:2.1.2
working_dir: /app
command: [ "test", "--allow-all", "./cucumber/test.ts", "--",
"--features", "/features",
"--steps", "/app/cucumber/steps", ]
volumes:
Expand Down
Loading

0 comments on commit 6d238b3

Please sign in to comment.