feature: Docker OAuth block support (via #4987)

* add `onFound` callback to schemas
* add warning to method docs (for #4957)
* implement Docker OAuth2 init block support
* update docs
* add OAUTH_SCOPE_SEPARATOR
* drop OAuth env from Dockerfile and run script
* don't indent the first oauth block line
* drop unused `dedent` import
* touch up warning message
* add more test cases
* return an empty block if no OAuth content is generated
* fix broken doc line
This commit is contained in:
kyle
2018-11-01 18:52:13 -04:00
committed by GitHub
parent 31a8b13777
commit c6eb8edb5f
10 changed files with 283 additions and 160 deletions

View File

@@ -0,0 +1,13 @@
module.exports.indent = function indent(str, len, fromLine = 0) {
return str
.split("\n")
.map((line, i) => {
if (i + 1 >= fromLine) {
return `${Array(len + 1).join(" ")}${line}`
} else {
return line
}
})
.join("\n")
}