Skip to content

Commit 1952165

Browse files
author
chadcarlson
committed
add puppeteerFormatter
1 parent 20b1b98 commit 1952165

10 files changed

Lines changed: 678 additions & 0 deletions

File tree

.idea/codeStyles/Project.xml

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/config-reader-nodejs.iml

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/dbnavigator.xml

Lines changed: 453 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/encodings.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/R_User_Library.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

Lines changed: 144 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/platformsh.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,17 @@ function mongodbFormatter(credentials) {
525525
return `mongodb://${credentials["username"]}:${credentials["password"]}@${credentials["host"]}:${credentials["port"]}/${credentials["path"]}`;
526526
}
527527

528+
/**
529+
* Returns a connection string appropriate for Puppeteer and headless Chrome.
530+
* @param cretentials
531+
* A chrome-headless credentials object
532+
* @returns {string}
533+
* A connection string to pass to puppeteer.connect().
534+
*/
535+
function puppeteerFormatter(credentials) {
536+
return `http://${credentials["ip"]}:${credentials["port"]}`;
537+
}
538+
528539
/**
529540
* Creates a new Config instance that represents the current environment.
530541
*

0 commit comments

Comments
 (0)