orator 2.0.4 → 3.0.2
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/.config/code-server/config.yaml +4 -0
- package/.config/configstore/update-notifier-npm-check-updates.json +4 -0
- package/.config/configstore/update-notifier-npm.json +4 -0
- package/.vscode/launch.json +26 -6
- package/Dockerfile_LUXURYCode +69 -0
- package/debug/Harness.js +42 -0
- package/dist/orator.js +986 -0
- package/dist/orator.min.js +135 -0
- package/dist/orator.min.js.map +1 -0
- package/gulpfile.js +83 -0
- package/package.json +43 -28
- package/source/Orator-Browser-Shim.js +14 -0
- package/source/Orator-Default-Configuration.js +10 -0
- package/source/Orator-Default-ServiceServers-Node.js +21 -0
- package/source/Orator-Default-ServiceServers-Web.js +21 -0
- package/source/Orator-ServiceServer-IPC-RouterConstrainer.js +35 -0
- package/source/Orator-ServiceServer-IPC-SynthesizedResponse.js +56 -0
- package/source/Orator-ServiceServer-IPC.js +216 -0
- package/source/Orator.js +122 -684
- package/test/Orator_basic_tests.js +44 -234
- package/{test → test_legacy}/Orator-proxy_tests.js +12 -3
- package/test_legacy/Orator_basic_tests.js +294 -0
- package/{test → test_legacy}/Orator_cluster_test.js.deferred +7 -7
- package/{test → test_legacy}/Orator_logging_tests.js +52 -6
- package/test_legacy/Test.css +4 -0
- package/test_legacy/Test.html +1 -0
- package/.travis.yml +0 -15
- package/Debug-Harness.js +0 -24
- package/test/Orator_chromecpu_notrace_tests.js +0 -90
- package/test/Orator_chromecpu_tests.js +0 -95
package/.vscode/launch.json
CHANGED
|
@@ -5,22 +5,42 @@
|
|
|
5
5
|
"version": "0.2.0",
|
|
6
6
|
"configurations": [
|
|
7
7
|
{
|
|
8
|
+
"name": "Launch Debug Harness",
|
|
8
9
|
"type": "node",
|
|
9
10
|
"request": "launch",
|
|
11
|
+
"outputCapture": "std",
|
|
12
|
+
"skipFiles": [
|
|
13
|
+
"<node_internals>/**"
|
|
14
|
+
],
|
|
15
|
+
"program": "${workspaceFolder}/debug/Harness.js",
|
|
16
|
+
"presentation": {
|
|
17
|
+
"hidden": false,
|
|
18
|
+
"group": "",
|
|
19
|
+
"order": 1
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
10
23
|
"name": "Mocha Tests",
|
|
11
|
-
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
|
|
12
24
|
"args": [
|
|
13
25
|
"-u",
|
|
14
26
|
"tdd",
|
|
15
|
-
"--bail",
|
|
16
27
|
"--timeout",
|
|
17
28
|
"999999",
|
|
18
29
|
"--colors",
|
|
19
|
-
"${workspaceFolder}/test
|
|
20
|
-
|
|
21
|
-
|
|
30
|
+
"${workspaceFolder}/test"
|
|
31
|
+
],
|
|
32
|
+
"internalConsoleOptions": "openOnSessionStart",
|
|
33
|
+
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
|
|
34
|
+
"request": "launch",
|
|
35
|
+
"skipFiles": [
|
|
36
|
+
"<node_internals>/**"
|
|
22
37
|
],
|
|
23
|
-
"
|
|
38
|
+
"type": "pwa-node",
|
|
39
|
+
"presentation": {
|
|
40
|
+
"hidden": false,
|
|
41
|
+
"group": "",
|
|
42
|
+
"order": 2
|
|
43
|
+
}
|
|
24
44
|
}
|
|
25
45
|
]
|
|
26
46
|
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Use the codercom/code-server image
|
|
2
|
+
FROM codercom/code-server:latest
|
|
3
|
+
MAINTAINER steven velozo
|
|
4
|
+
|
|
5
|
+
VOLUME /home/coder/.config
|
|
6
|
+
VOLUME /home/coder/.vscode
|
|
7
|
+
|
|
8
|
+
RUN echo "...installing debian dependencies..."
|
|
9
|
+
RUN sudo apt update
|
|
10
|
+
RUN sudo apt install vim curl tmux -y
|
|
11
|
+
|
|
12
|
+
RUN echo "Building development image..."
|
|
13
|
+
|
|
14
|
+
RUN echo "...installing vscode extensions..."
|
|
15
|
+
|
|
16
|
+
# Mocha unit testing in the sidebar
|
|
17
|
+
RUN code-server --install-extension hbenl.vscode-mocha-test-adapter
|
|
18
|
+
RUN code-server --install-extension hbenl.test-adapter-converter
|
|
19
|
+
RUN code-server --install-extension hbenl.vscode-test-explorer
|
|
20
|
+
|
|
21
|
+
# Magic indentation rainbow
|
|
22
|
+
RUN code-server --install-extension oderwat.indent-rainbow
|
|
23
|
+
RUN code-server --install-extension dbaeumer.vscode-eslint
|
|
24
|
+
|
|
25
|
+
# Contextual git
|
|
26
|
+
RUN code-server --install-extension eamodio.gitlens
|
|
27
|
+
|
|
28
|
+
# Other extensions (uncomment them to have them automagic, or run this from a terminal to install in the container):
|
|
29
|
+
|
|
30
|
+
# Microsoft's AI code completion
|
|
31
|
+
# RUN code-server --install-extension VisualStudioExptTeam.vscodeintellicode
|
|
32
|
+
|
|
33
|
+
# Live server -- make sure to open up the port on the docker image
|
|
34
|
+
# RUN code-server --install-extension ritwickdey.LiveServer
|
|
35
|
+
|
|
36
|
+
# Quick link to required modules' documentation
|
|
37
|
+
# RUN code-server --install-extension bengreenier.vscode-node-readme
|
|
38
|
+
|
|
39
|
+
# Switch up fonts
|
|
40
|
+
# RUN code-server --install-extension evan-buss.font-switcher
|
|
41
|
+
|
|
42
|
+
# Icons
|
|
43
|
+
# RUN code-server --install-extension vscode-icons-team.vscode-icons
|
|
44
|
+
# RUN code-server --install-extension PKief.material-icon-theme
|
|
45
|
+
|
|
46
|
+
# Hover over CSS colors to see them previewed
|
|
47
|
+
# RUN code-server --install-extension bierner.color-info
|
|
48
|
+
|
|
49
|
+
# An easy on the eyes color theme
|
|
50
|
+
# RUN code-server --install-extension daylerees.rainglow
|
|
51
|
+
|
|
52
|
+
RUN echo "...mapping library specific volumes..."
|
|
53
|
+
|
|
54
|
+
# Volume mapping for code
|
|
55
|
+
VOLUME /home/coder/orator
|
|
56
|
+
|
|
57
|
+
SHELL ["/bin/bash", "-c"]
|
|
58
|
+
USER coder
|
|
59
|
+
|
|
60
|
+
RUN echo "...installing node version manager..."
|
|
61
|
+
# Because there is a .bashrc chicken/egg problem, we will create one here to simulate logging in. This is not great.
|
|
62
|
+
RUN touch ~/.bashrc && chmod +x ~/.bashrc
|
|
63
|
+
RUN curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
|
|
64
|
+
|
|
65
|
+
RUN echo "...installing node version 14 as the default..."
|
|
66
|
+
RUN . ~/.nvm/nvm.sh && source ~/.bashrc && nvm install 14
|
|
67
|
+
RUN . ~/.nvm/nvm.sh && source ~/.bashrc && nvm alias default 14
|
|
68
|
+
|
|
69
|
+
WORKDIR /home/coder/orator
|
package/debug/Harness.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Load the orator module with a few simple routes
|
|
2
|
+
const libOrator = require(__dirname+'/../source/Orator.js');
|
|
3
|
+
// Uncomment the following line to test the restify server plug-in
|
|
4
|
+
// > make sure to run "npm i orator-serviceserver-restify" from the parent directory first so the package is available
|
|
5
|
+
// > please don't --save it!
|
|
6
|
+
const libOratorServiceServerRestify = require('orator-serviceserver-restify');
|
|
7
|
+
|
|
8
|
+
const tmpServiceServer = new libOrator(
|
|
9
|
+
{
|
|
10
|
+
"Product": "HarnessService",
|
|
11
|
+
"ProductVersion": "1.2.3",
|
|
12
|
+
|
|
13
|
+
"APIServerPort": 8080
|
|
14
|
+
}
|
|
15
|
+
// Uncomment the next line to enable restify!
|
|
16
|
+
,libOratorServiceServerRestify
|
|
17
|
+
);
|
|
18
|
+
// Initialize the service server
|
|
19
|
+
tmpServiceServer.initializeServiceServer();
|
|
20
|
+
// Start the service
|
|
21
|
+
tmpServiceServer.startService();
|
|
22
|
+
|
|
23
|
+
// Add a GET endpoint
|
|
24
|
+
tmpServiceServer.webServer.get
|
|
25
|
+
(
|
|
26
|
+
'/test/:hash',
|
|
27
|
+
(pRequest, pResponse, fNext) =>
|
|
28
|
+
{
|
|
29
|
+
// Send back whatever was sent as "name" in the URI
|
|
30
|
+
pResponse.send(pRequest.params);
|
|
31
|
+
tmpServiceServer.log.info(`Service has served the test echo route!`);
|
|
32
|
+
return fNext();
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
// If this is a web server, invoke is likely not implemented and will error.
|
|
37
|
+
let tmpURI = `/test/SomeHash`;
|
|
38
|
+
tmpServiceServer.invoke('GET', tmpURI, null,
|
|
39
|
+
(pError, pResponseData) =>
|
|
40
|
+
{
|
|
41
|
+
tmpServiceServer.log.info(`Response to [${tmpURI}] came back from IPC resulting in [${pResponseData}]!`)
|
|
42
|
+
});
|