Comparing version 0.0.2 to 0.0.3
@@ -6,3 +6,3 @@ export interface ConstructorOptions { | ||
interface LockActionOptions { | ||
/** a URL which will receive a POST event (with `{ "lockName": "<lock name>" }` in the body) when the lock becomes unlocked */ | ||
/** a URL which will receive a POST event (with `{ "lockName": "<lock name>" }` in the body) when the lock expires or is unlocked */ | ||
unlockWebhookUrl?: string; | ||
@@ -9,0 +9,0 @@ waitTimeoutInMs?: number; |
@@ -5,3 +5,3 @@ { | ||
"name": "lockdb", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "LockDB is a cross-platform tool you can use to handle process/event locking and avoid race conditions. It is sometimes also known as a semaphore.", | ||
@@ -8,0 +8,0 @@ "license": "AGPL-3.0", |
@@ -61,6 +61,14 @@ # LockDB | ||
You can find binaries for your system in the [latest release](https://github.com/BrunoBernardino/lockdb/releases/latest). | ||
Here's an example for Linux intel (x86_64), on downloading it with `curl` and moving it to `/usr/local/bin/` so it's available globally as `lockdb`: | ||
```sh | ||
# Install it first: | ||
$ deno install --allow-net --allow-env=LOCKDB_SERVICE_ID,LOCKDB_API_KEY,LOCKDB_SERVER_URL https://deno.land/x/lockdb@1.0.0/main.ts --name lockdb | ||
# Download the binary from the latest release for your system and move it to `/usr/local/bin/`. Here's an example for most Linux OSes: | ||
$ curl https://github.com/BrunoBernardino/lockdb/releases/latest/download/lockdb-linux-intel --output lockdb && sudo mv lockdb /usr/local/bin/ | ||
``` | ||
Then to use it, on any OS: | ||
```sh | ||
# Set ENV variables | ||
@@ -90,5 +98,6 @@ $ export LOCKDB_SERVICE_ID="service-id" | ||
$ make test | ||
# Dev CLI: | ||
# CLI | ||
$ deno run --allow-net mock_server.ts | ||
$ deno run --allow-net --allow-env=LOCKDB_SERVICE_ID,LOCKDB_API_KEY main.ts check report --server-url="http://127.0.0.1:5678" --service-id="service-identifier" --api-key="api-key" | ||
$ deno run --allow-net --allow-env=LOCKDB_SERVICE_ID,LOCKDB_API_KEY,LOCKDB_SERVER_URL main.ts check report --server-url="http://127.0.0.1:5678" --service-id="service-identifier" --api-key="api-key" | ||
``` | ||
@@ -98,2 +107,2 @@ | ||
After committing and pushing, just run `make publish VERSION=x.y.z`. | ||
After committing and pushing, just run `make publish VERSION=x.y.z`. That will also trigger a new tag, build binaries, and a new draft release with them. |
@@ -6,3 +6,3 @@ export interface ConstructorOptions { | ||
interface LockActionOptions { | ||
/** a URL which will receive a POST event (with `{ "lockName": "<lock name>" }` in the body) when the lock becomes unlocked */ | ||
/** a URL which will receive a POST event (with `{ "lockName": "<lock name>" }` in the body) when the lock expires or is unlocked */ | ||
unlockWebhookUrl?: string; | ||
@@ -9,0 +9,0 @@ waitTimeoutInMs?: number; |
48065
1
106