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.
@@ -0,0 +1,4 @@
1
+ bind-addr: 127.0.0.1:8080
2
+ auth: password
3
+ password: luxury
4
+ cert: false
@@ -0,0 +1,4 @@
1
+ {
2
+ "optOut": false,
3
+ "lastUpdateCheck": 1648097783781
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "optOut": false,
3
+ "lastUpdateCheck": 1677357438471
4
+ }
@@ -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/Orator_basic_tests.js",
20
- "${workspaceFolder}/test/Orator_logging_tests.js",
21
- "${workspaceFolder}/test/Orator-proxy_tests.js"
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
- "internalConsoleOptions": "openOnSessionStart"
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
@@ -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
+ });