@atproto/dev-env 0.5.26 → 0.5.27
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/CHANGELOG.md +21 -0
- package/dist/bsky.d.ts +1 -1
- package/dist/bsky.d.ts.map +1 -1
- package/dist/bsky.js.map +1 -1
- package/dist/bsync.d.ts +1 -1
- package/dist/bsync.d.ts.map +1 -1
- package/dist/bsync.js.map +1 -1
- package/dist/feed-gen.d.ts +2 -2
- package/dist/feed-gen.d.ts.map +1 -1
- package/dist/feed-gen.js.map +1 -1
- package/dist/introspect.d.ts +6 -6
- package/dist/introspect.d.ts.map +1 -1
- package/dist/introspect.js.map +1 -1
- package/dist/mock/index.d.ts +1 -1
- package/dist/mock/index.d.ts.map +1 -1
- package/dist/mock/index.js.map +1 -1
- package/dist/moderator-client.d.ts +3 -3
- package/dist/moderator-client.d.ts.map +1 -1
- package/dist/moderator-client.js +2 -0
- package/dist/moderator-client.js.map +1 -1
- package/dist/network-no-appview.d.ts +2 -2
- package/dist/network-no-appview.d.ts.map +1 -1
- package/dist/network-no-appview.js.map +1 -1
- package/dist/network.d.ts +1 -1
- package/dist/network.d.ts.map +1 -1
- package/dist/network.js.map +1 -1
- package/dist/ozone.d.ts +2 -2
- package/dist/ozone.d.ts.map +1 -1
- package/dist/ozone.js.map +1 -1
- package/dist/pds.d.ts +1 -1
- package/dist/pds.d.ts.map +1 -1
- package/dist/pds.js.map +1 -1
- package/dist/plc.d.ts +1 -1
- package/dist/plc.d.ts.map +1 -1
- package/dist/plc.js.map +1 -1
- package/dist/seed/author-feed.d.ts +1 -1
- package/dist/seed/author-feed.d.ts.map +1 -1
- package/dist/seed/author-feed.js.map +1 -1
- package/dist/seed/basic.d.ts +2 -2
- package/dist/seed/basic.d.ts.map +1 -1
- package/dist/seed/basic.js.map +1 -1
- package/dist/seed/client.d.ts +5 -5
- package/dist/seed/client.d.ts.map +1 -1
- package/dist/seed/client.js +1 -1
- package/dist/seed/client.js.map +1 -1
- package/dist/seed/follows.d.ts +1 -1
- package/dist/seed/follows.d.ts.map +1 -1
- package/dist/seed/follows.js.map +1 -1
- package/dist/seed/likes.d.ts +1 -1
- package/dist/seed/likes.d.ts.map +1 -1
- package/dist/seed/likes.js.map +1 -1
- package/dist/seed/quotes.d.ts +1 -1
- package/dist/seed/quotes.d.ts.map +1 -1
- package/dist/seed/quotes.js.map +1 -1
- package/dist/seed/reposts.d.ts +1 -1
- package/dist/seed/reposts.d.ts.map +1 -1
- package/dist/seed/reposts.js.map +1 -1
- package/dist/seed/thread-v2.d.ts +2 -2
- package/dist/seed/thread-v2.d.ts.map +1 -1
- package/dist/seed/thread-v2.js.map +1 -1
- package/dist/seed/users-bulk.d.ts +1 -1
- package/dist/seed/users-bulk.d.ts.map +1 -1
- package/dist/seed/users-bulk.js.map +1 -1
- package/dist/seed/users.d.ts +1 -1
- package/dist/seed/users.d.ts.map +1 -1
- package/dist/seed/users.js.map +1 -1
- package/dist/seed/verifications.d.ts +2 -2
- package/dist/seed/verifications.d.ts.map +1 -1
- package/dist/seed/verifications.js.map +1 -1
- package/dist/service-profile-lexicon.d.ts +1 -1
- package/dist/service-profile-lexicon.d.ts.map +1 -1
- package/dist/service-profile-lexicon.js.map +1 -1
- package/dist/service-profile-ozone.d.ts +3 -3
- package/dist/service-profile-ozone.d.ts.map +1 -1
- package/dist/service-profile-ozone.js.map +1 -1
- package/dist/service-profile.d.ts +3 -3
- package/dist/service-profile.d.ts.map +1 -1
- package/dist/service-profile.js.map +1 -1
- package/dist/types.d.ts +5 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/util.d.ts +4 -4
- package/dist/util.d.ts.map +1 -1
- package/dist/util.js.map +1 -1
- package/package.json +14 -14
- package/src/bsky.ts +1 -1
- package/src/bsync.ts +1 -1
- package/src/feed-gen.ts +3 -3
- package/src/introspect.ts +6 -6
- package/src/mock/index.ts +4 -4
- package/src/moderator-client.ts +13 -13
- package/src/network-no-appview.ts +2 -2
- package/src/network.ts +1 -1
- package/src/ozone.ts +2 -2
- package/src/pds.ts +1 -1
- package/src/plc.ts +1 -1
- package/src/seed/author-feed.ts +1 -1
- package/src/seed/basic.ts +3 -3
- package/src/seed/client.ts +10 -5
- package/src/seed/follows.ts +1 -1
- package/src/seed/likes.ts +1 -1
- package/src/seed/quotes.ts +1 -1
- package/src/seed/reposts.ts +1 -1
- package/src/seed/thread-v2.ts +4 -4
- package/src/seed/users-bulk.ts +1 -1
- package/src/seed/users.ts +1 -1
- package/src/seed/verifications.ts +2 -2
- package/src/service-profile-lexicon.ts +2 -2
- package/src/service-profile-ozone.ts +4 -4
- package/src/service-profile.ts +3 -3
- package/src/types.ts +5 -5
- package/src/util.ts +4 -4
package/src/bsky.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { Secp256k1Keypair } from '@atproto/crypto'
|
|
|
7
7
|
import { Client } from '@atproto/lex'
|
|
8
8
|
import type { DidString } from '@atproto/syntax'
|
|
9
9
|
import { ADMIN_PASSWORD, EXAMPLE_LABELER } from './const.js'
|
|
10
|
-
import { BskyConfig } from './types.js'
|
|
10
|
+
import type { BskyConfig } from './types.js'
|
|
11
11
|
export * from '@atproto/bsky'
|
|
12
12
|
|
|
13
13
|
export class TestBsky {
|
package/src/bsync.ts
CHANGED
package/src/feed-gen.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import events from 'node:events'
|
|
2
|
-
import http from 'node:http'
|
|
2
|
+
import type http from 'node:http'
|
|
3
3
|
import * as plc from '@did-plc/lib'
|
|
4
4
|
import getPort from 'get-port'
|
|
5
5
|
// eslint-disable-next-line import/default, import/no-named-as-default-member
|
|
6
6
|
import httpTerminator from 'http-terminator'
|
|
7
7
|
import { Secp256k1Keypair } from '@atproto/crypto'
|
|
8
|
-
import { SkeletonHandler, app } from '@atproto/pds'
|
|
9
|
-
import { AtUriString, DidString } from '@atproto/syntax'
|
|
8
|
+
import { type SkeletonHandler, app } from '@atproto/pds'
|
|
9
|
+
import type { AtUriString, DidString } from '@atproto/syntax'
|
|
10
10
|
import { InvalidRequestError, createServer } from '@atproto/xrpc-server'
|
|
11
11
|
|
|
12
12
|
export class TestFeedGen {
|
package/src/introspect.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import events from 'node:events'
|
|
2
|
-
import http from 'node:http'
|
|
2
|
+
import type http from 'node:http'
|
|
3
3
|
import express from 'express'
|
|
4
4
|
// eslint-disable-next-line import/default
|
|
5
5
|
import httpTerminator from 'http-terminator'
|
|
6
|
-
import { TestBsky } from './bsky.js'
|
|
7
|
-
import { TestBsync } from './bsync.js'
|
|
8
|
-
import { TestOzone } from './ozone.js'
|
|
9
|
-
import { TestPds } from './pds.js'
|
|
10
|
-
import { TestPlc } from './plc.js'
|
|
6
|
+
import type { TestBsky } from './bsky.js'
|
|
7
|
+
import type { TestBsync } from './bsync.js'
|
|
8
|
+
import type { TestOzone } from './ozone.js'
|
|
9
|
+
import type { TestPds } from './pds.js'
|
|
10
|
+
import type { TestPlc } from './plc.js'
|
|
11
11
|
|
|
12
12
|
export class IntrospectServer {
|
|
13
13
|
private terminator: httpTerminator.HttpTerminator
|
package/src/mock/index.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
-
AtpAgent,
|
|
2
|
+
type AtpAgent,
|
|
3
3
|
COM_ATPROTO_MODERATION,
|
|
4
4
|
ToolsOzoneQueueCreateQueue,
|
|
5
5
|
} from '@atproto/api'
|
|
6
|
-
import { Database } from '@atproto/bsky'
|
|
7
|
-
import { AtUri, AtUriString } from '@atproto/syntax'
|
|
8
|
-
import { EXAMPLE_LABELER, RecordRef, TestNetwork } from '../index.js'
|
|
6
|
+
import type { Database } from '@atproto/bsky'
|
|
7
|
+
import { AtUri, type AtUriString } from '@atproto/syntax'
|
|
8
|
+
import { EXAMPLE_LABELER, RecordRef, type TestNetwork } from '../index.js'
|
|
9
9
|
import { postTexts, replyTexts } from './data.js'
|
|
10
10
|
import blurHashB64 from './img/blur-hash-avatar-b64.js'
|
|
11
11
|
import labeledImgB64 from './img/labeled-img-b64.js'
|
package/src/moderator-client.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
|
-
$Typed,
|
|
3
|
-
AtpAgent,
|
|
4
|
-
ChatBskyConvoDefs,
|
|
5
|
-
ComAtprotoAdminDefs,
|
|
6
|
-
ComAtprotoRepoStrongRef,
|
|
7
|
-
ToolsOzoneModerationDefs,
|
|
8
|
-
ToolsOzoneModerationEmitEvent as EmitModerationEvent,
|
|
2
|
+
type $Typed,
|
|
3
|
+
type AtpAgent,
|
|
4
|
+
type ChatBskyConvoDefs,
|
|
5
|
+
type ComAtprotoAdminDefs,
|
|
6
|
+
type ComAtprotoRepoStrongRef,
|
|
7
|
+
type ToolsOzoneModerationDefs,
|
|
8
|
+
type ToolsOzoneModerationEmitEvent as EmitModerationEvent,
|
|
9
9
|
ToolsOzoneModerationGetReporterStats as _GetReporterStats, // includes types for getReporterStats()
|
|
10
|
-
ToolsOzoneModerationQueryEvents as QueryModerationEvents,
|
|
11
|
-
ToolsOzoneModerationQueryStatuses as QueryModerationStatuses,
|
|
12
|
-
ToolsOzoneReportQueryReports as QueryModerationReports,
|
|
13
|
-
ToolsOzoneSettingRemoveOptions,
|
|
14
|
-
ToolsOzoneSettingUpsertOption,
|
|
10
|
+
type ToolsOzoneModerationQueryEvents as QueryModerationEvents,
|
|
11
|
+
type ToolsOzoneModerationQueryStatuses as QueryModerationStatuses,
|
|
12
|
+
type ToolsOzoneReportQueryReports as QueryModerationReports,
|
|
13
|
+
type ToolsOzoneSettingRemoveOptions,
|
|
14
|
+
type ToolsOzoneSettingUpsertOption,
|
|
15
15
|
} from '@atproto/api'
|
|
16
|
-
import { TestOzone } from './ozone.js'
|
|
16
|
+
import type { TestOzone } from './ozone.js'
|
|
17
17
|
|
|
18
18
|
type TakeActionInput = EmitModerationEvent.InputSchema
|
|
19
19
|
type QueryStatusesParams = QueryModerationStatuses.QueryParams
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { SkeletonHandler } from '@atproto/pds'
|
|
1
|
+
import type { SkeletonHandler } from '@atproto/pds'
|
|
2
2
|
import { TestFeedGen } from './feed-gen.js'
|
|
3
3
|
import { TestPds } from './pds.js'
|
|
4
4
|
import { TestPlc } from './plc.js'
|
|
5
5
|
import { SeedClient } from './seed/client.js'
|
|
6
|
-
import { TestServerParams } from './types.js'
|
|
6
|
+
import type { TestServerParams } from './types.js'
|
|
7
7
|
import { mockNetworkUtilities } from './util.js'
|
|
8
8
|
|
|
9
9
|
export class TestNetworkNoAppView {
|
package/src/network.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { TestPds } from './pds.js'
|
|
|
13
13
|
import { TestPlc } from './plc.js'
|
|
14
14
|
import { LexiconAuthorityProfile } from './service-profile-lexicon.js'
|
|
15
15
|
import { OzoneServiceProfile } from './service-profile-ozone.js'
|
|
16
|
-
import { TestServerParams } from './types.js'
|
|
16
|
+
import type { TestServerParams } from './types.js'
|
|
17
17
|
import { mockNetworkUtilities } from './util.js'
|
|
18
18
|
|
|
19
19
|
const ADMIN_USERNAME = 'admin'
|
package/src/ozone.ts
CHANGED
|
@@ -2,12 +2,12 @@ import * as plc from '@did-plc/lib'
|
|
|
2
2
|
import getPort from 'get-port'
|
|
3
3
|
import * as ui8 from 'uint8arrays'
|
|
4
4
|
import { AtpAgent } from '@atproto/api'
|
|
5
|
-
import { Keypair, Secp256k1Keypair } from '@atproto/crypto'
|
|
5
|
+
import { type Keypair, Secp256k1Keypair } from '@atproto/crypto'
|
|
6
6
|
import * as ozone from '@atproto/ozone'
|
|
7
7
|
import { createServiceJwt } from '@atproto/xrpc-server'
|
|
8
8
|
import { ADMIN_PASSWORD, EXAMPLE_LABELER } from './const.js'
|
|
9
9
|
import { ModeratorClient } from './moderator-client.js'
|
|
10
|
-
import { DidAndKey, OzoneConfig } from './types.js'
|
|
10
|
+
import type { DidAndKey, OzoneConfig } from './types.js'
|
|
11
11
|
import { createDidAndKey } from './util.js'
|
|
12
12
|
|
|
13
13
|
export class TestOzone {
|
package/src/pds.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { Client } from '@atproto/lex'
|
|
|
9
9
|
import * as pds from '@atproto/pds'
|
|
10
10
|
import { createSecretKeyObject } from '@atproto/pds'
|
|
11
11
|
import { ADMIN_PASSWORD, EXAMPLE_LABELER, JWT_SECRET } from './const.js'
|
|
12
|
-
import { PdsConfig } from './types.js'
|
|
12
|
+
import type { PdsConfig } from './types.js'
|
|
13
13
|
|
|
14
14
|
export class TestPds {
|
|
15
15
|
constructor(
|
package/src/plc.ts
CHANGED
package/src/seed/author-feed.ts
CHANGED
package/src/seed/basic.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { TestBsky } from '../bsky.js'
|
|
1
|
+
import type { TestBsky } from '../bsky.js'
|
|
2
2
|
import { EXAMPLE_LABELER } from '../const.js'
|
|
3
|
-
import { TestNetworkNoAppView } from '../network-no-appview.js'
|
|
3
|
+
import type { TestNetworkNoAppView } from '../network-no-appview.js'
|
|
4
4
|
import { TestNetwork } from '../network.js'
|
|
5
|
-
import { SeedClient } from './client.js'
|
|
5
|
+
import type { SeedClient } from './client.js'
|
|
6
6
|
import usersSeed from './users.js'
|
|
7
7
|
|
|
8
8
|
export default async function basicSeed(
|
package/src/seed/client.ts
CHANGED
|
@@ -2,7 +2,7 @@ import fs from 'node:fs/promises'
|
|
|
2
2
|
import path from 'node:path'
|
|
3
3
|
import { fileURLToPath } from 'node:url'
|
|
4
4
|
import { CID } from 'multiformats/cid'
|
|
5
|
-
import {
|
|
5
|
+
import type {
|
|
6
6
|
$Typed,
|
|
7
7
|
AppBskyActorProfile,
|
|
8
8
|
AppBskyFeedLike,
|
|
@@ -19,10 +19,15 @@ import {
|
|
|
19
19
|
ComAtprotoModerationCreateReport,
|
|
20
20
|
ComAtprotoRepoStrongRef,
|
|
21
21
|
} from '@atproto/api'
|
|
22
|
-
import { CidString, Client } from '@atproto/lex'
|
|
23
|
-
import { BlobRef } from '@atproto/lexicon'
|
|
24
|
-
import {
|
|
25
|
-
|
|
22
|
+
import type { CidString, Client } from '@atproto/lex'
|
|
23
|
+
import type { BlobRef } from '@atproto/lexicon'
|
|
24
|
+
import {
|
|
25
|
+
AtUri,
|
|
26
|
+
type AtUriString,
|
|
27
|
+
type DidString,
|
|
28
|
+
type HandleString,
|
|
29
|
+
} from '@atproto/syntax'
|
|
30
|
+
import type { TestNetworkNoAppView } from '../network-no-appview.js'
|
|
26
31
|
|
|
27
32
|
// Makes it simple to create data via the XRPC client,
|
|
28
33
|
// and keeps track of all created data in memory for convenience.
|
package/src/seed/follows.ts
CHANGED
package/src/seed/likes.ts
CHANGED
package/src/seed/quotes.ts
CHANGED
package/src/seed/reposts.ts
CHANGED
package/src/seed/thread-v2.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { AppBskyFeedPost } from '@atproto/api'
|
|
1
|
+
import type { AppBskyFeedPost } from '@atproto/api'
|
|
2
2
|
import type { DatabaseSchema } from '@atproto/bsky'
|
|
3
3
|
import type { DidString, HandleString } from '@atproto/syntax'
|
|
4
|
-
import { TestNetworkNoAppView } from '../network-no-appview.js'
|
|
5
|
-
import { TestNetwork } from '../network.js'
|
|
6
|
-
import { RecordRef, SeedClient } from './client.js'
|
|
4
|
+
import type { TestNetworkNoAppView } from '../network-no-appview.js'
|
|
5
|
+
import type { TestNetwork } from '../network.js'
|
|
6
|
+
import type { RecordRef, SeedClient } from './client.js'
|
|
7
7
|
|
|
8
8
|
type User = {
|
|
9
9
|
id: string
|
package/src/seed/users-bulk.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { chunkArray } from '@atproto/common-web'
|
|
2
2
|
import type { HandleString } from '@atproto/syntax'
|
|
3
|
-
import { SeedClient } from './client.js'
|
|
3
|
+
import type { SeedClient } from './client.js'
|
|
4
4
|
|
|
5
5
|
export default async function usersBulkSeed(sc: SeedClient, max = Infinity) {
|
|
6
6
|
// @TODO when these are run in parallel, seem to get an intermittent
|
package/src/seed/users.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { INVALID_HANDLE } from '@atproto/syntax'
|
|
2
|
-
import { TestNetwork } from '../network.js'
|
|
3
|
-
import { SeedClient } from './client.js'
|
|
2
|
+
import type { TestNetwork } from '../network.js'
|
|
3
|
+
import type { SeedClient } from './client.js'
|
|
4
4
|
|
|
5
5
|
export default async (sc: SeedClient<TestNetwork>) => {
|
|
6
6
|
const labelerDid = sc.network.bsky.ctx.cfg.modServiceDid
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LexiconDoc } from '@atproto/lexicon'
|
|
2
|
-
import { TestPds } from './pds.js'
|
|
1
|
+
import type { LexiconDoc } from '@atproto/lexicon'
|
|
2
|
+
import type { TestPds } from './pds.js'
|
|
3
3
|
import { ServiceProfile } from './service-profile.js'
|
|
4
4
|
|
|
5
5
|
const LEXICONS: readonly LexiconDoc[] = [
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { AtpAgent } from '@atproto/api'
|
|
1
|
+
import type { AtpAgent } from '@atproto/api'
|
|
2
2
|
import { Secp256k1Keypair } from '@atproto/crypto'
|
|
3
|
-
import { TestPds } from './pds.js'
|
|
3
|
+
import type { TestPds } from './pds.js'
|
|
4
4
|
import {
|
|
5
|
-
ServiceMigrationOptions,
|
|
5
|
+
type ServiceMigrationOptions,
|
|
6
6
|
ServiceProfile,
|
|
7
|
-
ServiceUserDetails,
|
|
7
|
+
type ServiceUserDetails,
|
|
8
8
|
} from './service-profile.js'
|
|
9
9
|
|
|
10
10
|
export class OzoneServiceProfile extends ServiceProfile {
|
package/src/service-profile.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AtpAgent } from '@atproto/api'
|
|
2
|
-
import { DidString } from '@atproto/lex'
|
|
3
|
-
import { TestPds } from './pds.js'
|
|
1
|
+
import type { AtpAgent } from '@atproto/api'
|
|
2
|
+
import type { DidString } from '@atproto/lex'
|
|
3
|
+
import type { TestPds } from './pds.js'
|
|
4
4
|
|
|
5
5
|
export type ServiceUserDetails = {
|
|
6
6
|
email: string
|
package/src/types.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as bsky from '@atproto/bsky'
|
|
2
|
-
import * as bsync from '@atproto/bsync'
|
|
3
|
-
import { ExportableKeypair, Keypair } from '@atproto/crypto'
|
|
4
|
-
import * as ozone from '@atproto/ozone'
|
|
5
|
-
import * as pds from '@atproto/pds'
|
|
1
|
+
import type * as bsky from '@atproto/bsky'
|
|
2
|
+
import type * as bsync from '@atproto/bsync'
|
|
3
|
+
import type { ExportableKeypair, Keypair } from '@atproto/crypto'
|
|
4
|
+
import type * as ozone from '@atproto/ozone'
|
|
5
|
+
import type * as pds from '@atproto/pds'
|
|
6
6
|
|
|
7
7
|
export type IntrospectConfig = {
|
|
8
8
|
port?: number
|
package/src/util.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as plc from '@did-plc/lib'
|
|
2
2
|
import { request } from 'undici'
|
|
3
3
|
import { Secp256k1Keypair } from '@atproto/crypto'
|
|
4
|
-
import { IdResolver } from '@atproto/identity'
|
|
5
|
-
import { TestBsky } from './bsky.js'
|
|
6
|
-
import { TestPds } from './pds.js'
|
|
7
|
-
import { DidAndKey } from './types.js'
|
|
4
|
+
import type { IdResolver } from '@atproto/identity'
|
|
5
|
+
import type { TestBsky } from './bsky.js'
|
|
6
|
+
import type { TestPds } from './pds.js'
|
|
7
|
+
import type { DidAndKey } from './types.js'
|
|
8
8
|
|
|
9
9
|
export const mockNetworkUtilities = (pds: TestPds, bsky?: TestBsky) => {
|
|
10
10
|
mockResolvers(pds.ctx.idResolver, pds)
|