@atproto/dev-env 0.3.10 → 0.3.12
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +19 -0
- package/dist/bin.js +4 -0
- package/dist/bin.js.map +1 -1
- package/dist/introspect.d.ts +14 -0
- package/dist/introspect.d.ts.map +1 -0
- package/dist/introspect.js +58 -0
- package/dist/introspect.js.map +1 -0
- package/dist/network.d.ts +3 -1
- package/dist/network.d.ts.map +1 -1
- package/dist/network.js +14 -2
- package/dist/network.js.map +1 -1
- package/dist/seed/users.d.ts.map +1 -1
- package/dist/seed/users.js +13 -0
- package/dist/seed/users.js.map +1 -1
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +9 -6
- package/src/bin.ts +6 -0
- package/src/introspect.ts +54 -0
- package/src/network.ts +15 -1
- package/src/seed/users.ts +17 -0
- package/src/types.ts +5 -0
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
# @atproto/dev-env
|
2
2
|
|
3
|
+
## 0.3.12
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- Updated dependencies [[`f36585013`](https://github.com/bluesky-social/atproto/commit/f365850139ffb2b5e63facfd95eedf0b87d01ee7)]:
|
8
|
+
- @atproto/pds@0.4.21
|
9
|
+
- @atproto/bsky@0.0.51
|
10
|
+
- @atproto/ozone@0.1.13
|
11
|
+
|
12
|
+
## 0.3.11
|
13
|
+
|
14
|
+
### Patch Changes
|
15
|
+
|
16
|
+
- Updated dependencies [[`f83b4c8ca`](https://github.com/bluesky-social/atproto/commit/f83b4c8cad01cebc1b67caa6c7ebe45f07b2f318)]:
|
17
|
+
- @atproto/api@0.12.9
|
18
|
+
- @atproto/bsky@0.0.51
|
19
|
+
- @atproto/ozone@0.1.13
|
20
|
+
- @atproto/pds@0.4.20
|
21
|
+
|
3
22
|
## 0.3.10
|
4
23
|
|
5
24
|
### Patch Changes
|
package/dist/bin.js
CHANGED
@@ -26,9 +26,13 @@ const run = async () => {
|
|
26
26
|
publicUrl: 'http://localhost:2584',
|
27
27
|
},
|
28
28
|
plc: { port: 2582 },
|
29
|
+
introspect: { port: 2581 },
|
29
30
|
});
|
30
31
|
(0, util_1.mockMailer)(network.pds);
|
31
32
|
await (0, mock_1.generateMockSetup)(network);
|
33
|
+
if (network.introspect) {
|
34
|
+
console.log(`🔍 Dev-env introspection server started http://localhost:${network.introspect.port}`);
|
35
|
+
}
|
32
36
|
console.log(`👤 DID Placeholder server started http://localhost:${network.plc.port}`);
|
33
37
|
console.log(`🌞 Personal Data server started http://localhost:${network.pds.port}`);
|
34
38
|
console.log(`🗼 Ozone server started http://localhost:${network.ozone.port}`);
|
package/dist/bin.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";;AAAA,iBAAc;AACd,iCAA0C;AAC1C,uCAAuC;AACvC,iCAAmC;AAEnC,MAAM,GAAG,GAAG,KAAK,IAAI,EAAE;IACrB,OAAO,CAAC,GAAG,CAAC;;;;;;;;uBAQS,CAAC,CAAA;IAEtB,MAAM,OAAO,GAAG,MAAM,qBAAW,CAAC,MAAM,CAAC;QACvC,GAAG,EAAE;YACH,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,WAAW;YACrB,uBAAuB,EAAE,IAAI;SAC9B;QACD,IAAI,EAAE;YACJ,gBAAgB,EAAE,MAAM;YACxB,IAAI,EAAE,IAAI;YACV,SAAS,EAAE,uBAAuB;SACnC;QACD,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";;AAAA,iBAAc;AACd,iCAA0C;AAC1C,uCAAuC;AACvC,iCAAmC;AAEnC,MAAM,GAAG,GAAG,KAAK,IAAI,EAAE;IACrB,OAAO,CAAC,GAAG,CAAC;;;;;;;;uBAQS,CAAC,CAAA;IAEtB,MAAM,OAAO,GAAG,MA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CAAA"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/// <reference types="node" />
|
2
|
+
import http from 'node:http';
|
3
|
+
import { TestPlc } from './plc';
|
4
|
+
import { TestPds } from './pds';
|
5
|
+
import { TestBsky } from './bsky';
|
6
|
+
import { TestOzone } from './ozone';
|
7
|
+
export declare class IntrospectServer {
|
8
|
+
port: number;
|
9
|
+
server: http.Server;
|
10
|
+
constructor(port: number, server: http.Server);
|
11
|
+
static start(port: number, plc: TestPlc, pds: TestPds, bsky: TestBsky, ozone: TestOzone): Promise<IntrospectServer>;
|
12
|
+
close(): Promise<void>;
|
13
|
+
}
|
14
|
+
//# sourceMappingURL=introspect.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"introspect.d.ts","sourceRoot":"","sources":["../src/introspect.ts"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,WAAW,CAAA;AAG5B,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnC,qBAAa,gBAAgB;IAElB,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,IAAI,CAAC,MAAM;gBADnB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,IAAI,CAAC,MAAM;WAGf,KAAK,CAChB,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,SAAS;IA8BZ,KAAK;CAIZ"}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.IntrospectServer = void 0;
|
7
|
+
const node_events_1 = __importDefault(require("node:events"));
|
8
|
+
const express_1 = __importDefault(require("express"));
|
9
|
+
class IntrospectServer {
|
10
|
+
constructor(port, server) {
|
11
|
+
Object.defineProperty(this, "port", {
|
12
|
+
enumerable: true,
|
13
|
+
configurable: true,
|
14
|
+
writable: true,
|
15
|
+
value: port
|
16
|
+
});
|
17
|
+
Object.defineProperty(this, "server", {
|
18
|
+
enumerable: true,
|
19
|
+
configurable: true,
|
20
|
+
writable: true,
|
21
|
+
value: server
|
22
|
+
});
|
23
|
+
}
|
24
|
+
static async start(port, plc, pds, bsky, ozone) {
|
25
|
+
const app = (0, express_1.default)();
|
26
|
+
app.get('/', (_req, res) => {
|
27
|
+
res.status(200).send({
|
28
|
+
plc: {
|
29
|
+
url: plc.url,
|
30
|
+
},
|
31
|
+
pds: {
|
32
|
+
url: pds.url,
|
33
|
+
did: pds.ctx.cfg.service.did,
|
34
|
+
},
|
35
|
+
bsky: {
|
36
|
+
url: bsky.url,
|
37
|
+
did: bsky.ctx.cfg.serverDid,
|
38
|
+
},
|
39
|
+
ozone: {
|
40
|
+
url: ozone.url,
|
41
|
+
did: ozone.ctx.cfg.service.did,
|
42
|
+
},
|
43
|
+
db: {
|
44
|
+
url: ozone.ctx.cfg.db.postgresUrl,
|
45
|
+
},
|
46
|
+
});
|
47
|
+
});
|
48
|
+
const server = app.listen(port);
|
49
|
+
await node_events_1.default.once(server, 'listening');
|
50
|
+
return new IntrospectServer(port, server);
|
51
|
+
}
|
52
|
+
async close() {
|
53
|
+
this.server.close();
|
54
|
+
await node_events_1.default.once(this.server, 'close');
|
55
|
+
}
|
56
|
+
}
|
57
|
+
exports.IntrospectServer = IntrospectServer;
|
58
|
+
//# sourceMappingURL=introspect.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"introspect.js","sourceRoot":"","sources":["../src/introspect.ts"],"names":[],"mappings":";;;;;;AACA,8DAAgC;AAChC,sDAA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AC,KAAK;QACT,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACnB,MAAM,qBAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACzC,CAAC;CACF;AA7CD,4CA6CC"}
|
package/dist/network.d.ts
CHANGED
@@ -4,12 +4,14 @@ import { TestPds } from './pds';
|
|
4
4
|
import { TestBsky } from './bsky';
|
5
5
|
import { TestOzone } from './ozone';
|
6
6
|
import { TestNetworkNoAppView } from './network-no-appview';
|
7
|
+
import { IntrospectServer } from './introspect';
|
7
8
|
export declare class TestNetwork extends TestNetworkNoAppView {
|
8
9
|
plc: TestPlc;
|
9
10
|
pds: TestPds;
|
10
11
|
bsky: TestBsky;
|
11
12
|
ozone: TestOzone;
|
12
|
-
|
13
|
+
introspect?: IntrospectServer | undefined;
|
14
|
+
constructor(plc: TestPlc, pds: TestPds, bsky: TestBsky, ozone: TestOzone, introspect?: IntrospectServer | undefined);
|
13
15
|
static create(params?: Partial<TestServerParams>): Promise<TestNetwork>;
|
14
16
|
processFullSubscription(timeout?: number): Promise<void>;
|
15
17
|
processAll(timeout?: number): Promise<void>;
|
package/dist/network.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../src/network.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAGnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;
|
1
|
+
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../src/network.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAGnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAE3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAK/C,qBAAa,WAAY,SAAQ,oBAAoB;IAE1C,GAAG,EAAE,OAAO;IACZ,GAAG,EAAE,OAAO;IACZ,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,SAAS;IAChB,UAAU,CAAC;gBAJX,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,SAAS,EAChB,UAAU,CAAC,8BAAkB;WAKzB,MAAM,CACjB,MAAM,GAAE,OAAO,CAAC,gBAAgB,CAAM,GACrC,OAAO,CAAC,WAAW,CAAC;IAwGjB,uBAAuB,CAAC,OAAO,SAAO;IAgBtC,UAAU,CAAC,OAAO,CAAC,EAAE,MAAM;IAO3B,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM;;;IAUxC,YAAY,CAAC,EACjB,QAAyB,EACzB,QAAyB,GAC1B,EAAE;QACD,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;KAClB;;;IAWK,KAAK;CAQZ"}
|
package/dist/network.js
CHANGED
@@ -40,10 +40,11 @@ const ozone_service_profile_1 = require("./ozone-service-profile");
|
|
40
40
|
const util_1 = require("./util");
|
41
41
|
const network_no_appview_1 = require("./network-no-appview");
|
42
42
|
const const_1 = require("./const");
|
43
|
+
const introspect_1 = require("./introspect");
|
43
44
|
const ADMIN_USERNAME = 'admin';
|
44
45
|
const ADMIN_PASSWORD = 'admin-pass';
|
45
46
|
class TestNetwork extends network_no_appview_1.TestNetworkNoAppView {
|
46
|
-
constructor(plc, pds, bsky, ozone) {
|
47
|
+
constructor(plc, pds, bsky, ozone, introspect) {
|
47
48
|
super(plc, pds);
|
48
49
|
Object.defineProperty(this, "plc", {
|
49
50
|
enumerable: true,
|
@@ -69,6 +70,12 @@ class TestNetwork extends network_no_appview_1.TestNetworkNoAppView {
|
|
69
70
|
writable: true,
|
70
71
|
value: ozone
|
71
72
|
});
|
73
|
+
Object.defineProperty(this, "introspect", {
|
74
|
+
enumerable: true,
|
75
|
+
configurable: true,
|
76
|
+
writable: true,
|
77
|
+
value: introspect
|
78
|
+
});
|
72
79
|
}
|
73
80
|
static async create(params = {}) {
|
74
81
|
const redisHost = process.env.REDIS_HOST;
|
@@ -144,7 +151,11 @@ class TestNetwork extends network_no_appview_1.TestNetworkNoAppView {
|
|
144
151
|
await pds.processAll();
|
145
152
|
await bsky.sub.background.processAll();
|
146
153
|
await thirdPartyPds.close();
|
147
|
-
|
154
|
+
let introspect = undefined;
|
155
|
+
if (params.introspect?.port) {
|
156
|
+
introspect = await introspect_1.IntrospectServer.start(params.introspect.port, plc, pds, bsky, ozone);
|
157
|
+
}
|
158
|
+
return new TestNetwork(plc, pds, bsky, ozone, introspect);
|
148
159
|
}
|
149
160
|
async processFullSubscription(timeout = 5000) {
|
150
161
|
const sub = this.bsky.sub;
|
@@ -189,6 +200,7 @@ class TestNetwork extends network_no_appview_1.TestNetworkNoAppView {
|
|
189
200
|
await this.bsky.close();
|
190
201
|
await this.pds.close();
|
191
202
|
await this.plc.close();
|
203
|
+
await this.introspect?.close();
|
192
204
|
}
|
193
205
|
}
|
194
206
|
exports.TestNetwork = TestNetwork;
|
package/dist/network.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"network.js","sourceRoot":"","sources":["../src/network.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;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IAED,KAAK,CAAC,KAAK;QACT,MAAM,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACxD,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAA;QACxB,MAAM,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAA;QACvB,MAAM,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAA;QACtB,MAAM,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAA;QACtB,MAAM,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,CAAA;IAChC,CAAC;CACF;AA/KD,kCA+KC"}
|
package/dist/seed/users.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/seed/users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;6BAEX,UAAU;AAApC,
|
1
|
+
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/seed/users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;6BAEX,UAAU;AAApC,wBAqCC"}
|
package/dist/seed/users.js
CHANGED
@@ -7,6 +7,19 @@ exports.default = async (sc) => {
|
|
7
7
|
await sc.createAccount('dan', users.dan);
|
8
8
|
await sc.createProfile(sc.dids.alice, users.alice.displayName, users.alice.description, users.alice.selfLabels);
|
9
9
|
await sc.createProfile(sc.dids.bob, users.bob.displayName, users.bob.description, users.bob.selfLabels);
|
10
|
+
await sc.agent.api.com.atproto.repo.putRecord({
|
11
|
+
repo: sc.dids.dan,
|
12
|
+
collection: 'chat.bsky.actor.declaration',
|
13
|
+
rkey: 'self',
|
14
|
+
validate: false,
|
15
|
+
record: {
|
16
|
+
$type: 'chat.bsky.actor.declaration',
|
17
|
+
allowIncoming: 'none',
|
18
|
+
},
|
19
|
+
}, {
|
20
|
+
encoding: 'application/json',
|
21
|
+
headers: sc.getHeaders(sc.dids.dan),
|
22
|
+
});
|
10
23
|
return sc;
|
11
24
|
};
|
12
25
|
const users = {
|
package/dist/seed/users.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"users.js","sourceRoot":"","sources":["../../src/seed/users.ts"],"names":[],"mappings":";;AAEA,kBAAe,KAAK,EAAE,EAAc,EAAE,EAAE;IACtC,MAAM,EAAE,CAAC,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAA;IAC5C,MAAM,EAAE,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAA;IACxC,MAAM,EAAE,CAAC,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAA;IAC5C,MAAM,EAAE,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAA;IAExC,MAAM,EAAE,CAAC,aAAa,CACpB,EAAE,CAAC,IAAI,CAAC,KAAK,EACb,KAAK,CAAC,KAAK,CAAC,WAAW,EACvB,KAAK,CAAC,KAAK,CAAC,WAAW,EACvB,KAAK,CAAC,KAAK,CAAC,UAAU,CACvB,CAAA;IACD,MAAM,EAAE,CAAC,aAAa,CACpB,EAAE,CAAC,IAAI,CAAC,GAAG,EACX,KAAK,CAAC,GAAG,CAAC,WAAW,EACrB,KAAK,CAAC,GAAG,CAAC,WAAW,EACrB,KAAK,CAAC,GAAG,CAAC,UAAU,CACrB,CAAA;IAED,OAAO,EAAE,CAAA;AACX,CAAC,CAAA;AAED,MAAM,KAAK,GAAG;IACZ,KAAK,EAAE;QACL,KAAK,EAAE,gBAAgB;QACvB,MAAM,EAAE,YAAY;QACpB,QAAQ,EAAE,YAAY;QACtB,WAAW,EAAE,KAAK;QAClB,WAAW,EAAE,SAAS;QACtB,UAAU,EAAE,CAAC,cAAc,E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W,EAAE,SAAS;QACtB,WAAW,EAAE,SAAS;QACtB,UAAU,EAAE,SAAS;KACtB;CACF,CAAA"}
|
package/dist/types.d.ts
CHANGED
@@ -3,6 +3,9 @@ import * as bsky from '@atproto/bsky';
|
|
3
3
|
import * as bsync from '@atproto/bsync';
|
4
4
|
import * as ozone from '@atproto/ozone';
|
5
5
|
import { ExportableKeypair, Keypair } from '@atproto/crypto';
|
6
|
+
export type IntrospectConfig = {
|
7
|
+
port?: number;
|
8
|
+
};
|
6
9
|
export type PlcConfig = {
|
7
10
|
port?: number;
|
8
11
|
version?: string;
|
@@ -39,6 +42,7 @@ export type TestServerParams = {
|
|
39
42
|
plc: Partial<PlcConfig>;
|
40
43
|
bsky: Partial<BskyConfig>;
|
41
44
|
ozone: Partial<OzoneConfig>;
|
45
|
+
introspect: Partial<IntrospectConfig>;
|
42
46
|
};
|
43
47
|
export type DidAndKey = {
|
44
48
|
did: string;
|
package/dist/types.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,cAAc,CAAA;AACnC,OAAO,KAAK,IAAI,MAAM,eAAe,CAAA;AACrC,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAA;AACvC,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAE5D,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,GAAG;IACvD,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,UAAU,GAAG,OAAO,CAA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B,gBAAgB,EAAE,MAAM,CAAA;IACxB,GAAG,EAAE,OAAO,CAAC,SAAS,CAAC,CAAA;IACvB,GAAG,EAAE,OAAO,CAAC,SAAS,CAAC,CAAA;IACvB,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,CAAA;IACzB,KAAK,EAAE,OAAO,CAAC,WAAW,CAAC,CAAA;IAC3B,UAAU,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAA;CACtC,CAAA;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,OAAO,CAAA;CACb,CAAA"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atproto/dev-env",
|
3
|
-
"version": "0.3.
|
3
|
+
"version": "0.3.12",
|
4
4
|
"license": "MIT",
|
5
5
|
"description": "Local development environment helper for atproto development",
|
6
6
|
"keywords": [
|
@@ -24,18 +24,21 @@
|
|
24
24
|
"get-port": "^5.1.1",
|
25
25
|
"multiformats": "^9.9.0",
|
26
26
|
"uint8arrays": "3.0.0",
|
27
|
-
"@atproto/api": "^0.12.
|
28
|
-
"@atproto/bsky": "^0.0.50",
|
27
|
+
"@atproto/api": "^0.12.9",
|
29
28
|
"@atproto/bsync": "^0.0.3",
|
30
|
-
"@atproto/
|
29
|
+
"@atproto/bsky": "^0.0.51",
|
31
30
|
"@atproto/crypto": "^0.4.0",
|
31
|
+
"@atproto/common-web": "^0.3.0",
|
32
32
|
"@atproto/identity": "^0.4.0",
|
33
33
|
"@atproto/lexicon": "^0.4.0",
|
34
|
-
"@atproto/ozone": "^0.1.
|
35
|
-
"@atproto/pds": "^0.4.
|
34
|
+
"@atproto/ozone": "^0.1.13",
|
35
|
+
"@atproto/pds": "^0.4.21",
|
36
36
|
"@atproto/syntax": "^0.3.0",
|
37
37
|
"@atproto/xrpc-server": "^0.5.1"
|
38
38
|
},
|
39
|
+
"devDependencies": {
|
40
|
+
"@types/express": "^4.17.13"
|
41
|
+
},
|
39
42
|
"scripts": {
|
40
43
|
"build": "tsc --build tsconfig.build.json",
|
41
44
|
"start": "../dev-infra/with-test-redis-and-db.sh node dist/bin.js"
|
package/src/bin.ts
CHANGED
@@ -26,10 +26,16 @@ const run = async () => {
|
|
26
26
|
publicUrl: 'http://localhost:2584',
|
27
27
|
},
|
28
28
|
plc: { port: 2582 },
|
29
|
+
introspect: { port: 2581 },
|
29
30
|
})
|
30
31
|
mockMailer(network.pds)
|
31
32
|
await generateMockSetup(network)
|
32
33
|
|
34
|
+
if (network.introspect) {
|
35
|
+
console.log(
|
36
|
+
`🔍 Dev-env introspection server started http://localhost:${network.introspect.port}`,
|
37
|
+
)
|
38
|
+
}
|
33
39
|
console.log(
|
34
40
|
`👤 DID Placeholder server started http://localhost:${network.plc.port}`,
|
35
41
|
)
|
@@ -0,0 +1,54 @@
|
|
1
|
+
import http from 'node:http'
|
2
|
+
import events from 'node:events'
|
3
|
+
import express from 'express'
|
4
|
+
import { TestPlc } from './plc'
|
5
|
+
import { TestPds } from './pds'
|
6
|
+
import { TestBsky } from './bsky'
|
7
|
+
import { TestOzone } from './ozone'
|
8
|
+
|
9
|
+
export class IntrospectServer {
|
10
|
+
constructor(
|
11
|
+
public port: number,
|
12
|
+
public server: http.Server,
|
13
|
+
) {}
|
14
|
+
|
15
|
+
static async start(
|
16
|
+
port: number,
|
17
|
+
plc: TestPlc,
|
18
|
+
pds: TestPds,
|
19
|
+
bsky: TestBsky,
|
20
|
+
ozone: TestOzone,
|
21
|
+
) {
|
22
|
+
const app = express()
|
23
|
+
app.get('/', (_req, res) => {
|
24
|
+
res.status(200).send({
|
25
|
+
plc: {
|
26
|
+
url: plc.url,
|
27
|
+
},
|
28
|
+
pds: {
|
29
|
+
url: pds.url,
|
30
|
+
did: pds.ctx.cfg.service.did,
|
31
|
+
},
|
32
|
+
bsky: {
|
33
|
+
url: bsky.url,
|
34
|
+
did: bsky.ctx.cfg.serverDid,
|
35
|
+
},
|
36
|
+
ozone: {
|
37
|
+
url: ozone.url,
|
38
|
+
did: ozone.ctx.cfg.service.did,
|
39
|
+
},
|
40
|
+
db: {
|
41
|
+
url: ozone.ctx.cfg.db.postgresUrl,
|
42
|
+
},
|
43
|
+
})
|
44
|
+
})
|
45
|
+
const server = app.listen(port)
|
46
|
+
await events.once(server, 'listening')
|
47
|
+
return new IntrospectServer(port, server)
|
48
|
+
}
|
49
|
+
|
50
|
+
async close() {
|
51
|
+
this.server.close()
|
52
|
+
await events.once(this.server, 'close')
|
53
|
+
}
|
54
|
+
}
|
package/src/network.ts
CHANGED
@@ -12,6 +12,7 @@ import { OzoneServiceProfile } from './ozone-service-profile'
|
|
12
12
|
import { mockNetworkUtilities } from './util'
|
13
13
|
import { TestNetworkNoAppView } from './network-no-appview'
|
14
14
|
import { EXAMPLE_LABELER } from './const'
|
15
|
+
import { IntrospectServer } from './introspect'
|
15
16
|
|
16
17
|
const ADMIN_USERNAME = 'admin'
|
17
18
|
const ADMIN_PASSWORD = 'admin-pass'
|
@@ -22,6 +23,7 @@ export class TestNetwork extends TestNetworkNoAppView {
|
|
22
23
|
public pds: TestPds,
|
23
24
|
public bsky: TestBsky,
|
24
25
|
public ozone: TestOzone,
|
26
|
+
public introspect?: IntrospectServer,
|
25
27
|
) {
|
26
28
|
super(plc, pds)
|
27
29
|
}
|
@@ -118,7 +120,18 @@ export class TestNetwork extends TestNetworkNoAppView {
|
|
118
120
|
await bsky.sub.background.processAll()
|
119
121
|
await thirdPartyPds.close()
|
120
122
|
|
121
|
-
|
123
|
+
let introspect: IntrospectServer | undefined = undefined
|
124
|
+
if (params.introspect?.port) {
|
125
|
+
introspect = await IntrospectServer.start(
|
126
|
+
params.introspect.port,
|
127
|
+
plc,
|
128
|
+
pds,
|
129
|
+
bsky,
|
130
|
+
ozone,
|
131
|
+
)
|
132
|
+
}
|
133
|
+
|
134
|
+
return new TestNetwork(plc, pds, bsky, ozone, introspect)
|
122
135
|
}
|
123
136
|
|
124
137
|
async processFullSubscription(timeout = 5000) {
|
@@ -177,5 +190,6 @@ export class TestNetwork extends TestNetworkNoAppView {
|
|
177
190
|
await this.bsky.close()
|
178
191
|
await this.pds.close()
|
179
192
|
await this.plc.close()
|
193
|
+
await this.introspect?.close()
|
180
194
|
}
|
181
195
|
}
|
package/src/seed/users.ts
CHANGED
@@ -19,6 +19,23 @@ export default async (sc: SeedClient) => {
|
|
19
19
|
users.bob.selfLabels,
|
20
20
|
)
|
21
21
|
|
22
|
+
await sc.agent.api.com.atproto.repo.putRecord(
|
23
|
+
{
|
24
|
+
repo: sc.dids.dan,
|
25
|
+
collection: 'chat.bsky.actor.declaration',
|
26
|
+
rkey: 'self',
|
27
|
+
validate: false,
|
28
|
+
record: {
|
29
|
+
$type: 'chat.bsky.actor.declaration',
|
30
|
+
allowIncoming: 'none',
|
31
|
+
},
|
32
|
+
},
|
33
|
+
{
|
34
|
+
encoding: 'application/json',
|
35
|
+
headers: sc.getHeaders(sc.dids.dan),
|
36
|
+
},
|
37
|
+
)
|
38
|
+
|
22
39
|
return sc
|
23
40
|
}
|
24
41
|
|
package/src/types.ts
CHANGED
@@ -4,6 +4,10 @@ import * as bsync from '@atproto/bsync'
|
|
4
4
|
import * as ozone from '@atproto/ozone'
|
5
5
|
import { ExportableKeypair, Keypair } from '@atproto/crypto'
|
6
6
|
|
7
|
+
export type IntrospectConfig = {
|
8
|
+
port?: number
|
9
|
+
}
|
10
|
+
|
7
11
|
export type PlcConfig = {
|
8
12
|
port?: number
|
9
13
|
version?: string
|
@@ -45,6 +49,7 @@ export type TestServerParams = {
|
|
45
49
|
plc: Partial<PlcConfig>
|
46
50
|
bsky: Partial<BskyConfig>
|
47
51
|
ozone: Partial<OzoneConfig>
|
52
|
+
introspect: Partial<IntrospectConfig>
|
48
53
|
}
|
49
54
|
|
50
55
|
export type DidAndKey = {
|