Skip to content

Commit

Permalink
Add Sidekick Api Updates & Test Mode Implementation (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yakup Yasin Kalafat committed Nov 28, 2022
1 parent 927d6c5 commit b793a5b
Show file tree
Hide file tree
Showing 6 changed files with 645 additions and 165 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,5 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

.idea
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Tested with node v16.14.2
```
4. Call `putTracepoint` function
```js
apiClient.putTracepoints(params);
apiClient.putTracepoint(params);
```
Then your tracepoint will be added to `line 23` in the given file. Also, you can use `SidekickApi` for any other operations such as removing tracepoint or putting log point.
Expand Down
21 changes: 18 additions & 3 deletions common.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
const SIDEKICK_API_HOST="https://api.service.runsidekick.com"
const SIDEKICK_HOST="wss://broker.service.runsidekick.com"
const SIDEKICK_PORT="443"
const SIDEKICK_API_PORT="443"
const LOGPOINT_ENDPOINT="/api/v1/logpoint"
const TRACEPOINT_ENDPOINT="/api/v1/tracepoint"
const APPLICATIONS_ENDPOINT="/api/v1/applications"
const PROBE_TAGS_ENDPOINT="/api/v1/probetags"
const REFERENCE_EVENT_ENDPOINT="/api/v1/referenceevent"
const EVENT_HISTORY_ENDPOINT="/api/v1/eventhistory"

const SIDEKICK_TEST_MODE_HOST="http://127.0.0.1"
const SIDEKICK_TEST_MODE_PORT="80"
const TEST_MODE_EVENT_ENDPOINT="/api/events"


module.exports = {
SIDEKICK_API_HOST,
SIDEKICK_HOST,
SIDEKICK_PORT,
SIDEKICK_API_PORT,
LOGPOINT_ENDPOINT,
TRACEPOINT_ENDPOINT,
APPLICATIONS_ENDPOINT
APPLICATIONS_ENDPOINT,
PROBE_TAGS_ENDPOINT,
REFERENCE_EVENT_ENDPOINT,
EVENT_HISTORY_ENDPOINT,

SIDEKICK_TEST_MODE_HOST,
SIDEKICK_TEST_MODE_PORT,
TEST_MODE_EVENT_ENDPOINT
};

3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const { onTrigger } = require('./src/client.js')
const { SidekickApi } = require('./src/sidekick-api.js')
const { SidekickTestApi } = require('./src/sidekick-test-api.js')
module.exports = {
onTrigger,SidekickApi
onTrigger,SidekickApi, SidekickTestApi
}
Loading

0 comments on commit b793a5b

Please sign in to comment.