@pkcprotocol/pkc-js 0.0.80 → 0.0.81
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/pkc/pkc.d.ts +1 -2
- package/dist/browser/pkc/pkc.js +17 -24
- package/dist/browser/pkc/pkc.js.map +1 -1
- package/dist/browser/rpc/src/index.js +1 -1
- package/dist/browser/rpc/src/index.js.map +1 -1
- package/dist/browser/runtime/browser/setup-kubo-http-routers.d.ts +1 -0
- package/dist/browser/runtime/browser/setup-kubo-http-routers.js +4 -0
- package/dist/browser/runtime/browser/setup-kubo-http-routers.js.map +1 -0
- package/dist/browser/runtime/node/community/local-community/reprovide-on-address-change.d.ts +3 -2
- package/dist/browser/runtime/node/community/local-community/reprovide-on-address-change.js +19 -10
- package/dist/browser/runtime/node/community/local-community/reprovide-on-address-change.js.map +1 -1
- package/dist/browser/runtime/node/setup-kubo-http-routers.d.ts +2 -0
- package/dist/browser/runtime/node/{setup-kubo-address-rewriter-and-http-router.js → setup-kubo-http-routers.js} +54 -112
- package/dist/browser/runtime/node/setup-kubo-http-routers.js.map +1 -0
- package/dist/browser/util.d.ts +3 -4
- package/dist/browser/util.js +7 -3
- package/dist/browser/util.js.map +1 -1
- package/dist/bundled/bundle-manifest.json +76 -93
- package/dist/bundled/chunks/{helia-for-pkc-BsYWQ7qS.js → helia-for-pkc-BcNF-orO.js} +31 -31
- package/dist/bundled/chunks/{local-community-EqWKTLxr.js → local-community-B6-jaMsn.js} +1 -1
- package/dist/bundled/chunks/{local-community-CHzhypCp.js → local-community-CyX1HwD0.js} +8 -4
- package/dist/bundled/chunks/{node-4qAZNuJG.js → node-BCXmIYLQ.js} +265 -2310
- package/dist/bundled/chunks/{rpc-local-community-Cog5rZLG.js → rpc-local-community-BOiy8BX1.js} +47 -570
- package/dist/bundled/chunks/{schema-Iavj-cRD.js → schema-DZyEx0YQ.js} +4 -4
- package/dist/bundled/chunks/{util-CfSUfLkV.js → util-BTPlI1yF.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/pkc/pkc.d.ts +1 -2
- package/dist/node/pkc/pkc.js +17 -24
- package/dist/node/pkc/pkc.js.map +1 -1
- package/dist/node/rpc/src/index.js +1 -1
- package/dist/node/rpc/src/index.js.map +1 -1
- package/dist/node/runtime/browser/setup-kubo-http-routers.d.ts +1 -0
- package/dist/node/runtime/browser/setup-kubo-http-routers.js +4 -0
- package/dist/node/runtime/browser/setup-kubo-http-routers.js.map +1 -0
- package/dist/node/runtime/node/community/local-community/reprovide-on-address-change.d.ts +3 -2
- package/dist/node/runtime/node/community/local-community/reprovide-on-address-change.js +19 -10
- package/dist/node/runtime/node/community/local-community/reprovide-on-address-change.js.map +1 -1
- package/dist/node/runtime/node/setup-kubo-http-routers.d.ts +2 -0
- package/dist/node/runtime/node/{setup-kubo-address-rewriter-and-http-router.js → setup-kubo-http-routers.js} +54 -112
- package/dist/node/runtime/node/setup-kubo-http-routers.js.map +1 -0
- package/dist/node/util.d.ts +3 -4
- package/dist/node/util.js +7 -3
- package/dist/node/util.js.map +1 -1
- package/package.json +2 -2
- package/dist/browser/runtime/browser/setup-kubo-address-rewriter-and-http-router.d.ts +0 -1
- package/dist/browser/runtime/browser/setup-kubo-address-rewriter-and-http-router.js +0 -4
- package/dist/browser/runtime/browser/setup-kubo-address-rewriter-and-http-router.js.map +0 -1
- package/dist/browser/runtime/node/address-rewriter-db.d.ts +0 -33
- package/dist/browser/runtime/node/address-rewriter-db.js +0 -156
- package/dist/browser/runtime/node/address-rewriter-db.js.map +0 -1
- package/dist/browser/runtime/node/addresses-rewriter-proxy-server.d.ts +0 -47
- package/dist/browser/runtime/node/addresses-rewriter-proxy-server.js +0 -534
- package/dist/browser/runtime/node/addresses-rewriter-proxy-server.js.map +0 -1
- package/dist/browser/runtime/node/setup-kubo-address-rewriter-and-http-router.d.ts +0 -4
- package/dist/browser/runtime/node/setup-kubo-address-rewriter-and-http-router.js.map +0 -1
- package/dist/node/runtime/browser/setup-kubo-address-rewriter-and-http-router.d.ts +0 -1
- package/dist/node/runtime/browser/setup-kubo-address-rewriter-and-http-router.js +0 -4
- package/dist/node/runtime/browser/setup-kubo-address-rewriter-and-http-router.js.map +0 -1
- package/dist/node/runtime/node/address-rewriter-db.d.ts +0 -33
- package/dist/node/runtime/node/address-rewriter-db.js +0 -156
- package/dist/node/runtime/node/address-rewriter-db.js.map +0 -1
- package/dist/node/runtime/node/addresses-rewriter-proxy-server.d.ts +0 -47
- package/dist/node/runtime/node/addresses-rewriter-proxy-server.js +0 -534
- package/dist/node/runtime/node/addresses-rewriter-proxy-server.js.map +0 -1
- package/dist/node/runtime/node/setup-kubo-address-rewriter-and-http-router.d.ts +0 -4
- package/dist/node/runtime/node/setup-kubo-address-rewriter-and-http-router.js.map +0 -1
- package/dist/bundled/chunks/{src-BEjAH2gY.js → src-WLgFbUwZ.js} +1 -1
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"node:module"
|
|
15
15
|
],
|
|
16
16
|
"dynamicImports": [
|
|
17
|
-
"chunks/node-
|
|
17
|
+
"chunks/node-BCXmIYLQ.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-BCXmIYLQ.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/rpc-local-community-
|
|
36
|
-
"chunks/node-
|
|
37
|
-
"chunks/schema-
|
|
38
|
-
"chunks/local-community-
|
|
35
|
+
"chunks/rpc-local-community-BOiy8BX1.js",
|
|
36
|
+
"chunks/node-BCXmIYLQ.js",
|
|
37
|
+
"chunks/schema-DZyEx0YQ.js",
|
|
38
|
+
"chunks/local-community-CyX1HwD0.js",
|
|
39
39
|
"node:url",
|
|
40
40
|
"path",
|
|
41
41
|
"assert",
|
|
@@ -65,12 +65,12 @@
|
|
|
65
65
|
"\u0000rolldown/runtime.js"
|
|
66
66
|
]
|
|
67
67
|
},
|
|
68
|
-
"chunks/helia-for-pkc-
|
|
68
|
+
"chunks/helia-for-pkc-BcNF-orO.js": {
|
|
69
69
|
"isEntry": false,
|
|
70
70
|
"imports": [
|
|
71
71
|
"chunks/chunk-2rV9d50f.js",
|
|
72
|
-
"chunks/schema-
|
|
73
|
-
"chunks/util-
|
|
72
|
+
"chunks/schema-DZyEx0YQ.js",
|
|
73
|
+
"chunks/util-BTPlI1yF.js",
|
|
74
74
|
"chunks/src-DKntVmyX.js",
|
|
75
75
|
"chunks/src-Cpx2Sts8.js",
|
|
76
76
|
"node:url",
|
|
@@ -186,12 +186,20 @@
|
|
|
186
186
|
"dist/node/helia/helia-for-pkc.js"
|
|
187
187
|
]
|
|
188
188
|
},
|
|
189
|
-
"chunks/local-community-
|
|
189
|
+
"chunks/local-community-B6-jaMsn.js": {
|
|
190
|
+
"isEntry": false,
|
|
191
|
+
"imports": [
|
|
192
|
+
"chunks/local-community-CyX1HwD0.js"
|
|
193
|
+
],
|
|
194
|
+
"dynamicImports": [],
|
|
195
|
+
"inputs": []
|
|
196
|
+
},
|
|
197
|
+
"chunks/local-community-CyX1HwD0.js": {
|
|
190
198
|
"isEntry": false,
|
|
191
199
|
"imports": [
|
|
192
200
|
"chunks/chunk-2rV9d50f.js",
|
|
193
|
-
"chunks/rpc-local-community-
|
|
194
|
-
"chunks/schema-
|
|
201
|
+
"chunks/rpc-local-community-BOiy8BX1.js",
|
|
202
|
+
"chunks/schema-DZyEx0YQ.js",
|
|
195
203
|
"node:crypto",
|
|
196
204
|
"node:url",
|
|
197
205
|
"node:path",
|
|
@@ -247,21 +255,13 @@
|
|
|
247
255
|
"dist/node/runtime/node/community/local-community.js"
|
|
248
256
|
]
|
|
249
257
|
},
|
|
250
|
-
"chunks/
|
|
251
|
-
"isEntry": false,
|
|
252
|
-
"imports": [
|
|
253
|
-
"chunks/local-community-CHzhypCp.js"
|
|
254
|
-
],
|
|
255
|
-
"dynamicImports": [],
|
|
256
|
-
"inputs": []
|
|
257
|
-
},
|
|
258
|
-
"chunks/node-4qAZNuJG.js": {
|
|
258
|
+
"chunks/node-BCXmIYLQ.js": {
|
|
259
259
|
"isEntry": false,
|
|
260
260
|
"imports": [
|
|
261
261
|
"chunks/chunk-2rV9d50f.js",
|
|
262
|
-
"chunks/rpc-local-community-
|
|
263
|
-
"chunks/schema-
|
|
264
|
-
"chunks/util-
|
|
262
|
+
"chunks/rpc-local-community-BOiy8BX1.js",
|
|
263
|
+
"chunks/schema-DZyEx0YQ.js",
|
|
264
|
+
"chunks/util-BTPlI1yF.js",
|
|
265
265
|
"path",
|
|
266
266
|
"assert",
|
|
267
267
|
"fs",
|
|
@@ -272,8 +272,8 @@
|
|
|
272
272
|
"rpc-websockets"
|
|
273
273
|
],
|
|
274
274
|
"dynamicImports": [
|
|
275
|
-
"chunks/helia-for-pkc-
|
|
276
|
-
"chunks/local-community-
|
|
275
|
+
"chunks/helia-for-pkc-BcNF-orO.js",
|
|
276
|
+
"chunks/local-community-CyX1HwD0.js"
|
|
277
277
|
],
|
|
278
278
|
"inputs": [
|
|
279
279
|
"node_modules/zod/v4/locales/en.js",
|
|
@@ -307,18 +307,7 @@
|
|
|
307
307
|
"dist/node/runtime/node/sqlite-lru-cache.js",
|
|
308
308
|
"dist/node/runtime/node/lru-storage.js",
|
|
309
309
|
"dist/node/publications/comment-moderation/comment-moderation.js",
|
|
310
|
-
"
|
|
311
|
-
"node_modules/is2/node_modules/ip-regex/index.js",
|
|
312
|
-
"node_modules/is2/package.json",
|
|
313
|
-
"node_modules/is-url/index.js",
|
|
314
|
-
"node_modules/is2/index.js",
|
|
315
|
-
"node_modules/tcp-port-used/node_modules/ms/index.js",
|
|
316
|
-
"node_modules/tcp-port-used/node_modules/debug/src/common.js",
|
|
317
|
-
"node_modules/tcp-port-used/node_modules/debug/src/browser.js",
|
|
318
|
-
"node_modules/tcp-port-used/node_modules/debug/src/node.js",
|
|
319
|
-
"node_modules/tcp-port-used/node_modules/debug/src/index.js",
|
|
320
|
-
"node_modules/tcp-port-used/index.js",
|
|
321
|
-
"dist/node/runtime/node/setup-kubo-address-rewriter-and-http-router.js",
|
|
310
|
+
"dist/node/runtime/node/setup-kubo-http-routers.js",
|
|
322
311
|
"dist/node/publications/community-edit/community-edit.js",
|
|
323
312
|
"dist/node/pkc/pkc.js",
|
|
324
313
|
"dist/node/runtime/browser/native-functions.js",
|
|
@@ -326,17 +315,14 @@
|
|
|
326
315
|
"dist/node/index.js"
|
|
327
316
|
]
|
|
328
317
|
},
|
|
329
|
-
"chunks/rpc-local-community-
|
|
318
|
+
"chunks/rpc-local-community-BOiy8BX1.js": {
|
|
330
319
|
"isEntry": false,
|
|
331
320
|
"imports": [
|
|
332
321
|
"chunks/chunk-2rV9d50f.js",
|
|
333
|
-
"chunks/schema-
|
|
322
|
+
"chunks/schema-DZyEx0YQ.js",
|
|
334
323
|
"chunks/src-CYIMjhjK.js",
|
|
335
|
-
"node:http",
|
|
336
324
|
"node:crypto",
|
|
337
325
|
"node:url",
|
|
338
|
-
"node:fs/promises",
|
|
339
|
-
"node:path",
|
|
340
326
|
"node:dns",
|
|
341
327
|
"os",
|
|
342
328
|
"node:fs",
|
|
@@ -355,11 +341,10 @@
|
|
|
355
341
|
"multiformats/basics",
|
|
356
342
|
"events",
|
|
357
343
|
"uint8arrays/concat",
|
|
358
|
-
"node:https",
|
|
359
344
|
"perf_hooks"
|
|
360
345
|
],
|
|
361
346
|
"dynamicImports": [
|
|
362
|
-
"chunks/src-
|
|
347
|
+
"chunks/src-WLgFbUwZ.js"
|
|
363
348
|
],
|
|
364
349
|
"inputs": [
|
|
365
350
|
"node_modules/undici/lib/core/symbols.js",
|
|
@@ -859,8 +844,6 @@
|
|
|
859
844
|
"dist/node/community/community-gateway-selection.js",
|
|
860
845
|
"dist/node/community/community-client-manager.js",
|
|
861
846
|
"dist/node/community/remote-community.js",
|
|
862
|
-
"dist/node/runtime/node/address-rewriter-db.js",
|
|
863
|
-
"dist/node/runtime/node/addresses-rewriter-proxy-server.js",
|
|
864
847
|
"node_modules/lru-cache/dist/esm/index.js",
|
|
865
848
|
"dist/node/pkc/tracked-instance-registry.js",
|
|
866
849
|
"node_modules/js-sizeof/index.js",
|
|
@@ -887,7 +870,7 @@
|
|
|
887
870
|
"dist/node/community/rpc-local-community.js"
|
|
888
871
|
]
|
|
889
872
|
},
|
|
890
|
-
"chunks/schema-
|
|
873
|
+
"chunks/schema-DZyEx0YQ.js": {
|
|
891
874
|
"isEntry": false,
|
|
892
875
|
"imports": [
|
|
893
876
|
"chunks/chunk-2rV9d50f.js",
|
|
@@ -1042,7 +1025,48 @@
|
|
|
1042
1025
|
"node_modules/ipfs-unixfs-importer/dist/src/index.js"
|
|
1043
1026
|
]
|
|
1044
1027
|
},
|
|
1045
|
-
"chunks/src-
|
|
1028
|
+
"chunks/src-BOzgM7Fp.js": {
|
|
1029
|
+
"isEntry": false,
|
|
1030
|
+
"imports": [
|
|
1031
|
+
"chunks/chunk-2rV9d50f.js",
|
|
1032
|
+
"multiformats/cid"
|
|
1033
|
+
],
|
|
1034
|
+
"dynamicImports": [],
|
|
1035
|
+
"inputs": [
|
|
1036
|
+
"node_modules/it-first/dist/src/index.js",
|
|
1037
|
+
"node_modules/@ipld/dag-pb/src/pb-decode.js",
|
|
1038
|
+
"node_modules/@ipld/dag-pb/src/pb-encode.js",
|
|
1039
|
+
"node_modules/@ipld/dag-pb/src/util.js",
|
|
1040
|
+
"node_modules/@ipld/dag-pb/src/index.js"
|
|
1041
|
+
]
|
|
1042
|
+
},
|
|
1043
|
+
"chunks/src-CYIMjhjK.js": {
|
|
1044
|
+
"isEntry": false,
|
|
1045
|
+
"imports": [],
|
|
1046
|
+
"dynamicImports": [],
|
|
1047
|
+
"inputs": [
|
|
1048
|
+
"node_modules/it-all/dist/src/index.js"
|
|
1049
|
+
]
|
|
1050
|
+
},
|
|
1051
|
+
"chunks/src-Cpx2Sts8.js": {
|
|
1052
|
+
"isEntry": false,
|
|
1053
|
+
"imports": [],
|
|
1054
|
+
"dynamicImports": [],
|
|
1055
|
+
"inputs": [
|
|
1056
|
+
"node_modules/it-peekable/dist/src/index.js",
|
|
1057
|
+
"node_modules/it-map/dist/src/index.js"
|
|
1058
|
+
]
|
|
1059
|
+
},
|
|
1060
|
+
"chunks/src-DKntVmyX.js": {
|
|
1061
|
+
"isEntry": false,
|
|
1062
|
+
"imports": [],
|
|
1063
|
+
"dynamicImports": [],
|
|
1064
|
+
"inputs": [
|
|
1065
|
+
"node_modules/it-batch/dist/src/index.js",
|
|
1066
|
+
"node_modules/it-parallel-batch/dist/src/index.js"
|
|
1067
|
+
]
|
|
1068
|
+
},
|
|
1069
|
+
"chunks/src-WLgFbUwZ.js": {
|
|
1046
1070
|
"isEntry": false,
|
|
1047
1071
|
"imports": [
|
|
1048
1072
|
"chunks/chunk-2rV9d50f.js",
|
|
@@ -1058,13 +1082,13 @@
|
|
|
1058
1082
|
"@libp2p/crypto/keys",
|
|
1059
1083
|
"uint8arrays/from-string",
|
|
1060
1084
|
"multiformats/basics",
|
|
1061
|
-
"node:https",
|
|
1062
1085
|
"@libp2p/interface",
|
|
1063
1086
|
"@multiformats/multiaddr",
|
|
1064
1087
|
"multiformats",
|
|
1065
1088
|
"multiformats/bases/base64",
|
|
1066
1089
|
"multiformats/hashes/identity",
|
|
1067
1090
|
"@libp2p/logger",
|
|
1091
|
+
"node:https",
|
|
1068
1092
|
"@multiformats/multiaddr-to-uri"
|
|
1069
1093
|
],
|
|
1070
1094
|
"dynamicImports": [],
|
|
@@ -1299,51 +1323,10 @@
|
|
|
1299
1323
|
"node_modules/kubo-rpc-client/dist/src/index.js"
|
|
1300
1324
|
]
|
|
1301
1325
|
},
|
|
1302
|
-
"chunks/
|
|
1303
|
-
"isEntry": false,
|
|
1304
|
-
"imports": [
|
|
1305
|
-
"chunks/chunk-2rV9d50f.js",
|
|
1306
|
-
"multiformats/cid"
|
|
1307
|
-
],
|
|
1308
|
-
"dynamicImports": [],
|
|
1309
|
-
"inputs": [
|
|
1310
|
-
"node_modules/it-first/dist/src/index.js",
|
|
1311
|
-
"node_modules/@ipld/dag-pb/src/pb-decode.js",
|
|
1312
|
-
"node_modules/@ipld/dag-pb/src/pb-encode.js",
|
|
1313
|
-
"node_modules/@ipld/dag-pb/src/util.js",
|
|
1314
|
-
"node_modules/@ipld/dag-pb/src/index.js"
|
|
1315
|
-
]
|
|
1316
|
-
},
|
|
1317
|
-
"chunks/src-CYIMjhjK.js": {
|
|
1318
|
-
"isEntry": false,
|
|
1319
|
-
"imports": [],
|
|
1320
|
-
"dynamicImports": [],
|
|
1321
|
-
"inputs": [
|
|
1322
|
-
"node_modules/it-all/dist/src/index.js"
|
|
1323
|
-
]
|
|
1324
|
-
},
|
|
1325
|
-
"chunks/src-Cpx2Sts8.js": {
|
|
1326
|
-
"isEntry": false,
|
|
1327
|
-
"imports": [],
|
|
1328
|
-
"dynamicImports": [],
|
|
1329
|
-
"inputs": [
|
|
1330
|
-
"node_modules/it-peekable/dist/src/index.js",
|
|
1331
|
-
"node_modules/it-map/dist/src/index.js"
|
|
1332
|
-
]
|
|
1333
|
-
},
|
|
1334
|
-
"chunks/src-DKntVmyX.js": {
|
|
1335
|
-
"isEntry": false,
|
|
1336
|
-
"imports": [],
|
|
1337
|
-
"dynamicImports": [],
|
|
1338
|
-
"inputs": [
|
|
1339
|
-
"node_modules/it-batch/dist/src/index.js",
|
|
1340
|
-
"node_modules/it-parallel-batch/dist/src/index.js"
|
|
1341
|
-
]
|
|
1342
|
-
},
|
|
1343
|
-
"chunks/util-CfSUfLkV.js": {
|
|
1326
|
+
"chunks/util-BTPlI1yF.js": {
|
|
1344
1327
|
"isEntry": false,
|
|
1345
1328
|
"imports": [
|
|
1346
|
-
"chunks/schema-
|
|
1329
|
+
"chunks/schema-DZyEx0YQ.js",
|
|
1347
1330
|
"ipns/selector",
|
|
1348
1331
|
"uint8arrays/equals"
|
|
1349
1332
|
],
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
|
|
2
|
-
import { L as hideClassPrivateProps, R as ipnsNameToIpnsOverPubsubTopic, br as logger_default, vr as PKCError } from "./schema-
|
|
3
|
-
import { a as fetchBlockWithStalledSessionFailover, i as directFetchIpnsRecordFromProviders, n as cacheIpnsRecordInPubsubLocalStore, o as getHeliaDebugContext, r as connectToPubsubPeers, s as selectBitswapSessionSeedPeers } from "./util-
|
|
2
|
+
import { L as hideClassPrivateProps, R as ipnsNameToIpnsOverPubsubTopic, br as logger_default, vr as PKCError } from "./schema-DZyEx0YQ.js";
|
|
3
|
+
import { a as fetchBlockWithStalledSessionFailover, i as directFetchIpnsRecordFromProviders, n as cacheIpnsRecordInPubsubLocalStore, o as getHeliaDebugContext, r as connectToPubsubPeers, s as selectBitswapSessionSeedPeers } from "./util-BTPlI1yF.js";
|
|
4
4
|
import { t as map } from "./src-Cpx2Sts8.js";
|
|
5
5
|
import { t as parallelBatch } from "./src-DKntVmyX.js";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
|
-
import
|
|
7
|
+
import fsp, { rename, writeFile } from "node:fs/promises";
|
|
8
8
|
import path, { basename, dirname, join } from "node:path";
|
|
9
9
|
import path$1 from "path";
|
|
10
10
|
import { CID } from "multiformats/cid";
|
|
@@ -4150,12 +4150,12 @@ var require_sync$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4150
4150
|
var require_fs$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4151
4151
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4152
4152
|
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
|
|
4153
|
-
const fs$
|
|
4153
|
+
const fs$2 = __require("fs");
|
|
4154
4154
|
exports.FILE_SYSTEM_ADAPTER = {
|
|
4155
|
-
lstat: fs$
|
|
4156
|
-
stat: fs$
|
|
4157
|
-
lstatSync: fs$
|
|
4158
|
-
statSync: fs$
|
|
4155
|
+
lstat: fs$2.lstat,
|
|
4156
|
+
stat: fs$2.stat,
|
|
4157
|
+
lstatSync: fs$2.lstatSync,
|
|
4158
|
+
statSync: fs$2.statSync
|
|
4159
4159
|
};
|
|
4160
4160
|
function createFileSystemAdapter(fsMethods) {
|
|
4161
4161
|
if (fsMethods === void 0) return exports.FILE_SYSTEM_ADAPTER;
|
|
@@ -4473,14 +4473,14 @@ var require_sync$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4473
4473
|
var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4474
4474
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4475
4475
|
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
|
|
4476
|
-
const fs$
|
|
4476
|
+
const fs$1 = __require("fs");
|
|
4477
4477
|
exports.FILE_SYSTEM_ADAPTER = {
|
|
4478
|
-
lstat: fs$
|
|
4479
|
-
stat: fs$
|
|
4480
|
-
lstatSync: fs$
|
|
4481
|
-
statSync: fs$
|
|
4482
|
-
readdir: fs$
|
|
4483
|
-
readdirSync: fs$
|
|
4478
|
+
lstat: fs$1.lstat,
|
|
4479
|
+
stat: fs$1.stat,
|
|
4480
|
+
lstatSync: fs$1.lstatSync,
|
|
4481
|
+
statSync: fs$1.statSync,
|
|
4482
|
+
readdir: fs$1.readdir,
|
|
4483
|
+
readdirSync: fs$1.readdirSync
|
|
4484
4484
|
};
|
|
4485
4485
|
function createFileSystemAdapter(fsMethods) {
|
|
4486
4486
|
if (fsMethods === void 0) return exports.FILE_SYSTEM_ADAPTER;
|
|
@@ -5674,7 +5674,7 @@ var require_sync = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5674
5674
|
var require_settings = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5675
5675
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5676
5676
|
exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
|
|
5677
|
-
const fs
|
|
5677
|
+
const fs = __require("fs");
|
|
5678
5678
|
const os = __require("os");
|
|
5679
5679
|
/**
|
|
5680
5680
|
* The `os.cpus` method can return zero. We expect the number of cores to be greater than zero.
|
|
@@ -5682,12 +5682,12 @@ var require_settings = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5682
5682
|
*/
|
|
5683
5683
|
const CPU_COUNT = Math.max(os.cpus().length, 1);
|
|
5684
5684
|
exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
|
|
5685
|
-
lstat: fs
|
|
5686
|
-
lstatSync: fs
|
|
5687
|
-
stat: fs
|
|
5688
|
-
statSync: fs
|
|
5689
|
-
readdir: fs
|
|
5690
|
-
readdirSync: fs
|
|
5685
|
+
lstat: fs.lstat,
|
|
5686
|
+
lstatSync: fs.lstatSync,
|
|
5687
|
+
stat: fs.stat,
|
|
5688
|
+
statSync: fs.statSync,
|
|
5689
|
+
readdir: fs.readdir,
|
|
5690
|
+
readdirSync: fs.readdirSync
|
|
5691
5691
|
};
|
|
5692
5692
|
var Settings = class {
|
|
5693
5693
|
constructor(_options = {}) {
|
|
@@ -5850,7 +5850,7 @@ var import_out = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((export
|
|
|
5850
5850
|
*/
|
|
5851
5851
|
async function* glob(dir, pattern, options = {}) {
|
|
5852
5852
|
const absoluteDir = path.resolve(dir);
|
|
5853
|
-
const stats = await
|
|
5853
|
+
const stats = await fsp.stat(absoluteDir);
|
|
5854
5854
|
for await (const entry of import_out.default.stream(pattern, {
|
|
5855
5855
|
...options,
|
|
5856
5856
|
cwd: stats.isDirectory() ? dir : process.cwd()
|
|
@@ -6050,14 +6050,14 @@ var NextToLast = class {
|
|
|
6050
6050
|
async function writeFile$1(file, contents, options) {
|
|
6051
6051
|
try {
|
|
6052
6052
|
options?.signal?.throwIfAborted();
|
|
6053
|
-
await raceSignal(
|
|
6053
|
+
await raceSignal(fsp.mkdir(path.dirname(file), { recursive: true }), options?.signal);
|
|
6054
6054
|
const writer = new Writer(file);
|
|
6055
6055
|
options?.signal?.throwIfAborted();
|
|
6056
6056
|
await writer.write(contents);
|
|
6057
6057
|
} catch (err) {
|
|
6058
6058
|
if (err.syscall === "rename" && ["ENOENT", "EPERM"].includes(err.code)) {
|
|
6059
6059
|
options?.signal?.throwIfAborted();
|
|
6060
|
-
await raceSignal(
|
|
6060
|
+
await raceSignal(fsp.access(file, fsp.constants.F_OK | fsp.constants.W_OK), options?.signal);
|
|
6061
6061
|
return;
|
|
6062
6062
|
}
|
|
6063
6063
|
throw err;
|
|
@@ -6085,11 +6085,11 @@ var FsBlockstore = class {
|
|
|
6085
6085
|
}
|
|
6086
6086
|
async open() {
|
|
6087
6087
|
try {
|
|
6088
|
-
await
|
|
6088
|
+
await fsp.access(this.path, fsp.constants.F_OK | fsp.constants.W_OK);
|
|
6089
6089
|
if (this.errorIfExists) throw new OpenFailedError(`Blockstore directory: ${this.path} already exists`);
|
|
6090
6090
|
} catch (err) {
|
|
6091
6091
|
if (err.code === "ENOENT") if (this.createIfMissing) {
|
|
6092
|
-
await
|
|
6092
|
+
await fsp.mkdir(this.path, { recursive: true });
|
|
6093
6093
|
return;
|
|
6094
6094
|
} else throw new OpenFailedError(`Blockstore directory: ${this.path} does not exist`);
|
|
6095
6095
|
throw err;
|
|
@@ -6120,7 +6120,7 @@ var FsBlockstore = class {
|
|
|
6120
6120
|
let handle;
|
|
6121
6121
|
try {
|
|
6122
6122
|
options?.signal?.throwIfAborted();
|
|
6123
|
-
handle = await raceSignal(
|
|
6123
|
+
handle = await raceSignal(fsp.open(path.join(this.path, dir, file)), options?.signal);
|
|
6124
6124
|
yield* handle.createReadStream();
|
|
6125
6125
|
} catch (err) {
|
|
6126
6126
|
if (handle != null) await raceSignal(handle.close(), options?.signal);
|
|
@@ -6141,7 +6141,7 @@ var FsBlockstore = class {
|
|
|
6141
6141
|
const { dir, file } = this.shardingStrategy.encode(key);
|
|
6142
6142
|
try {
|
|
6143
6143
|
options?.signal?.throwIfAborted();
|
|
6144
|
-
await raceSignal(
|
|
6144
|
+
await raceSignal(fsp.unlink(path.join(this.path, dir, file)), options?.signal);
|
|
6145
6145
|
} catch (err) {
|
|
6146
6146
|
if (err.code === "ENOENT") return;
|
|
6147
6147
|
throw new DeleteFailedError(String(err));
|
|
@@ -6159,7 +6159,7 @@ var FsBlockstore = class {
|
|
|
6159
6159
|
const { dir, file } = this.shardingStrategy.encode(key);
|
|
6160
6160
|
try {
|
|
6161
6161
|
options?.signal?.throwIfAborted();
|
|
6162
|
-
await raceSignal(
|
|
6162
|
+
await raceSignal(fsp.access(path.join(this.path, dir, file)), options?.signal);
|
|
6163
6163
|
} catch (err) {
|
|
6164
6164
|
return false;
|
|
6165
6165
|
}
|
|
@@ -6175,7 +6175,7 @@ var FsBlockstore = class {
|
|
|
6175
6175
|
bytes: (async function* () {
|
|
6176
6176
|
let handle;
|
|
6177
6177
|
try {
|
|
6178
|
-
handle = await raceSignal(
|
|
6178
|
+
handle = await raceSignal(fsp.open(file), options?.signal);
|
|
6179
6179
|
yield* handle.createReadStream();
|
|
6180
6180
|
} finally {
|
|
6181
6181
|
if (handle != null) await raceSignal(handle.close(), options?.signal);
|
|
@@ -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-CyX1HwD0.js";
|
|
2
2
|
export { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
|
|
2
|
-
import { $ as pubsubTopicToDhtKey, $n as n$3, An as CommentsTableRowSchema, At as trackStartedCommunity, Bn as CommentEditsTableRowSchema, Bt as CommunityEditPublicationPubsubReservedFields, C as contentContainsMarkdownAudio, Ct as findUpdatingCommunity, Dn as CommentUpdateSchema, F as getIpnsRecordInLocalKuboNode, Ft as untrackUpdatingCommunity, G as isLinkOfAudio, Gt as CommentModerationPubsubMessagePublicationSchema, In as CommentEditPubsubMessagePublicationSchema, It as require_sha256, J as isLinkOfVideo, Jt as CommentModerationsTableRowSchema, K as isLinkOfImage, Kt as CommentModerationReservedFields, L as hideClassPrivateProps, Ln as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, M as genToArray, Mt as trackUpdatingCommunity, N as getEquivalentCommunityAddresses, Nr as ZodError, Nt as untrackStartedCommunity, O as derivePublicationFromChallengeRequest, P as getErrorCodeFromMessage, Q as isStringDomain, Qn as t$8, R as ipnsNameToIpnsOverPubsubTopic, Rn as CommentEditReservedFields, S as calculateStringSizeSameAsIpfsAddCidV0, T as contentContainsMarkdownVideos, W as isLinkOfAnimatedImage, Wn as AuthorReservedFields, Y as isLinkValid, Zn as n$4, _t as timestamp, a as ChallengeRequestMessageSchema, ar as r$1, at as removeNullUndefinedValues, b as areEquivalentCommunityAddresses, bn as CommentPubsubMessageReservedFields, br as logger_default, bt as findCommunityInRegistry, d as DecryptedChallengeRequestSchema, dt as retryKuboIpfsAddAndProvide, er as t$7, fr as require_retry, gn as VoteTablesRowSchema, ht as statMfsPathSafely, in as CommunitySignedPropertyNames, k as doesDomainAddressHaveCapitalLetter, kn as CommentUpdateTableRowSchema, kt as syncCommunityRegistryEntry, lr as t$5, lt as retryKuboBlockPutPinAndProvidePubsubTopic, mn as VotePubsubReservedFields, mt as sleepUntilTimeoutOrAbort, nr as e, nt as removeBlocksFromKuboNode, or as t$4, pn as VotePubsubMessagePublicationSchema, q as isLinkOfMedia, r as ChallengeMessageSchema, rn as CommunityIpfsSchema, rr as e$1, rt as removeMfsFilesSafely, s as ChallengeVerificationMessageSchema, t as ChallengeAnswerMessageSchema, tr as t$6, u as DecryptedChallengeRequestPublicationSchema, ur as t$3, vr as PKCError, w as contentContainsMarkdownImages, x as calculateIpfsCidV0, xt as findStartedCommunity, y as version_default, yn as CommentIpfsSchema, yr as messages, yt as writeKuboFilesWithTimeout } from "./schema-
|
|
3
|
-
import { $n as
|
|
2
|
+
import { $ as pubsubTopicToDhtKey, $n as n$3, An as CommentsTableRowSchema, At as trackStartedCommunity, Bn as CommentEditsTableRowSchema, Bt as CommunityEditPublicationPubsubReservedFields, C as contentContainsMarkdownAudio, Ct as findUpdatingCommunity, Dn as CommentUpdateSchema, F as getIpnsRecordInLocalKuboNode, Ft as untrackUpdatingCommunity, G as isLinkOfAudio, Gt as CommentModerationPubsubMessagePublicationSchema, In as CommentEditPubsubMessagePublicationSchema, It as require_sha256, J as isLinkOfVideo, Jt as CommentModerationsTableRowSchema, K as isLinkOfImage, Kt as CommentModerationReservedFields, L as hideClassPrivateProps, Ln as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, M as genToArray, Mt as trackUpdatingCommunity, N as getEquivalentCommunityAddresses, Nr as ZodError, Nt as untrackStartedCommunity, O as derivePublicationFromChallengeRequest, P as getErrorCodeFromMessage, Q as isStringDomain, Qn as t$8, R as ipnsNameToIpnsOverPubsubTopic, Rn as CommentEditReservedFields, S as calculateStringSizeSameAsIpfsAddCidV0, T as contentContainsMarkdownVideos, W as isLinkOfAnimatedImage, Wn as AuthorReservedFields, Y as isLinkValid, Zn as n$4, _t as timestamp, a as ChallengeRequestMessageSchema, ar as r$1, at as removeNullUndefinedValues, b as areEquivalentCommunityAddresses, bn as CommentPubsubMessageReservedFields, br as logger_default, bt as findCommunityInRegistry, d as DecryptedChallengeRequestSchema, dt as retryKuboIpfsAddAndProvide, er as t$7, fr as require_retry, gn as VoteTablesRowSchema, ht as statMfsPathSafely, in as CommunitySignedPropertyNames, k as doesDomainAddressHaveCapitalLetter, kn as CommentUpdateTableRowSchema, kt as syncCommunityRegistryEntry, lr as t$5, lt as retryKuboBlockPutPinAndProvidePubsubTopic, mn as VotePubsubReservedFields, mt as sleepUntilTimeoutOrAbort, nr as e, nt as removeBlocksFromKuboNode, or as t$4, pn as VotePubsubMessagePublicationSchema, q as isLinkOfMedia, r as ChallengeMessageSchema, rn as CommunityIpfsSchema, rr as e$1, rt as removeMfsFilesSafely, s as ChallengeVerificationMessageSchema, t as ChallengeAnswerMessageSchema, tr as t$6, u as DecryptedChallengeRequestPublicationSchema, ur as t$3, vr as PKCError, w as contentContainsMarkdownImages, x as calculateIpfsCidV0, xt as findStartedCommunity, y as version_default, yn as CommentIpfsSchema, yr as messages, yt as writeKuboFilesWithTimeout } from "./schema-DZyEx0YQ.js";
|
|
3
|
+
import { $n as n$5, A as deriveDbReplies, At as verifyVote, C as backupCommunityDb, Ct as verifyCommentEdit, D as deleteOldCommunityInWindows, Dt as verifyCommentUpdate, Et as verifyCommentPubsubMessage, G as TIMEFRAMES_TO_SECONDS, Gt as getPKCAddressFromPublicKey, H as POSTS_SORT_TYPES, Ht as encode, Jn as t$9, Jt as createSchemaRowParser, Kt as getPKCAddressFromPublicKeySync, L as moveCommunityDbToDeletedDirectory, Mt as cleanWireAuthor, N as getThumbnailPropsOfLink, O as deriveCommentIpfsFromCommentTableRow, Ot as verifyCommunity, P as importSignerIntoKuboNode, Pt as getAuthorNameFromWire, Qn as n$6, R as resolveDbPostsCidRefs, Rt as getCommunityNameFromWire, S as BackupAbortError, T as calculateInlineRepliesBudget, Tt as verifyCommentModeration, U as POST_REPLIES_SORT_TYPES, Vt as decode, W as REPLY_REPLIES_SORT_TYPES, Wt as getIpfsKeyFromPrivateKey, X as iterateOverPageCidsToFindAllCids, Xn as r$2, Yn as t$12, Zn as t$11, _n as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, a as pkcJsChallenges, an as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, bn as parseJsonWithPKCErrorIfFails, ct as signChallengeMessage, dt as signComment, ft as signCommentEdit, gt as signCommunity, h as SignerWithPublicKeyAddress, ht as signCommentUpdateForChallengeVerification, i as getCommunityChallengeFromCommunityChallengeSettings, ir as require_lodash_merge, j as getDefaultCommunityDbConfig, jt as buildRuntimeAuthor, k as deriveDbPosts, kt as verifyCommunityEdit, l as MAX_FILE_SIZE_BYTES_FOR_COMMUNITY_IPFS, mt as signCommentUpdate, nr as stringify, o as TrackedInstanceRegistry, ot as cleanUpBeforePublishing, qt as getPublicKeyFromPrivateKey, r as getChallengeVerification, rr as STORAGE_KEYS, rt as pLimit, s as LRUCache, sn as parseCommunityIpfsSchemaPassthroughWithPKCErrorIfItFails, t as RpcLocalCommunity, tr as t$10, u as KeyvBetterSqlite3, ut as signChallengeVerification, w as calculateExpectedSignatureSize, wt as verifyCommentIpfs, x as encryptEd25519AesGcmPublicKeyBuffer, xt as verifyChallengeRequest, y as decryptEd25519AesGcmPublicKeyBuffer, yt as verifyChallengeAnswer, zt as getCommunityPublicKeyFromWire } from "./rpc-local-community-BOiy8BX1.js";
|
|
4
4
|
import { randomFillSync, randomUUID } from "node:crypto";
|
|
5
5
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
6
6
|
import path from "node:path";
|
|
@@ -6487,6 +6487,10 @@ async function syncIpnsWithDb(community) {
|
|
|
6487
6487
|
throw e;
|
|
6488
6488
|
}
|
|
6489
6489
|
}
|
|
6490
|
+
function normalizeSelfAddrsForProvider(addrs, peerId) {
|
|
6491
|
+
const suffix = `/p2p/${peerId}`;
|
|
6492
|
+
return n$4(addrs.map((addr) => addr.endsWith(suffix) ? addr.slice(0, -suffix.length) : addr));
|
|
6493
|
+
}
|
|
6490
6494
|
function isBrowserDialableAddr(addr) {
|
|
6491
6495
|
return addr.includes("/webrtc") || addr.includes("/ws");
|
|
6492
6496
|
}
|
|
@@ -6501,8 +6505,8 @@ function connectionCriticalCids(community) {
|
|
|
6501
6505
|
}
|
|
6502
6506
|
/**
|
|
6503
6507
|
* Re-provide the connection-critical CIDs when the node's browser-dialable (WSS/WebRTC) self-addresses
|
|
6504
|
-
* have changed since the last provide. This pushes the current addresses to the HTTP routers
|
|
6505
|
-
*
|
|
6508
|
+
* have changed since the last provide. This pushes the current addresses to the HTTP routers so browsers
|
|
6509
|
+
* don't get NoValidAddressesError against stale/dead addresses.
|
|
6506
6510
|
*
|
|
6507
6511
|
* The first observation only establishes a baseline (start() already force-provides these CIDs with fresh
|
|
6508
6512
|
* addresses via providePubsubTopicRoutingCidsIfNeeded); subsequent changes trigger a re-provide.
|