orator 3.0.11 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/debug/Harness.js +4 -8
- package/dist/orator.compatible.js +4889 -0
- package/dist/orator.compatible.min.js +17 -0
- package/dist/orator.compatible.min.js.map +1 -0
- package/dist/orator.js +977 -1725
- package/dist/orator.min.js +3 -24
- package/dist/orator.min.js.map +1 -1
- package/package.json +59 -66
- package/source/Orator-Default-ServiceServer-Web.js +4 -0
- package/source/Orator-Default-ServiceServer.js +4 -0
- package/source/Orator-ServiceServer-IPC-SynthesizedResponse.js +18 -1
- package/source/Orator-ServiceServer-IPC.js +108 -83
- package/source/Orator.js +141 -34
- package/test/Orator_basic_tests.js +43 -18
- package/test_legacy/Orator_basic_tests.js +1 -1
- package/test_legacy/Orator_cluster_test.js.deferred +1 -1
- package/test_legacy/Orator_logging_tests.js +1 -1
- package/source/Orator-Default-ServiceServers-Node.js +0 -21
- package/source/Orator-Default-ServiceServers-Web.js +0 -21
- package/source/Orator-ServiceServer-Base.js +0 -225
- package/source/Orator-ServiceServer-IPC-RouterConstrainer.js +0 -35
- /package/{test → debug/site}/Test.css +0 -0
- /package/{test → debug/site}/Test.html +0 -0
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
// This is taken directly from the find-my-way documentation for custom constraints and only mildly edited
|
|
4
|
-
const ipcResponseTypeStrategy = (
|
|
5
|
-
{
|
|
6
|
-
// strategy name for referencing in the route handler `constraints` options
|
|
7
|
-
name: 'ipc',
|
|
8
|
-
isAsync: true,
|
|
9
|
-
|
|
10
|
-
// storage factory for storing routes in the find-my-way route tree
|
|
11
|
-
storage:
|
|
12
|
-
()=>
|
|
13
|
-
{
|
|
14
|
-
let handlers = {};
|
|
15
|
-
|
|
16
|
-
return (
|
|
17
|
-
{
|
|
18
|
-
get: (type) => { return handlers[type] || null },
|
|
19
|
-
set: (type, store) => { handlers[type] = store }
|
|
20
|
-
});
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
// function to get the value of the constraint from each incoming request
|
|
24
|
-
deriveConstraint: (pRequest, pContext, fDone) =>
|
|
25
|
-
{
|
|
26
|
-
// If we wanted to deny the IPC request based on a constraint, we would do:
|
|
27
|
-
// fDone(new Error(`The request was denied because ____ in the Request object wasn't right...`));
|
|
28
|
-
return fDone(null, 'IPC');
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
// optional flag marking if handlers without constraints can match requests that have a value for this constraint
|
|
32
|
-
mustMatchWhenDerived: true
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
module.exports = ipcResponseTypeStrategy;
|
|
File without changes
|
|
File without changes
|