Skip to content

Commit

Permalink
chore: bump typedoc dependencies (#7)
Browse files Browse the repository at this point in the history
* chore(deps): bump the all group with 2 updates

Bumps the all group with 2 updates: [typedoc](https://github.com/TypeStrong/TypeDoc) and [typescript](https://github.com/microsoft/TypeScript).


Updates `typedoc` from 0.25.13 to 0.26.7
- [Release notes](https://github.com/TypeStrong/TypeDoc/releases)
- [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md)
- [Commits](TypeStrong/typedoc@v0.25.13...v0.26.7)

Updates `typescript` from 5.4.5 to 5.6.2
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](microsoft/TypeScript@v5.4.5...v5.6.2)

---
updated-dependencies:
- dependency-name: typedoc
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: all
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore: bump typedoc dependencies

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
aorumbayev and dependabot[bot] authored Sep 30, 2024
1 parent 235ac5d commit 377f671
Show file tree
Hide file tree
Showing 10 changed files with 729 additions and 178 deletions.
94 changes: 6 additions & 88 deletions docs/code/README.md
Original file line number Diff line number Diff line change
@@ -1,93 +1,11 @@
@algorandfoundation/algokit-utils-debug
**@algorandfoundation/algokit-utils-debug****Docs**

# @algorandfoundation/algokit-utils-debug

## Table of contents

### Functions
***

- [registerDebugEventHandlers](README.md#registerdebugeventhandlers)
- [writeAVMDebugTrace](README.md#writeavmdebugtrace)
- [writeTealDebugSourceMaps](README.md#writetealdebugsourcemaps)
# @algorandfoundation/algokit-utils-debug

## Functions

### registerDebugEventHandlers

**registerDebugEventHandlers**(): `void`

Registers event handlers for debugging events in Algorand development.

This function sets up handlers for the following events:
- 'TxnGroupSimulated': Calls the `writeAVMDebugTrace` function to generate and persist an AVM debug trace.
- 'AppCompiled': Calls the `writeTealDebugSourceMaps` function to generate and persist TEAL source maps.

These handlers help in debugging Algorand smart contracts by providing detailed traces and source maps.

#### Returns

`void`

#### Defined in

[index.ts:17](https://github.com/algorandfoundation/algokit-utils-ts-debug/blob/main/src/index.ts#L17)

___

### writeAVMDebugTrace

**writeAVMDebugTrace**(`input`): `Promise`\<`void`\>

Generates an AVM debug trace from the provided simulation response and persists it to a file.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `input` | `AVMTracesEventData` | The AVMTracesEventData containing the simulation response and other relevant information. |

#### Returns

`Promise`\<`void`\>

An object containing the output file path and the trace content as a string.

**`Example`**

```ts
const eventData: AVMTracesEventData = {
simulateResponse: // ... simulation response object
};

const result = await writeAVMDebugTrace(eventData);
console.log(`Debug trace saved to: ${result.outputPath}`);
console.log(`Trace content: ${result.traceContent}`);
```

#### Defined in

[debugging/writeAVMDebugTrace.ts:20](https://github.com/algorandfoundation/algokit-utils-ts-debug/blob/main/src/debugging/writeAVMDebugTrace.ts#L20)

___

### writeTealDebugSourceMaps

**writeTealDebugSourceMaps**(`input`): `Promise`\<`void`\>

Generates a source map for the given Teal source code.

#### Parameters

| Name | Type |
| :------ | :------ |
| `input` | `TealSourcesDebugEventData` |

#### Returns

`Promise`\<`void`\>

A promise that resolves when the source map has been generated.

#### Defined in

[debugging/writeTealDebugSourceMaps.ts:36](https://github.com/algorandfoundation/algokit-utils-ts-debug/blob/main/src/debugging/writeTealDebugSourceMaps.ts#L36)
- [registerDebugEventHandlers](functions/registerDebugEventHandlers.md)
- [writeAVMDebugTrace](functions/writeAVMDebugTrace.md)
- [writeTealDebugSourceMaps](functions/writeTealDebugSourceMaps.md)
25 changes: 25 additions & 0 deletions docs/code/functions/registerDebugEventHandlers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[**@algorandfoundation/algokit-utils-debug**](../README.md)**Docs**

***

[@algorandfoundation/algokit-utils-debug](../README.md) / registerDebugEventHandlers

# Function: registerDebugEventHandlers()

> **registerDebugEventHandlers**(): `void`
Registers event handlers for debugging events in Algorand development.

This function sets up handlers for the following events:
- 'TxnGroupSimulated': Calls the `writeAVMDebugTrace` function to generate and persist an AVM debug trace.
- 'AppCompiled': Calls the `writeTealDebugSourceMaps` function to generate and persist TEAL source maps.

These handlers help in debugging Algorand smart contracts by providing detailed traces and source maps.

## Returns

`void`

## Defined in

[index.ts:17](https://github.com/algorandfoundation/algokit-utils-ts-debug/blob/main/src/index.ts#L17)
39 changes: 39 additions & 0 deletions docs/code/functions/writeAVMDebugTrace.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[**@algorandfoundation/algokit-utils-debug**](../README.md)**Docs**

***

[@algorandfoundation/algokit-utils-debug](../README.md) / writeAVMDebugTrace

# Function: writeAVMDebugTrace()

> **writeAVMDebugTrace**(`input`): `Promise`\<`void`\>
Generates an AVM debug trace from the provided simulation response and persists it to a file.

## Parameters

**input**: `AVMTracesEventData`

The AVMTracesEventData containing the simulation response and other relevant information.

## Returns

`Promise`\<`void`\>

An object containing the output file path and the trace content as a string.

## Example

```ts
const eventData: AVMTracesEventData = {
simulateResponse: // ... simulation response object
};

const result = await writeAVMDebugTrace(eventData);
console.log(`Debug trace saved to: ${result.outputPath}`);
console.log(`Trace content: ${result.traceContent}`);
```

## Defined in

[debugging/writeAVMDebugTrace.ts:20](https://github.com/algorandfoundation/algokit-utils-ts-debug/blob/main/src/debugging/writeAVMDebugTrace.ts#L20)
31 changes: 31 additions & 0 deletions docs/code/functions/writeTealDebugSourceMaps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[**@algorandfoundation/algokit-utils-debug**](../README.md)**Docs**

***

[@algorandfoundation/algokit-utils-debug](../README.md) / writeTealDebugSourceMaps

# Function: writeTealDebugSourceMaps()

> **writeTealDebugSourceMaps**(`input`): `Promise`\<`void`\>
Generates and writes debug source maps for multiple TEAL sources.

## Parameters

**input**: `TealSourcesDebugEventData`

An object of type TealSourcesDebugEventData containing an array of TEAL sources.

## Returns

`Promise`\<`void`\>

A promise that resolves when all source maps have been generated and written.

## Throws

Will throw an error if there's an issue during the source map generation or writing process.

## Defined in

[debugging/writeTealDebugSourceMaps.ts:37](https://github.com/algorandfoundation/algokit-utils-ts-debug/blob/main/src/debugging/writeTealDebugSourceMaps.ts#L37)
Loading

0 comments on commit 377f671

Please sign in to comment.