1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Updated Design: Version Control (markdown)

Nick O'Leary 2016-07-25 11:41:11 +01:00
parent 5903abe37d
commit d7c0760ac4

@ -66,9 +66,11 @@ Returns a promise that resolves to an array of history entries. Each entry consi
---
The format of the combined flow/credential configuration is a vital detail that needs some more thinking.
### Notes
The starting point will be the already documented [new flow format](https://github.com/node-red/node-red/wiki/Design%3A-Flow-file-format-v2). With an additional `credential` property at the top level that contains the node credentials.
- The format of the combined flow/credential configuration is a vital detail that needs some more thinking. The starting point will be the already documented [new flow format](https://github.com/node-red/node-red/wiki/Design%3A-Flow-file-format-v2). With an additional `credential` property at the top level that contains the node credentials.
- An implementation is not required to maintain any history - it could return a single entry from the `getFlowHistory` call. This reduces the burden on implementations
## UI Changes
@ -85,6 +87,43 @@ There are two parts additions to the UI:
![](images/vc-deploy-menu/vc-deploy-menu.png)
## Implementation details
### Local File System (default)
By default, the `localfilesystem` implementation should be entirely file based.
- the base flow/credential files remain unchanged to how they work today
- a new directory structure is created alongside the flow file:
my-flows.json
my-flows_cred.json
.my-flows_history/
log.json
0.my-flows.json
0.my-flows_cred.json
1.my-flows.json
1.my-flows_cred.json
The `.<file>_history` directory contains the history of flow files; each prefixed
with its version id.
The `log.json` file contains the version history.
### Git Repository
An optional storage module will be provided that uses a Git repository for its storage.
- if the specified flow file, `my-flows.json` does not exist, it will:
- create an empty repository under `<userHome>/my-flows`
- store `my-flows.json` and `my-flows_cred.json` under that directory
- if the specified flow file does exist and is determined to be in a git repo, it
will be used as-is.
# Added Nodes
Target: future
@ -95,3 +134,5 @@ This raises some questions:
- should we try to create/maintain a package.json file under the user directory - in much the same way that `npm install --save` does.
- should we do this via the Storage API so alternative (non-filesystem) based solutions can make use of it