cob-cli 2.3.0 → 2.4.1
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.
- package/lib/task_lists/common_enviromentHandler.js +0 -1
- package/lib/task_lists/common_releaseManager.js +1 -0
- package/lib/task_lists/rsyncFilter.txt +0 -1
- package/lib/task_lists/test_otherFilesContiousReload.js +2 -2
- package/lib/task_lists/test_validate.js +1 -1
- package/lib/webpack/webpack.config.js +4 -1
- package/package.json +1 -1
|
@@ -131,7 +131,6 @@ async function _getLastEnvironmentDeployed(server) {
|
|
|
131
131
|
|
|
132
132
|
/* ************************************ */
|
|
133
133
|
async function _setLastEnvironmentDeployed(server, environmentName) {
|
|
134
|
-
await execa('ssh', [server, "mkdir -p " + SERVER_COB_CLI_DIRECTORY ]); //TODO: remove after new sudo mkdir
|
|
135
134
|
await execa('ssh', [server, "echo '" + environmentName + "' > " + SERVER_LAST_ENV_FILE ]);
|
|
136
135
|
}
|
|
137
136
|
|
|
@@ -63,6 +63,7 @@ async function getLastDeployedSha(server) {
|
|
|
63
63
|
result = await execa('ssh', [server, "cat " + SERVER_LAST_SHA_FILE ]);
|
|
64
64
|
} catch (error) {
|
|
65
65
|
await execa('ssh', [server, "mkdir -p " + SERVER_COB_CLI_DIRECTORY ]);
|
|
66
|
+
await execa('ssh', [server, "setfacl -d -m group:users:rw " + SERVER_COB_CLI_DIRECTORY ]);
|
|
66
67
|
return null
|
|
67
68
|
}
|
|
68
69
|
return result.stdout;
|
|
@@ -30,7 +30,7 @@ async function otherFilesContiousReload(cmdEnv) {
|
|
|
30
30
|
if(changedFiles.size > 0) {
|
|
31
31
|
console.log("\nRestoring changed files...".yellow);
|
|
32
32
|
let stash = true;
|
|
33
|
-
await git().stash(["--include-untracked"]).then( value => value.indexOf("Saved") == 0 || (stash = false))
|
|
33
|
+
await git().env('LC_ALL', 'C').stash(["--include-untracked"]).then( value => value.indexOf("Saved") == 0 || (stash = false))
|
|
34
34
|
let lastSha = await getLastDeployedSha(cmdEnv.server)
|
|
35
35
|
git().checkout(lastSha)
|
|
36
36
|
|
|
@@ -153,4 +153,4 @@ function checkNoTestsRunningOnServer(server) {
|
|
|
153
153
|
}
|
|
154
154
|
} /* Error is good: test file doesn't exist */ )
|
|
155
155
|
}
|
|
156
|
-
exports.checkNoTestsRunningOnServer = checkNoTestsRunningOnServer
|
|
156
|
+
exports.checkNoTestsRunningOnServer = checkNoTestsRunningOnServer
|
|
@@ -18,7 +18,7 @@ async function validateTestingConditions(cmdEnv, args) {
|
|
|
18
18
|
{ title: "Check there's no other 'cob-cli test' running locally".bold, task: () => _checkNoTestsRunningLocally() },
|
|
19
19
|
{ title: "find out branch-for-HEAD", task: (ctx) => getCurrentBranch().then( currentBranch => ctx.currentBranch = currentBranch) },
|
|
20
20
|
{ title: "find out SHA for last-deploy on specified server", task: (ctx) => _getLastDeployedSha(cmdEnv).then( lastSha => ctx.lastSha = lastSha).catch( err => ctx.err = err ) },
|
|
21
|
-
{ title: "git stash --include-untracked", skip: ctx => !ctx.lastSha, task: (ctx) => git().stash(["--include-untracked"]).then( value => value.indexOf("Saved") == 0 && (ctx.stash = true)) },
|
|
21
|
+
{ title: "git stash --include-untracked", skip: ctx => !ctx.lastSha, task: (ctx) => git().env('LC_ALL', 'C').stash(["--include-untracked"]).then( value => value.indexOf("Saved") == 0 && (ctx.stash = true)) },
|
|
22
22
|
{ title: "git checkout SHA for last-deploy", skip: ctx => !ctx.lastSha, task: (ctx) => git().checkout(ctx.lastSha) },
|
|
23
23
|
{ title: "Apply last enviroment specifics".bold, skip: ctx => !ctx.lastSha, task: () => cmdEnv.applyLastEnvironmentDeployedToServerChanges() },
|
|
24
24
|
{ title: "Check last-deploy == serverLive".bold, skip: ctx => !ctx.lastSha, task: (ctx) => testEquality(cmdEnv, "serverLive", "localCopy").then( changes => _handleTestEquality(ctx, changes, cmdEnv.server).catch( err => ctx.err = err.message ) ) },
|
|
@@ -56,9 +56,12 @@ module.exports = env => {
|
|
|
56
56
|
console.log("[CoB] Serving LOCAL -> " + localPath );
|
|
57
57
|
}
|
|
58
58
|
return localPath;
|
|
59
|
+
},
|
|
60
|
+
onProxyRes: response => {
|
|
61
|
+
response.headers['content-security-policy'] = "default-src 'unsafe-inline' 'unsafe-eval' https: data: http:";
|
|
59
62
|
}
|
|
60
63
|
}
|
|
61
64
|
}
|
|
62
65
|
}
|
|
63
66
|
}
|
|
64
|
-
};
|
|
67
|
+
};
|
package/package.json
CHANGED