@surph_ai/cli 0.0.19 → 0.0.20

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@surph_ai/cli",
3
- "version": "0.0.19",
3
+ "version": "0.0.20",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "types": "./types.d.ts",
@@ -53,14 +53,18 @@ router.get('/', async (req, res, next) => {
53
53
  tools = req.surph_board.tools
54
54
  tides = req.surph_board.tides
55
55
  contexts = req.surph_board.contexts
56
- } else {
56
+ } else if (userConfig) {
57
57
  tools = userConfig.tools
58
58
  tides = userConfig.tides
59
59
  contexts = userConfig.contexts
60
+ } else { // no user logged in, set empty:
61
+ tools = []
62
+ tides = []
63
+ contexts = []
60
64
  }
61
65
 
62
- const user = userConfig.user
63
- const creator = { _id: user._id, username: user.username, avatar: user.avatar }
66
+ const user = userConfig ? userConfig.user : { permissions: [] }
67
+ const creator = userConfig ? { _id: user._id, username: user.username, avatar: user.avatar } : {}
64
68
  const localTools = toolSlugs.map(slug => {
65
69
  const tool = manifest[slug]
66
70
  let isTideTool = false