generated from hyper63/adapter-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from hyper63/twilson63/feat-connect-mod-to-adap…
…ter-5 Twilson63/feat connect mod to adapter 5
- Loading branch information
Showing
9 changed files
with
131 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
publish-egg: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: v1.x | ||
- run: deno install -A -f --unstable --no-check https://x.nest.land/eggs@0.3.6/eggs.ts | ||
- run: | | ||
export PATH="/home/runner/.deno/bin:$PATH" | ||
eggs link ${{ secrets.NESTAPIKEY }} | ||
eggs publish --yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"$schema": "https://x.nest.land/eggs@0.3.8/src/schema.json", | ||
"name": "hyper-adapter-queue", | ||
"entry": "./mod.js", | ||
"description": "Hyper Queue adapter", | ||
"homepage": "https://github.com/hyper63/hyper-adapter-queue", | ||
"repo": "https://github.com/hyper63/hyper-adapter-queue", | ||
"version": "0.0.1", | ||
"unstable": false, | ||
"unlisted": false, | ||
"files": [ | ||
"./*" | ||
], | ||
"ignore": [ | ||
"./package.json", | ||
"./scripts/*", | ||
"./.git*" | ||
], | ||
"checkFormat": false, | ||
"checkTests": false, | ||
"checkInstallation": false, | ||
"check": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
import { Datastore } from "./deps.js"; | ||
import adapter from "./adapter.js"; | ||
import PORT_NAME from "./port_name.js"; | ||
|
||
export default () => ({ | ||
export default (dbFile) => ({ | ||
id: "queue", | ||
port: PORT_NAME, | ||
load: () => ({}), // load env | ||
load: () => { | ||
if (!dbFile) { | ||
throw new Error("DB FILE: required for queue adapter"); | ||
} | ||
const db = new Datastore({ filename: dbFile, autoload: true }); | ||
return { db }; | ||
}, // load env | ||
link: (env) => (_) => adapter(env), // link adapter | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/bash | ||
|
||
deno run --unstable -A ./test/hyper.js | ||
deno run --no-check --unstable -A ./test/hyper.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
|
||
deno lint | ||
deno fmt --check | ||
deno test -A --unstable --no-check adapter_test.js | ||
deno test -A --unstable --no-check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters