Constructor
new VersionManager(projectId, server, project, options)
Parameters:
| Name | Type | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
projectId | string | ID of the server project to version. | |||||||||||||||
server | object | Server instance with createVersion() | |||||||||||||||
project | object | Active Project instance | |||||||||||||||
options | object | Configuration options.Properties
|
Classes
Methods
(async) _saveVersion(label) → {Promise.<object>}
Parameters:
| Name | Type | Description |
|---|---|---|
label | string | | Version label, or null for an auto-version. |
Returns:
The created version index entry.
- Type:
- Promise.<object>
_triggerAutoVersion()
Fires an auto-save if one is not already in progress.
destroy()
Cleans up timers when the workspace unloads the project.
onHistoryPush(stackSize)
Called by workspace._updateUndoRedoButtons() after every history.push().
Parameters:
| Name | Type | Description |
|---|---|---|
stackSize | number | current undo stack depth (unused, for future use) |
onProjectSaved()
Call after a successful server save to reset the pending-changes flag.
(async) saveNamedVersion(label) → {Promise.<object>}
Creates a named version snapshot.
Parameters:
| Name | Type | Description |
|---|---|---|
label | string | | Version label, or null for unlabelled named version. |
Returns:
The created version index entry.
- Type:
- Promise.<object>