systemview 1.20.0 → 1.21.0
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/README.md +76 -40
- package/api/Connections.js +14 -0
- package/api/connections.json +1 -1
- package/api/index.js +40 -12
- package/build/asset-manifest.json +8 -6
- package/build/index.html +1 -1
- package/build/static/css/main.8e85f0c8.css +15 -0
- package/build/static/css/main.8e85f0c8.css.map +1 -0
- package/build/static/js/422.05c538a9.chunk.js +2 -0
- package/build/static/js/422.05c538a9.chunk.js.map +1 -0
- package/build/static/js/main.6240c0f1.js +3 -0
- package/build/static/js/{main.c3485d98.js.LICENSE.txt → main.6240c0f1.js.LICENSE.txt} +26 -48
- package/build/static/js/main.6240c0f1.js.map +1 -0
- package/cli/connectService.js +147 -55
- package/cli/cookieClient.js +1 -4
- package/cli/index.js +85 -29
- package/cli/launchApp.js +5 -4
- package/cli/listTests.js +15 -19
- package/cli/logs.js +251 -0
- package/cli/manifest.js +97 -0
- package/cli/probe.js +36 -19
- package/cli/runTests.js +35 -40
- package/cli/startLineReader.js +122 -13
- package/cli/utils/cli.js +60 -12
- package/package.json +3 -3
- package/testing-utilities/Test.class.js +2 -1
- package/testing-utilities/transformTests.js +7 -6
- package/build/static/css/main.3396e24d.css +0 -15
- package/build/static/css/main.3396e24d.css.map +0 -1
- package/build/static/js/main.c3485d98.js +0 -3
- package/build/static/js/main.c3485d98.js.map +0 -1
package/README.md
CHANGED
|
@@ -21,6 +21,8 @@ systemview # start on port 3000 (interactive)
|
|
|
21
21
|
systemview start 4000 # custom port
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
+
If SystemView is already running, `systemview start` attaches your terminal to the existing instance — no second server is started. You can run as many interactive terminals as you like against the same instance.
|
|
25
|
+
|
|
24
26
|
Once running:
|
|
25
27
|
- **UI** → `http://localhost:3000`
|
|
26
28
|
- **API** → `http://localhost:3000/systemview/api`
|
|
@@ -63,35 +65,37 @@ if (process.env.SYSTEMVIEW_HOST) {
|
|
|
63
65
|
```
|
|
64
66
|
|
|
65
67
|
On startup the plugin:
|
|
66
|
-
1.
|
|
67
|
-
2. Writes `systemview.manifest.json` to the project root —
|
|
68
|
-
|
|
69
|
-
```json
|
|
70
|
-
{
|
|
71
|
-
"projectCode": "myProject",
|
|
72
|
-
"services": [
|
|
73
|
-
{
|
|
74
|
-
"serviceId": "MyService",
|
|
75
|
-
"system": {
|
|
76
|
-
"connectionData": {
|
|
77
|
-
"serviceUrl": "http://localhost:4100/my/api",
|
|
78
|
-
"modules": { ... },
|
|
79
|
-
"routing": { ... }
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
"specList": {
|
|
83
|
-
"docs": ["Users.md"],
|
|
84
|
-
"tests": ["Users.signUp.json"]
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
]
|
|
88
|
-
}
|
|
89
|
-
```
|
|
68
|
+
1. Registers the service with the SystemView UI (source of truth for all connections)
|
|
69
|
+
2. Writes `systemview.manifest.json` to the project root — used by the CLI to reconnect at startup
|
|
90
70
|
|
|
91
71
|
Add `systemview.manifest.json` to `.gitignore` — it regenerates each time the service starts.
|
|
92
72
|
|
|
93
73
|
---
|
|
94
74
|
|
|
75
|
+
## Connecting Services from the CLI
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
# Probe a live service and register it in the UI
|
|
79
|
+
systemview connect http://localhost:4100/my/api
|
|
80
|
+
|
|
81
|
+
# With plugin installed — registers under the real projectCode from the manifest
|
|
82
|
+
systemview connect http://localhost:4100/my/api --manifest
|
|
83
|
+
|
|
84
|
+
# Reconnect all services for a stored project
|
|
85
|
+
systemview connect myProject
|
|
86
|
+
|
|
87
|
+
# Re-probe even if already connected (picks up shape changes)
|
|
88
|
+
systemview connect http://localhost:4100/my/api --force
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# Remove a project or service from the UI store
|
|
93
|
+
systemview disconnect myProject
|
|
94
|
+
systemview disconnect myProject MyService
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
95
99
|
## Using the UI
|
|
96
100
|
|
|
97
101
|
| Panel | Description |
|
|
@@ -116,25 +120,56 @@ Click **Run** to execute the sequence. Click **Save** to persist the test to the
|
|
|
116
120
|
## Running Tests from the CLI
|
|
117
121
|
|
|
118
122
|
```bash
|
|
119
|
-
systemview test myProject
|
|
120
|
-
systemview test myProject Users
|
|
121
|
-
systemview test myProject Users.signUp
|
|
122
|
-
systemview test myProject --json
|
|
123
|
-
systemview test myProject --verbose
|
|
123
|
+
systemview test myProject # run all tests for a project
|
|
124
|
+
systemview test myProject Users # filter by module
|
|
125
|
+
systemview test myProject Users.signUp # filter by method
|
|
126
|
+
systemview test myProject --json # structured JSON output for CI/agents
|
|
127
|
+
systemview test myProject --verbose # show args passed to each call
|
|
128
|
+
systemview test myProject --bail # stop after first failure
|
|
129
|
+
systemview test myProject --dry-run # print which tests would run
|
|
130
|
+
systemview test myProject --skip deleteUser # exclude matching tests (repeatable)
|
|
131
|
+
systemview test myProject --phase main # run only one phase (before/main/events/after)
|
|
132
|
+
systemview test myProject --index 0 # run only action at index n within each phase
|
|
133
|
+
systemview test myProject --header "X-Key: secret" # extra request header (repeatable)
|
|
124
134
|
```
|
|
125
135
|
|
|
126
136
|
Starts the SystemView server headlessly if needed, runs all tests, exits with `0` (all passed) or `1` (any failure).
|
|
127
137
|
|
|
128
138
|
---
|
|
129
139
|
|
|
130
|
-
##
|
|
140
|
+
## Streaming Logs
|
|
131
141
|
|
|
132
142
|
```bash
|
|
133
|
-
#
|
|
134
|
-
systemview
|
|
143
|
+
systemview logs # stream from all connected services
|
|
144
|
+
systemview logs myProject # stream from a project
|
|
145
|
+
systemview logs myProject Users # filter by module/method namespace
|
|
146
|
+
systemview logs myProject --level error # filter by level
|
|
147
|
+
systemview logs myProject --current # show existing entries before streaming
|
|
148
|
+
systemview logs myProject --current --limit 20 # limit history shown
|
|
149
|
+
systemview logs myProject --filter level=error # AND filter on any field (repeatable)
|
|
150
|
+
systemview logs myProject --or moduleMethod=signIn # OR filter (repeatable)
|
|
151
|
+
systemview logs myProject --include userId # show extra field as column (repeatable)
|
|
152
|
+
systemview logs myProject --verbose # show full entry payload
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
In interactive mode:
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
logs myProject # start streaming
|
|
159
|
+
stoplogs # stop streaming (keeps log history)
|
|
160
|
+
unsubscribe # alias for stoplogs
|
|
161
|
+
clearlogs # wipe log history and stop streaming
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
---
|
|
135
165
|
|
|
136
|
-
|
|
137
|
-
|
|
166
|
+
## Listing Projects and Tests
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
systemview list # list all connected projects and services
|
|
170
|
+
systemview list myProject # list services and test files for a project
|
|
171
|
+
systemview list myProject Users # list tests for a module/method
|
|
172
|
+
systemview list myProject --verbose # expand full hierarchy
|
|
138
173
|
```
|
|
139
174
|
|
|
140
175
|
---
|
|
@@ -158,15 +193,16 @@ systemview probe MyService.String.repeat '["ha", 3]'
|
|
|
158
193
|
|
|
159
194
|
| Command | Description |
|
|
160
195
|
|---|---|
|
|
161
|
-
| `systemview [start] [port]` | Start SystemView UI
|
|
196
|
+
| `systemview [start] [port]` | Start SystemView UI; attach if already running |
|
|
162
197
|
| `systemview test <projectCode> [namespace]` | Run saved tests |
|
|
163
|
-
| `systemview
|
|
164
|
-
| `systemview
|
|
198
|
+
| `systemview list [projectCode] [namespace]` | List projects, services, or tests |
|
|
199
|
+
| `systemview logs [projectCode] [namespace]` | Stream log entries from connected services |
|
|
200
|
+
| `systemview connect <url\|projectCode>` | Connect a service or reconnect a project |
|
|
201
|
+
| `systemview connect <url> --manifest` | Connect via plugin manifest (real projectCode) |
|
|
202
|
+
| `systemview disconnect [projectCode] [serviceId]` | Remove from UI store |
|
|
165
203
|
| `systemview probe <Service.Module.method> [args]` | Call a method ad-hoc |
|
|
166
204
|
| `systemview open [projectCode] [namespace]` | Open the UI in a browser |
|
|
167
205
|
| `systemview shutdown [port]` | Stop a running instance |
|
|
168
206
|
| `systemview help` | Print help |
|
|
169
207
|
|
|
170
|
-
**
|
|
171
|
-
|
|
172
|
-
Full reference: [`docs/cli.md`](docs/cli.md)
|
|
208
|
+
**Common flags:** `--json` · `--verbose` · `--bail` · `--dry-run` · `--manifest` · `--force` · `--header "Name: Value"` · `--skip <pattern>` · `--phase <phase>` · `--index <n>` · `--level <level>` · `--current` · `--limit <n>` · `--filter <field=value>` · `--or <field=value>` · `--include <field>`
|
package/api/Connections.js
CHANGED
|
@@ -65,5 +65,19 @@ module.exports = function ConnectedServices() {
|
|
|
65
65
|
return JSON.parse(fs.readFileSync(LOCAL_STORAGE, "utf8"));
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
+
this.deleteService = (projectCode, serviceId) => {
|
|
69
|
+
const connections = JSON.parse(fs.readFileSync(LOCAL_STORAGE, "utf8"));
|
|
70
|
+
const filtered = connections.filter(
|
|
71
|
+
(s) => !(s.projectCode === projectCode && s.serviceId === serviceId)
|
|
72
|
+
);
|
|
73
|
+
fs.writeFileSync(LOCAL_STORAGE, JSON.stringify(filtered), "utf8");
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
this.deleteProject = (projectCode) => {
|
|
77
|
+
const connections = JSON.parse(fs.readFileSync(LOCAL_STORAGE, "utf8"));
|
|
78
|
+
const filtered = connections.filter((s) => s.projectCode !== projectCode);
|
|
79
|
+
fs.writeFileSync(LOCAL_STORAGE, JSON.stringify(filtered), "utf8");
|
|
80
|
+
};
|
|
81
|
+
|
|
68
82
|
return this;
|
|
69
83
|
};
|
package/api/connections.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"projectCode":"buAPI","serviceId":"Profiles","system":{"connectionData":{"modules":[{"namespace":"ws://127.0.0.1:4100/bu/api/profiles/Badges","route":"/bu/api/profiles/Badges","name":"Badges","methods":[{"method":"post","fn":"get"},{"method":"post","fn":"getPage"},{"method":"post","fn":"getDefinitions"}]},{"namespace":"ws://127.0.0.1:4100/bu/api/profiles/Locations","route":"/bu/api/profiles/Locations","name":"Locations","methods":[{"method":"post","fn":"save"},{"method":"post","fn":"search"},{"method":"post","fn":"resolve"},{"method":"post","fn":"get"},{"method":"post","fn":"getPage"}]},{"namespace":"ws://127.0.0.1:4100/bu/api/profiles/Users","route":"/bu/api/profiles/Users","name":"Users","methods":[{"method":"post","fn":"signUp"},{"method":"post","fn":"signIn"},{"method":"post","fn":"signOut"},{"method":"post","fn":"get"},{"method":"post","fn":"getPage"},{"method":"post","fn":"edit"},{"method":"post","fn":"quickSignUp"},{"method":"post","fn":"exists"},{"method":"post","fn":"isRecognized"},{"method":"post","fn":"registerSeason"},{"method":"post","fn":"setBadges"},{"method":"post","fn":"updateRealLocation"}]},{"namespace":"ws://127.0.0.1:4100/bu/api/profiles/Teams","route":"/bu/api/profiles/Teams","name":"Teams","methods":[{"method":"post","fn":"add"},{"method":"post","fn":"get"},{"method":"post","fn":"getPage"},{"method":"post","fn":"edit"},{"method":"post","fn":"addAdmin"},{"method":"post","fn":"addMember"},{"method":"post","fn":"removeMember"},{"method":"post","fn":"removeAdmin"},{"method":"post","fn":"updateStatus"},{"method":"post","fn":"registerSeason"},{"method":"post","fn":"setScope"},{"method":"post","fn":"removeScope"},{"method":"post","fn":"startDraft"},{"method":"post","fn":"closeDraft"},{"method":"post","fn":"endDraft"},{"method":"post","fn":"joinDraft"},{"method":"post","fn":"removeFromDraft"},{"method":"post","fn":"acceptDraft"},{"method":"post","fn":"rejectDraft"}]},{"namespace":"ws://127.0.0.1:4100/bu/api/profiles/Tournaments","route":"/bu/api/profiles/Tournaments","name":"Tournaments","methods":[{"method":"post","fn":"get"},{"method":"post","fn":"getPage"},{"method":"post","fn":"edit"},{"method":"post","fn":"add"},{"method":"post","fn":"addAdmin"},{"method":"post","fn":"addMember"},{"method":"post","fn":"addTeam"},{"method":"post","fn":"removeMember"},{"method":"post","fn":"removeTeam"},{"method":"post","fn":"removeAdmin"},{"method":"post","fn":"updateStatus"},{"method":"post","fn":"registerSeason"},{"method":"post","fn":"startDraft"},{"method":"post","fn":"closeDraft"},{"method":"post","fn":"endDraft"},{"method":"post","fn":"joinDraft"},{"method":"post","fn":"removeFromDraft"},{"method":"post","fn":"acceptDraft"},{"method":"post","fn":"rejectDraft"}]},{"namespace":"ws://127.0.0.1:4100/bu/api/profiles/Groups","route":"/bu/api/profiles/Groups","name":"Groups","methods":[{"method":"post","fn":"get"},{"method":"post","fn":"getPage"},{"method":"post","fn":"edit"},{"method":"post","fn":"add"},{"method":"post","fn":"addAdmin"},{"method":"post","fn":"removeAdmin"},{"method":"post","fn":"addMember"},{"method":"post","fn":"removeMember"},{"method":"post","fn":"addTeam"},{"method":"post","fn":"removeTeam"},{"method":"post","fn":"addTournament"},{"method":"post","fn":"removeTournament"},{"method":"post","fn":"updateStatus"},{"method":"post","fn":"registerSeason"},{"method":"post","fn":"startDraft"},{"method":"post","fn":"closeDraft"},{"method":"post","fn":"endDraft"},{"method":"post","fn":"joinDraft"},{"method":"post","fn":"removeFromDraft"},{"method":"post","fn":"acceptDraft"},{"method":"post","fn":"rejectDraft"}]},{"namespace":"ws://127.0.0.1:4100/bu/api/profiles/Events","route":"/bu/api/profiles/Events","name":"Events","methods":[{"method":"post","fn":"startDraft"},{"method":"post","fn":"closeDraft"},{"method":"post","fn":"endDraft"},{"method":"post","fn":"joinDraft"},{"method":"post","fn":"removeFromDraft"},{"method":"post","fn":"acceptDraft"},{"method":"post","fn":"rejectDraft"},{"method":"post","fn":"get"},{"method":"post","fn":"getPage"},{"method":"post","fn":"edit"},{"method":"post","fn":"add"},{"method":"post","fn":"addMember"},{"method":"post","fn":"removeMember"},{"method":"post","fn":"addAdmin"},{"method":"post","fn":"removeAdmin"},{"method":"post","fn":"addTeam"},{"method":"post","fn":"removeTeam"},{"method":"post","fn":"addTournament"},{"method":"post","fn":"removeTournament"},{"method":"post","fn":"addGroup"},{"method":"post","fn":"removeGroup"},{"method":"post","fn":"registerSeason"}]},{"namespace":"ws://127.0.0.1:4100/bu/api/profiles/Follows","route":"/bu/api/profiles/Follows","name":"Follows","methods":[{"method":"post","fn":"add"},{"method":"post","fn":"addMulti"},{"method":"post","fn":"get"},{"method":"post","fn":"getPage"},{"method":"post","fn":"delete"},{"method":"post","fn":"deleteMulti"}]},{"namespace":"ws://127.0.0.1:4100/bu/api/profiles/Solicitations","route":"/bu/api/profiles/Solicitations","name":"Solicitations","methods":[{"method":"post","fn":"send"},{"method":"post","fn":"get"},{"method":"post","fn":"cancel"},{"method":"post","fn":"reject"},{"method":"post","fn":"accept"},{"method":"post","fn":"resend"}]},{"namespace":"ws://127.0.0.1:4100/bu/api/profiles/Aggregator","route":"/bu/api/profiles/Aggregator","name":"Aggregator","methods":[{"method":"post","fn":"get"}]},{"namespace":"ws://127.0.0.1:4100/bu/api/profiles/Storage","route":"/bu/api/profiles/Storage","name":"Storage","methods":[{"method":"post","fn":"save"},{"method":"post","fn":"delete"},{"method":"post","fn":"list"}]},{"namespace":"ws://127.0.0.1:4100/bu/api/profiles/Plugin","route":"/bu/api/profiles/Plugin","name":"Plugin","methods":[{"method":"post","fn":"clearMockUsers"},{"method":"post","fn":"clearMockTournaments"},{"method":"post","fn":"clearMockTeams"},{"method":"post","fn":"clearMockGroups"},{"method":"post","fn":"clearMockEvents"},{"method":"post","fn":"clearMockSolicitations"},{"method":"post","fn":"clearMockFollows"},{"method":"post","fn":"clearMockBadges"},{"method":"post","fn":"clearMockLocations"},{"method":"post","fn":"patchLocations"},{"method":"post","fn":"addMockLocationEntries"},{"method":"post","fn":"createMockUsers"},{"method":"post","fn":"createMockBadge"},{"method":"post","fn":"createReadyTeam"},{"method":"post","fn":"createReadyTournament"},{"method":"post","fn":"createMultipleTeams"},{"method":"post","fn":"clearStorage"},{"method":"post","fn":"clearExpiredTeams"},{"method":"post","fn":"saveDoc"},{"method":"post","fn":"getDoc"},{"method":"post","fn":"getTests"},{"method":"post","fn":"saveTest"},{"method":"post","fn":"deleteTest"},{"method":"post","fn":"getSpecList"},{"method":"post","fn":"getConnection"},{"method":"post","fn":"getLog"}]}],"host":"127.0.0.1","route":"/bu/api/profiles","port":"4100","serviceUrl":"http://127.0.0.1:4100/bu/api/profiles","socketPath":"/bu/api/profiles/socket.io","namespace":"ws://127.0.0.1:4100/bu/api/profiles","SystemLynxService":true},"modules":[{"name":"Badges","module":{"db":{"itemName":"Badge","collectionName":"Badges"}}},{"name":"Locations","module":{"db":{"itemName":"Location","collectionName":"Locations"}}},{"name":"Users","module":{"db":{"itemName":"User","collectionName":"Users"}}},{"name":"Teams","module":{"db":{"itemName":"Team","collectionName":"Teams"}}},{"name":"Tournaments","module":{"db":{"itemName":"Tournament","collectionName":"Tournaments"}}},{"name":"Groups","module":{"db":{"itemName":"Group","collectionName":"Groups"}}},{"name":"Events","module":{"db":{"itemName":"Event","collectionName":"Events"}}},{"name":"Follows","module":{"db":{"itemName":"Follow","collectionName":"Follows"}}},{"name":"Solicitations","module":{"db":{"itemName":"Solicitation","collectionName":"Solicitations"}}},{"name":"Aggregator","module":{"db":{},"COLLECTIONS":["Users","Teams","Tournaments","Groups","Events","Follows","Solicitations","Locations"]}},{"name":"Storage","module":{"STORAGE":"/Users/odionedwards/buAPI/Profiles/files","STORAGE_URL":"http://127.0.0.1:4100/storage"}},{"name":"Plugin","module":{}}],"routing":{"route":"bu/api/profiles","port":"4100","host":"127.0.0.1","protocol":"http","ssl":null},"services":[{"name":"SystemView","url":"http://localhost:3000/systemview/api","onLoad":null,"client":{"SystemView":{}}}]},"specList":{"docs":["Badges.md","Events.md","Follows.md","Groups.md","Locations.md","Profiles.md","Solicitations.md","Teams.md","Tournaments.md","Users.md","Users.signIn.md","Users.signUp.md"],"tests":["Aggregator.get.json","Badges.get.json","Events.add.json","Events.addAdmin.json","Events.addGroup.json","Events.addMember.json","Events.addTeam.json","Events.addTournament.json","Events.edit.json","Events.get.json","Events.removeAdmin.json","Events.removeGroup.json","Events.removeMember.json","Events.removeTeam.json","Events.removeTournament.json","Follows.add.json","Follows.delete.json","Follows.get.json","Follows.getPage.json","Groups.add.json","Groups.addAdmin.json","Groups.addMember.json","Groups.addTeam.json","Groups.addTournament.json","Groups.edit.json","Groups.get.json","Groups.removeAdmin.json","Groups.removeMember.json","Groups.removeTeam.json","Groups.removeTournament.json","Groups.updateStatus.json","Locations.get.json","Locations.resolve.json","Locations.save.json","Locations.search.json","Solicitations.accept.json","Solicitations.cancel.json","Solicitations.get.json","Solicitations.reject.json","Solicitations.resend.json","Solicitations.send.json","Storage.delete.json","Storage.list.json","Storage.save.json","Teams.acceptDraft.json","Teams.add.json","Teams.addAdmin.json","Teams.addMember.json","Teams.closeDraft.json","Teams.edit.json","Teams.endDraft.json","Teams.get.json","Teams.joinDraft.json","Teams.rejectDraft.json","Teams.removeAdmin.json","Teams.removeFromDraft.json","Teams.removeMember.json","Teams.removeScope.json","Teams.setScope.json","Teams.startDraft.json","Teams.updateStatus.json","Tournaments.add.json","Tournaments.addAdmin.json","Tournaments.addMember.json","Tournaments.addTeam.json","Tournaments.edit.json","Tournaments.get.json","Tournaments.getPage.json","Tournaments.removeAdmin.json","Tournaments.removeMember.json","Tournaments.removeTeam.json","Tournaments.startDraft.json","Tournaments.updateStatus.json","Users.edit.json","Users.exists.json","Users.get.json","Users.getPage.json","Users.isRecognized.json","Users.quickSignUp.json","Users.setBadges.json","Users.signIn.json","Users.signOut.json","Users.signUp.json","Users.updateRealLocation.json"]}},{"projectCode":"buAPI","serviceId":"Networking","system":{"connectionData":{"modules":[{"namespace":"ws://127.0.0.1:5100/bu/api/networking/Chats","route":"/bu/api/networking/Chats","name":"Chats","methods":[{"method":"post","fn":"start"},{"method":"post","fn":"send"},{"method":"post","fn":"get"},{"method":"post","fn":"getMessages"},{"method":"post","fn":"undoMessage"},{"method":"post","fn":"addMember"},{"method":"post","fn":"removeMember"},{"method":"post","fn":"addSeenBy"},{"method":"post","fn":"getAll"}]},{"namespace":"ws://127.0.0.1:5100/bu/api/networking/Notifications","route":"/bu/api/networking/Notifications","name":"Notifications","methods":[{"method":"post","fn":"add"},{"method":"post","fn":"get"},{"method":"post","fn":"updateStatus"}]},{"namespace":"ws://127.0.0.1:5100/bu/api/networking/Storage","route":"/bu/api/networking/Storage","name":"Storage","methods":[{"method":"post","fn":"save"},{"method":"post","fn":"delete"},{"method":"post","fn":"list"}]},{"namespace":"ws://127.0.0.1:5100/bu/api/networking/Plugin","route":"/bu/api/networking/Plugin","name":"Plugin","methods":[{"method":"post","fn":"clearMockChats"},{"method":"post","fn":"clearMockNotifications"},{"method":"post","fn":"clearStorage"},{"method":"post","fn":"saveDoc"},{"method":"post","fn":"getDoc"},{"method":"post","fn":"getTests"},{"method":"post","fn":"saveTest"},{"method":"post","fn":"deleteTest"},{"method":"post","fn":"getSpecList"},{"method":"post","fn":"getConnection"},{"method":"post","fn":"getLog"}]}],"host":"127.0.0.1","route":"/bu/api/networking","port":"5100","serviceUrl":"http://127.0.0.1:5100/bu/api/networking","socketPath":"/bu/api/networking/socket.io","namespace":"ws://127.0.0.1:5100/bu/api/networking","SystemLynxService":true},"modules":[{"name":"Chats","module":{"db":{"itemName":"Chat","collectionName":"Chats"}}},{"name":"Notifications","module":{"db":{"itemName":"Notification","collectionName":"Notifications"}}},{"name":"Storage","module":{"STORAGE":"/Users/odionedwards/buAPI/Networking/files","STORAGE_URL":"http://127.0.0.1:5100/storage"}},{"name":"Plugin","module":{}}],"routing":{"route":"bu/api/networking","port":"5100","host":"127.0.0.1","protocol":"http","ssl":null,"staticRouting":true},"services":[{"name":"Profiles","url":"http://127.0.0.1:4100/bu/api/profiles","onLoad":null,"client":{"Badges":{},"Locations":{},"Users":{},"Teams":{},"Tournaments":{},"Groups":{},"Events":{},"Follows":{},"Solicitations":{},"Aggregator":{},"Storage":{},"Plugin":{}}},{"name":"SystemView","url":"http://localhost:3000/systemview/api","onLoad":null,"client":{"SystemView":{}}}]},"specList":{"docs":["Chats.md","Networking.md","Notifications.md","Shares.md"],"tests":["Chats.addMember.json","Chats.addSeenBy.json","Chats.get.json","Chats.getAll.json","Chats.getMessages.json","Chats.removeMember.json","Chats.send.json","Chats.start.json","Chats.undoMessage.json","Notifications.add.json","Notifications.get.json","Notifications.updateStatus.json"]}},{"projectCode":"buAPI","serviceId":"Basketball","system":{"connectionData":{"modules":[{"namespace":"ws://127.0.0.1:4900/bu/api/basketball/Games","route":"/bu/api/basketball/Games","name":"Games","methods":[{"method":"post","fn":"add"},{"method":"post","fn":"get"},{"method":"post","fn":"getPage"},{"method":"post","fn":"editGameDetails"},{"method":"post","fn":"updateTeam"},{"method":"post","fn":"addAdmin"},{"method":"post","fn":"removeAdmin"},{"method":"post","fn":"addPlay"},{"method":"post","fn":"editPlay"},{"method":"post","fn":"undoPlay"},{"method":"post","fn":"insertPlay"},{"method":"post","fn":"endReview"},{"method":"post","fn":"acceptCallout"},{"method":"post","fn":"rejectCallout"},{"method":"post","fn":"setAdmins"}]},{"namespace":"ws://127.0.0.1:4900/bu/api/basketball/Stats","route":"/bu/api/basketball/Stats","name":"Stats","methods":[{"method":"post","fn":"get"},{"method":"post","fn":"getPage"}]},{"namespace":"ws://127.0.0.1:4900/bu/api/basketball/Seasons","route":"/bu/api/basketball/Seasons","name":"Seasons","methods":[{"method":"post","fn":"add"},{"method":"post","fn":"get"},{"method":"post","fn":"getPage"},{"method":"post","fn":"edit"},{"method":"post","fn":"addAdmin"},{"method":"post","fn":"removeAdmin"},{"method":"post","fn":"addRound"},{"method":"post","fn":"editRound"},{"method":"post","fn":"removeRound"},{"method":"post","fn":"addTeam"},{"method":"post","fn":"removeTeam"},{"method":"post","fn":"editTeam"},{"method":"post","fn":"acceptCallout"},{"method":"post","fn":"rejectCallout"},{"method":"post","fn":"addMatch"},{"method":"post","fn":"editMatch"},{"method":"post","fn":"cancel"},{"method":"post","fn":"removeMatch"}]},{"namespace":"ws://127.0.0.1:4900/bu/api/basketball/Aggregator","route":"/bu/api/basketball/Aggregator","name":"Aggregator","methods":[{"method":"post","fn":"get"}]},{"namespace":"ws://127.0.0.1:4900/bu/api/basketball/Storage","route":"/bu/api/basketball/Storage","name":"Storage","methods":[{"method":"post","fn":"save"},{"method":"post","fn":"delete"},{"method":"post","fn":"list"}]},{"namespace":"ws://127.0.0.1:4900/bu/api/basketball/Plugin","route":"/bu/api/basketball/Plugin","name":"Plugin","methods":[{"method":"post","fn":"clearMockCourts"},{"method":"post","fn":"clearMockGames"},{"method":"post","fn":"clearMockSeasons"},{"method":"post","fn":"clearMockLocations"},{"method":"post","fn":"readyGame"},{"method":"post","fn":"clearStats"},{"method":"post","fn":"getMockPlays"},{"method":"post","fn":"wait"},{"method":"post","fn":"readySeason"},{"method":"post","fn":"seasonsTest1"},{"method":"post","fn":"seasonsTest2"},{"method":"post","fn":"seasonsTest3"},{"method":"post","fn":"seasonsTest4"},{"method":"post","fn":"seasonsTest5"},{"method":"post","fn":"playOutMockRound"},{"method":"post","fn":"playCasualGames"},{"method":"post","fn":"addSeasonGames"},{"method":"post","fn":"seedLocations"},{"method":"post","fn":"clearStorage"},{"method":"post","fn":"saveDoc"},{"method":"post","fn":"getDoc"},{"method":"post","fn":"getTests"},{"method":"post","fn":"saveTest"},{"method":"post","fn":"deleteTest"},{"method":"post","fn":"getSpecList"},{"method":"post","fn":"getConnection"},{"method":"post","fn":"getLog"}]}],"host":"127.0.0.1","route":"/bu/api/basketball","port":"4900","serviceUrl":"http://127.0.0.1:4900/bu/api/basketball","socketPath":"/bu/api/basketball/socket.io","namespace":"ws://127.0.0.1:4900/bu/api/basketball","SystemLynxService":true},"modules":[{"name":"Games","module":{"db":{"itemName":"Game","collectionName":"Games"}}},{"name":"Stats","module":{}},{"name":"Seasons","module":{"db":{"itemName":"Season","collectionName":"Seasons"}}},{"name":"Aggregator","module":{"db":{},"COLLECTIONS":["Events","Games","Seasons","PlayerOverallPerformance","PlayerSeasonalPerformance","PlayerPerGamePerformance","TeamOverallPerformance","TeamSeasonalPerformance","TeamPerGamePerformance","Locations"]}},{"name":"Storage","module":{"STORAGE":"/Users/odionedwards/buAPI/Basketball/files","STORAGE_URL":"http://127.0.0.1:4900/storage"}},{"name":"Plugin","module":{}}],"routing":{"route":"bu/api/basketball","port":"4900","host":"127.0.0.1","protocol":"http","ssl":null,"staticRouting":true},"services":[{"name":"Profiles","url":"http://127.0.0.1:4100/bu/api/profiles","onLoad":null,"client":{"Badges":{},"Locations":{},"Users":{},"Teams":{},"Tournaments":{},"Groups":{},"Events":{},"Follows":{},"Solicitations":{},"Aggregator":{},"Storage":{},"Plugin":{}}},{"name":"SystemView","url":"http://localhost:3000/systemview/api","onLoad":null,"client":{"SystemView":{}}}]},"specList":{"docs":["Basketball.md","Games.md","Seasons.get.md","Seasons.md","Stats.md"],"tests":["Aggregator.get.json","Games.acceptCallout.json","Games.add.json","Games.addAdmin.json","Games.addPlay.json","Games.editGameDetails.json","Games.editPlay.json","Games.endReview.json","Games.get.json","Games.getPage.json","Games.insertPlay.json","Games.rejectCallout.json","Games.removeAdmin.json","Games.setAdmins.json","Games.undoPlay.json","Games.updateTeam.json","Plugin.getMockPlays.json","Plugin.seasonsTest1.json","Plugin.seasonsTest2.json","Plugin.seasonsTest3.json","Plugin.seasonsTest4.json","Plugin.seasonsTest5.json","Seasons.acceptCallout.json","Seasons.add.json","Seasons.addAdmin.json","Seasons.addMatch.json","Seasons.addRound.json","Seasons.addTeam.json","Seasons.cancel.json","Seasons.edit.json","Seasons.editMatch.json","Seasons.editRound.json","Seasons.editTeam.json","Seasons.get.json","Seasons.getPage.json","Seasons.rejectCallout.json","Seasons.removeAdmin.json","Seasons.removeMatch.json","Seasons.removeRound.json","Seasons.removeTeam.json","Stats.get.json","Stats.getPage.json"]}},{"projectCode":"buAPI","serviceId":"Media","system":{"connectionData":{"modules":[{"namespace":"ws://127.0.0.1:4000/bu/api/media/Broadcasts","route":"/bu/api/media/Broadcasts","name":"Broadcasts","methods":[{"method":"post","fn":"add"},{"method":"post","fn":"get"},{"method":"post","fn":"getPage"},{"method":"post","fn":"getRtpCapabilities"},{"method":"post","fn":"getSenderTransportData"},{"method":"post","fn":"connectTransport"},{"method":"post","fn":"createSceneProducer"},{"method":"post","fn":"getReceiverTransportData"},{"method":"post","fn":"createSceneConsumers"},{"method":"post","fn":"resumeConsumer"},{"method":"post","fn":"switchScenes"},{"method":"post","fn":"startBroadcast"},{"method":"post","fn":"endBroadcast"},{"method":"post","fn":"addAdmin"},{"method":"post","fn":"removeAdmin"},{"method":"post","fn":"setAdmins"},{"method":"post","fn":"addContributor"},{"method":"post","fn":"removeContributor"},{"method":"post","fn":"setContributors"}]},{"namespace":"ws://127.0.0.1:4000/bu/api/media/Posts","route":"/bu/api/media/Posts","name":"Posts","methods":[{"method":"post","fn":"add"},{"method":"post","fn":"get"},{"method":"post","fn":"getPage"},{"method":"post","fn":"delete"},{"method":"post","fn":"edit"}]},{"namespace":"ws://127.0.0.1:4000/bu/api/media/Reactions","route":"/bu/api/media/Reactions","name":"Reactions","methods":[{"method":"post","fn":"add"},{"method":"post","fn":"get"},{"method":"post","fn":"getPage"},{"method":"post","fn":"getCount"},{"method":"post","fn":"delete"}]},{"namespace":"ws://127.0.0.1:4000/bu/api/media/Storage","route":"/bu/api/media/Storage","name":"Storage","methods":[{"method":"post","fn":"save"},{"method":"post","fn":"delete"},{"method":"post","fn":"list"}]},{"namespace":"ws://127.0.0.1:4000/bu/api/media/Plugin","route":"/bu/api/media/Plugin","name":"Plugin","methods":[{"method":"post","fn":"clearMockBroadcasts"},{"method":"post","fn":"clearMockReactions"},{"method":"post","fn":"clearMockPost"},{"method":"post","fn":"clearStorage"},{"method":"post","fn":"saveDoc"},{"method":"post","fn":"getDoc"},{"method":"post","fn":"getTests"},{"method":"post","fn":"saveTest"},{"method":"post","fn":"deleteTest"},{"method":"post","fn":"getSpecList"},{"method":"post","fn":"getConnection"},{"method":"post","fn":"getLog"}]}],"host":"127.0.0.1","route":"/bu/api/media","port":"4000","serviceUrl":"http://127.0.0.1:4000/bu/api/media","socketPath":"/bu/api/media/socket.io","namespace":"ws://127.0.0.1:4000/bu/api/media","SystemLynxService":true},"modules":[{"name":"Broadcasts","module":{"db":{"itemName":"Broadcast","collectionName":"Broadcasts"},"router":{"_events":{},"_eventsCount":2,"_maxListeners":null}}},{"name":"Posts","module":{"db":{"itemName":"Post","collectionName":"Posts"}}},{"name":"Reactions","module":{"db":{"itemName":"Reaction","collectionName":"Reactions"}}},{"name":"Storage","module":{"STORAGE":"/Users/odionedwards/buAPI/Media/files","STORAGE_URL":"http://127.0.0.1:4000/storage"}},{"name":"Plugin","module":{}}],"routing":{"route":"bu/api/media","port":"4000","host":"127.0.0.1","protocol":"http","ssl":null,"staticRouting":true},"services":[{"name":"Profiles","url":"http://127.0.0.1:4100/bu/api/profiles","onLoad":null,"client":{"Badges":{},"Locations":{},"Users":{},"Teams":{},"Tournaments":{},"Groups":{},"Events":{},"Follows":{},"Solicitations":{},"Aggregator":{},"Storage":{},"Plugin":{}}},{"name":"Basketball","url":"http://127.0.0.1:4900/bu/api/basketball","onLoad":null,"client":{"Games":{},"Stats":{},"Seasons":{},"Aggregator":{},"Storage":{},"Plugin":{}}},{"name":"SystemView","url":"http://localhost:3000/systemview/api","onLoad":null,"client":{"SystemView":{}}}]},"specList":{"docs":["Broadcasts.md","Media.md","Posts-contract.md","Posts.md","Reactions.md","Storage.md"],"tests":["Broadcasts.add.json","Broadcasts.addAdmin.json","Broadcasts.addContributor.json","Broadcasts.get.json","Broadcasts.getPage.json","Broadcasts.removeAdmin.json","Broadcasts.removeContributor.json","Broadcasts.setAdmins.json","Broadcasts.setContributors.json","Posts.add.json","Posts.delete.json","Posts.edit.json","Posts.get.json","Posts.getPage.json","Reactions.add.json","Reactions.delete.json","Reactions.get.json","Reactions.getCount.json","Reactions.getPage.json"]}},{"projectCode":"buAPI","serviceId":"Mocks","system":{"connectionData":{"modules":[{"namespace":"ws://127.0.0.1:4300/bu/api/mocks/Badges","route":"/bu/api/mocks/Badges","name":"Badges","methods":[{"method":"post","fn":"find"},{"method":"post","fn":"findOne"},{"method":"post","fn":"updateOne"},{"method":"post","fn":"deleteOne"},{"method":"post","fn":"deleteMany"}]},{"namespace":"ws://127.0.0.1:4300/bu/api/mocks/Locations","route":"/bu/api/mocks/Locations","name":"Locations","methods":[{"method":"post","fn":"find"},{"method":"post","fn":"findOne"},{"method":"post","fn":"updateOne"},{"method":"post","fn":"deleteOne"},{"method":"post","fn":"deleteMany"}]},{"namespace":"ws://127.0.0.1:4300/bu/api/mocks/Users","route":"/bu/api/mocks/Users","name":"Users","methods":[{"method":"post","fn":"find"},{"method":"post","fn":"findOne"},{"method":"post","fn":"updateOne"},{"method":"post","fn":"deleteOne"},{"method":"post","fn":"deleteMany"}]},{"namespace":"ws://127.0.0.1:4300/bu/api/mocks/UsersArchive","route":"/bu/api/mocks/UsersArchive","name":"UsersArchive","methods":[{"method":"post","fn":"find"},{"method":"post","fn":"findOne"},{"method":"post","fn":"updateOne"},{"method":"post","fn":"deleteOne"},{"method":"post","fn":"deleteMany"}]},{"namespace":"ws://127.0.0.1:4300/bu/api/mocks/Tournaments","route":"/bu/api/mocks/Tournaments","name":"Tournaments","methods":[{"method":"post","fn":"find"},{"method":"post","fn":"findOne"},{"method":"post","fn":"updateOne"},{"method":"post","fn":"deleteOne"},{"method":"post","fn":"deleteMany"}]},{"namespace":"ws://127.0.0.1:4300/bu/api/mocks/Teams","route":"/bu/api/mocks/Teams","name":"Teams","methods":[{"method":"post","fn":"find"},{"method":"post","fn":"findOne"},{"method":"post","fn":"updateOne"},{"method":"post","fn":"deleteOne"},{"method":"post","fn":"deleteMany"}]},{"namespace":"ws://127.0.0.1:4300/bu/api/mocks/Groups","route":"/bu/api/mocks/Groups","name":"Groups","methods":[{"method":"post","fn":"find"},{"method":"post","fn":"findOne"},{"method":"post","fn":"updateOne"},{"method":"post","fn":"deleteOne"},{"method":"post","fn":"deleteMany"}]},{"namespace":"ws://127.0.0.1:4300/bu/api/mocks/Events","route":"/bu/api/mocks/Events","name":"Events","methods":[{"method":"post","fn":"find"},{"method":"post","fn":"findOne"},{"method":"post","fn":"updateOne"},{"method":"post","fn":"deleteOne"},{"method":"post","fn":"deleteMany"}]},{"namespace":"ws://127.0.0.1:4300/bu/api/mocks/Follows","route":"/bu/api/mocks/Follows","name":"Follows","methods":[{"method":"post","fn":"find"},{"method":"post","fn":"findOne"},{"method":"post","fn":"updateOne"},{"method":"post","fn":"deleteOne"},{"method":"post","fn":"deleteMany"}]},{"namespace":"ws://127.0.0.1:4300/bu/api/mocks/Solicitations","route":"/bu/api/mocks/Solicitations","name":"Solicitations","methods":[{"method":"post","fn":"find"},{"method":"post","fn":"findOne"},{"method":"post","fn":"updateOne"},{"method":"post","fn":"deleteOne"},{"method":"post","fn":"deleteMany"}]},{"namespace":"ws://127.0.0.1:4300/bu/api/mocks/PlayerOverallPerformance","route":"/bu/api/mocks/PlayerOverallPerformance","name":"PlayerOverallPerformance","methods":[{"method":"post","fn":"find"},{"method":"post","fn":"findOne"},{"method":"post","fn":"updateOne"},{"method":"post","fn":"deleteOne"},{"method":"post","fn":"deleteMany"}]},{"namespace":"ws://127.0.0.1:4300/bu/api/mocks/PlayerSeasonalPerformance","route":"/bu/api/mocks/PlayerSeasonalPerformance","name":"PlayerSeasonalPerformance","methods":[{"method":"post","fn":"find"},{"method":"post","fn":"findOne"},{"method":"post","fn":"updateOne"},{"method":"post","fn":"deleteOne"},{"method":"post","fn":"deleteMany"}]},{"namespace":"ws://127.0.0.1:4300/bu/api/mocks/PlayerPerGamePerformance","route":"/bu/api/mocks/PlayerPerGamePerformance","name":"PlayerPerGamePerformance","methods":[{"method":"post","fn":"find"},{"method":"post","fn":"findOne"},{"method":"post","fn":"updateOne"},{"method":"post","fn":"deleteOne"},{"method":"post","fn":"deleteMany"}]},{"namespace":"ws://127.0.0.1:4300/bu/api/mocks/TeamOverallPerformance","route":"/bu/api/mocks/TeamOverallPerformance","name":"TeamOverallPerformance","methods":[{"method":"post","fn":"find"},{"method":"post","fn":"findOne"},{"method":"post","fn":"updateOne"},{"method":"post","fn":"deleteOne"},{"method":"post","fn":"deleteMany"}]},{"namespace":"ws://127.0.0.1:4300/bu/api/mocks/TeamSeasonalPerformance","route":"/bu/api/mocks/TeamSeasonalPerformance","name":"TeamSeasonalPerformance","methods":[{"method":"post","fn":"find"},{"method":"post","fn":"findOne"},{"method":"post","fn":"updateOne"},{"method":"post","fn":"deleteOne"},{"method":"post","fn":"deleteMany"}]},{"namespace":"ws://127.0.0.1:4300/bu/api/mocks/TeamPerGamePerformance","route":"/bu/api/mocks/TeamPerGamePerformance","name":"TeamPerGamePerformance","methods":[{"method":"post","fn":"find"},{"method":"post","fn":"findOne"},{"method":"post","fn":"updateOne"},{"method":"post","fn":"deleteOne"},{"method":"post","fn":"deleteMany"}]},{"namespace":"ws://127.0.0.1:4300/bu/api/mocks/Broadcasts","route":"/bu/api/mocks/Broadcasts","name":"Broadcasts","methods":[{"method":"post","fn":"find"},{"method":"post","fn":"findOne"},{"method":"post","fn":"updateOne"},{"method":"post","fn":"deleteOne"},{"method":"post","fn":"deleteMany"}]},{"namespace":"ws://127.0.0.1:4300/bu/api/mocks/Posts","route":"/bu/api/mocks/Posts","name":"Posts","methods":[{"method":"post","fn":"find"},{"method":"post","fn":"findOne"},{"method":"post","fn":"updateOne"},{"method":"post","fn":"deleteOne"},{"method":"post","fn":"deleteMany"}]},{"namespace":"ws://127.0.0.1:4300/bu/api/mocks/Reactions","route":"/bu/api/mocks/Reactions","name":"Reactions","methods":[{"method":"post","fn":"find"},{"method":"post","fn":"findOne"},{"method":"post","fn":"updateOne"},{"method":"post","fn":"deleteOne"},{"method":"post","fn":"deleteMany"}]},{"namespace":"ws://127.0.0.1:4300/bu/api/mocks/People","route":"/bu/api/mocks/People","name":"People","methods":[{"method":"post","fn":"createUsers"},{"method":"post","fn":"createPopulatedUsers"},{"method":"post","fn":"createTeams"},{"method":"post","fn":"createPopulatedTeams"},{"method":"post","fn":"createTournaments"},{"method":"post","fn":"createPopulatedTournaments"},{"method":"post","fn":"createGroups"},{"method":"post","fn":"createPopulatedGroups"},{"method":"post","fn":"createEvents"},{"method":"post","fn":"createPopulatedEvents"}]},{"namespace":"ws://127.0.0.1:4300/bu/api/mocks/Games","route":"/bu/api/mocks/Games","name":"Games","methods":[{"method":"post","fn":"playOutGames"},{"method":"post","fn":"playOutExistingGames"}]},{"namespace":"ws://127.0.0.1:4300/bu/api/mocks/Seasons","route":"/bu/api/mocks/Seasons","name":"Seasons","methods":[{"method":"post","fn":"createPopulatedSeasons"},{"method":"post","fn":"playOutSeasons"}]},{"namespace":"ws://127.0.0.1:4300/bu/api/mocks/Media","route":"/bu/api/mocks/Media","name":"Media","methods":[{"method":"post","fn":"createPosts"}]},{"namespace":"ws://127.0.0.1:4300/bu/api/mocks/Scenarios","route":"/bu/api/mocks/Scenarios","name":"Scenarios","methods":[{"method":"post","fn":"buildArea"}]},{"namespace":"ws://127.0.0.1:4300/bu/api/mocks/GamesDB","route":"/bu/api/mocks/GamesDB","name":"GamesDB","methods":[{"method":"post","fn":"find"},{"method":"post","fn":"findOne"},{"method":"post","fn":"updateOne"},{"method":"post","fn":"deleteOne"},{"method":"post","fn":"deleteMany"}]},{"namespace":"ws://127.0.0.1:4300/bu/api/mocks/SeasonsDB","route":"/bu/api/mocks/SeasonsDB","name":"SeasonsDB","methods":[{"method":"post","fn":"find"},{"method":"post","fn":"findOne"},{"method":"post","fn":"updateOne"},{"method":"post","fn":"deleteOne"},{"method":"post","fn":"deleteMany"}]},{"namespace":"ws://127.0.0.1:4300/bu/api/mocks/Plugin","route":"/bu/api/mocks/Plugin","name":"Plugin","methods":[{"method":"post","fn":"saveDoc"},{"method":"post","fn":"getDoc"},{"method":"post","fn":"getTests"},{"method":"post","fn":"saveTest"},{"method":"post","fn":"deleteTest"},{"method":"post","fn":"getSpecList"},{"method":"post","fn":"getConnection"},{"method":"post","fn":"getLog"}]}],"host":"127.0.0.1","route":"/bu/api/mocks","port":"4300","serviceUrl":"http://127.0.0.1:4300/bu/api/mocks","socketPath":"/bu/api/mocks/socket.io","namespace":"ws://127.0.0.1:4300/bu/api/mocks","SystemLynxService":true},"modules":[{"name":"Badges","__constructor":{},"module":{}},{"name":"Locations","__constructor":{},"module":{}},{"name":"Users","__constructor":{},"module":{}},{"name":"UsersArchive","__constructor":{},"module":{}},{"name":"Tournaments","__constructor":{},"module":{}},{"name":"Teams","__constructor":{},"module":{}},{"name":"Groups","__constructor":{},"module":{}},{"name":"Events","__constructor":{},"module":{}},{"name":"Follows","__constructor":{},"module":{}},{"name":"Solicitations","__constructor":{},"module":{}},{"name":"PlayerOverallPerformance","__constructor":{},"module":{}},{"name":"PlayerSeasonalPerformance","__constructor":{},"module":{}},{"name":"PlayerPerGamePerformance","__constructor":{},"module":{}},{"name":"TeamOverallPerformance","__constructor":{},"module":{}},{"name":"TeamSeasonalPerformance","__constructor":{},"module":{}},{"name":"TeamPerGamePerformance","__constructor":{},"module":{}},{"name":"Broadcasts","__constructor":{},"module":{}},{"name":"Posts","__constructor":{},"module":{}},{"name":"Reactions","__constructor":{},"module":{}},{"name":"People","module":{}},{"name":"Games","module":{}},{"name":"Seasons","module":{}},{"name":"Media","module":{}},{"name":"Scenarios","module":{}},{"name":"GamesDB","__constructor":{},"module":{}},{"name":"SeasonsDB","__constructor":{},"module":{}},{"name":"Plugin","module":{}}],"routing":{"route":"bu/api/mocks","port":"4300","host":"127.0.0.1","protocol":"http","ssl":null,"staticRouting":true},"services":[{"name":"Basketball","url":"http://127.0.0.1:4900/bu/api/basketball","onLoad":null,"client":{"Games":{},"Stats":{},"Seasons":{},"Aggregator":{},"Storage":{},"Plugin":{}}},{"name":"SystemView","url":"http://localhost:3000/systemview/api","onLoad":null,"client":{"SystemView":{}}}]},"specList":{"docs":["Mocks.md"],"tests":["Games.playOutGames.json","Media.createPosts.json","People.createPopulatedTeams.json","People.createUsers.json","Seasons.createPopulatedSeasons.json","Seasons.playOutSeasons.json"]}},{"projectCode":"systemview-test","serviceId":"TestService","system":{"connectionData":{"modules":[{"namespace":"ws://localhost:5555/test/api/Math","route":"/test/api/Math","name":"Math","methods":[{"method":"post","fn":"add"},{"method":"post","fn":"subtract"},{"method":"post","fn":"multiply"},{"method":"post","fn":"getItems"}]},{"namespace":"ws://localhost:5555/test/api/String","route":"/test/api/String","name":"String","methods":[{"method":"post","fn":"concat"},{"method":"post","fn":"repeat"},{"method":"post","fn":"toUpperCase"}]},{"namespace":"ws://localhost:5555/test/api/Auth","route":"/test/api/Auth","name":"Auth","methods":[{"method":"post","fn":"signIn"},{"method":"post","fn":"getSession"}]},{"namespace":"ws://localhost:5555/test/api/Headers","route":"/test/api/Headers","name":"Headers","methods":[{"method":"post","fn":"getOrigin"}]},{"namespace":"ws://localhost:5555/test/api/Plugin","route":"/test/api/Plugin","name":"Plugin","methods":[{"method":"post","fn":"saveDoc"},{"method":"post","fn":"getDoc"},{"method":"post","fn":"getTests"},{"method":"post","fn":"saveTest"},{"method":"post","fn":"deleteTest"},{"method":"post","fn":"getSpecList"},{"method":"post","fn":"getConnection"},{"method":"post","fn":"getLog"}]}],"host":"localhost","route":"/test/api","port":5555,"serviceUrl":"http://localhost:5555/test/api","socketPath":"/test/api/socket.io","namespace":"ws://localhost:5555/test/api","SystemLynxService":true},"modules":[{"name":"Math","__constructor":{},"module":{}},{"name":"String","__constructor":{},"module":{}},{"name":"Auth","__constructor":{"_lastCookie":"session=test-session-value"},"module":{}},{"name":"Headers","__constructor":{"_lastOrigin":"http://localhost:3000"},"module":{}},{"name":"Plugin","module":{}}],"routing":{"route":"test/api","port":5555},"services":[{"name":"SystemView","url":"http://localhost:3000/systemview/api","onLoad":null,"client":{"SystemView":{}}}]},"specList":{"docs":[],"tests":["Auth.getSession.json","Auth.signIn.json","Headers.getOrigin.json","Math.add.json","Math.list.json","Math.subtract.json","String.concat.json","String.repeat.json"]}}]
|
|
1
|
+
[{"projectCode":"systemview-test","serviceId":"TestService","system":{"connectionData":{"modules":[{"namespace":"ws://localhost:5555/test/api/Math","route":"/test/api/Math","name":"Math","methods":[{"method":"post","fn":"add"},{"method":"post","fn":"subtract"},{"method":"post","fn":"multiply"},{"method":"post","fn":"divide"},{"method":"post","fn":"getItems"},{"method":"post","fn":"once"},{"method":"post","fn":"destroy"}]},{"namespace":"ws://localhost:5555/test/api/String","route":"/test/api/String","name":"String","methods":[{"method":"post","fn":"concat"},{"method":"post","fn":"repeat"},{"method":"post","fn":"toUpperCase"},{"method":"post","fn":"once"},{"method":"post","fn":"destroy"}]},{"namespace":"ws://localhost:5555/test/api/Auth","route":"/test/api/Auth","name":"Auth","methods":[{"method":"post","fn":"signIn"},{"method":"post","fn":"getSession"},{"method":"post","fn":"once"},{"method":"post","fn":"destroy"}]},{"namespace":"ws://localhost:5555/test/api/Headers","route":"/test/api/Headers","name":"Headers","methods":[{"method":"post","fn":"getOrigin"},{"method":"post","fn":"once"},{"method":"post","fn":"destroy"}]},{"namespace":"ws://localhost:5555/test/api/SystemView","route":"/test/api/SystemView","name":"SystemView","methods":[{"method":"post","fn":"once"},{"method":"post","fn":"destroy"},{"method":"post","fn":"trace"},{"method":"post","fn":"log"},{"method":"post","fn":"warn"},{"method":"post","fn":"error"},{"method":"post","fn":"debug"},{"method":"post","fn":"getLog"},{"method":"post","fn":"clearLog"}]},{"namespace":"ws://localhost:5555/test/api/Plugin","route":"/test/api/Plugin","name":"Plugin","methods":[{"method":"post","fn":"once"},{"method":"post","fn":"destroy"},{"method":"post","fn":"saveDoc"},{"method":"post","fn":"getDoc"},{"method":"post","fn":"getTests"},{"method":"post","fn":"saveTest"},{"method":"post","fn":"deleteTest"},{"method":"post","fn":"getSpecList"},{"method":"post","fn":"getConnection"},{"method":"post","fn":"getLog"},{"method":"post","fn":"getManifest"}]}],"host":"localhost","route":"/test/api","port":5555,"serviceUrl":"http://localhost:5555/test/api","socketPath":"/test/api/socket.io","namespace":"ws://localhost:5555/test/api","SystemLynxService":true},"modules":[{"name":"Math","__constructor":{},"module":{"_svPendingDuration":0,"_svTraceId":"655930-q05v"}},{"name":"String","__constructor":{},"module":{}},{"name":"Auth","__constructor":{"_lastCookie":""},"module":{"_svPendingDuration":1,"_svTraceId":"655911-cedb"}},{"name":"Headers","__constructor":{"_lastOrigin":"http://localhost:3000"},"module":{}},{"name":"SystemView","module":{}},{"name":"Plugin","module":{}}],"routing":{"route":"test/api","port":5555},"services":[{"name":"SystemView","url":"http://localhost:3000/systemview/api","onLoad":null,"client":{}}]},"specList":{"docs":[],"tests":["Auth.getSession.json","Auth.signIn.json","Headers.getOrigin.json","Math.add.json","Math.divide.json","Math.list.json","Math.multiply.json","Math.subtract.json","String.concat.json","String.repeat.json"]}}]
|
package/api/index.js
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
const { HttpClient: http, App } = require("systemlynx");
|
|
1
|
+
const { HttpClient: http, createClient, App } = require("systemlynx");
|
|
2
2
|
const ConnectedServices = require("./Connections")();
|
|
3
|
+
const Client = createClient();
|
|
3
4
|
const route = "systemview/api";
|
|
4
5
|
const host = "localhost";
|
|
5
6
|
const express = require("express");
|
|
6
7
|
const path = require("path");
|
|
8
|
+
|
|
7
9
|
const isUrl = (str) =>
|
|
8
10
|
/^(http:\/\/|https:\/\/)?((localhost|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})|([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}))(:[0-9]{1,5})?(\/.*)?$/.test(
|
|
9
|
-
str
|
|
11
|
+
str,
|
|
10
12
|
);
|
|
11
13
|
|
|
12
14
|
function connect({ system, projectCode, serviceId, specList }) {
|
|
13
15
|
const { service, index } = ConnectedServices.findService(
|
|
14
16
|
system.connectionData.serviceUrl,
|
|
15
|
-
projectCode
|
|
17
|
+
projectCode,
|
|
16
18
|
);
|
|
17
19
|
|
|
18
20
|
if (service) {
|
|
@@ -28,7 +30,7 @@ function updateSpecList(specList, projectCode, serviceId) {
|
|
|
28
30
|
const { service, index } = ConnectedServices.findService(
|
|
29
31
|
undefined,
|
|
30
32
|
projectCode,
|
|
31
|
-
serviceId
|
|
33
|
+
serviceId,
|
|
32
34
|
);
|
|
33
35
|
if (service) {
|
|
34
36
|
service.specList = specList;
|
|
@@ -59,13 +61,27 @@ function getServices(searchText) {
|
|
|
59
61
|
async function getConnectionData(url) {
|
|
60
62
|
try {
|
|
61
63
|
const connectionData = await http.request({ url });
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
if (!connectionData || !connectionData.SystemLynxService) return [];
|
|
65
|
+
const svc = Client.createService(connectionData);
|
|
66
|
+
let project;
|
|
67
|
+
try {
|
|
68
|
+
const connection = await svc.Plugin.getConnection();
|
|
69
|
+
project = {
|
|
70
|
+
system: connection.system,
|
|
71
|
+
projectCode: connection.projectCode,
|
|
72
|
+
serviceId: connection.serviceId,
|
|
73
|
+
specList: connection.specList,
|
|
74
|
+
};
|
|
75
|
+
} catch {
|
|
76
|
+
const routeSegs = (connectionData.route || "").split("/").filter(Boolean);
|
|
77
|
+
const serviceId = [...routeSegs].reverse().find((s) => s.toLowerCase() !== "api") || "Service";
|
|
78
|
+
project = {
|
|
79
|
+
system: { connectionData },
|
|
80
|
+
serviceId,
|
|
81
|
+
projectCode: "connected-services",
|
|
82
|
+
specList: { tests: [], docs: [] },
|
|
83
|
+
};
|
|
84
|
+
}
|
|
69
85
|
connect(project);
|
|
70
86
|
return [project];
|
|
71
87
|
} catch (error) {
|
|
@@ -80,17 +96,27 @@ async function refreshConnection(searchText) {
|
|
|
80
96
|
function getProjects() {
|
|
81
97
|
const connections = ConnectedServices.getAllConnections();
|
|
82
98
|
const projects = {};
|
|
83
|
-
connections.forEach(({ projectCode, serviceId, system }) => {
|
|
99
|
+
connections.forEach(({ projectCode, serviceId, system, specList }) => {
|
|
84
100
|
if (!projects[projectCode]) projects[projectCode] = [];
|
|
85
101
|
projects[projectCode].push({
|
|
86
102
|
serviceId,
|
|
87
103
|
serviceUrl: system.connectionData.serviceUrl,
|
|
88
104
|
connectionData: system.connectionData,
|
|
105
|
+
system,
|
|
106
|
+
specList: specList || { tests: [], docs: [] },
|
|
89
107
|
});
|
|
90
108
|
});
|
|
91
109
|
return projects;
|
|
92
110
|
}
|
|
93
111
|
|
|
112
|
+
function deleteService(projectCode, serviceId) {
|
|
113
|
+
ConnectedServices.deleteService(projectCode, serviceId);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function deleteProject(projectCode) {
|
|
117
|
+
ConnectedServices.deleteProject(projectCode);
|
|
118
|
+
}
|
|
119
|
+
|
|
94
120
|
const shutdown = () => process.exit(0);
|
|
95
121
|
|
|
96
122
|
module.exports = function launchSystemView(port = 3000) {
|
|
@@ -113,6 +139,8 @@ module.exports = function launchSystemView(port = 3000) {
|
|
|
113
139
|
updateSpecList,
|
|
114
140
|
shutdown,
|
|
115
141
|
refreshConnection,
|
|
142
|
+
deleteService,
|
|
143
|
+
deleteProject,
|
|
116
144
|
})
|
|
117
145
|
.on("ready", () => {
|
|
118
146
|
server.get("*", (req, res) => {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"files": {
|
|
3
|
-
"main.css": "/static/css/main.
|
|
4
|
-
"main.js": "/static/js/main.
|
|
3
|
+
"main.css": "/static/css/main.8e85f0c8.css",
|
|
4
|
+
"main.js": "/static/js/main.6240c0f1.js",
|
|
5
|
+
"static/js/422.05c538a9.chunk.js": "/static/js/422.05c538a9.chunk.js",
|
|
5
6
|
"static/media/FontsFree-Net-SFMono-Regular.ttf": "/static/media/FontsFree-Net-SFMono-Regular.9647425ef282c28529df.ttf",
|
|
6
7
|
"static/media/loading.gif": "/static/media/loading.10ca842f103fd1282bdb.gif",
|
|
7
8
|
"static/media/Malkor-Regular.ttf": "/static/media/Malkor-Regular.f55d6a829566789554a5.ttf",
|
|
@@ -11,11 +12,12 @@
|
|
|
11
12
|
"static/media/check.svg": "/static/media/check.c17549c742b818356d1a95bfa3b0404a.svg",
|
|
12
13
|
"static/media/error.svg": "/static/media/error.1d9e99c1bb443d2374ef72a7205a5b71.svg",
|
|
13
14
|
"static/media/x.svg": "/static/media/x.f680188c9bc9ed62e3647ad587e1bea0.svg",
|
|
14
|
-
"main.
|
|
15
|
-
"main.
|
|
15
|
+
"main.8e85f0c8.css.map": "/static/css/main.8e85f0c8.css.map",
|
|
16
|
+
"main.6240c0f1.js.map": "/static/js/main.6240c0f1.js.map",
|
|
17
|
+
"422.05c538a9.chunk.js.map": "/static/js/422.05c538a9.chunk.js.map"
|
|
16
18
|
},
|
|
17
19
|
"entrypoints": [
|
|
18
|
-
"static/css/main.
|
|
19
|
-
"static/js/main.
|
|
20
|
+
"static/css/main.8e85f0c8.css",
|
|
21
|
+
"static/js/main.6240c0f1.js"
|
|
20
22
|
]
|
|
21
23
|
}
|
package/build/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>SystemView</title><script defer="defer" src="/static/js/main.
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>SystemView</title><script defer="defer" src="/static/js/main.6240c0f1.js"></script><link href="/static/css/main.8e85f0c8.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|