systemview 1.20.1 → 1.22.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 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. Connects the service to the SystemView UI
67
- 2. Writes `systemview.manifest.json` to the project root — lets the CLI run tests without the SystemView server
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 # run all tests for a project
120
- systemview test myProject Users # filter by module
121
- systemview test myProject Users.signUp # filter by method
122
- systemview test myProject --json # structured JSON output for CI/agents
123
- systemview test myProject --verbose # show args passed to each call
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
- ## Registering Services Without the Plugin
140
+ ## Streaming Logs
131
141
 
132
142
  ```bash
133
- # Probe a live service and write its connection data to systemview.manifest.json
134
- systemview connect MyService http://localhost:4100/my/api
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
- # Re-probe all services already in the manifest
137
- systemview connect
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 (interactive, default port 3000) |
196
+ | `systemview [start] [port]` | Start SystemView UI; attach if already running |
162
197
  | `systemview test <projectCode> [namespace]` | Run saved tests |
163
- | `systemview connect <serviceId> <url>` | Register a service, write manifest |
164
- | `systemview connect` | Re-probe all services in existing manifest |
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
- **Flags:** `--json` · `--verbose` · `--manifest <path>`
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>`
@@ -0,0 +1,29 @@
1
+ const fs = require("fs");
2
+
3
+ const HISTORY_FILE = `${__dirname}/cli-history.json`;
4
+ const LIMIT = 50;
5
+
6
+ function read() {
7
+ try { return JSON.parse(fs.readFileSync(HISTORY_FILE, "utf8")); }
8
+ catch { return []; }
9
+ }
10
+
11
+ function write(history) {
12
+ fs.writeFile(HISTORY_FILE, JSON.stringify(history), () => {});
13
+ }
14
+
15
+ module.exports = function CLIHistory() {
16
+ this.getHistory = () => read();
17
+
18
+ this.saveHistory = (entry) => {
19
+ if (!entry || !entry.trim()) return;
20
+ let history = read();
21
+ history = history.filter((h) => h !== entry);
22
+ history.push(entry);
23
+ if (history.length > LIMIT) history = history.slice(-LIMIT);
24
+ write(history);
25
+ return true;
26
+ };
27
+
28
+ return this;
29
+ };
@@ -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
  };
@@ -0,0 +1 @@
1
+ ["test"]
@@ -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"}]},{"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/SystemView","route":"/test/api/SystemView","name":"SystemView","methods":[{"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":"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":{"_svLoggerInjected":true,"_svPendingDuration":0,"_svTraceId":"227998-iv6o"}},{"name":"String","__constructor":{},"module":{"_svLoggerInjected":true}},{"name":"Auth","__constructor":{"_lastCookie":"session=test-session-value"},"module":{"_svLoggerInjected":true}},{"name":"Headers","__constructor":{"_lastOrigin":"http://localhost:3000"},"module":{"_svLoggerInjected":true}},{"name":"SystemView","module":{}},{"name":"Plugin","module":{}}],"routing":{"route":"test/api","port":5555},"services":[{"name":"SystemViewUI","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,21 @@
1
- const { HttpClient: http, App } = require("systemlynx");
1
+ const { HttpClient: http, createClient, App } = require("systemlynx");
2
2
  const ConnectedServices = require("./Connections")();
3
+ const CLIHistory = require("./CLIHistory")();
4
+ const Client = createClient();
3
5
  const route = "systemview/api";
4
6
  const host = "localhost";
5
7
  const express = require("express");
6
8
  const path = require("path");
9
+
7
10
  const isUrl = (str) =>
8
11
  /^(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
12
+ str,
10
13
  );
11
14
 
