Skip to content

Commit

Permalink
Merge branch 'refs/heads/main' into mb-MOBA-7494
Browse files Browse the repository at this point in the history
  • Loading branch information
bahrimootaz committed Aug 13, 2024
2 parents ca3840e + 3b07fb4 commit 0b6c3e5
Show file tree
Hide file tree
Showing 5 changed files with 137 additions and 9 deletions.
45 changes: 39 additions & 6 deletions docs/error-reporting/language-integrations/node.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,26 +51,59 @@ $ npm install @backtrace/node

Add the following code to your application before all other scripts to report node errors to Backtrace.

<Tabs
groupId="applications"
defaultValue="typescript"
values={[
{label: 'Typescript', value: 'typescript'},
{label: 'JavaScript', value: 'javascript'},
]}>

<TabItem value="typescript">

```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
// <universe> is the subdomain of your Backtrace instance (<universe>.backtrace.io)
// <universe> is the subdomain of your Backtrace instance (<universe>.sp.backtrace.io)
// <token> can be found in Project Settings/Submission tokens
url: 'https://submit.backtrace.io/<universe>/<token>/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!'));
```
</TabItem>
<TabItem value="javascript">

```js
// Import BacktraceClient from @backtrace/node
const { BacktraceClient } = require('@backtrace/node');

// Configure the submit url to send errors to your project
const options = {
// <universe> is the subdomain of your Backtrace instance (<universe>.sp.backtrace.io)
// <token> can be found in Project Settings/Submission tokens
url: 'https://submit.backtrace.io/<universe>/<token>/json',
};

// 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!'));
```
</TabItem>
</Tabs>

### Upload source maps

Expand Down
38 changes: 38 additions & 0 deletions docs/web-apps/automated-testing/cucumberjs-playwright/yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -530,6 +531,43 @@ To use this feature, make sure that `node_modules` is not ignored via `.sauceign

---

### `packages`

<p><small>| OPTIONAL | OBJECT |</small></p>

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`

<p><small>| OPTIONAL | BOOLEAN |</small></p>

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`

<p><small>| OPTIONAL | OBJECT |</small></p>
Expand Down
21 changes: 20 additions & 1 deletion docs/web-apps/automated-testing/cypress/yaml/v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -518,7 +519,7 @@ npm:

<p><small>| OPTIONAL | OBJECT |</small></p>

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:
Expand Down Expand Up @@ -563,6 +564,24 @@ Do not use `dependencies` and `packages` at the same time.

---

### `strictSSL`

<p><small>| OPTIONAL | BOOLEAN |</small></p>

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`

<p><small>| OPTIONAL | OBJECT |</small></p>
Expand Down
21 changes: 20 additions & 1 deletion docs/web-apps/automated-testing/playwright/yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -499,7 +500,7 @@ npm:

<p><small>| OPTIONAL | OBJECT |</small></p>

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:
Expand Down Expand Up @@ -542,6 +543,24 @@ Do not use `dependencies` and `packages` at the same time.

---

### `strictSSL`

<p><small>| OPTIONAL | BOOLEAN |</small></p>

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`

<p><small>| OPTIONAL | OBJECT |</small></p>
Expand Down
21 changes: 20 additions & 1 deletion docs/web-apps/automated-testing/testcafe/yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -501,7 +502,7 @@ npm:

<p><small>| OPTIONAL | OBJECT |</small></p>

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:
Expand Down Expand Up @@ -546,6 +547,24 @@ Do not use `dependencies` and `packages` at the same time.

---

### `strictSSL`

<p><small>| OPTIONAL | BOOLEAN |</small></p>

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`

<p><small>| OPTIONAL | OBJECT |</small></p>
Expand Down

0 comments on commit 0b6c3e5

Please sign in to comment.