Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-fiscaletti committed Mar 15, 2022
1 parent 248d7b3 commit 0a03b01
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const Peer = require(`./lib/peer`);
const Receiver = require(`./lib/receiver`);
const Action = require(`./lib/action`);

module.exports = { Peer, Receiver, Action };
2 changes: 1 addition & 1 deletion lib/action-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ActionManager extends ModuleManager {
return new Promise((resolve, reject) => {
try {
const requirePath = this.pathsFor(name).requirePath;
const actionClass = require(path.relative(__dirname, requirePath))(require(`./action`));
const actionClass = require(path.relative(__dirname, requirePath))(require(`../`));
const action = new actionClass();
action.name = name;
resolve(action);
Expand Down
2 changes: 1 addition & 1 deletion lib/receiver-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ReceiverManager extends ModuleManager {
return new Promise((resolve, reject) => {
try {
const requirePath = this.pathsFor(name).requirePath;
const receiverClass = require(path.relative(__dirname, requirePath))(Reciever);
const receiverClass = require(path.relative(__dirname, requirePath))(require(`../`));
const receiver = new receiverClass();
receiver.name = name;
resolve(receiver);
Expand Down
5 changes: 1 addition & 4 deletions notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,13 @@ To Do:
fix tables when output is plain or json
Rate limitting
per peer notifications
?? Commands for Schemas ??
$ coattail action schema --action --peer
$ coattail token purge
move colors to class or consts
key rotation
tls without hostname verification
service stop command based on pwd
non-headless coattail instances in service status don't show instance path
unsubscribe functionality
add access to coattail api
transmit log messages when remotely executing an action

Other Project Ideas:

Expand Down
2 changes: 1 addition & 1 deletion templates/action.template.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = (Action) => class extends Action {
module.exports = (Coattail) => class extends Coattail.Action {
async perform(input) {
// Perform action and return output.
return { ...input };
Expand Down
2 changes: 1 addition & 1 deletion templates/receiver.template.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = (Receiver) => class extends Receiver {
module.exports = (Coattail) => class extends Coattail.Receiver {
async onReceived(input) {
// Handle input
}
Expand Down

0 comments on commit 0a03b01

Please sign in to comment.