@hatk/hatk 0.0.1-alpha.102 → 0.0.1-alpha.103
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/dev-entry.d.ts.map +1 -1
- package/dist/dev-entry.js +4 -0
- package/dist/main.js +4 -0
- package/dist/spaces/identity.d.ts.map +1 -1
- package/dist/spaces/identity.js +5 -0
- package/package.json +1 -1
package/dist/dev-entry.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-entry.d.ts","sourceRoot":"","sources":["../src/dev-entry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dev-entry.d.ts","sourceRoot":"","sources":["../src/dev-entry.ts"],"names":[],"mappings":"AAoIA,eAAO,MAAM,OAAO,yCAKlB,CAAA;AAEF,yEAAyE;AACzE,wBAAsB,YAAY,kBAEjC;AAED,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA"}
|
package/dist/dev-entry.js
CHANGED
|
@@ -17,6 +17,7 @@ import { setPrivateCollections } from "./private-collections.js";
|
|
|
17
17
|
import { auxCursorKey, startAuxIndexer, startIndexer, sweepReferences } from "./indexer.js";
|
|
18
18
|
import { getCursor } from "./database/db.js";
|
|
19
19
|
import { runBackfill, configurePlc } from "./backfill.js";
|
|
20
|
+
import { configureSpaceIdentity } from "./spaces/identity.js";
|
|
20
21
|
import { rebuildAllIndexes } from "./database/fts.js";
|
|
21
22
|
import { relayHttpUrl } from "./config.js";
|
|
22
23
|
import { validateLexicons } from '@bigmoves/lexicon';
|
|
@@ -30,6 +31,9 @@ const configDir = dirname(resolve(configPath));
|
|
|
30
31
|
const config = await loadConfig(configPath);
|
|
31
32
|
configureRelay(config.relay);
|
|
32
33
|
configurePlc(config.plc);
|
|
34
|
+
// Space reads resolve authorities too, and ctx.spaceCredential works without
|
|
35
|
+
// `spaces` indexing being configured.
|
|
36
|
+
configureSpaceIdentity(config.plc);
|
|
33
37
|
configureCdn(config.cdn);
|
|
34
38
|
const lexicons = loadLexicons(resolve(configDir, 'lexicons'));
|
|
35
39
|
const lexiconErrors = validateLexicons(validatableLexicons(lexicons));
|
package/dist/main.js
CHANGED
|
@@ -38,6 +38,7 @@ import { enabledPushTransports, initPush, isPushEnabled } from "./push.js";
|
|
|
38
38
|
import { initSetup } from "./setup.js";
|
|
39
39
|
import { initServer } from "./server-init.js";
|
|
40
40
|
import { startSpaces } from "./spaces/index.js";
|
|
41
|
+
import { configureSpaceIdentity } from "./spaces/identity.js";
|
|
41
42
|
const configPath = process.argv[2] || 'hatk.config.ts';
|
|
42
43
|
const configDir = dirname(resolve(configPath));
|
|
43
44
|
registerHatkResolveHook();
|
|
@@ -45,6 +46,9 @@ registerHatkResolveHook();
|
|
|
45
46
|
const config = await loadConfig(configPath);
|
|
46
47
|
configureRelay(config.relay);
|
|
47
48
|
configurePlc(config.plc);
|
|
49
|
+
// Space reads resolve authorities too, and ctx.spaceCredential works without
|
|
50
|
+
// `spaces` indexing being configured.
|
|
51
|
+
configureSpaceIdentity(config.plc);
|
|
48
52
|
configureCdn(config.cdn);
|
|
49
53
|
// 2. Load lexicons, validate schemas, and discover collections
|
|
50
54
|
const lexicons = loadLexicons(resolve(configDir, 'lexicons'));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../src/spaces/identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,aAAa,CAAA;AAS/D,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAExD;
|
|
1
|
+
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../src/spaces/identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,aAAa,CAAA;AAS/D,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAExD;AA+BD;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAK1E;AAED,+EAA+E;AAC/E,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAEzD;AAED,gFAAgF;AAChF,wBAAgB,uBAAuB,IAAI,IAAI,CAE9C;AAED;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAW9E"}
|
package/dist/spaces/identity.js
CHANGED
|
@@ -37,6 +37,11 @@ function fetchDidDoc(did) {
|
|
|
37
37
|
}
|
|
38
38
|
})();
|
|
39
39
|
docCache.set(did, pending);
|
|
40
|
+
// A failed lookup is not an answer: the next call asks again.
|
|
41
|
+
void pending.then((doc) => {
|
|
42
|
+
if (doc === null && docCache.get(did) === pending)
|
|
43
|
+
docCache.delete(did);
|
|
44
|
+
});
|
|
40
45
|
return pending;
|
|
41
46
|
}
|
|
42
47
|
function serviceEndpoint(doc, id) {
|