| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | the id of a workspace. usually same to file system id | |
| name | String | display text of this workspace for UI | |
| description | String | human readable description on this workspace | |
| createdAt | Date | the time when this workspace is created (registered from local file system) | |
| accessedAt | Date | the time when the last session on this workspace was made. (optional) | [optional] |
| workspacePath | String | absolute path of this workspace in server. Server may not expose this property to some untrusted clients. | |
| ephemeral | Boolean | If set, workspace is ephemeral - Server will drop registration when it stops working. Ususally, side-loaded workspace via desktop app is ephemeral. Client with proper access right can flip this flag to declare the workspace should be persist, after rebooting. | [optional] |
| excludedPaths | [String] | Ignore patterns to exclude from watch service and search-and-replace operations. Pattern follows '.gitignore' syntax, 1 item per line. It should work as a .gitignore file in the workspace directory. Server should remove all comment items (any item that begins with '#') and blank items. Escaping with '\' char for the beginning '!' and ending white-spaces shoule be supported, too. To exclude a directory, client may have to put '/' at the end of the item to exclude everything underneath it. When a dir path is excluded with 'ending /', watch service may not deliver unlinkDir/addDir events for the path and client should manually check the existence or stats. | |
| offlineCachePaths | [String] | Any paths (including excluded paths) to be cached in remote clients. Browser client should respect offline cache paths always. Desktop-app client may not use off-line cache for local (embedded) server but shall use cache for any remote servers, even for same host. All caches should be partitioned with workspace id, globally unique value through time and space. Client should pre-fetch the contents of offline cache paths when it start IDE sessions on a workspace to use for off-line state. When client goes to off-line, after losing connection to server, it can use cached data as reply of some WFS operations and can write some data to cache to save workspace data & metadata. The changes should be persistent on client side safely. C When a client recovers connectivity to server, it should check the stats of files and dirs to upload if it has got some changes in offline state. If server has more recents contents, client should drop chagnes and refill the cache with fresher data. Client may have some 'time-tolerance' to accept server's data is fresher than client's, smaller than serveral seconds. If server has more recent contents, client should drop the changes and refill the cache with fresher data. If not, client should replay the changes 1 by 1. Same protocol should be applied when client application starts with some 'unuploaded change' evertime. That means, client should save 'change history' with 'changed data' too, to process it later, when starting app again in normal condition. All Clients should not replay any 'delete' operations while replaying changes on client's cache, to protect from more serious problems with skewed timer or unexpected behaviors. And, of course, client should not rely on cached data while connection state is healthy. |