diff --git a/docs/error-reporting/language-integrations/node.md b/docs/error-reporting/language-integrations/node.md index a85b7b4992..77d8182b73 100644 --- a/docs/error-reporting/language-integrations/node.md +++ b/docs/error-reporting/language-integrations/node.md @@ -51,14 +51,45 @@ $ npm install @backtrace/node Add the following code to your application before all other scripts to report node errors to Backtrace. + + + + ```ts -// Import the BacktraceClient from @backtrace/node with your favorite package manager. +// Import BacktraceClient and BacktraceConfiguration from @backtrace/node import { BacktraceClient, BacktraceConfiguration } from '@backtrace/node'; -// Configure client options +// Configure the submit url to send errors to your project const options: BacktraceConfiguration = { - // Submission url - // is the subdomain of your Backtrace instance (.backtrace.io) + // is the subdomain of your Backtrace instance (.sp.backtrace.io) + // can be found in Project Settings/Submission tokens + url: 'https://submit.backtrace.io///json', +}; + +// Initialize the client with the options +const client = BacktraceClient.initialize(options); + +// By default, Backtrace will send errors for Uncaught Exceptions and Unhandled Promise Rejections + +// You may send errors manually +client.send(new Error('Something broke!')); +``` + + + +```js +// Import BacktraceClient from @backtrace/node +const { BacktraceClient } = require('@backtrace/node'); + +// Configure the submit url to send errors to your project +const options = { + // is the subdomain of your Backtrace instance (.sp.backtrace.io) // can be found in Project Settings/Submission tokens url: 'https://submit.backtrace.io///json', }; @@ -66,11 +97,13 @@ const options: BacktraceConfiguration = { // Initialize the client with the options const client = BacktraceClient.initialize(options); -// By default, Backtrace will send an error for Uncaught Exceptions and Unhandled Promise Rejections +// By default, Backtrace will send errors for Uncaught Exceptions and Unhandled Promise Rejections -// Manually send an error +// You may send errors manually client.send(new Error('Something broke!')); ``` + + ### Upload source maps diff --git a/docs/web-apps/automated-testing/cucumberjs-playwright/yaml.md b/docs/web-apps/automated-testing/cucumberjs-playwright/yaml.md index 58d53b70d7..c2a95d3dc6 100644 --- a/docs/web-apps/automated-testing/cucumberjs-playwright/yaml.md +++ b/docs/web-apps/automated-testing/cucumberjs-playwright/yaml.md @@ -349,6 +349,7 @@ A parent property specifying the configuration details for any `npm` dependencie ```yaml npm: + strictSSL: true registry: https://registry.npmjs.org registries: - url: https://registry.npmjs.org @@ -530,6 +531,43 @@ To use this feature, make sure that `node_modules` is not ignored via `.sauceign --- +### `packages` + +

| OPTIONAL | OBJECT |

