Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit ee2fbcd

Browse files
committed
Merge remote-tracking branch 'upstream/master' into shared-worker
2 parents 102b1ae + 16587f1 commit ee2fbcd

File tree

111 files changed

+899
-671
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+899
-671
lines changed

.github/workflows/main.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Checks
2+
3+
on: [push]
4+
5+
jobs:
6+
checks:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- run: npm i
11+
- uses: ipfs/aegir/actions/bundle-size@master
12+
with:
13+
github_token: ${{ secrets.GITHUB_TOKEN }}

docs/core-api/CONFIG.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
# Config API <!-- omit in toc -->
22

3-
- [`ipfs.config.get([key,] [options])`](#ipfsconfiggetkey-options)
3+
- [`ipfs.config.get(key, [options])`](#ipfsconfiggetkey-options)
44
- [Parameters](#parameters)
55
- [Options](#options)
66
- [Returns](#returns)
77
- [Example](#example)
8+
- [`ipfs.config.getAll([options])`](#ipfsconfiggetkey-options)
9+
- [Options](#options)
10+
- [Returns](#returns)
11+
- [Example](#example)
812
- [`ipfs.config.set(key, value, [options])`](#ipfsconfigsetkey-value-options)
913
- [Parameters](#parameters-1)
1014
- [Options](#options-1)
@@ -26,15 +30,15 @@
2630
- [Returns](#returns-4)
2731
- [Example](#example-4)
2832

29-
## `ipfs.config.get([key,] [options])`
33+
## `ipfs.config.get(key, [options])`
3034

3135
> Returns the currently being used config. If the daemon is off, it returns the stored config.
3236
3337
### Parameters
3438

3539
| Name | Type | Description |
3640
| ---- | ---- | ----------- |
37-
| key | `String` | The key of the value that should be fetched from the config file. If no key is passed, then the whole config will be returned. |
41+
| key | `String` | The key of the value that should be fetched from the config file. |
3842

3943
### Options
4044

@@ -60,6 +64,35 @@ console.log(config)
6064

6165
A great source of [examples][] can be found in the tests for this API.
6266

67+
## `ipfs.config.getAll([options])`
68+
69+
> Returns the full config been used. If the daemon is off, it returns the stored config.
70+
71+
### Options
72+
73+
An optional object which may have the following keys:
74+
75+
| Name | Type | Default | Description |
76+
| ---- | ---- | ------- | ----------- |
77+
| timeout | `Number` | `undefined` | A timeout in ms |
78+
| signal | [AbortSignal][] | `undefined` | Can be used to cancel any long running requests started as a result of this call |
79+
80+
### Returns
81+
82+
| Type | Description |
83+
| -------- | -------- |
84+
| `Promise<Object>` | An object containing the configuration of the IPFS node |
85+
86+
### Example
87+
88+
```JavaScript
89+
const config = await ipfs.config.getAll()
90+
console.log(config)
91+
```
92+
93+
A great source of [examples][] can be found in the tests for this API.
94+
95+
6396
## `ipfs.config.set(key, value, [options])`
6497

6598
> Adds or replaces a config value.

docs/core-api/DHT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ A great source of [examples][] can be found in the tests for this API.
126126

127127
| Name | Type | Description |
128128
| ---- | ---- | ----------- |
129-
| key | Buffer | The key associated with the value to find |
129+
| key | `Buffer` or `string` | The key associated with the value to find |
130130

131131
### Options
132132

docs/core-api/FILES.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,6 @@ An optional object which may have the following keys:
916916

917917
| Name | Type | Default | Description |
918918
| ---- | ---- | ------- | ----------- |
919-
| sort | `boolean` | `false` | If true entries will be sorted by filename |
920919
| timeout | `Number` | `undefined` | A timeout in ms |
921920
| signal | [AbortSignal][] | `undefined` | Can be used to cancel any long running requests started as a result of this call |
922921

docs/core-api/KEY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,4 +289,4 @@ A great source of [examples][] can be found in the tests for this API.
289289

290290
[examples]: https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/src/key
291291
[cid]: https://www.npmjs.com/package/cids
292-
[AbortSignal]: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
292+
[AbortSignal]: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal

examples/browser-add-readable-stream/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"keywords": [],
1313
"license": "MIT",
1414
"devDependencies": {
15-
"ipfs": "^0.45.0",
15+
"ipfs": "^0.46.0",
1616
"test-ipfs-example": "^2.0.3"
1717
}
1818
}

examples/browser-browserify/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"concat-stream": "^2.0.0",
1919
"execa": "^4.0.0",
2020
"http-server": "^0.11.1",
21-
"ipfs": "^0.45.0",
21+
"ipfs": "^0.46.0",
2222
"test-ipfs-example": "^2.0.3"
2323
},
2424
"browser": {

examples/browser-create-react-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"dependencies": {
66
"dot-prop": "^5.0.0",
7-
"ipfs": "^0.45.0",
7+
"ipfs": "^0.46.0",
88
"ipfs-css": "^0.13.1",
99
"react": "^16.8.6",
1010
"react-dom": "^16.8.6",

examples/browser-mfs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"webpack-cli": "^3.3.11"
2222
},
2323
"dependencies": {
24-
"ipfs": "^0.45.0",
24+
"ipfs": "^0.46.0",
2525
"mime-sniffer": "~0.0.3"
2626
}
2727
}

examples/browser-parceljs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"author": "",
1919
"license": "ISC",
2020
"dependencies": {
21-
"ipfs": "^0.45.0"
21+
"ipfs": "^0.46.0"
2222
},
2323
"devDependencies": {
2424
"@babel/cli": "^7.1.5",

0 commit comments

Comments
 (0)