-
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 #1 from fabrix-app/v1.6
[feat] Sparks
- Loading branch information
Showing
23 changed files
with
7,851 additions
and
538 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
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,5 +1,8 @@ | ||
export const realtime = { | ||
path: null, | ||
prefix: null, | ||
primus: { | ||
options: {} | ||
} | ||
}, | ||
plugins: {} | ||
} |
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,14 @@ | ||
import {FabrixGeneric as Generic, FabrixModel} from '@fabrix/fabrix/dist/common' | ||
|
||
/** | ||
* @module Spark | ||
* @description Spark | ||
*/ | ||
export class Spark extends Generic { | ||
connection(spark) { | ||
throw new Error('Connection should be overwritten by sub class!') | ||
} | ||
disconnection(spark) { | ||
throw new Error('Disconnection should be overwritten by sub class!') | ||
} | ||
} |
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,15 @@ | ||
import { FabrixController as Controller } from '@fabrix/fabrix/dist/common' | ||
|
||
/** | ||
* @module CartController | ||
* @description Cart Controller. | ||
*/ | ||
// TODO lock down certain requests by Owner(s) | ||
export class PrimusController extends Controller { | ||
spec(req, res) { | ||
return res.send(this.app.sockets.spec) | ||
} | ||
library(req, res) { | ||
return res.send(this.app.sockets.library()) | ||
} | ||
} |
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 @@ | ||
export { PrimusController } from './PrimisController' |
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,6 @@ | ||
import * as controllers from './controllers' | ||
import * as sparks from './sparks' | ||
export { | ||
// controllers | ||
sparks | ||
} |
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 @@ | ||
export {} |
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,2 +1,3 @@ | ||
export { spool } from './spool' | ||
export { realtime } from './realtime' | ||
export { routes } from './routes' |
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,5 +1,9 @@ | ||
export const realtime = { | ||
path: null, | ||
prefix: null, | ||
primus: { | ||
transformer: 'engine.io', | ||
options: {} | ||
} | ||
}, | ||
plugins: {} | ||
} |
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,26 @@ | ||
export const routes = { | ||
// '/primus/spec': { | ||
// 'GET': { | ||
// handler: 'PrimusController.spec', | ||
// config: { | ||
// prefix: 'realtime.prefix' | ||
// } | ||
// } | ||
// }, | ||
// '/primus/library': { | ||
// 'GET': { | ||
// handler: 'PrimusController.library', | ||
// config: { | ||
// prefix: 'realtime.prefix' | ||
// } | ||
// } | ||
// }, | ||
// '/primus/primus.js': { | ||
// 'GET': { | ||
// file: 'primus.js', | ||
// config: { | ||
// prefix: 'realtime.prefix' | ||
// } | ||
// } | ||
// }, | ||
} |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
export { RealtimeSpool } from './RealtimeSpool' | ||
export { Spark } from './Spark' |
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
Oops, something went wrong.