You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,9 @@
6
6
### Breaking Changes
7
7
- (Jeff Hitchcock) When passing both `--expandAdventures` and `--folders`, the Adventure's contents will now be grouped by Document type in separate folders. The `--recursive` flag must be supplied when packing entries extracted in this way.
8
8
9
+
### Improvements
10
+
- Added the `--omitVolatile` command-line flag, and corresponding `omitVolatile` parameter to `extractPact`. When used, changes will only be written if at least one non-volatile field has changed between the entry on disk and the candidate entry being extracted. Currently, `_stats.createdTime`, `_stats.modifiedTime`, and `_stats.lastModifiedBy` are considered volatile.
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -214,6 +214,7 @@ Extract the contents of a compendium pack into individual source files for each
214
214
***transformName:***(entry: object): Promise<string|void>* A function that is called on every entry. The value returned from this will be used as the entry's filename and must include the appropriate file extension. If nothing is returned, an auto-generated name will be used instead.
215
215
***transformFolderName:***(entry: object): Promise<string|void>* A function used to generate a directory name for an extracted Folder document when the `folders` option is used.
216
216
***expandAdventures:***boolean* Write documents embedded in Adventures to their own files. If the `folders` option is also supplied, the Adventure is treated like a folder, and written to `_Adventure.{yml|json}` instead of `_Folder.{yml|json}`. Additionally, all its entries are grouped into sub-folders by Document type.
217
+
***omitVolatile:***boolean* When unpacking, diff the candidate entry against an existing one and only write it if non-volatile fields have changed. Currently, `_stats.createdTime`, `_stats.modifiedTime`, and `_stats.lastModifiedBy` are considered volatile.
217
218
***jsonOptions:***object*
218
219
***replacer:***(key: string, value: any): any|Array<string|number>* A replacer function or an array of property names in the object to include in the resulting string.
219
220
***space:***string|number* A number of spaces or a string to use as indentation.
* @property {boolean} [expandAdventures] When unpacking, extract adventure documents into a folder with
32
32
* each contained document as its own entry in a folder.
33
+
* @property {boolean} [omitVolatile] When unpacking, diff the candidate entry against an existing one
34
+
* and only write it if non-volatile fields have changed.
35
+
* Currently, _stats.createdTime, _stats.modifiedTime, and
36
+
* _stats.lastModifiedBy are considered volatile.
33
37
*/
34
38
35
39
/**
@@ -139,6 +143,11 @@ export function getCommand() {
139
143
type: "boolean"
140
144
});
141
145
146
+
yargs.option("omitVolatile",{
147
+
describe: "When unpacking, diff the candidate entry against an existing one and only write it if non-volatile fields have changed. Currently, _stats.createdTime, _stats.modifiedTime, and _stats.lastModifiedBy are considered volatile.",
148
+
type: "boolean"
149
+
});
150
+
142
151
returnyargs;
143
152
},
144
153
handler: asyncargv=>{
@@ -390,7 +399,7 @@ async function handleUnpack(argv) {
0 commit comments