diff --git a/.github/workflows/npm-publish-dev.yml b/.github/workflows/npm-publish-dev.yml new file mode 100644 index 00000000..27c1b03f --- /dev/null +++ b/.github/workflows/npm-publish-dev.yml @@ -0,0 +1,34 @@ +name: Continuous Delivery + +on: + push: + branches: + - main + paths: + - 'src/**' + - 'package.json' + +jobs: + Publish: + name: Publishing Dev + runs-on: ubuntu-latest + + steps: + - name: Check out Git repository + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 + + - name: Set up Node.js + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 + with: + node-version: 18 + registry-url: 'https://registry.npmjs.org' + + - name: Install Node.js dependencies + run: npm i && npm run build:dev + + - name: Publish to npm + run: | + npm version premajor --preid "dev.$(git rev-parse --verify --short HEAD)" --git-tag-version=false + npm publish --tag dev + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/src/handlers/dispatchers.ts b/src/handlers/dispatchers.ts index 5162e1ee..d52f7bee 100644 --- a/src/handlers/dispatchers.ts +++ b/src/handlers/dispatchers.ts @@ -85,10 +85,7 @@ export function createDispatcher(payload: { args: [payload.event], }; } - return { - module: payload.module, - args: contextArgs(payload.event), - }; + return { module: payload.module, args: contextArgs(payload.event) }; } default: return { module: payload.module, diff --git a/src/handlers/event-utils.ts b/src/handlers/event-utils.ts index f766bcb6..fd079384 100644 --- a/src/handlers/event-utils.ts +++ b/src/handlers/event-utils.ts @@ -26,7 +26,7 @@ import { import { Emitter, ErrorHandling, Logging, ModuleManager, PayloadType } from '../core'; import { contextArgs, createDispatcher } from './dispatchers'; import { ObservableInput, pipe } from 'rxjs'; -import { Err, Ok, Result, Option } from 'ts-results-es'; +import { Err, Ok, Result } from 'ts-results-es'; import type { Awaitable } from '../types/utility'; import type { ControlPlugin } from '../types/core-plugin'; import type { AnyModule, CommandModule, Module, Processed } from '../types/core-modules'; diff --git a/src/handlers/presence.ts b/src/handlers/presence.ts index 38afa6e0..761fbb12 100644 --- a/src/handlers/presence.ts +++ b/src/handlers/presence.ts @@ -19,7 +19,6 @@ const parseConfig = async (conf: Promise) => { .pipe(scan(onRepeat, s), startWith(s)); } - //take 1? return of(s).pipe(take(1)); }) }; @@ -37,7 +36,7 @@ export const presenceHandler = (path: string, setPresence: SetPresence) => { }) const module$ = from(presence); return module$.pipe( - //compose:. + //compose: //call the execute function, passing that result into parseConfig. //concatMap resolves the promise, and passes it to the next concatMap. concatMap(fn => parseConfig(fn())),