cob-cli 2.55.0-beta-2 → 2.55.0-beta-4
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.
|
@@ -47,10 +47,14 @@ async function _syncFiles(executionType, cmdEnv, from, to, extraOptions = [], ar
|
|
|
47
47
|
while (count < RSYNC_RETRIES) {
|
|
48
48
|
if (args.verbose > 2)
|
|
49
49
|
console.log("rsync".bold +" '" + (product).blue + "': attempt " + (count + 1));
|
|
50
|
-
|
|
50
|
+
// Exclude the decrypted siblings of every local .enc file: their content on the
|
|
51
|
+
// server is owned by cob-decrypt, never by a local cleartext file with the same
|
|
52
|
+
// path.
|
|
53
|
+
const excludeDecryptedFilters = _getDecryptedEncFilePaths(product).map(p => `--filter='- ${p}'`);
|
|
51
54
|
const rsyncArgs = [
|
|
52
55
|
fromPath,
|
|
53
56
|
toPath,
|
|
57
|
+
...excludeDecryptedFilters,
|
|
54
58
|
"-acvi",
|
|
55
59
|
"--delete",
|
|
56
60
|
"--chmod=g+w",
|
|
@@ -60,7 +64,6 @@ async function _syncFiles(executionType, cmdEnv, from, to, extraOptions = [], ar
|
|
|
60
64
|
"--filter='merge " + path.resolve(__dirname,"rsyncFilter-pre.txt") + "'",
|
|
61
65
|
hasRsyncFilter ? "--filter='merge " + cmdEnv.rsyncFilter + "'" : "",
|
|
62
66
|
"--filter='merge " + path.resolve(__dirname,"rsyncFilter-post.txt") + "'",
|
|
63
|
-
...protectFilters,
|
|
64
67
|
executionType == _syncFiles.COPY ? "-v" : "--dry-run"
|
|
65
68
|
].concat(productExtraOptions)
|
|
66
69
|
if (args.verbose > 3) {
|
|
@@ -87,13 +87,18 @@ const defnameCache = {
|
|
|
87
87
|
get: async function(id) {
|
|
88
88
|
if(!this.resolved.has(id)){
|
|
89
89
|
const uri = `https://${this.servername}.cultofbits.com/recordm/recordm/definitions/${id}`
|
|
90
|
-
|
|
90
|
+
try {
|
|
91
|
+
const response = await axios.get( uri );
|
|
91
92
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
if(response.status != 200){
|
|
94
|
+
throw new Error(`HTTP Error Response: ${response.status} ${response.statusText}`);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
this.resolved.set(id, response.data.name)
|
|
98
|
+
} catch(err) {
|
|
99
|
+
throw new Error(`Couldn't get the Definition with id ${id}: ${err}`)
|
|
95
100
|
|
|
96
|
-
|
|
101
|
+
}
|
|
97
102
|
}
|
|
98
103
|
|
|
99
104
|
return this.resolved.get(id)
|
package/package.json
CHANGED