Skip to content

Commit

Permalink
dev workflow and cleaning up comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoobes committed Feb 4, 2024
1 parent 13e3faf commit d2054f2
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 7 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/npm-publish-dev.yml
Original file line number Diff line number Diff line change
@@ -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 }}
5 changes: 1 addition & 4 deletions src/handlers/dispatchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/handlers/event-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
3 changes: 1 addition & 2 deletions src/handlers/presence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const parseConfig = async (conf: Promise<Presence.Result>) => {
.pipe(scan(onRepeat, s),
startWith(s));
}
//take 1?
return of(s).pipe(take(1));
})
};
Expand All @@ -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())),
Expand Down

0 comments on commit d2054f2

Please sign in to comment.