12
15
  function connect({ system, projectCode, serviceId, specList }) {
13
16
  const { service, index } = ConnectedServices.findService(
14
17
  system.connectionData.serviceUrl,
15
- projectCode
18
+ projectCode,
16
19
  );
17
20
 
18
21
  if (service) {
@@ -28,7 +31,7 @@ function updateSpecList(specList, projectCode, serviceId) {
28
31
  const { service, index } = ConnectedServices.findService(
29
32
  undefined,
30
33
  projectCode,
31
- serviceId
34
+ serviceId,
32
35
  );
33
36
  if (service) {
34
37
  service.specList = specList;
@@ -59,13 +62,27 @@ function getServices(searchText) {
59
62
  async function getConnectionData(url) {
60
63
  try {
61
64
  const connectionData = await http.request({ url });
62
- const project = {
63
- system: { connectionData },
64
- serviceId: "Service",
65
- projectCode: "SystemLynx",
66
- specList: { tests: [], docs: [] },
67
- };
68
-
65
+ if (!connectionData || !connectionData.SystemLynxService) return [];
66
+ const svc = Client.createService(connectionData);
67
+ let project;
68
+ try {
69
+ const connection = await svc.Plugin.getConnection();
70
+ project = {
71
+ system: connection.system,
72
+ projectCode: connection.projectCode,
73
+ serviceId: connection.serviceId,
74
+ specList: connection.specList,
75
+ };
76
+ } catch {
77
+ const routeSegs = (connectionData.route || "").split("/").filter(Boolean);
78
+ const serviceId = [...routeSegs].reverse().find((s) => s.toLowerCase() !== "api") || "Service";
79
+ project = {
80
+ system: { connectionData },
81
+ serviceId,
82
+ projectCode: "connected-services",
83
+ specList: { tests: [], docs: [] },
84
+ };
85
+ }
69
86
  connect(project);
70
87
  return [project];
71
88
  } catch (error) {
@@ -80,17 +97,27 @@ async function refreshConnection(searchText) {
80
97
  function getProjects() {
81
98
  const connections = ConnectedServices.getAllConnections();
82
99
  const projects = {};
83
- connections.forEach(({ projectCode, serviceId, system }) => {
100
+ connections.forEach(({ projectCode, serviceId, system, specList }) => {
84
101
  if (!projects[projectCode]) projects[projectCode] = [];
85
102
  projects[projectCode].push({
86
103
  serviceId,
87
104
  serviceUrl: system.connectionData.serviceUrl,
88
105
  connectionData: system.connectionData,
106
+ system,
107
+ specList: specList || { tests: [], docs: [] },
89
108
  });
90
109
  });
91
110
  return projects;
92
111
  }
93
112
 
113
+ function deleteService(projectCode, serviceId) {
114
+ ConnectedServices.deleteService(projectCode, serviceId);
115
+ }
116
+
117
+ function deleteProject(projectCode) {
118
+ ConnectedServices.deleteProject(projectCode);
119
+ }
120
+
94
121
  const shutdown = () => process.exit(0);
95
122
 
96
123
  module.exports = function launchSystemView(port = 3000) {
@@ -113,6 +140,12 @@ module.exports = function launchSystemView(port = 3000) {
113
140
  updateSpecList,
114
141
  shutdown,
115
142
  refreshConnection,
143
+ deleteService,
144
+ deleteProject,
145
+ })
146
+ .module("CLI", {
147
+ getHistory: CLIHistory.getHistory,
148
+ saveHistory: CLIHistory.saveHistory,
116
149
  })
117
150
  .on("ready", () => {
118
151
  server.get("*", (req, res) => {
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "files": {
3
- "main.css": "/static/css/main.3396e24d.css",
4
- "main.js": "/static/js/main.c3485d98.js",
3
+ "main.css": "/static/css/main.1916c1d1.css",
4
+ "main.js": "/static/js/main.e9f9f4f8.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.3396e24d.css.map": "/static/css/main.3396e24d.css.map",
15
- "main.c3485d98.js.map": "/static/js/main.c3485d98.js.map"
15
+ "main.1916c1d1.css.map": "/static/css/main.1916c1d1.css.map",
16
+ "main.e9f9f4f8.js.map": "/static/js/main.e9f9f4f8.js.map",
17
+ "422.05c538a9.chunk.js.map": "/static/js/422.05c538a9.chunk.js.map"
16
18
  },
17
19
  "entrypoints": [
18
- "static/css/main.3396e24d.css",
19
- "static/js/main.c3485d98.js"
20
+ "static/css/main.1916c1d1.css",
21
+ "static/js/main.e9f9f4f8.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.c3485d98.js"></script><link href="/static/css/main.3396e24d.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
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.e9f9f4f8.js"></script><link href="/static/css/main.1916c1d1.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>