Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feat/act
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferenc Sárai committed Aug 12, 2024
2 parents fbc7e7e + e6487b2 commit 91562d2
Show file tree
Hide file tree
Showing 10 changed files with 576 additions and 489 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Changelog


## [7.1.1](https://github.com/ethersphere/bee-js/compare/v7.1.0...v7.1.1) (2024-08-08)


### Bug Fixes

* correct jsdocs links ([#938](https://github.com/ethersphere/bee-js/issues/938)) ([105909d](https://github.com/ethersphere/bee-js/commit/105909db865ea29be449cba9d1e54c2b479138aa))

## [7.1.0](https://github.com/ethersphere/bee-js/compare/v7.0.4...v7.1.0) (2024-07-17)


Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,22 @@
> Intended to be used with Bee version 2.1.0.
## Quick start

Start a Swarm project using TypeScript:

```sh
npm init swarm-app@latest my-dapp node-ts
```

or using Vite and TypeScript:

```sh
npm init swarm-app@latest my-dapp vite-tsx
```

Supported types are `node`, `node-esm`, `node-ts` and `vite-tsx`. Replace `my-dapp` with your project name.

## Install

```sh
Expand Down
36 changes: 36 additions & 0 deletions linkcheck.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
const { default: axios } = require('axios')
const { Strings } = require('cafe-utility')
const { readdirSync, statSync, readFileSync } = require('fs')
const { join } = require('path')

main()

function main() {
walk('src')
}

function walk(dir) {
const files = readdirSync(dir)
for (const file of files) {
const path = join(dir, file)
if (statSync(path).isDirectory()) {
walk(path)
} else {
check(path)
}
}
}

function check(path) {
const content = readFileSync(path, 'utf8')
const links = Strings.extractAllBlocks(content, {
opening: '](https://docs.ethswarm.org',
closing: ')',
})
for (const link of links) {
const cleanLink = link.replaceAll('](', '').replaceAll(')', '')
axios.get(cleanLink).catch(error => {
console.error(path, cleanLink, error.response.status)
})
}
}
Loading

0 comments on commit 91562d2

Please sign in to comment.