Skip to content

Commit

Permalink
fix: error if esm.output was not present
Browse files Browse the repository at this point in the history
  • Loading branch information
hstove committed Oct 14, 2022
1 parent 6ef2b4a commit 89ce01f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/loud-buckets-tie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"clarigen-deno": patch
---

- Fixed a bug where an error would throw if there was no `output` in the `esm` section of config
- Added `chain.burnBlockHeight`
7 changes: 7 additions & 0 deletions src/chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,13 @@ export class Chain {
return this.chain.blockHeight;
}

// N.B.: in Clarinet v1, `burn-block-height` is one
// less than `burn-block`. This is undocumented and may
// change.
public get burnBlockHeight() {
return this.blockHeight - 1;
}

mineEmptyBlock(count: number | bigint = 1) {
return this.chain.mineEmptyBlock(Number(count));
}
Expand Down
2 changes: 1 addition & 1 deletion src/cli/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export enum OutputType {
const ConfigFileSchema = Schema({
clarinet: string,
[OutputType.ESM]: Schema({
output: string,
output: string.optional(),
include_accounts: boolean.optional(),
after: string.optional(),
}).optional(),
Expand Down

0 comments on commit 89ce01f

Please sign in to comment.