@pkcprotocol/pkc-js 0.0.47 → 0.0.48
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/dist/browser/generated-version.d.ts +1 -1
- package/dist/browser/generated-version.js +1 -1
- package/dist/browser/helia/helia-for-pkc.js +26 -17
- package/dist/browser/helia/helia-for-pkc.js.map +1 -1
- package/dist/browser/runtime/node/community/db-handler.d.ts +1 -0
- package/dist/browser/runtime/node/community/db-handler.js +3 -0
- package/dist/browser/runtime/node/community/db-handler.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community/comment-updates.js +11 -3
- package/dist/browser/runtime/node/community/local-community/comment-updates.js.map +1 -1
- package/dist/browser/signer/encryption.d.ts +2 -2
- package/dist/browser/signer/util.d.ts +1 -1
- package/dist/bundled/bundle-manifest.json +81 -77
- package/dist/bundled/chunks/{helia-for-pkc-Kr0fvym5.js → helia-for-pkc-C9v3jcS7.js} +16 -15
- package/dist/bundled/chunks/{local-community-DyL61Q84.js → local-community-BUAd-a_f.js} +1 -1
- package/dist/bundled/chunks/{local-community-1YWTMINk.js → local-community-CXbUZ0um.js} +11 -5
- package/dist/bundled/chunks/{node-7bvDHqBl.js → node-edb9-nES.js} +5 -5
- package/dist/bundled/chunks/{rpc-local-community-Xpx65cbz.js → rpc-local-community-CO__pwvD.js} +1 -1
- package/dist/bundled/chunks/{schema-CijXm_fr.js → schema-B7HIUI8w.js} +3782 -3410
- package/dist/bundled/chunks/{util-RR1J0iZB.js → util-BqBjzCfN.js} +1 -1
- package/dist/bundled/index.js +1 -1
- package/dist/bundled/rpc/src/index.js +4 -4
- package/dist/node/generated-version.d.ts +1 -1
- package/dist/node/generated-version.js +1 -1
- package/dist/node/helia/helia-for-pkc.js +26 -17
- package/dist/node/helia/helia-for-pkc.js.map +1 -1
- package/dist/node/runtime/node/community/db-handler.d.ts +1 -0
- package/dist/node/runtime/node/community/db-handler.js +3 -0
- package/dist/node/runtime/node/community/db-handler.js.map +1 -1
- package/dist/node/runtime/node/community/local-community/comment-updates.js +11 -3
- package/dist/node/runtime/node/community/local-community/comment-updates.js.map +1 -1
- package/dist/node/signer/encryption.d.ts +2 -2
- package/dist/node/signer/util.d.ts +1 -1
- package/package.json +16 -16
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"node:module"
|
|
15
15
|
],
|
|
16
16
|
"dynamicImports": [
|
|
17
|
-
"chunks/node-
|
|
17
|
+
"chunks/node-edb9-nES.js"
|
|
18
18
|
],
|
|
19
19
|
"inputs": [
|
|
20
20
|
"dist/node/runtime/node/compile-cache.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"index.js": {
|
|
25
25
|
"isEntry": true,
|
|
26
26
|
"imports": [
|
|
27
|
-
"chunks/node-
|
|
27
|
+
"chunks/node-edb9-nES.js"
|
|
28
28
|
],
|
|
29
29
|
"dynamicImports": [],
|
|
30
30
|
"inputs": []
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"rpc/src/index.js": {
|
|
33
33
|
"isEntry": true,
|
|
34
34
|
"imports": [
|
|
35
|
-
"chunks/schema-
|
|
36
|
-
"chunks/rpc-local-community-
|
|
37
|
-
"chunks/node-
|
|
38
|
-
"chunks/local-community-
|
|
35
|
+
"chunks/schema-B7HIUI8w.js",
|
|
36
|
+
"chunks/rpc-local-community-CO__pwvD.js",
|
|
37
|
+
"chunks/node-edb9-nES.js",
|
|
38
|
+
"chunks/local-community-CXbUZ0um.js",
|
|
39
39
|
"node:url",
|
|
40
40
|
"path",
|
|
41
41
|
"assert",
|
|
@@ -54,12 +54,13 @@
|
|
|
54
54
|
"dist/node/rpc/src/index.js"
|
|
55
55
|
]
|
|
56
56
|
},
|
|
57
|
-
"chunks/helia-for-pkc-
|
|
57
|
+
"chunks/helia-for-pkc-C9v3jcS7.js": {
|
|
58
58
|
"isEntry": false,
|
|
59
59
|
"imports": [
|
|
60
|
-
"chunks/schema-
|
|
61
|
-
"chunks/util-
|
|
60
|
+
"chunks/schema-B7HIUI8w.js",
|
|
61
|
+
"chunks/util-BqBjzCfN.js",
|
|
62
62
|
"multiformats/cid",
|
|
63
|
+
"@libp2p/interface",
|
|
63
64
|
"@libp2p/peer-id",
|
|
64
65
|
"ipns",
|
|
65
66
|
"ipns/validator",
|
|
@@ -82,11 +83,19 @@
|
|
|
82
83
|
"dist/node/helia/helia-for-pkc.js"
|
|
83
84
|
]
|
|
84
85
|
},
|
|
85
|
-
"chunks/local-community-
|
|
86
|
+
"chunks/local-community-BUAd-a_f.js": {
|
|
87
|
+
"isEntry": false,
|
|
88
|
+
"imports": [
|
|
89
|
+
"chunks/local-community-CXbUZ0um.js"
|
|
90
|
+
],
|
|
91
|
+
"dynamicImports": [],
|
|
92
|
+
"inputs": []
|
|
93
|
+
},
|
|
94
|
+
"chunks/local-community-CXbUZ0um.js": {
|
|
86
95
|
"isEntry": false,
|
|
87
96
|
"imports": [
|
|
88
|
-
"chunks/schema-
|
|
89
|
-
"chunks/rpc-local-community-
|
|
97
|
+
"chunks/schema-B7HIUI8w.js",
|
|
98
|
+
"chunks/rpc-local-community-CO__pwvD.js",
|
|
90
99
|
"node:crypto",
|
|
91
100
|
"node:url",
|
|
92
101
|
"node:path",
|
|
@@ -133,20 +142,12 @@
|
|
|
133
142
|
"dist/node/runtime/node/community/local-community.js"
|
|
134
143
|
]
|
|
135
144
|
},
|
|
136
|
-
"chunks/
|
|
145
|
+
"chunks/node-edb9-nES.js": {
|
|
137
146
|
"isEntry": false,
|
|
138
147
|
"imports": [
|
|
139
|
-
"chunks/
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
"inputs": []
|
|
143
|
-
},
|
|
144
|
-
"chunks/node-7bvDHqBl.js": {
|
|
145
|
-
"isEntry": false,
|
|
146
|
-
"imports": [
|
|
147
|
-
"chunks/schema-CijXm_fr.js",
|
|
148
|
-
"chunks/rpc-local-community-Xpx65cbz.js",
|
|
149
|
-
"chunks/util-RR1J0iZB.js",
|
|
148
|
+
"chunks/schema-B7HIUI8w.js",
|
|
149
|
+
"chunks/rpc-local-community-CO__pwvD.js",
|
|
150
|
+
"chunks/util-BqBjzCfN.js",
|
|
150
151
|
"path",
|
|
151
152
|
"assert",
|
|
152
153
|
"fs",
|
|
@@ -156,8 +157,8 @@
|
|
|
156
157
|
"rpc-websockets"
|
|
157
158
|
],
|
|
158
159
|
"dynamicImports": [
|
|
159
|
-
"chunks/helia-for-pkc-
|
|
160
|
-
"chunks/local-community-
|
|
160
|
+
"chunks/helia-for-pkc-C9v3jcS7.js",
|
|
161
|
+
"chunks/local-community-CXbUZ0um.js"
|
|
161
162
|
],
|
|
162
163
|
"inputs": [
|
|
163
164
|
"node_modules/zod/v4/locales/en.js",
|
|
@@ -198,10 +199,10 @@
|
|
|
198
199
|
"dist/node/index.js"
|
|
199
200
|
]
|
|
200
201
|
},
|
|
201
|
-
"chunks/rpc-local-community-
|
|
202
|
+
"chunks/rpc-local-community-CO__pwvD.js": {
|
|
202
203
|
"isEntry": false,
|
|
203
204
|
"imports": [
|
|
204
|
-
"chunks/schema-
|
|
205
|
+
"chunks/schema-B7HIUI8w.js",
|
|
205
206
|
"node:crypto",
|
|
206
207
|
"node:url",
|
|
207
208
|
"node:dns",
|
|
@@ -733,7 +734,7 @@
|
|
|
733
734
|
"dist/node/community/rpc-local-community.js"
|
|
734
735
|
]
|
|
735
736
|
},
|
|
736
|
-
"chunks/schema-
|
|
737
|
+
"chunks/schema-B7HIUI8w.js": {
|
|
737
738
|
"isEntry": false,
|
|
738
739
|
"imports": [
|
|
739
740
|
"node:module",
|
|
@@ -764,6 +765,7 @@
|
|
|
764
765
|
"uint8arrays/alloc",
|
|
765
766
|
"uint8arrays/concat",
|
|
766
767
|
"uint8arrays/equals",
|
|
768
|
+
"uint8arrays/with-array-buffer",
|
|
767
769
|
"multiformats/codecs/raw",
|
|
768
770
|
"multiformats/hashes/sha2",
|
|
769
771
|
"@multiformats/murmur3",
|
|
@@ -803,6 +805,36 @@
|
|
|
803
805
|
"dist/node/errors.js",
|
|
804
806
|
"node_modules/ts-custom-error/dist/custom-error.js",
|
|
805
807
|
"dist/node/pkc-error.js",
|
|
808
|
+
"node_modules/kubo-rpc-client/node_modules/cborg/lib/is.js",
|
|
809
|
+
"node_modules/kubo-rpc-client/node_modules/cborg/lib/token.js",
|
|
810
|
+
"node_modules/kubo-rpc-client/node_modules/cborg/lib/byte-utils.js",
|
|
811
|
+
"node_modules/kubo-rpc-client/node_modules/cborg/lib/bl.js",
|
|
812
|
+
"node_modules/kubo-rpc-client/node_modules/cborg/lib/common.js",
|
|
813
|
+
"node_modules/kubo-rpc-client/node_modules/cborg/lib/0uint.js",
|
|
814
|
+
"node_modules/kubo-rpc-client/node_modules/cborg/lib/1negint.js",
|
|
815
|
+
"node_modules/kubo-rpc-client/node_modules/cborg/lib/2bytes.js",
|
|
816
|
+
"node_modules/kubo-rpc-client/node_modules/cborg/lib/3string.js",
|
|
817
|
+
"node_modules/kubo-rpc-client/node_modules/cborg/lib/4array.js",
|
|
818
|
+
"node_modules/kubo-rpc-client/node_modules/cborg/lib/5map.js",
|
|
819
|
+
"node_modules/kubo-rpc-client/node_modules/cborg/lib/6tag.js",
|
|
820
|
+
"node_modules/kubo-rpc-client/node_modules/cborg/lib/7float.js",
|
|
821
|
+
"node_modules/kubo-rpc-client/node_modules/cborg/lib/jump.js",
|
|
822
|
+
"node_modules/kubo-rpc-client/node_modules/cborg/lib/encode.js",
|
|
823
|
+
"node_modules/kubo-rpc-client/node_modules/cborg/lib/decode.js",
|
|
824
|
+
"node_modules/kubo-rpc-client/node_modules/cborg/lib/tagged.js",
|
|
825
|
+
"node_modules/kubo-rpc-client/node_modules/cborg/cborg.js",
|
|
826
|
+
"node_modules/kubo-rpc-client/node_modules/@ipld/dag-cbor/src/index.js",
|
|
827
|
+
"node_modules/kubo-rpc-client/node_modules/cborg/lib/json/encode.js",
|
|
828
|
+
"node_modules/kubo-rpc-client/node_modules/cborg/lib/json/decode.js",
|
|
829
|
+
"node_modules/kubo-rpc-client/node_modules/cborg/lib/json/json.js",
|
|
830
|
+
"node_modules/kubo-rpc-client/node_modules/@ipld/dag-json/src/index.js",
|
|
831
|
+
"node_modules/@ipld/dag-pb/src/pb-decode.js",
|
|
832
|
+
"node_modules/@ipld/dag-pb/src/pb-encode.js",
|
|
833
|
+
"node_modules/@ipld/dag-pb/src/util.js",
|
|
834
|
+
"node_modules/@ipld/dag-pb/src/index.js",
|
|
835
|
+
"node_modules/dag-jose/lib/utils.js",
|
|
836
|
+
"node_modules/dag-jose/lib/signing.js",
|
|
837
|
+
"node_modules/dag-jose/lib/encryption.js",
|
|
806
838
|
"node_modules/@ipld/dag-cbor/node_modules/cborg/lib/is.js",
|
|
807
839
|
"node_modules/@ipld/dag-cbor/node_modules/cborg/lib/token.js",
|
|
808
840
|
"node_modules/@ipld/dag-cbor/node_modules/cborg/lib/byte-utils.js",
|
|
@@ -822,35 +854,6 @@
|
|
|
822
854
|
"node_modules/@ipld/dag-cbor/node_modules/cborg/lib/tagged.js",
|
|
823
855
|
"node_modules/@ipld/dag-cbor/node_modules/cborg/cborg.js",
|
|
824
856
|
"node_modules/@ipld/dag-cbor/src/index.js",
|
|
825
|
-
"node_modules/@ipld/dag-json/node_modules/cborg/lib/is.js",
|
|
826
|
-
"node_modules/@ipld/dag-json/node_modules/cborg/lib/token.js",
|
|
827
|
-
"node_modules/@ipld/dag-json/node_modules/cborg/lib/byte-utils.js",
|
|
828
|
-
"node_modules/@ipld/dag-json/node_modules/cborg/lib/bl.js",
|
|
829
|
-
"node_modules/@ipld/dag-json/node_modules/cborg/lib/common.js",
|
|
830
|
-
"node_modules/@ipld/dag-json/node_modules/cborg/lib/0uint.js",
|
|
831
|
-
"node_modules/@ipld/dag-json/node_modules/cborg/lib/1negint.js",
|
|
832
|
-
"node_modules/@ipld/dag-json/node_modules/cborg/lib/2bytes.js",
|
|
833
|
-
"node_modules/@ipld/dag-json/node_modules/cborg/lib/3string.js",
|
|
834
|
-
"node_modules/@ipld/dag-json/node_modules/cborg/lib/4array.js",
|
|
835
|
-
"node_modules/@ipld/dag-json/node_modules/cborg/lib/5map.js",
|
|
836
|
-
"node_modules/@ipld/dag-json/node_modules/cborg/lib/6tag.js",
|
|
837
|
-
"node_modules/@ipld/dag-json/node_modules/cborg/lib/7float.js",
|
|
838
|
-
"node_modules/@ipld/dag-json/node_modules/cborg/lib/jump.js",
|
|
839
|
-
"node_modules/@ipld/dag-json/node_modules/cborg/lib/encode.js",
|
|
840
|
-
"node_modules/@ipld/dag-json/node_modules/cborg/lib/decode.js",
|
|
841
|
-
"node_modules/@ipld/dag-json/node_modules/cborg/lib/tagged.js",
|
|
842
|
-
"node_modules/@ipld/dag-json/node_modules/cborg/cborg.js",
|
|
843
|
-
"node_modules/@ipld/dag-json/node_modules/cborg/lib/json/encode.js",
|
|
844
|
-
"node_modules/@ipld/dag-json/node_modules/cborg/lib/json/decode.js",
|
|
845
|
-
"node_modules/@ipld/dag-json/node_modules/cborg/lib/json/json.js",
|
|
846
|
-
"node_modules/@ipld/dag-json/src/index.js",
|
|
847
|
-
"node_modules/@ipld/dag-pb/src/pb-decode.js",
|
|
848
|
-
"node_modules/@ipld/dag-pb/src/pb-encode.js",
|
|
849
|
-
"node_modules/@ipld/dag-pb/src/util.js",
|
|
850
|
-
"node_modules/@ipld/dag-pb/src/index.js",
|
|
851
|
-
"node_modules/dag-jose/lib/utils.js",
|
|
852
|
-
"node_modules/dag-jose/lib/signing.js",
|
|
853
|
-
"node_modules/dag-jose/lib/encryption.js",
|
|
854
857
|
"node_modules/dag-jose/lib/index.js",
|
|
855
858
|
"node_modules/any-signal/dist/src/index.js",
|
|
856
859
|
"node_modules/nanoid/url-alphabet/index.js",
|
|
@@ -1225,25 +1228,26 @@
|
|
|
1225
1228
|
"node_modules/js-sha256/src/sha256.js",
|
|
1226
1229
|
"node_modules/it-batch/dist/src/index.js",
|
|
1227
1230
|
"node_modules/it-parallel-batch/dist/src/index.js",
|
|
1228
|
-
"node_modules/uint8arraylist/dist/src/index.js",
|
|
1231
|
+
"node_modules/ipfs-unixfs-importer/node_modules/uint8arraylist/dist/src/index.js",
|
|
1229
1232
|
"node_modules/ipfs-unixfs-importer/dist/src/constants.js",
|
|
1230
1233
|
"node_modules/ipfs-unixfs-importer/dist/src/chunker/fixed-size.js",
|
|
1231
|
-
"node_modules/ipfs-unixfs/dist/src/errors.js",
|
|
1232
|
-
"node_modules/uint8-varint/dist/src/index.js",
|
|
1233
|
-
"node_modules/ipfs-unixfs/node_modules/protons-runtime/dist/src/utils/float.js",
|
|
1234
|
-
"node_modules/ipfs-unixfs/node_modules/protons-runtime/dist/src/utils/longbits.js",
|
|
1235
|
-
"node_modules/ipfs-unixfs/node_modules/protons-runtime/dist/src/utils/utf8.js",
|
|
1236
|
-
"node_modules/ipfs-unixfs/node_modules/protons-runtime/dist/src/utils/reader.js",
|
|
1237
|
-
"node_modules/ipfs-unixfs/node_modules/protons-runtime/dist/src/decode.js",
|
|
1238
|
-
"node_modules/ipfs-unixfs/node_modules/protons-runtime/dist/src/utils/pool.js",
|
|
1239
|
-
"node_modules/ipfs-unixfs/node_modules/protons-runtime/dist/src/utils/writer.js",
|
|
1240
|
-
"node_modules/ipfs-unixfs/node_modules/protons-runtime/dist/src/encode.js",
|
|
1241
|
-
"node_modules/ipfs-unixfs/node_modules/protons-runtime/dist/src/
|
|
1242
|
-
"node_modules/ipfs-unixfs/node_modules/protons-runtime/dist/src/
|
|
1243
|
-
"node_modules/ipfs-unixfs/node_modules/protons-runtime/dist/src/codecs/
|
|
1244
|
-
"node_modules/ipfs-unixfs/node_modules/protons-runtime/dist/src/
|
|
1245
|
-
"node_modules/ipfs-unixfs/dist/src/
|
|
1246
|
-
"node_modules/ipfs-unixfs/dist/src/
|
|
1234
|
+
"node_modules/ipfs-unixfs-importer/node_modules/ipfs-unixfs/dist/src/errors.js",
|
|
1235
|
+
"node_modules/ipfs-unixfs-importer/node_modules/uint8-varint/dist/src/index.js",
|
|
1236
|
+
"node_modules/ipfs-unixfs-importer/node_modules/protons-runtime/dist/src/utils/float.js",
|
|
1237
|
+
"node_modules/ipfs-unixfs-importer/node_modules/protons-runtime/dist/src/utils/longbits.js",
|
|
1238
|
+
"node_modules/ipfs-unixfs-importer/node_modules/protons-runtime/dist/src/utils/utf8.js",
|
|
1239
|
+
"node_modules/ipfs-unixfs-importer/node_modules/protons-runtime/dist/src/utils/reader.js",
|
|
1240
|
+
"node_modules/ipfs-unixfs-importer/node_modules/protons-runtime/dist/src/decode.js",
|
|
1241
|
+
"node_modules/ipfs-unixfs-importer/node_modules/protons-runtime/dist/src/utils/pool.js",
|
|
1242
|
+
"node_modules/ipfs-unixfs-importer/node_modules/protons-runtime/dist/src/utils/writer.js",
|
|
1243
|
+
"node_modules/ipfs-unixfs-importer/node_modules/protons-runtime/dist/src/encode.js",
|
|
1244
|
+
"node_modules/ipfs-unixfs-importer/node_modules/protons-runtime/dist/src/stream.js",
|
|
1245
|
+
"node_modules/ipfs-unixfs-importer/node_modules/protons-runtime/dist/src/codec.js",
|
|
1246
|
+
"node_modules/ipfs-unixfs-importer/node_modules/protons-runtime/dist/src/codecs/enum.js",
|
|
1247
|
+
"node_modules/ipfs-unixfs-importer/node_modules/protons-runtime/dist/src/codecs/message.js",
|
|
1248
|
+
"node_modules/ipfs-unixfs-importer/node_modules/protons-runtime/dist/src/index.js",
|
|
1249
|
+
"node_modules/ipfs-unixfs-importer/node_modules/ipfs-unixfs/dist/src/unixfs.js",
|
|
1250
|
+
"node_modules/ipfs-unixfs-importer/node_modules/ipfs-unixfs/dist/src/index.js",
|
|
1247
1251
|
"node_modules/progress-events/dist/src/index.js",
|
|
1248
1252
|
"node_modules/ipfs-unixfs-importer/dist/src/utils/persist.js",
|
|
1249
1253
|
"node_modules/ipfs-unixfs-importer/dist/src/dag-builder/buffer-importer.js",
|
|
@@ -1274,10 +1278,10 @@
|
|
|
1274
1278
|
"dist/node/pubsub-messages/schema.js"
|
|
1275
1279
|
]
|
|
1276
1280
|
},
|
|
1277
|
-
"chunks/util-
|
|
1281
|
+
"chunks/util-BqBjzCfN.js": {
|
|
1278
1282
|
"isEntry": false,
|
|
1279
1283
|
"imports": [
|
|
1280
|
-
"chunks/schema-
|
|
1284
|
+
"chunks/schema-B7HIUI8w.js"
|
|
1281
1285
|
],
|
|
1282
1286
|
"dynamicImports": [],
|
|
1283
1287
|
"inputs": [
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { L as hideClassPrivateProps, R as ipnsNameToIpnsOverPubsubTopic, ir as PKCError, or as logger_default } from "./schema-
|
|
2
|
-
import { n as getHeliaDebugContext, t as connectToPubsubPeers } from "./util-
|
|
1
|
+
import { L as hideClassPrivateProps, R as ipnsNameToIpnsOverPubsubTopic, ir as PKCError, or as logger_default } from "./schema-B7HIUI8w.js";
|
|
2
|
+
import { n as getHeliaDebugContext, t as connectToPubsubPeers } from "./util-BqBjzCfN.js";
|
|
3
3
|
import { CID } from "multiformats/cid";
|
|
4
|
+
import { NotFoundError } from "@libp2p/interface";
|
|
4
5
|
import { peerIdFromString } from "@libp2p/peer-id";
|
|
5
6
|
import { multihashToIPNSRoutingKey, unmarshalIPNSRecord } from "ipns";
|
|
6
7
|
import { ipnsValidator } from "ipns/validator";
|
|
@@ -11,7 +12,7 @@ import { ipns } from "@helia/ipns";
|
|
|
11
12
|
import { gossipsub } from "@libp2p/gossipsub";
|
|
12
13
|
import { identify } from "@libp2p/identify";
|
|
13
14
|
import { bitswap } from "@helia/block-brokers";
|
|
14
|
-
import {
|
|
15
|
+
import { delegatedRoutingV1HttpApiClientContentRouting } from "@helia/delegated-routing-v1-http-api-client";
|
|
15
16
|
import { unixfs } from "@helia/unixfs";
|
|
16
17
|
import { fetch } from "@libp2p/fetch";
|
|
17
18
|
import { pubsub } from "@helia/ipns/routing";
|
|
@@ -40,11 +41,14 @@ const creatingLibp2pJsClients = {};
|
|
|
40
41
|
function getDelegatedRoutingFields(routers) {
|
|
41
42
|
const routersObj = {};
|
|
42
43
|
for (let i = 0; i < routers.length; i++) {
|
|
43
|
-
const factory =
|
|
44
|
+
const factory = delegatedRoutingV1HttpApiClientContentRouting({ url: routers[i] });
|
|
44
45
|
routersObj["delegatedRouting" + i] = (components) => {
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
const routing = factory(components);
|
|
47
|
+
routing.get = async () => {
|
|
48
|
+
throw new NotFoundError("pkc HTTP routers do not serve IPNS records");
|
|
49
|
+
};
|
|
50
|
+
routing.put = async () => {};
|
|
51
|
+
return routing;
|
|
48
52
|
};
|
|
49
53
|
}
|
|
50
54
|
return routersObj;
|
|
@@ -97,6 +101,10 @@ async function createLibp2pJsClientOrUseExistingOne(pkcOptions) {
|
|
|
97
101
|
pubsubEventHandler.emit(evt.detail.topic, msgFormatted);
|
|
98
102
|
});
|
|
99
103
|
const heliaFs = unixfs(helia);
|
|
104
|
+
const asHeliaCatCid = (ipfsPathOrCid) => {
|
|
105
|
+
CID.parse(ipfsPathOrCid.split("/")[0]);
|
|
106
|
+
return ipfsPathOrCid;
|
|
107
|
+
};
|
|
100
108
|
const ipnsNameResolver = ipns(helia, { routers: [pubsub(helia)] });
|
|
101
109
|
ipnsNameResolver.routers = ipnsNameResolver.routers.filter((r) => r?.constructor?.name !== "LocalStoreRouting");
|
|
102
110
|
const WARMUP_MAX_PEERS = 4;
|
|
@@ -184,14 +192,7 @@ async function createLibp2pJsClientOrUseExistingOne(pkcOptions) {
|
|
|
184
192
|
} },
|
|
185
193
|
cat(ipfsPath, options) {
|
|
186
194
|
throwIfHeliaIsStoppingOrStopped();
|
|
187
|
-
|
|
188
|
-
const rootCid = ipfsPath.split("/")[0];
|
|
189
|
-
const path = ipfsPath.split("/").slice(1).join("/");
|
|
190
|
-
return heliaFs.cat(CID.parse(rootCid), {
|
|
191
|
-
...options,
|
|
192
|
-
path
|
|
193
|
-
});
|
|
194
|
-
} else return heliaFs.cat(CID.parse(ipfsPath), options);
|
|
195
|
+
return heliaFs.cat(asHeliaCatCid(ipfsPath), options);
|
|
195
196
|
},
|
|
196
197
|
pubsub: {
|
|
197
198
|
ls: async () => helia.libp2p.services.pubsub.getTopics(),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createNewLocalCommunityDb, r as updateInstancePropsWithStartedCommunityOrDb, t as LocalCommunity } from "./local-community-
|
|
1
|
+
import { n as createNewLocalCommunityDb, r as updateInstancePropsWithStartedCommunityOrDb, t as LocalCommunity } from "./local-community-CXbUZ0um.js";
|
|
2
2
|
export { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as pubsubTopicToDhtKey, At as trackUpdatingCommunity, C as contentContainsMarkdownAudio, Cr as __commonJSMin, Dn as CommentsTableRowSchema, Dt as syncCommunityRegistryEntry, En as CommentUpdateTableRowSchema, Er as __toESM, F as getIpnsRecordInLocalKuboNode, Fn as CommentEditReservedFields, G as isLinkOfAudio, J as isLinkOfVideo, Jn as require_commonjs, K as isLinkOfImage, Kt as CommentModerationsTableRowSchema, L as hideClassPrivateProps, Ln as CommentEditsTableRowSchema, M as genToArray, N as getEquivalentCommunityAddresses, Nn as CommentEditPubsubMessagePublicationSchema, Nt as untrackUpdatingCommunity, O as derivePublicationFromChallengeRequest, Ot as trackStartedCommunity, P as getErrorCodeFromMessage, Pn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, Pt as require_sha256, Q as isStringDomain, R as ipnsNameToIpnsOverPubsubTopic, Rt as CommunityEditPublicationPubsubReservedFields, S as calculateStringSizeSameAsIpfsAddCidV0, T as contentContainsMarkdownVideos, Tr as __require, Ut as CommentModerationPubsubMessagePublicationSchema, Vn as AuthorReservedFields, W as isLinkOfAnimatedImage, Wt as CommentModerationReservedFields, Y as isLinkValid, Yn as require_retry, _n as CommentPubsubMessageReservedFields, _t as writeKuboFilesWithTimeout, a as ChallengeRequestMessageSchema, ar as messages, b as areEquivalentCommunityAddresses, ct as retryKuboBlockPutPinAndProvidePubsubTopic, d as DecryptedChallengeRequestSchema, dn as VotePubsubReservedFields, en as CommunityIpfsSchema, gn as CommentIpfsSchema, ht as timestamp, ir as PKCError, it as removeNullUndefinedValues, jt as untrackStartedCommunity, k as doesDomainAddressHaveCapitalLetter, nt as removeMfsFilesSafely, or as logger_default, pn as VoteTablesRowSchema, pt as statMfsPathSafely, q as isLinkOfMedia, r as ChallengeMessageSchema, s as ChallengeVerificationMessageSchema, t as ChallengeAnswerMessageSchema, tn as CommunitySignedPropertyNames, tt as removeBlocksFromKuboNode, u as DecryptedChallengeRequestPublicationSchema, un as VotePubsubMessagePublicationSchema, ut as retryKuboIpfsAddAndProvide, vt as findCommunityInRegistry, w as contentContainsMarkdownImages, wn as CommentUpdateSchema, x as calculateIpfsCidV0, xt as findUpdatingCommunity, y as version_default, yr as ZodError, yt as findStartedCommunity } from "./schema-
|
|
2
|
-
import { A as getDefaultCommunityDbConfig, At as cleanWireAuthor, Bt as encode, C as calculateExpectedSignatureSize, Ct as verifyCommentModeration, D as deriveCommentIpfsFromCommentTableRow, Dt as verifyCommunityEdit, E as deleteOldCommunityInWindows, Et as verifyCommunity, Gn as require_lodash_merge, Gt as getPublicKeyFromPrivateKey, H as POST_REPLIES_SORT_TYPES, Ht as getIpfsKeyFromPrivateKey, I as moveCommunityDbToDeletedDirectory, It as getCommunityNameFromWire, Kt as createSchemaRowParser, L as resolveDbPostsCidRefs, Lt as getCommunityPublicKeyFromWire, M as getThumbnailPropsOfLink, Mt as getAuthorNameFromWire, N as importSignerIntoKuboNode, O as deriveDbPosts, Ot as verifyVote, S as backupCommunityDb, St as verifyCommentIpfs, Tt as verifyCommentUpdate, U as REPLY_REPLIES_SORT_TYPES, Un as stringify, Ut as getPKCAddressFromPublicKey, V as POSTS_SORT_TYPES, W as TIMEFRAMES_TO_SECONDS, Wn as STORAGE_KEYS, Wt as getPKCAddressFromPublicKeySync, Y as iterateOverPageCidsToFindAllCids, _t as verifyChallengeAnswer, a as pkcJsChallenges, an as parseCommunityIpfsSchemaPassthroughWithPKCErrorIfItFails, b as encryptEd25519AesGcmPublicKeyBuffer, ct as signChallengeVerification, ft as signCommentUpdate, h as SignerWithPublicKeyAddress, hn as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, i as getCommunityChallengeFromCommunityChallengeSettings, it as cleanUpBeforePublishing, k as deriveDbReplies, kt as buildRuntimeAuthor, l as MAX_FILE_SIZE_BYTES_FOR_COMMUNITY_IPFS, lt as signComment, mt as signCommunity, o as TrackedInstanceRegistry, ot as signChallengeMessage, pt as signCommentUpdateForChallengeVerification, r as getChallengeVerification, rn as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, s as LRUCache, t as RpcLocalCommunity, tt as pLimit, u as KeyvBetterSqlite3, ut as signCommentEdit, v as decryptEd25519AesGcmPublicKeyBuffer, vn as parseJsonWithPKCErrorIfFails, w as calculateInlineRepliesBudget, wt as verifyCommentPubsubMessage, x as BackupAbortError, xt as verifyCommentEdit, yt as verifyChallengeRequest, zt as decode } from "./rpc-local-community-
|
|
1
|
+
import { $ as pubsubTopicToDhtKey, At as trackUpdatingCommunity, C as contentContainsMarkdownAudio, Cr as __commonJSMin, Dn as CommentsTableRowSchema, Dt as syncCommunityRegistryEntry, En as CommentUpdateTableRowSchema, Er as __toESM, F as getIpnsRecordInLocalKuboNode, Fn as CommentEditReservedFields, G as isLinkOfAudio, J as isLinkOfVideo, Jn as require_commonjs, K as isLinkOfImage, Kt as CommentModerationsTableRowSchema, L as hideClassPrivateProps, Ln as CommentEditsTableRowSchema, M as genToArray, N as getEquivalentCommunityAddresses, Nn as CommentEditPubsubMessagePublicationSchema, Nt as untrackUpdatingCommunity, O as derivePublicationFromChallengeRequest, Ot as trackStartedCommunity, P as getErrorCodeFromMessage, Pn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, Pt as require_sha256, Q as isStringDomain, R as ipnsNameToIpnsOverPubsubTopic, Rt as CommunityEditPublicationPubsubReservedFields, S as calculateStringSizeSameAsIpfsAddCidV0, T as contentContainsMarkdownVideos, Tr as __require, Ut as CommentModerationPubsubMessagePublicationSchema, Vn as AuthorReservedFields, W as isLinkOfAnimatedImage, Wt as CommentModerationReservedFields, Y as isLinkValid, Yn as require_retry, _n as CommentPubsubMessageReservedFields, _t as writeKuboFilesWithTimeout, a as ChallengeRequestMessageSchema, ar as messages, b as areEquivalentCommunityAddresses, ct as retryKuboBlockPutPinAndProvidePubsubTopic, d as DecryptedChallengeRequestSchema, dn as VotePubsubReservedFields, en as CommunityIpfsSchema, gn as CommentIpfsSchema, ht as timestamp, ir as PKCError, it as removeNullUndefinedValues, jt as untrackStartedCommunity, k as doesDomainAddressHaveCapitalLetter, nt as removeMfsFilesSafely, or as logger_default, pn as VoteTablesRowSchema, pt as statMfsPathSafely, q as isLinkOfMedia, r as ChallengeMessageSchema, s as ChallengeVerificationMessageSchema, t as ChallengeAnswerMessageSchema, tn as CommunitySignedPropertyNames, tt as removeBlocksFromKuboNode, u as DecryptedChallengeRequestPublicationSchema, un as VotePubsubMessagePublicationSchema, ut as retryKuboIpfsAddAndProvide, vt as findCommunityInRegistry, w as contentContainsMarkdownImages, wn as CommentUpdateSchema, x as calculateIpfsCidV0, xt as findUpdatingCommunity, y as version_default, yr as ZodError, yt as findStartedCommunity } from "./schema-B7HIUI8w.js";
|
|
2
|
+
import { A as getDefaultCommunityDbConfig, At as cleanWireAuthor, Bt as encode, C as calculateExpectedSignatureSize, Ct as verifyCommentModeration, D as deriveCommentIpfsFromCommentTableRow, Dt as verifyCommunityEdit, E as deleteOldCommunityInWindows, Et as verifyCommunity, Gn as require_lodash_merge, Gt as getPublicKeyFromPrivateKey, H as POST_REPLIES_SORT_TYPES, Ht as getIpfsKeyFromPrivateKey, I as moveCommunityDbToDeletedDirectory, It as getCommunityNameFromWire, Kt as createSchemaRowParser, L as resolveDbPostsCidRefs, Lt as getCommunityPublicKeyFromWire, M as getThumbnailPropsOfLink, Mt as getAuthorNameFromWire, N as importSignerIntoKuboNode, O as deriveDbPosts, Ot as verifyVote, S as backupCommunityDb, St as verifyCommentIpfs, Tt as verifyCommentUpdate, U as REPLY_REPLIES_SORT_TYPES, Un as stringify, Ut as getPKCAddressFromPublicKey, V as POSTS_SORT_TYPES, W as TIMEFRAMES_TO_SECONDS, Wn as STORAGE_KEYS, Wt as getPKCAddressFromPublicKeySync, Y as iterateOverPageCidsToFindAllCids, _t as verifyChallengeAnswer, a as pkcJsChallenges, an as parseCommunityIpfsSchemaPassthroughWithPKCErrorIfItFails, b as encryptEd25519AesGcmPublicKeyBuffer, ct as signChallengeVerification, ft as signCommentUpdate, h as SignerWithPublicKeyAddress, hn as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, i as getCommunityChallengeFromCommunityChallengeSettings, it as cleanUpBeforePublishing, k as deriveDbReplies, kt as buildRuntimeAuthor, l as MAX_FILE_SIZE_BYTES_FOR_COMMUNITY_IPFS, lt as signComment, mt as signCommunity, o as TrackedInstanceRegistry, ot as signChallengeMessage, pt as signCommentUpdateForChallengeVerification, r as getChallengeVerification, rn as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, s as LRUCache, t as RpcLocalCommunity, tt as pLimit, u as KeyvBetterSqlite3, ut as signCommentEdit, v as decryptEd25519AesGcmPublicKeyBuffer, vn as parseJsonWithPKCErrorIfFails, w as calculateInlineRepliesBudget, wt as verifyCommentPubsubMessage, x as BackupAbortError, xt as verifyCommentEdit, yt as verifyChallengeRequest, zt as decode } from "./rpc-local-community-CO__pwvD.js";
|
|
3
3
|
import { randomFillSync, randomUUID } from "node:crypto";
|
|
4
4
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
5
5
|
import path from "node:path";
|
|
@@ -148,12 +148,15 @@ async function syncPostUpdatesWithIpfs(community, commentUpdateRowsToPublishToIp
|
|
|
148
148
|
const postUpdatesDirectory = `/${community.address}`;
|
|
149
149
|
const commentUpdatesWithLocalPath = commentUpdateRowsToPublishToIpfs.filter((row) => typeof row.localMfsPath === "string");
|
|
150
150
|
if (commentUpdatesWithLocalPath.length === 0) throw Error("No comment updates of posts to publish to postUpdates directory. This is a critical bug");
|
|
151
|
+
const liveCommentUpdates = commentUpdatesWithLocalPath.filter((row) => community._dbHandler.commentExistsInDb(row.newCommentUpdate.cid));
|
|
152
|
+
const purgedMidSyncCount = commentUpdatesWithLocalPath.length - liveCommentUpdates.length;
|
|
153
|
+
if (purgedMidSyncCount > 0) log(`Skipping ${purgedMidSyncCount} post CommentUpdate(s) for community ${community.address} whose comment was purged mid-sync`);
|
|
151
154
|
const kuboRpc = community._clientsManager.getDefaultKuboRpcClient();
|
|
152
155
|
const removedMfsPaths = await rmUnneededMfsPaths(community);
|
|
153
156
|
let postUpdatesDirectoryCid;
|
|
154
157
|
const BATCH_SIZE = 50;
|
|
155
|
-
for (let index = 0; index <
|
|
156
|
-
const batch =
|
|
158
|
+
for (let index = 0; index < liveCommentUpdates.length; index += BATCH_SIZE) {
|
|
159
|
+
const batch = liveCommentUpdates.slice(index, index + BATCH_SIZE);
|
|
157
160
|
await Promise.all(batch.map(async (row) => {
|
|
158
161
|
const { localMfsPath, newCommentUpdate } = row;
|
|
159
162
|
const content = stringify(newCommentUpdate);
|
|
@@ -174,7 +177,7 @@ async function syncPostUpdatesWithIpfs(community, commentUpdateRowsToPublishToIp
|
|
|
174
177
|
postUpdatesDirectoryCid = await kuboRpc._client.files.flush(postUpdatesDirectory);
|
|
175
178
|
}
|
|
176
179
|
const postUpdatesDirectoryCidString = postUpdatesDirectoryCid?.toString();
|
|
177
|
-
log("Community", community.address, "Synced",
|
|
180
|
+
log("Community", community.address, "Synced", liveCommentUpdates.length, "post CommentUpdates", "with MFS postUpdates directory", postUpdatesDirectoryCidString);
|
|
178
181
|
community._dbHandler.markCommentsAsPublishedToPostUpdates(commentUpdateRowsToPublishToIpfs.map((row) => row.newCommentUpdate.cid));
|
|
179
182
|
}
|
|
180
183
|
async function adjustPostUpdatesBucketsIfNeeded(community) {
|
|
@@ -4449,6 +4452,9 @@ var DbHandler = class {
|
|
|
4449
4452
|
if (!row) return void 0;
|
|
4450
4453
|
return this._parseCommentsTableRow(row);
|
|
4451
4454
|
}
|
|
4455
|
+
commentExistsInDb(cid) {
|
|
4456
|
+
return this._db.prepare(`SELECT 1 FROM ${TABLES.COMMENTS} WHERE cid = ? LIMIT 1`).get(cid) !== void 0;
|
|
4457
|
+
}
|
|
4452
4458
|
queryPseudonymityAliasByCommentCid(commentCid) {
|
|
4453
4459
|
return this._db.prepare(`SELECT commentCid, aliasPrivateKey, originalAuthorPublicKey, originalAuthorName, mode, insertedAt FROM ${TABLES.PSEUDONYMITY_ALIASES} WHERE commentCid = ?`).get(commentCid);
|
|
4454
4460
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $n as FailedToFetchCommentIpfsFromGatewaysError, B as isIpfsCid, Cr as __commonJSMin, Ct as listUpdatingComments, D as deepMergeRuntimeFields, E as createAbortError, Er as __toESM, Ft as TimeoutError, It as pTimeout, Jn as require_commonjs, L as hideClassPrivateProps, Mt as untrackUpdatingComment, Pt as require_sha256, Q as isStringDomain, Sr as stringifyPrimitive, St as listStartedCommunities, Tr as __require, Tt as refreshTrackedCommentAliases, Xn as CID, Yn as require_retry, a as ChallengeRequestMessageSchema, ar as messages, at as removeUndefinedValuesRecursively, b as areEquivalentCommunityAddresses, br as joinValues, bt as findUpdatingComment, dt as shortifyAddress, en as CommunityIpfsSchema, ft as shortifyCid, gn as CommentIpfsSchema, gt as waitForUpdateInCommunityInstanceWithErrorAndTimeout, ht as timestamp, ir as PKCError, k as doesDomainAddressHaveCapitalLetter, kt as trackUpdatingComment, lr as setErrorMap, lt as retryKuboIpfsAdd, on as PubsubTopicSchema, or as logger_default, ot as replaceXWithY, r as ChallengeMessageSchema, s as ChallengeVerificationMessageSchema, st as resolveWhenPredicateIsTrue, t as ChallengeAnswerMessageSchema, wn as CommentUpdateSchema, wt as listUpdatingCommunities, xn as CommentUpdateForChallengeVerificationSchema, xr as parsedType, xt as findUpdatingCommunity, y as version_default, yt as findStartedCommunity, z as isAbortError } from "./schema-
|
|
2
|
-
import { $ as PKCClientsManager, $t as parseCommentModerationPubsubMessagePublicationSchemaWithPKCErrorIfItFails, An as RpcCommunityPageParamSchema, At as cleanWireAuthor, B as CommentClientsManager, Bn as RpcSubscriptionIdResultSchema, Ct as verifyCommentModeration, Dn as RpcCidParamSchema, Dt as verifyCommunityEdit, En as RpcCancelExportParamSchema, F as monitorCommunitiesDirectory, Fn as RpcExportCommunityResultSchema, Ft as getCommunityAddressFromRecord, Hn as RpcUnsubscribeParamSchema, In as RpcFetchCidParamSchema, It as getCommunityNameFromWire, J as findCommentInPageInstanceRecursively, Kn as nativeFunctions$2, Ln as RpcFetchCidResultSchema, Lt as getCommunityPublicKeyFromWire, Mn as RpcExportCommunityModLogsParamSchema, Nn as RpcExportCommunityModLogsResultSchema, Nt as normalizeCreatePublicationAuthor, On as RpcCommentRepliesPageParamSchema, Ot as verifyVote, P as listCommunitiesSync, Pn as RpcExportCommunityParamSchema, Pt as buildRuntimeCommunityFields, Q as PublicationClientsManager, R as setNativeFunctions$1, Rn as RpcPublishChallengeAnswersParamSchema, Rt as normalizeCommunityInputFromCommunity, Sn as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, St as verifyCommentIpfs, T as createKuboRpcClient, Tn as RpcAuthorNameParamSchema, Tt as verifyCommentUpdate, Vn as RpcSuccessResultSchema, Vt as getBufferedPKCAddressFromPublicKey, X as parseRawPages, Xt as parseCommentEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, Z as RepliesPages, Zt as parseCommentIpfsSchemaWithPKCErrorIfItFails, _ as decryptEd25519AesGcm, _n as parseDecryptedChallengeWithPKCErrorIfItFails, a as pkcJsChallenges, at as signChallengeAnswer, bn as parseRpcCommentEventWithPKCErrorIfItFails, bt as verifyChallengeVerification, c as RemoteCommunity, cn as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, d as decodeRpcChallengeAnswerPubsubMsg, dt as signCommentModeration, en as parseCommentPubsubMessagePublicationWithPKCErrorIfItFails, et as InflightFetchManager, f as decodeRpcChallengePubsubMsg, fn as parseCreateRemoteCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, g as createSigner, gn as parseDecryptedChallengeVerification, gt as signVote, hn as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, ht as signCommunityEdit, in as parseCommunityEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, it as cleanUpBeforePublishing, j as getDefaultDataPath, jn as RpcEditCommunityParamSchema, jt as getAuthorNameFromRuntime, kn as RpcCommunityIdentifierParamSchema, kt as buildRuntimeAuthor, ln as parseCreateCommunityEditPublicationOptionsSchemaWithPKCErrorIfItFails, lt as signComment, m as decodeRpcChallengeVerificationPubsubMsg, mn as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, n as RpcRemoteCommunity, nt as PKCTypedEmitter, o as TrackedInstanceRegistry, on as parseCreateCommentEditOptionsSchemaWithPKCErrorIfItFails, p as decodeRpcChallengeRequestPubsubMsg, pn as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, q as extractCommunityRuntimeFieldsFromParsedPages, qn as require_undici, qt as parseCidStringSchemaWithPKCErrorIfItFails, rt as require_lib$1, s as LRUCache, sn as parseCreateCommentModerationOptionsSchemaWithPKCErrorIfItFails, st as signChallengeRequest, t as RpcLocalCommunity, tn as parseCommunityAddressWithPKCErrorIfItFails, u as KeyvBetterSqlite3, ut as signCommentEdit, vn as parseJsonWithPKCErrorIfFails, vt as verifyChallengeMessage, wn as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, wt as verifyCommentPubsubMessage, xn as parseRpcCommentUpdateEventWithPKCErrorIfItFails, xt as verifyCommentEdit, y as encryptEd25519AesGcm, yn as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, z as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, zn as RpcResolveAuthorNameResultSchema, zt as decode } from "./rpc-local-community-
|
|
3
|
-
import { n as getHeliaDebugContext } from "./util-
|
|
1
|
+
import { $n as FailedToFetchCommentIpfsFromGatewaysError, B as isIpfsCid, Cr as __commonJSMin, Ct as listUpdatingComments, D as deepMergeRuntimeFields, E as createAbortError, Er as __toESM, Ft as TimeoutError, It as pTimeout, Jn as require_commonjs, L as hideClassPrivateProps, Mt as untrackUpdatingComment, Pt as require_sha256, Q as isStringDomain, Sr as stringifyPrimitive, St as listStartedCommunities, Tr as __require, Tt as refreshTrackedCommentAliases, Xn as CID, Yn as require_retry, a as ChallengeRequestMessageSchema, ar as messages, at as removeUndefinedValuesRecursively, b as areEquivalentCommunityAddresses, br as joinValues, bt as findUpdatingComment, dt as shortifyAddress, en as CommunityIpfsSchema, ft as shortifyCid, gn as CommentIpfsSchema, gt as waitForUpdateInCommunityInstanceWithErrorAndTimeout, ht as timestamp, ir as PKCError, k as doesDomainAddressHaveCapitalLetter, kt as trackUpdatingComment, lr as setErrorMap, lt as retryKuboIpfsAdd, on as PubsubTopicSchema, or as logger_default, ot as replaceXWithY, r as ChallengeMessageSchema, s as ChallengeVerificationMessageSchema, st as resolveWhenPredicateIsTrue, t as ChallengeAnswerMessageSchema, wn as CommentUpdateSchema, wt as listUpdatingCommunities, xn as CommentUpdateForChallengeVerificationSchema, xr as parsedType, xt as findUpdatingCommunity, y as version_default, yt as findStartedCommunity, z as isAbortError } from "./schema-B7HIUI8w.js";
|
|
2
|
+
import { $ as PKCClientsManager, $t as parseCommentModerationPubsubMessagePublicationSchemaWithPKCErrorIfItFails, An as RpcCommunityPageParamSchema, At as cleanWireAuthor, B as CommentClientsManager, Bn as RpcSubscriptionIdResultSchema, Ct as verifyCommentModeration, Dn as RpcCidParamSchema, Dt as verifyCommunityEdit, En as RpcCancelExportParamSchema, F as monitorCommunitiesDirectory, Fn as RpcExportCommunityResultSchema, Ft as getCommunityAddressFromRecord, Hn as RpcUnsubscribeParamSchema, In as RpcFetchCidParamSchema, It as getCommunityNameFromWire, J as findCommentInPageInstanceRecursively, Kn as nativeFunctions$2, Ln as RpcFetchCidResultSchema, Lt as getCommunityPublicKeyFromWire, Mn as RpcExportCommunityModLogsParamSchema, Nn as RpcExportCommunityModLogsResultSchema, Nt as normalizeCreatePublicationAuthor, On as RpcCommentRepliesPageParamSchema, Ot as verifyVote, P as listCommunitiesSync, Pn as RpcExportCommunityParamSchema, Pt as buildRuntimeCommunityFields, Q as PublicationClientsManager, R as setNativeFunctions$1, Rn as RpcPublishChallengeAnswersParamSchema, Rt as normalizeCommunityInputFromCommunity, Sn as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, St as verifyCommentIpfs, T as createKuboRpcClient, Tn as RpcAuthorNameParamSchema, Tt as verifyCommentUpdate, Vn as RpcSuccessResultSchema, Vt as getBufferedPKCAddressFromPublicKey, X as parseRawPages, Xt as parseCommentEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, Z as RepliesPages, Zt as parseCommentIpfsSchemaWithPKCErrorIfItFails, _ as decryptEd25519AesGcm, _n as parseDecryptedChallengeWithPKCErrorIfItFails, a as pkcJsChallenges, at as signChallengeAnswer, bn as parseRpcCommentEventWithPKCErrorIfItFails, bt as verifyChallengeVerification, c as RemoteCommunity, cn as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, d as decodeRpcChallengeAnswerPubsubMsg, dt as signCommentModeration, en as parseCommentPubsubMessagePublicationWithPKCErrorIfItFails, et as InflightFetchManager, f as decodeRpcChallengePubsubMsg, fn as parseCreateRemoteCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, g as createSigner, gn as parseDecryptedChallengeVerification, gt as signVote, hn as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, ht as signCommunityEdit, in as parseCommunityEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, it as cleanUpBeforePublishing, j as getDefaultDataPath, jn as RpcEditCommunityParamSchema, jt as getAuthorNameFromRuntime, kn as RpcCommunityIdentifierParamSchema, kt as buildRuntimeAuthor, ln as parseCreateCommunityEditPublicationOptionsSchemaWithPKCErrorIfItFails, lt as signComment, m as decodeRpcChallengeVerificationPubsubMsg, mn as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, n as RpcRemoteCommunity, nt as PKCTypedEmitter, o as TrackedInstanceRegistry, on as parseCreateCommentEditOptionsSchemaWithPKCErrorIfItFails, p as decodeRpcChallengeRequestPubsubMsg, pn as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, q as extractCommunityRuntimeFieldsFromParsedPages, qn as require_undici, qt as parseCidStringSchemaWithPKCErrorIfItFails, rt as require_lib$1, s as LRUCache, sn as parseCreateCommentModerationOptionsSchemaWithPKCErrorIfItFails, st as signChallengeRequest, t as RpcLocalCommunity, tn as parseCommunityAddressWithPKCErrorIfItFails, u as KeyvBetterSqlite3, ut as signCommentEdit, vn as parseJsonWithPKCErrorIfFails, vt as verifyChallengeMessage, wn as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, wt as verifyCommentPubsubMessage, xn as parseRpcCommentUpdateEventWithPKCErrorIfItFails, xt as verifyCommentEdit, y as encryptEd25519AesGcm, yn as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, z as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, zn as RpcResolveAuthorNameResultSchema, zt as decode } from "./rpc-local-community-CO__pwvD.js";
|
|
3
|
+
import { n as getHeliaDebugContext } from "./util-BqBjzCfN.js";
|
|
4
4
|
import path from "path";
|
|
5
5
|
import assert from "assert";
|
|
6
6
|
import fs from "fs";
|
|
@@ -6805,7 +6805,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
6805
6805
|
this.clients.libp2pJsClients = {};
|
|
6806
6806
|
if (!this.libp2pJsClientsOptions) return;
|
|
6807
6807
|
if (!this.httpRoutersOptions) throw Error("httpRoutersOptions is required for libp2pJsClient");
|
|
6808
|
-
const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-
|
|
6808
|
+
const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-C9v3jcS7.js");
|
|
6809
6809
|
for (const clientOptions of this.libp2pJsClientsOptions) {
|
|
6810
6810
|
const heliaNode = await createLibp2pJsClientOrUseExistingOne({
|
|
6811
6811
|
...clientOptions,
|
|
@@ -7044,7 +7044,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
7044
7044
|
const log = logger_default("pkc-js:pkc:createLocalCommunity");
|
|
7045
7045
|
log.trace("Received community options to create a local community instance:", options);
|
|
7046
7046
|
if (!this._canCreateNewLocalCommunity()) throw new PKCError("ERR_CAN_NOT_CREATE_A_LOCAL_COMMUNITY", { pkcOptions: this._userPKCOptions });
|
|
7047
|
-
const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-
|
|
7047
|
+
const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-BUAd-a_f.js");
|
|
7048
7048
|
const isLocalCommunity = (await listCommunitiesSync(this)).includes(options.address);
|
|
7049
7049
|
const community = new LocalCommunity(this);
|
|
7050
7050
|
if (isLocalCommunity) {
|
package/dist/bundled/chunks/{rpc-local-community-Xpx65cbz.js → rpc-local-community-CO__pwvD.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as pubsubTopicToDhtKey, $n as FailedToFetchCommentIpfsFromGatewaysError, $t as CommunityIpfsReservedFields, A as extractNetworkErrorDetails, An as ModQueuePageIpfsSchema, At as trackUpdatingCommunity, B as isIpfsCid, Bn as AuthorCommentIpfsReservedFields, Bt as CommunityEditPubsubMessagePublicationSchema, Cn as CommentUpdateReservedFields, Cr as __commonJSMin, D as deepMergeRuntimeFields, E as createAbortError, Er as __toESM, Et as refreshTrackedCommunityAliases, Gn as CommunityAddressSchema, Gt as CommentModerationSignedPropertyNames, H as isIpns, Hn as ChallengeAnswersSchema, Ht as CommentModerationChallengeRequestToEncryptSchema, I as getPostUpdateTimestampRange, In as CommentEditSignedPropertyNames, It as pTimeout, Jn as require_commonjs$4, Jt as ChallengeFileFactorySchema, Kn as CommunityAuthorChallengeReservedFieldNames, Kt as CommentModerationsTableRowSchema, L as hideClassPrivateProps, Lt as CommunityEditPublicationChallengeRequestToEncryptSchema, Mn as CommentEditChallengeRequestToEncryptSchema, Nt as untrackUpdatingCommunity, O as derivePublicationFromChallengeRequest, On as CreateCommentOptionsWithRefinementSchema, Ot as trackStartedCommunity, Pn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, Pt as require_sha256$1, Q as isStringDomain, Qn as all, Qt as CommunityExportRecordsSchema, R as ipnsNameToIpnsOverPubsubTopic, Rn as CreateCommentEditOptionsWithRefinementSchema, Sn as CommentUpdateForChallengeVerificationSignedPropertyNames, St as listStartedCommunities, Tn as CommentUpdateSignedPropertyNames, Tr as __require, U as isIpnsPath, Un as CidPathSchema, Ut as CommentModerationPubsubMessagePublicationSchema, V as isIpfsPath, Vt as CreateCommunityEditPublicationOptionsWithRefinementSchema, Wn as CidStringSchema, X as isRequestPubsubPublicationOfPost, Xn as CID$1, Xt as CommunityChallengeSettingSchema, Yn as require_retry$1, Yt as ChallengeFileSchema, Z as isRequestPubsubPublicationOfReply, Zn as create, Zt as CommunityEditOptionsSchema, _ as PKCUserOptionBaseSchema, _r as record, an as ExportCommunityModLogsOptionsSchema, ar as messages, b as areEquivalentCommunityAddresses, bn as CommentUpdateChallengeReservedFieldNames, bt as findUpdatingComment, c as ChallengeVerificationMessageSignedPropertyNames, cn as CreateVoteUserOptionsWithRefinementSchema, cr as require_ms$1, dr as array, dt as shortifyAddress, en as CommunityIpfsSchema, er as FailedToFetchCommentUpdateFromGatewaysError, f as DecryptedChallengeSchema, fn as VoteSignedPropertyNames, fr as boolean, ft as shortifyCid, g as PKCParsedOptionsSchema, gn as CommentIpfsSchema, gr as object, gt as waitForUpdateInCommunityInstanceWithErrorAndTimeout, h as NameResolverSerializedSchema, hn as CommentIpfsReservedFields, hr as number, ht as timestamp, i as ChallengeMessageSignedPropertyNames, in as CreateRpcCommunityFunctionArgumentSchema, ir as PKCError, j as fetchAndValidateIpnsRecordFromGateway, jn as PageIpfsSchema, jt as untrackStartedCommunity, k as doesDomainAddressHaveCapitalLetter, kn as GetPageParamSchema, l as DecryptedChallengeAnswerSchema, ln as VoteChallengeRequestToEncryptSchema, m as NameResolveCacheOptionsSchema, mn as CommentChallengeRequestToEncryptSchema, mr as literal, mt as throwIfAbortSignalAborted, n as ChallengeAnswerMessageSignedPropertyNames, nn as CreateNewLocalCommunityUserOptionsSchema, nr as FailedToFetchGenericIpfsFromGatewaysError, o as ChallengeRequestMessageSignedPropertyNames, or as logger_default, p as DecryptedChallengeVerificationSchema, pr as custom, qn as CreateSignerSchema, qt as CreateCommentModerationOptionsWithRefinementSchema, rn as CreateRemoteCommunityFunctionArgumentSchema, rr as FailedToFetchPageIpfsFromGatewaysError, rt as removeNullUndefinedEmptyObjectsValuesRecursively, sn as RpcRemoteCommunityUpdateEventResultSchema, sr as require_supports_color, st as resolveWhenPredicateIsTrue, tn as CommunitySignedPropertyNames, tr as FailedToFetchCommunityFromGatewaysError, un as VotePubsubMessagePublicationSchema, ur as _enum, v as PKCUserOptionsSchema, vn as CommentPubsubMessageWithFlexibleAuthorRefinementSchema, vr as string, wn as CommentUpdateSchema, wr as __exportAll, wt as listUpdatingCommunities, x as calculateIpfsCidV0, xt as findUpdatingCommunity, yn as CommentSignedPropertyNames, yt as findStartedCommunity, z as isAbortError, zn as AuthorAddressSchema, zt as CommunityEditPublicationSignedPropertyNames } from "./schema-
|
|
1
|
+
import { $ as pubsubTopicToDhtKey, $n as FailedToFetchCommentIpfsFromGatewaysError, $t as CommunityIpfsReservedFields, A as extractNetworkErrorDetails, An as ModQueuePageIpfsSchema, At as trackUpdatingCommunity, B as isIpfsCid, Bn as AuthorCommentIpfsReservedFields, Bt as CommunityEditPubsubMessagePublicationSchema, Cn as CommentUpdateReservedFields, Cr as __commonJSMin, D as deepMergeRuntimeFields, E as createAbortError, Er as __toESM, Et as refreshTrackedCommunityAliases, Gn as CommunityAddressSchema, Gt as CommentModerationSignedPropertyNames, H as isIpns, Hn as ChallengeAnswersSchema, Ht as CommentModerationChallengeRequestToEncryptSchema, I as getPostUpdateTimestampRange, In as CommentEditSignedPropertyNames, It as pTimeout, Jn as require_commonjs$4, Jt as ChallengeFileFactorySchema, Kn as CommunityAuthorChallengeReservedFieldNames, Kt as CommentModerationsTableRowSchema, L as hideClassPrivateProps, Lt as CommunityEditPublicationChallengeRequestToEncryptSchema, Mn as CommentEditChallengeRequestToEncryptSchema, Nt as untrackUpdatingCommunity, O as derivePublicationFromChallengeRequest, On as CreateCommentOptionsWithRefinementSchema, Ot as trackStartedCommunity, Pn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, Pt as require_sha256$1, Q as isStringDomain, Qn as all, Qt as CommunityExportRecordsSchema, R as ipnsNameToIpnsOverPubsubTopic, Rn as CreateCommentEditOptionsWithRefinementSchema, Sn as CommentUpdateForChallengeVerificationSignedPropertyNames, St as listStartedCommunities, Tn as CommentUpdateSignedPropertyNames, Tr as __require, U as isIpnsPath, Un as CidPathSchema, Ut as CommentModerationPubsubMessagePublicationSchema, V as isIpfsPath, Vt as CreateCommunityEditPublicationOptionsWithRefinementSchema, Wn as CidStringSchema, X as isRequestPubsubPublicationOfPost, Xn as CID$1, Xt as CommunityChallengeSettingSchema, Yn as require_retry$1, Yt as ChallengeFileSchema, Z as isRequestPubsubPublicationOfReply, Zn as create, Zt as CommunityEditOptionsSchema, _ as PKCUserOptionBaseSchema, _r as record, an as ExportCommunityModLogsOptionsSchema, ar as messages, b as areEquivalentCommunityAddresses, bn as CommentUpdateChallengeReservedFieldNames, bt as findUpdatingComment, c as ChallengeVerificationMessageSignedPropertyNames, cn as CreateVoteUserOptionsWithRefinementSchema, cr as require_ms$1, dr as array, dt as shortifyAddress, en as CommunityIpfsSchema, er as FailedToFetchCommentUpdateFromGatewaysError, f as DecryptedChallengeSchema, fn as VoteSignedPropertyNames, fr as boolean, ft as shortifyCid, g as PKCParsedOptionsSchema, gn as CommentIpfsSchema, gr as object, gt as waitForUpdateInCommunityInstanceWithErrorAndTimeout, h as NameResolverSerializedSchema, hn as CommentIpfsReservedFields, hr as number, ht as timestamp, i as ChallengeMessageSignedPropertyNames, in as CreateRpcCommunityFunctionArgumentSchema, ir as PKCError, j as fetchAndValidateIpnsRecordFromGateway, jn as PageIpfsSchema, jt as untrackStartedCommunity, k as doesDomainAddressHaveCapitalLetter, kn as GetPageParamSchema, l as DecryptedChallengeAnswerSchema, ln as VoteChallengeRequestToEncryptSchema, m as NameResolveCacheOptionsSchema, mn as CommentChallengeRequestToEncryptSchema, mr as literal, mt as throwIfAbortSignalAborted, n as ChallengeAnswerMessageSignedPropertyNames, nn as CreateNewLocalCommunityUserOptionsSchema, nr as FailedToFetchGenericIpfsFromGatewaysError, o as ChallengeRequestMessageSignedPropertyNames, or as logger_default, p as DecryptedChallengeVerificationSchema, pr as custom, qn as CreateSignerSchema, qt as CreateCommentModerationOptionsWithRefinementSchema, rn as CreateRemoteCommunityFunctionArgumentSchema, rr as FailedToFetchPageIpfsFromGatewaysError, rt as removeNullUndefinedEmptyObjectsValuesRecursively, sn as RpcRemoteCommunityUpdateEventResultSchema, sr as require_supports_color, st as resolveWhenPredicateIsTrue, tn as CommunitySignedPropertyNames, tr as FailedToFetchCommunityFromGatewaysError, un as VotePubsubMessagePublicationSchema, ur as _enum, v as PKCUserOptionsSchema, vn as CommentPubsubMessageWithFlexibleAuthorRefinementSchema, vr as string, wn as CommentUpdateSchema, wr as __exportAll, wt as listUpdatingCommunities, x as calculateIpfsCidV0, xt as findUpdatingCommunity, yn as CommentSignedPropertyNames, yt as findStartedCommunity, z as isAbortError, zn as AuthorAddressSchema, zt as CommunityEditPublicationSignedPropertyNames } from "./schema-B7HIUI8w.js";
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
3
|
import { pathToFileURL } from "node:url";
|
|
4
4
|
import dns from "node:dns";
|