@bitsocial/bitsocial-cli 0.19.76 → 0.19.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -16
- package/dist/common-utils/defaults.js +8 -1
- package/dist/ipfs/startIpfs.d.ts +1 -0
- package/dist/ipfs/startIpfs.js +16 -1
- package/oclif.manifest.json +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -421,7 +421,7 @@ EXAMPLES
|
|
|
421
421
|
$ bitsocial challenge install ./my-local-challenge
|
|
422
422
|
```
|
|
423
423
|
|
|
424
|
-
_See code: [src/cli/commands/challenge/install.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
424
|
+
_See code: [src/cli/commands/challenge/install.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.78/src/cli/commands/challenge/install.ts)_
|
|
425
425
|
|
|
426
426
|
## `bitsocial challenge list`
|
|
427
427
|
|
|
@@ -447,7 +447,7 @@ EXAMPLES
|
|
|
447
447
|
$ bitsocial challenge list -q
|
|
448
448
|
```
|
|
449
449
|
|
|
450
|
-
_See code: [src/cli/commands/challenge/list.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
450
|
+
_See code: [src/cli/commands/challenge/list.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.78/src/cli/commands/challenge/list.ts)_
|
|
451
451
|
|
|
452
452
|
## `bitsocial challenge ls`
|
|
453
453
|
|
|
@@ -501,7 +501,7 @@ EXAMPLES
|
|
|
501
501
|
$ bitsocial challenge remove @scope/my-challenge
|
|
502
502
|
```
|
|
503
503
|
|
|
504
|
-
_See code: [src/cli/commands/challenge/remove.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
504
|
+
_See code: [src/cli/commands/challenge/remove.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.78/src/cli/commands/challenge/remove.ts)_
|
|
505
505
|
|
|
506
506
|
## `bitsocial challenge rm NAME`
|
|
507
507
|
|
|
@@ -615,7 +615,7 @@ EXAMPLES
|
|
|
615
615
|
$ bitsocial community create --jsonFile ./create-options.json
|
|
616
616
|
```
|
|
617
617
|
|
|
618
|
-
_See code: [src/cli/commands/community/create.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
618
|
+
_See code: [src/cli/commands/community/create.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.78/src/cli/commands/community/create.ts)_
|
|
619
619
|
|
|
620
620
|
## `bitsocial community delete ADDRESSES`
|
|
621
621
|
|
|
@@ -640,7 +640,7 @@ EXAMPLES
|
|
|
640
640
|
$ bitsocial community delete 12D3KooWG3XbzoVyAE6Y9vHZKF64Yuuu4TjdgQKedk14iYmTEPWu
|
|
641
641
|
```
|
|
642
642
|
|
|
643
|
-
_See code: [src/cli/commands/community/delete.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
643
|
+
_See code: [src/cli/commands/community/delete.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.78/src/cli/commands/community/delete.ts)_
|
|
644
644
|
|
|
645
645
|
## `bitsocial community edit ADDRESS`
|
|
646
646
|
|
|
@@ -710,7 +710,7 @@ EXAMPLES
|
|
|
710
710
|
$ bitsocial community edit bitsocial.bso --jsonFile ./edit-options.json
|
|
711
711
|
```
|
|
712
712
|
|
|
713
|
-
_See code: [src/cli/commands/community/edit.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
713
|
+
_See code: [src/cli/commands/community/edit.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.78/src/cli/commands/community/edit.ts)_
|
|
714
714
|
|
|
715
715
|
## `bitsocial community export [ADDRESS]`
|
|
716
716
|
|
|
@@ -751,7 +751,7 @@ EXAMPLES
|
|
|
751
751
|
$ bitsocial community export --publicKey 12D3KooWG3XbzoVyAE6Y9vHZKF64Yuuu4TjdgQKedk14iYmTEPWu
|
|
752
752
|
```
|
|
753
753
|
|
|
754
|
-
_See code: [src/cli/commands/community/export.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
754
|
+
_See code: [src/cli/commands/community/export.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.78/src/cli/commands/community/export.ts)_
|
|
755
755
|
|
|
756
756
|
## `bitsocial community get [ADDRESS]`
|
|
757
757
|
|
|
@@ -782,7 +782,7 @@ EXAMPLES
|
|
|
782
782
|
$ bitsocial community get --publicKey 12D3KooWG3XbzoVyAE6Y9vHZKF64Yuuu4TjdgQKedk14iYmTEPWu
|
|
783
783
|
```
|
|
784
784
|
|
|
785
|
-
_See code: [src/cli/commands/community/get.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
785
|
+
_See code: [src/cli/commands/community/get.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.78/src/cli/commands/community/get.ts)_
|
|
786
786
|
|
|
787
787
|
## `bitsocial community list`
|
|
788
788
|
|
|
@@ -805,7 +805,7 @@ EXAMPLES
|
|
|
805
805
|
$ bitsocial community list
|
|
806
806
|
```
|
|
807
807
|
|
|
808
|
-
_See code: [src/cli/commands/community/list.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
808
|
+
_See code: [src/cli/commands/community/list.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.78/src/cli/commands/community/list.ts)_
|
|
809
809
|
|
|
810
810
|
## `bitsocial community start ADDRESSES`
|
|
811
811
|
|
|
@@ -839,7 +839,7 @@ EXAMPLES
|
|
|
839
839
|
$ bitsocial community start $(bitsocial community list -q) --concurrency 1
|
|
840
840
|
```
|
|
841
841
|
|
|
842
|
-
_See code: [src/cli/commands/community/start.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
842
|
+
_See code: [src/cli/commands/community/start.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.78/src/cli/commands/community/start.ts)_
|
|
843
843
|
|
|
844
844
|
## `bitsocial community stop ADDRESSES`
|
|
845
845
|
|
|
@@ -864,7 +864,7 @@ EXAMPLES
|
|
|
864
864
|
$ bitsocial community stop Qmb99crTbSUfKXamXwZBe829Vf6w5w5TktPkb6WstC9RFW
|
|
865
865
|
```
|
|
866
866
|
|
|
867
|
-
_See code: [src/cli/commands/community/stop.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
867
|
+
_See code: [src/cli/commands/community/stop.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.78/src/cli/commands/community/stop.ts)_
|
|
868
868
|
|
|
869
869
|
## `bitsocial daemon`
|
|
870
870
|
|
|
@@ -911,7 +911,7 @@ EXAMPLES
|
|
|
911
911
|
$ bitsocial daemon --no-allowPrivateKeyExport
|
|
912
912
|
```
|
|
913
913
|
|
|
914
|
-
_See code: [src/cli/commands/daemon.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
914
|
+
_See code: [src/cli/commands/daemon.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.78/src/cli/commands/daemon.ts)_
|
|
915
915
|
|
|
916
916
|
## `bitsocial help [COMMAND]`
|
|
917
917
|
|
|
@@ -977,7 +977,7 @@ EXAMPLES
|
|
|
977
977
|
$ bitsocial logs --stdout -f
|
|
978
978
|
```
|
|
979
979
|
|
|
980
|
-
_See code: [src/cli/commands/logs.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
980
|
+
_See code: [src/cli/commands/logs.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.78/src/cli/commands/logs.ts)_
|
|
981
981
|
|
|
982
982
|
## `bitsocial update check`
|
|
983
983
|
|
|
@@ -994,7 +994,7 @@ EXAMPLES
|
|
|
994
994
|
$ bitsocial update check
|
|
995
995
|
```
|
|
996
996
|
|
|
997
|
-
_See code: [src/cli/commands/update/check.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
997
|
+
_See code: [src/cli/commands/update/check.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.78/src/cli/commands/update/check.ts)_
|
|
998
998
|
|
|
999
999
|
## `bitsocial update install [VERSION]`
|
|
1000
1000
|
|
|
@@ -1026,7 +1026,7 @@ EXAMPLES
|
|
|
1026
1026
|
$ bitsocial update install --no-restart-daemons
|
|
1027
1027
|
```
|
|
1028
1028
|
|
|
1029
|
-
_See code: [src/cli/commands/update/install.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
1029
|
+
_See code: [src/cli/commands/update/install.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.78/src/cli/commands/update/install.ts)_
|
|
1030
1030
|
|
|
1031
1031
|
## `bitsocial update versions`
|
|
1032
1032
|
|
|
@@ -1048,7 +1048,7 @@ EXAMPLES
|
|
|
1048
1048
|
$ bitsocial update versions --limit 5
|
|
1049
1049
|
```
|
|
1050
1050
|
|
|
1051
|
-
_See code: [src/cli/commands/update/versions.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.
|
|
1051
|
+
_See code: [src/cli/commands/update/versions.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.78/src/cli/commands/update/versions.ts)_
|
|
1052
1052
|
<!-- commandsstop -->
|
|
1053
1053
|
|
|
1054
1054
|
## Contribution
|
|
@@ -5,6 +5,13 @@ export default {
|
|
|
5
5
|
PKC_RPC_URL: new URL("ws://localhost:9138"),
|
|
6
6
|
KUBO_RPC_URL: new URL(process.env["KUBO_RPC_URL"] || "http://127.0.0.1:50019/api/v0"),
|
|
7
7
|
IPFS_GATEWAY_URL: new URL(process.env["IPFS_GATEWAY_URL"] || "http://127.0.0.1:6473"),
|
|
8
|
-
HTTP_TRACKERS: [
|
|
8
|
+
HTTP_TRACKERS: [
|
|
9
|
+
"https://peers.pleb.bot",
|
|
10
|
+
"https://routing.lol",
|
|
11
|
+
"https://peers.forumindex.com",
|
|
12
|
+
"https://peers.plebpubsub.xyz",
|
|
13
|
+
"https://routerofbitsocial.xyz",
|
|
14
|
+
"https://bsotracker.online"
|
|
15
|
+
],
|
|
9
16
|
PKC_LOG_PATH: envPaths("bitsocial", { suffix: "" }).log
|
|
10
17
|
};
|
package/dist/ipfs/startIpfs.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChildProcessWithoutNullStreams } from "child_process";
|
|
2
2
|
export declare function mergeCliDefaultsIntoIpfsConfig(log: any, ipfsConfigPath: string, apiUrl: URL, gatewayUrl: URL): Promise<void>;
|
|
3
|
+
export declare function ensureIpnsPubsubEnabled(log: any, ipfsConfigPath: string): Promise<void>;
|
|
3
4
|
export declare function _gatherChildOutput(log: any, child: ChildProcessWithoutNullStreams): Promise<null>;
|
|
4
5
|
export declare function startKuboNode(apiUrl: URL, gatewayUrl: URL, dataPath: string, onSpawn?: (process: ChildProcessWithoutNullStreams) => void): Promise<ChildProcessWithoutNullStreams>;
|
package/dist/ipfs/startIpfs.js
CHANGED
|
@@ -62,6 +62,19 @@ export async function mergeCliDefaultsIntoIpfsConfig(log, ipfsConfigPath, apiUrl
|
|
|
62
62
|
await fsPromises.writeFile(ipfsConfigPath, JSON.stringify(mergedIpfsConfig, null, 4));
|
|
63
63
|
log("Applied bitsocial CLI defaults to freshly initialized IPFS config.", ipfsConfigPath);
|
|
64
64
|
}
|
|
65
|
+
// Kubo deprecated the `--enable-namesys-pubsub` daemon flag in favor of the `Ipns.UsePubsub`
|
|
66
|
+
// config option. We previously passed that flag on every daemon start, so to preserve behavior
|
|
67
|
+
// we ensure `Ipns.UsePubsub: true` is set on every start — including pre-existing repos whose
|
|
68
|
+
// config we otherwise leave untouched. Only the single key is written; all other user settings
|
|
69
|
+
// are preserved, and the file is left alone if it is already enabled.
|
|
70
|
+
export async function ensureIpnsPubsubEnabled(log, ipfsConfigPath) {
|
|
71
|
+
const config = JSON.parse((await fsPromises.readFile(ipfsConfigPath)).toString());
|
|
72
|
+
if (config?.Ipns?.UsePubsub === true)
|
|
73
|
+
return;
|
|
74
|
+
config.Ipns = { ...(config.Ipns ?? {}), UsePubsub: true };
|
|
75
|
+
await fsPromises.writeFile(ipfsConfigPath, JSON.stringify(config, null, 4));
|
|
76
|
+
log("Enabled Ipns.UsePubsub in IPFS config (replaces deprecated --enable-namesys-pubsub flag).", ipfsConfigPath);
|
|
77
|
+
}
|
|
65
78
|
// use this custom function instead of spawnSync for better logging
|
|
66
79
|
// also spawnSync might have been causing crash on start on windows
|
|
67
80
|
// Listens on 'close' (not 'exit') so all stderr 'data' events have been delivered
|
|
@@ -220,6 +233,8 @@ export async function startKuboNode(apiUrl, gatewayUrl, dataPath, onSpawn) {
|
|
|
220
233
|
else {
|
|
221
234
|
log("IPFS config already exists; skipping config overrides to preserve user changes.");
|
|
222
235
|
}
|
|
236
|
+
// Replaces the deprecated `--enable-namesys-pubsub` daemon flag; must run for existing repos too.
|
|
237
|
+
await ensureIpnsPubsubEnabled(log, ipfsConfigPath);
|
|
223
238
|
try {
|
|
224
239
|
await _spawnAsync(log, kuboExePath, ["repo", "migrate"], { env, hideWindows: true });
|
|
225
240
|
log("Ensured IPFS repository is migrated to the latest supported version.");
|
|
@@ -232,7 +247,7 @@ export async function startKuboNode(apiUrl, gatewayUrl, dataPath, onSpawn) {
|
|
|
232
247
|
// Spawn phase: the promise only wraps the event-driven wait for kubo's "Daemon is ready",
|
|
233
248
|
// so every settle path goes through resolve/reject.
|
|
234
249
|
return new Promise((resolve, reject) => {
|
|
235
|
-
const daemonArgs = ["--
|
|
250
|
+
const daemonArgs = ["--migrate"];
|
|
236
251
|
const kuboProcess = spawn(kuboExePath, ["daemon", ...daemonArgs], {
|
|
237
252
|
env,
|
|
238
253
|
cwd: process.cwd(),
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitsocial/bitsocial-cli",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.78",
|
|
4
4
|
"description": "Command line interface to Bitsocial API",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"homepage": "https://github.com/bitsocialnet/bitsocial-cli",
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"@oclif/plugin-help": "6.2.36",
|
|
120
120
|
"@oclif/plugin-not-found": "3.2.73",
|
|
121
121
|
"@oclif/table": "0.5.1",
|
|
122
|
-
"@pkcprotocol/pkc-js": "0.0.
|
|
122
|
+
"@pkcprotocol/pkc-js": "0.0.53",
|
|
123
123
|
"dataobject-parser": "1.2.22",
|
|
124
124
|
"decompress": "4.2.1",
|
|
125
125
|
"env-paths": "2.2.1",
|