From 85f2af9716eafe4d7b06da2d3bb9aeeac17b85ed Mon Sep 17 00:00:00 2001 From: Nahuel Alejandro Ramos Date: Tue, 8 Aug 2023 12:05:18 -0300 Subject: [PATCH 1/4] chore: add sslCheckDomain property [gh-0] --- .../e2e/__tests__/fixtures/deploy-project/browser.check.ts | 1 + packages/cli/src/constructs/browser-check.ts | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/packages/cli/e2e/__tests__/fixtures/deploy-project/browser.check.ts b/packages/cli/e2e/__tests__/fixtures/deploy-project/browser.check.ts index c9d9bedd..bcb2f0a3 100644 --- a/packages/cli/e2e/__tests__/fixtures/deploy-project/browser.check.ts +++ b/packages/cli/e2e/__tests__/fixtures/deploy-project/browser.check.ts @@ -9,4 +9,5 @@ new BrowserCheck('homepage-browser-check', { code: { entrypoint: path.join(__dirname, 'homepage.test.ts') }, + sslCheckDomain: 'acme.com', }) \ No newline at end of file diff --git a/packages/cli/src/constructs/browser-check.ts b/packages/cli/src/constructs/browser-check.ts index f200a31b..ef9267c3 100644 --- a/packages/cli/src/constructs/browser-check.ts +++ b/packages/cli/src/constructs/browser-check.ts @@ -17,6 +17,10 @@ export interface BrowserCheckProps extends CheckProps { * with the Puppeteer or Playwright frameworks. */ code: Content|Entrypoint + /** + * A valid fully qualified domain name (FQDN) to check its SSL certificate. + */ + sslCheckDomain?: string } /** @@ -30,6 +34,7 @@ export class BrowserCheck extends Check { script: string scriptPath?: string dependencies?: Array + sslCheckDomain?: string /** * Constructs the Browser Check instance @@ -44,6 +49,7 @@ export class BrowserCheck extends Check { } BrowserCheck.applyDefaultBrowserCheckConfig(props) super(logicalId, props) + this.sslCheckDomain = props.sslCheckDomain if ('content' in props.code) { const script = props.code.content this.script = script @@ -127,6 +133,7 @@ export class BrowserCheck extends Check { script: this.script, scriptPath: this.scriptPath, dependencies: this.dependencies, + sslCheckDomain: this.sslCheckDomain ?? null, } } } From 03dc3ac90046496453bb1f9ec29820758a632760 Mon Sep 17 00:00:00 2001 From: Nahuel Alejandro Ramos Date: Tue, 8 Aug 2023 12:09:45 -0300 Subject: [PATCH 2/4] chore: add sslCheckDomain property [gh-0] --- packages/cli/src/constructs/browser-check.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/src/constructs/browser-check.ts b/packages/cli/src/constructs/browser-check.ts index ef9267c3..c86072c7 100644 --- a/packages/cli/src/constructs/browser-check.ts +++ b/packages/cli/src/constructs/browser-check.ts @@ -133,7 +133,7 @@ export class BrowserCheck extends Check { script: this.script, scriptPath: this.scriptPath, dependencies: this.dependencies, - sslCheckDomain: this.sslCheckDomain ?? null, + sslCheckDomain: this.sslCheckDomain || null, // empty string is converted to null } } } From a56179cdfb1a691369cebbf538c5d4abb7bbeda0 Mon Sep 17 00:00:00 2001 From: Nahuel Alejandro Ramos Date: Wed, 9 Aug 2023 12:09:46 -0300 Subject: [PATCH 3/4] Update packages/cli/src/constructs/browser-check.ts Co-authored-by: Chris Lample --- packages/cli/src/constructs/browser-check.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/src/constructs/browser-check.ts b/packages/cli/src/constructs/browser-check.ts index c86072c7..305b8b6d 100644 --- a/packages/cli/src/constructs/browser-check.ts +++ b/packages/cli/src/constructs/browser-check.ts @@ -18,7 +18,7 @@ export interface BrowserCheckProps extends CheckProps { */ code: Content|Entrypoint /** - * A valid fully qualified domain name (FQDN) to check its SSL certificate. + * A valid fully qualified domain name (FQDN) to check for SSL certificate expiration. For example, 'app.checklyhq.com'. */ sslCheckDomain?: string } From c227c8b8003d2cb46ee57cf73c5a7d53268b3fa1 Mon Sep 17 00:00:00 2001 From: Nahuel Alejandro Ramos Date: Wed, 9 Aug 2023 12:18:31 -0300 Subject: [PATCH 4/4] fix: lint issue [gh-0] --- packages/cli/src/constructs/browser-check.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/constructs/browser-check.ts b/packages/cli/src/constructs/browser-check.ts index 305b8b6d..46871206 100644 --- a/packages/cli/src/constructs/browser-check.ts +++ b/packages/cli/src/constructs/browser-check.ts @@ -18,7 +18,8 @@ export interface BrowserCheckProps extends CheckProps { */ code: Content|Entrypoint /** - * A valid fully qualified domain name (FQDN) to check for SSL certificate expiration. For example, 'app.checklyhq.com'. + * A valid fully qualified domain name (FQDN) to check for SSL certificate + * expiration. For example, 'app.checklyhq.com'. */ sslCheckDomain?: string }