+ +Specifies any npm packages that are required to run tests and should, therefore, be installed on the Sauce Labs VM. See [Including Node Dependencies](advanced.md#including-node-dependencies). + +```yaml +npm: + packages: + lodash: "4.17.20" + "@babel/preset-typescript": "7.12" +``` + +:::caution +Do not use `dependencies` and `packages` at the same time. +::: + +--- + +### `strictSSL` + +

| OPTIONAL | BOOLEAN |

+ +Instructs npm to perform SSL key validation when making requests to the registry via HTTPS (`true`) or not (`false`). Defaults to `false` if not set. + +:::note +If you're using a Sauce Connect tunnel, you must set `strictSSL` to `false`. +::: + +```yaml +npm: + strictSSL: false + package: + "lodash": "4.17.20" +``` +--- + ## `reporters`

| OPTIONAL | OBJECT |

diff --git a/docs/web-apps/automated-testing/cypress/yaml/v1.md b/docs/web-apps/automated-testing/cypress/yaml/v1.md index b1340101ed..61abd579ad 100644 --- a/docs/web-apps/automated-testing/cypress/yaml/v1.md +++ b/docs/web-apps/automated-testing/cypress/yaml/v1.md @@ -360,6 +360,7 @@ A parent property specifying the configuration details for any `npm` dependencie ```yaml npm: + strictSSL: true registry: https://registry.npmjs.org registries: - url: https://registry.npmjs.org @@ -518,7 +519,7 @@ npm:

| OPTIONAL | OBJECT |

-Specifies any npm packages that are required to run tests and should, therefore, be installed on the Sauce Labs VM. See [Including Node Dependencies](#including-node-dependencies). +Specifies any npm packages that are required to run tests and should, therefore, be installed on the Sauce Labs VM. See [Including Node Dependencies](../advanced.md#including-node-dependencies). ```yaml npm: @@ -563,6 +564,24 @@ Do not use `dependencies` and `packages` at the same time. --- +### `strictSSL` + +

| OPTIONAL | BOOLEAN |

+ +Instructs npm to perform SSL key validation when making requests to the registry via HTTPS (`true`) or not (`false`). Defaults to `false` if not set. + +:::note +If you're using a Sauce Connect tunnel, you must set `strictSSL` to `false`. +::: + +```yaml +npm: + strictSSL: false + package: + "lodash": "4.17.20" +``` +--- + ## `reporters`

| OPTIONAL | OBJECT |

diff --git a/docs/web-apps/automated-testing/playwright/yaml.md b/docs/web-apps/automated-testing/playwright/yaml.md index 7f1f2ed3ed..79197e0e72 100644 --- a/docs/web-apps/automated-testing/playwright/yaml.md +++ b/docs/web-apps/automated-testing/playwright/yaml.md @@ -343,6 +343,7 @@ A parent property specifying the configuration details for any `npm` dependencie ```yaml npm: + strictSSL: true registry: https://registry.npmjs.org registries: - url: https://registry.npmjs.org @@ -499,7 +500,7 @@ npm:

| OPTIONAL | OBJECT |

-Specifies any npm packages that are required to run tests and should, therefore, be installed on the Sauce Labs VM. See [Including Node Dependencies](#including-node-dependencies). +Specifies any npm packages that are required to run tests and should, therefore, be installed on the Sauce Labs VM. See [Including Node Dependencies](advanced.md#including-node-dependencies). ```yaml npm: @@ -542,6 +543,24 @@ Do not use `dependencies` and `packages` at the same time. --- +### `strictSSL` + +

| OPTIONAL | BOOLEAN |

+ +Instructs npm to perform SSL key validation when making requests to the registry via HTTPS (`true`) or not (`false`). Defaults to `false` if not set. + +:::note +If you're using a Sauce Connect tunnel, you must set `strictSSL` to `false`. +::: + +```yaml +npm: + strictSSL: false + package: + "lodash": "4.17.20" +``` +--- + ## `reporters`

| OPTIONAL | OBJECT |

diff --git a/docs/web-apps/automated-testing/testcafe/yaml.md b/docs/web-apps/automated-testing/testcafe/yaml.md index 1bc724b67e..0e8342575f 100644 --- a/docs/web-apps/automated-testing/testcafe/yaml.md +++ b/docs/web-apps/automated-testing/testcafe/yaml.md @@ -343,6 +343,7 @@ A parent property specifying the configuration details for any `npm` dependencie ```yaml npm: + strictSSL: true registry: https://registry.npmjs.org registries: - url: https://registry.npmjs.org @@ -501,7 +502,7 @@ npm:

| OPTIONAL | OBJECT |

-Specifies any npm packages that are required to run tests and should, therefore, be installed on the Sauce Labs VM. See [Including Node Dependencies](#including-node-dependencies). +Specifies any npm packages that are required to run tests and should, therefore, be installed on the Sauce Labs VM. See [Including Node Dependencies](advanced.md#including-node-dependencies). ```yaml npm: @@ -546,6 +547,24 @@ Do not use `dependencies` and `packages` at the same time. --- +### `strictSSL` + +

| OPTIONAL | BOOLEAN |

+ +Instructs npm to perform SSL key validation when making requests to the registry via HTTPS (`true`) or not (`false`). Defaults to `false` if not set. + +:::note +If you're using a Sauce Connect tunnel, you must set `strictSSL` to `false`. +::: + +```yaml +npm: + strictSSL: false + package: + "lodash": "4.17.20" +``` +--- + ## `reporters`

| OPTIONAL | OBJECT |