@clioplaylists/clio 0.1.6 → 0.1.8
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/.env +7 -0
- package/dist/api/health.js +3 -10
- package/dist/api/index.js +2 -39
- package/dist/api/util.js +6 -10
- package/dist/api/well-known.d.ts +3 -0
- package/dist/api/well-known.js +31 -0
- package/dist/auth-verifier.js +165 -273
- package/dist/client.js +8 -15
- package/dist/config.d.ts +2 -0
- package/dist/config.js +17 -23
- package/dist/context.d.ts +3 -0
- package/dist/context.js +6 -10
- package/dist/dataplane/client/hosts.d.ts +21 -0
- package/dist/dataplane/client/hosts.js +25 -0
- package/dist/dataplane/client/index.d.ts +11 -0
- package/dist/dataplane/client/index.js +97 -0
- package/dist/dataplane/client.js +25 -70
- package/dist/dataplane/index.js +2 -18
- package/dist/dataplane/server/background.js +8 -29
- package/dist/dataplane/server/db/database-schema.js +1 -2
- package/dist/dataplane/server/db/db.js +27 -103
- package/dist/dataplane/server/db/index.js +1 -17
- package/dist/dataplane/server/db/migrations/20230309T045948368Z-init.js +7 -11
- package/dist/dataplane/server/db/migrations/20230420T211446071Z-did-cache.js +2 -6
- package/dist/dataplane/server/db/migrations/index.js +2 -38
- package/dist/dataplane/server/db/migrations/provider.js +5 -17
- package/dist/dataplane/server/db/pagination.js +21 -37
- package/dist/dataplane/server/db/tables/actor-sync.js +1 -4
- package/dist/dataplane/server/db/tables/actor.js +1 -4
- package/dist/dataplane/server/db/tables/artist-list-item.js +1 -4
- package/dist/dataplane/server/db/tables/artist.js +1 -4
- package/dist/dataplane/server/db/tables/playlist-idea.js +1 -4
- package/dist/dataplane/server/db/tables/playlist-item.js +1 -4
- package/dist/dataplane/server/db/tables/playlist.js +1 -4
- package/dist/dataplane/server/db/tables/profile.js +1 -4
- package/dist/dataplane/server/db/tables/record.js +1 -4
- package/dist/dataplane/server/db/tables/song.js +1 -4
- package/dist/dataplane/server/db/types.js +1 -2
- package/dist/dataplane/server/db/util.js +18 -26
- package/dist/dataplane/server/index.js +17 -33
- package/dist/dataplane/server/indexing/index.js +39 -89
- package/dist/dataplane/server/indexing/plugins/playlist-idea.js +7 -44
- package/dist/dataplane/server/indexing/plugins/profile.js +5 -42
- package/dist/dataplane/server/indexing/processor.js +11 -29
- package/dist/dataplane/server/routes/identity.js +11 -13
- package/dist/dataplane/server/routes/index.js +10 -15
- package/dist/dataplane/server/routes/profile.js +9 -11
- package/dist/dataplane/server/routes/records.js +14 -51
- package/dist/dataplane/server/routes/sync.js +1 -3
- package/dist/dataplane/server/subscription.js +19 -47
- package/dist/error.js +5 -9
- package/dist/index.d.ts +2 -0
- package/dist/index.js +36 -90
- package/dist/lexicons/index.js +52 -227
- package/dist/lexicons/lexicons.js +5 -8
- package/dist/lexicons/types/com/atproto/admin/defs.js +27 -39
- package/dist/lexicons/types/com/atproto/admin/deleteAccount.js +1 -2
- package/dist/lexicons/types/com/atproto/admin/disableAccountInvites.js +1 -2
- package/dist/lexicons/types/com/atproto/admin/disableInviteCodes.js +1 -2
- package/dist/lexicons/types/com/atproto/admin/enableAccountInvites.js +1 -2
- package/dist/lexicons/types/com/atproto/admin/getAccountInfo.js +1 -2
- package/dist/lexicons/types/com/atproto/admin/getAccountInfos.js +1 -2
- package/dist/lexicons/types/com/atproto/admin/getInviteCodes.js +1 -2
- package/dist/lexicons/types/com/atproto/admin/getSubjectStatus.js +1 -2
- package/dist/lexicons/types/com/atproto/admin/searchAccounts.js +1 -2
- package/dist/lexicons/types/com/atproto/admin/sendEmail.js +1 -2
- package/dist/lexicons/types/com/atproto/admin/updateAccountEmail.js +1 -2
- package/dist/lexicons/types/com/atproto/admin/updateAccountHandle.js +1 -2
- package/dist/lexicons/types/com/atproto/admin/updateAccountPassword.js +1 -2
- package/dist/lexicons/types/com/atproto/admin/updateSubjectStatus.js +1 -2
- package/dist/lexicons/types/com/atproto/identity/defs.js +7 -11
- package/dist/lexicons/types/com/atproto/identity/getRecommendedDidCredentials.js +1 -2
- package/dist/lexicons/types/com/atproto/identity/refreshIdentity.js +1 -2
- package/dist/lexicons/types/com/atproto/identity/requestPlcOperationSignature.js +1 -2
- package/dist/lexicons/types/com/atproto/identity/resolveDid.js +1 -2
- package/dist/lexicons/types/com/atproto/identity/resolveHandle.js +1 -2
- package/dist/lexicons/types/com/atproto/identity/resolveIdentity.js +1 -2
- package/dist/lexicons/types/com/atproto/identity/signPlcOperation.js +1 -2
- package/dist/lexicons/types/com/atproto/identity/submitPlcOperation.js +1 -2
- package/dist/lexicons/types/com/atproto/identity/updateHandle.js +1 -2
- package/dist/lexicons/types/com/atproto/label/defs.js +27 -39
- package/dist/lexicons/types/com/atproto/label/queryLabels.js +1 -2
- package/dist/lexicons/types/com/atproto/label/subscribeLabels.js +12 -18
- package/dist/lexicons/types/com/atproto/lexicon/schema.js +7 -11
- package/dist/lexicons/types/com/atproto/moderation/createReport.js +1 -2
- package/dist/lexicons/types/com/atproto/moderation/defs.js +7 -10
- package/dist/lexicons/types/com/atproto/repo/applyWrites.js +32 -46
- package/dist/lexicons/types/com/atproto/repo/createRecord.js +1 -2
- package/dist/lexicons/types/com/atproto/repo/defs.js +7 -11
- package/dist/lexicons/types/com/atproto/repo/deleteRecord.js +1 -2
- package/dist/lexicons/types/com/atproto/repo/describeRepo.js +1 -2
- package/dist/lexicons/types/com/atproto/repo/getRecord.js +1 -2
- package/dist/lexicons/types/com/atproto/repo/importRepo.js +1 -2
- package/dist/lexicons/types/com/atproto/repo/listMissingBlobs.js +7 -11
- package/dist/lexicons/types/com/atproto/repo/listRecords.js +7 -11
- package/dist/lexicons/types/com/atproto/repo/putRecord.js +1 -2
- package/dist/lexicons/types/com/atproto/repo/strongRef.js +7 -11
- package/dist/lexicons/types/com/atproto/repo/uploadBlob.js +1 -2
- package/dist/lexicons/types/com/atproto/server/activateAccount.js +1 -2
- package/dist/lexicons/types/com/atproto/server/checkAccountStatus.js +1 -2
- package/dist/lexicons/types/com/atproto/server/confirmEmail.js +1 -2
- package/dist/lexicons/types/com/atproto/server/createAccount.js +1 -2
- package/dist/lexicons/types/com/atproto/server/createAppPassword.js +7 -11
- package/dist/lexicons/types/com/atproto/server/createInviteCode.js +1 -2
- package/dist/lexicons/types/com/atproto/server/createInviteCodes.js +7 -11
- package/dist/lexicons/types/com/atproto/server/createSession.js +1 -2
- package/dist/lexicons/types/com/atproto/server/deactivateAccount.js +1 -2
- package/dist/lexicons/types/com/atproto/server/defs.js +12 -18
- package/dist/lexicons/types/com/atproto/server/deleteAccount.js +1 -2
- package/dist/lexicons/types/com/atproto/server/deleteSession.js +1 -2
- package/dist/lexicons/types/com/atproto/server/describeServer.js +12 -18
- package/dist/lexicons/types/com/atproto/server/getAccountInviteCodes.js +1 -2
- package/dist/lexicons/types/com/atproto/server/getServiceAuth.js +1 -2
- package/dist/lexicons/types/com/atproto/server/getSession.js +1 -2
- package/dist/lexicons/types/com/atproto/server/listAppPasswords.js +7 -11
- package/dist/lexicons/types/com/atproto/server/refreshSession.js +1 -2
- package/dist/lexicons/types/com/atproto/server/requestAccountDelete.js +1 -2
- package/dist/lexicons/types/com/atproto/server/requestEmailConfirmation.js +1 -2
- package/dist/lexicons/types/com/atproto/server/requestEmailUpdate.js +1 -2
- package/dist/lexicons/types/com/atproto/server/requestPasswordReset.js +1 -2
- package/dist/lexicons/types/com/atproto/server/reserveSigningKey.js +1 -2
- package/dist/lexicons/types/com/atproto/server/resetPassword.js +1 -2
- package/dist/lexicons/types/com/atproto/server/revokeAppPassword.js +1 -2
- package/dist/lexicons/types/com/atproto/server/updateEmail.js +1 -2
- package/dist/lexicons/types/com/atproto/sync/getBlob.js +1 -2
- package/dist/lexicons/types/com/atproto/sync/getBlocks.js +1 -2
- package/dist/lexicons/types/com/atproto/sync/getCheckout.js +1 -2
- package/dist/lexicons/types/com/atproto/sync/getHead.js +1 -2
- package/dist/lexicons/types/com/atproto/sync/getLatestCommit.js +1 -2
- package/dist/lexicons/types/com/atproto/sync/getRecord.js +1 -2
- package/dist/lexicons/types/com/atproto/sync/getRepo.js +1 -2
- package/dist/lexicons/types/com/atproto/sync/getRepoStatus.js +1 -2
- package/dist/lexicons/types/com/atproto/sync/listBlobs.js +1 -2
- package/dist/lexicons/types/com/atproto/sync/listRepos.js +7 -11
- package/dist/lexicons/types/com/atproto/sync/listReposByCollection.js +7 -11
- package/dist/lexicons/types/com/atproto/sync/notifyOfUpdate.js +1 -2
- package/dist/lexicons/types/com/atproto/sync/requestCrawl.js +1 -2
- package/dist/lexicons/types/com/atproto/sync/subscribeRepos.js +32 -46
- package/dist/lexicons/types/com/atproto/temp/addReservedHandle.js +1 -2
- package/dist/lexicons/types/com/atproto/temp/checkSignupQueue.js +1 -2
- package/dist/lexicons/types/com/atproto/temp/fetchLabels.js +1 -2
- package/dist/lexicons/types/com/atproto/temp/requestPhoneVerification.js +1 -2
- package/dist/lexicons/types/com/clioplaylists/alpha/actor/profile.js +7 -11
- package/dist/lexicons/types/com/clioplaylists/alpha/feed/defs.js +12 -18
- package/dist/lexicons/types/com/clioplaylists/alpha/feed/getSongs.js +1 -2
- package/dist/lexicons/types/com/clioplaylists/alpha/feed/playlistIdea.js +17 -25
- package/dist/lexicons/util.js +2 -6
- package/dist/logger.js +10 -16
- package/dist/rpc/clio_connect.js +30 -33
- package/dist/rpc/clio_pb.js +402 -956
- package/dist/start.js +9 -1
- package/dist/util/retry.js +7 -10
- package/dist/util/uris.js +3 -6
- package/dist/util.js +17 -60
- package/package.json +4 -4
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const util_1 = require("../../../../util");
|
|
7
|
-
function isRepo(v) {
|
|
8
|
-
return ((0, util_1.isObj)(v) &&
|
|
9
|
-
(0, util_1.hasProp)(v, '$type') &&
|
|
1
|
+
import { lexicons } from '../../../../lexicons';
|
|
2
|
+
import { hasProp, isObj } from '../../../../util';
|
|
3
|
+
export function isRepo(v) {
|
|
4
|
+
return (isObj(v) &&
|
|
5
|
+
hasProp(v, '$type') &&
|
|
10
6
|
v.$type === 'com.atproto.sync.listRepos#repo');
|
|
11
7
|
}
|
|
12
|
-
function validateRepo(v) {
|
|
13
|
-
return
|
|
8
|
+
export function validateRepo(v) {
|
|
9
|
+
return lexicons.validate('com.atproto.sync.listRepos#repo', v);
|
|
14
10
|
}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const util_1 = require("../../../../util");
|
|
7
|
-
function isRepo(v) {
|
|
8
|
-
return ((0, util_1.isObj)(v) &&
|
|
9
|
-
(0, util_1.hasProp)(v, '$type') &&
|
|
1
|
+
import { lexicons } from '../../../../lexicons';
|
|
2
|
+
import { hasProp, isObj } from '../../../../util';
|
|
3
|
+
export function isRepo(v) {
|
|
4
|
+
return (isObj(v) &&
|
|
5
|
+
hasProp(v, '$type') &&
|
|
10
6
|
v.$type === 'com.atproto.sync.listReposByCollection#repo');
|
|
11
7
|
}
|
|
12
|
-
function validateRepo(v) {
|
|
13
|
-
return
|
|
8
|
+
export function validateRepo(v) {
|
|
9
|
+
return lexicons.validate('com.atproto.sync.listReposByCollection#repo', v);
|
|
14
10
|
}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,64 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports.validateSync = validateSync;
|
|
7
|
-
exports.isIdentity = isIdentity;
|
|
8
|
-
exports.validateIdentity = validateIdentity;
|
|
9
|
-
exports.isAccount = isAccount;
|
|
10
|
-
exports.validateAccount = validateAccount;
|
|
11
|
-
exports.isInfo = isInfo;
|
|
12
|
-
exports.validateInfo = validateInfo;
|
|
13
|
-
exports.isRepoOp = isRepoOp;
|
|
14
|
-
exports.validateRepoOp = validateRepoOp;
|
|
15
|
-
const lexicons_1 = require("../../../../lexicons");
|
|
16
|
-
const util_1 = require("../../../../util");
|
|
17
|
-
function isCommit(v) {
|
|
18
|
-
return ((0, util_1.isObj)(v) &&
|
|
19
|
-
(0, util_1.hasProp)(v, '$type') &&
|
|
1
|
+
import { lexicons } from '../../../../lexicons';
|
|
2
|
+
import { hasProp, isObj } from '../../../../util';
|
|
3
|
+
export function isCommit(v) {
|
|
4
|
+
return (isObj(v) &&
|
|
5
|
+
hasProp(v, '$type') &&
|
|
20
6
|
v.$type === 'com.atproto.sync.subscribeRepos#commit');
|
|
21
7
|
}
|
|
22
|
-
function validateCommit(v) {
|
|
23
|
-
return
|
|
8
|
+
export function validateCommit(v) {
|
|
9
|
+
return lexicons.validate('com.atproto.sync.subscribeRepos#commit', v);
|
|
24
10
|
}
|
|
25
|
-
function isSync(v) {
|
|
26
|
-
return (
|
|
27
|
-
|
|
11
|
+
export function isSync(v) {
|
|
12
|
+
return (isObj(v) &&
|
|
13
|
+
hasProp(v, '$type') &&
|
|
28
14
|
v.$type === 'com.atproto.sync.subscribeRepos#sync');
|
|
29
15
|
}
|
|
30
|
-
function validateSync(v) {
|
|
31
|
-
return
|
|
16
|
+
export function validateSync(v) {
|
|
17
|
+
return lexicons.validate('com.atproto.sync.subscribeRepos#sync', v);
|
|
32
18
|
}
|
|
33
|
-
function isIdentity(v) {
|
|
34
|
-
return (
|
|
35
|
-
|
|
19
|
+
export function isIdentity(v) {
|
|
20
|
+
return (isObj(v) &&
|
|
21
|
+
hasProp(v, '$type') &&
|
|
36
22
|
v.$type === 'com.atproto.sync.subscribeRepos#identity');
|
|
37
23
|
}
|
|
38
|
-
function validateIdentity(v) {
|
|
39
|
-
return
|
|
24
|
+
export function validateIdentity(v) {
|
|
25
|
+
return lexicons.validate('com.atproto.sync.subscribeRepos#identity', v);
|
|
40
26
|
}
|
|
41
|
-
function isAccount(v) {
|
|
42
|
-
return (
|
|
43
|
-
|
|
27
|
+
export function isAccount(v) {
|
|
28
|
+
return (isObj(v) &&
|
|
29
|
+
hasProp(v, '$type') &&
|
|
44
30
|
v.$type === 'com.atproto.sync.subscribeRepos#account');
|
|
45
31
|
}
|
|
46
|
-
function validateAccount(v) {
|
|
47
|
-
return
|
|
32
|
+
export function validateAccount(v) {
|
|
33
|
+
return lexicons.validate('com.atproto.sync.subscribeRepos#account', v);
|
|
48
34
|
}
|
|
49
|
-
function isInfo(v) {
|
|
50
|
-
return (
|
|
51
|
-
|
|
35
|
+
export function isInfo(v) {
|
|
36
|
+
return (isObj(v) &&
|
|
37
|
+
hasProp(v, '$type') &&
|
|
52
38
|
v.$type === 'com.atproto.sync.subscribeRepos#info');
|
|
53
39
|
}
|
|
54
|
-
function validateInfo(v) {
|
|
55
|
-
return
|
|
40
|
+
export function validateInfo(v) {
|
|
41
|
+
return lexicons.validate('com.atproto.sync.subscribeRepos#info', v);
|
|
56
42
|
}
|
|
57
|
-
function isRepoOp(v) {
|
|
58
|
-
return (
|
|
59
|
-
|
|
43
|
+
export function isRepoOp(v) {
|
|
44
|
+
return (isObj(v) &&
|
|
45
|
+
hasProp(v, '$type') &&
|
|
60
46
|
v.$type === 'com.atproto.sync.subscribeRepos#repoOp');
|
|
61
47
|
}
|
|
62
|
-
function validateRepoOp(v) {
|
|
63
|
-
return
|
|
48
|
+
export function validateRepoOp(v) {
|
|
49
|
+
return lexicons.validate('com.atproto.sync.subscribeRepos#repoOp', v);
|
|
64
50
|
}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const util_1 = require("../../../../../util");
|
|
7
|
-
function isRecord(v) {
|
|
8
|
-
return ((0, util_1.isObj)(v) &&
|
|
9
|
-
(0, util_1.hasProp)(v, '$type') &&
|
|
1
|
+
import { lexicons } from '../../../../../lexicons';
|
|
2
|
+
import { hasProp, isObj } from '../../../../../util';
|
|
3
|
+
export function isRecord(v) {
|
|
4
|
+
return (isObj(v) &&
|
|
5
|
+
hasProp(v, '$type') &&
|
|
10
6
|
(v.$type === 'com.clioplaylists.alpha.actor.profile#main' ||
|
|
11
7
|
v.$type === 'com.clioplaylists.alpha.actor.profile'));
|
|
12
8
|
}
|
|
13
|
-
function validateRecord(v) {
|
|
14
|
-
return
|
|
9
|
+
export function validateRecord(v) {
|
|
10
|
+
return lexicons.validate('com.clioplaylists.alpha.actor.profile#main', v);
|
|
15
11
|
}
|
|
@@ -1,24 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports.validateSongView = validateSongView;
|
|
7
|
-
const lexicons_1 = require("../../../../../lexicons");
|
|
8
|
-
const util_1 = require("../../../../../util");
|
|
9
|
-
function isSong(v) {
|
|
10
|
-
return ((0, util_1.isObj)(v) &&
|
|
11
|
-
(0, util_1.hasProp)(v, '$type') &&
|
|
1
|
+
import { lexicons } from '../../../../../lexicons';
|
|
2
|
+
import { hasProp, isObj } from '../../../../../util';
|
|
3
|
+
export function isSong(v) {
|
|
4
|
+
return (isObj(v) &&
|
|
5
|
+
hasProp(v, '$type') &&
|
|
12
6
|
v.$type === 'com.clioplaylists.alpha.feed.defs#song');
|
|
13
7
|
}
|
|
14
|
-
function validateSong(v) {
|
|
15
|
-
return
|
|
8
|
+
export function validateSong(v) {
|
|
9
|
+
return lexicons.validate('com.clioplaylists.alpha.feed.defs#song', v);
|
|
16
10
|
}
|
|
17
|
-
function isSongView(v) {
|
|
18
|
-
return (
|
|
19
|
-
|
|
11
|
+
export function isSongView(v) {
|
|
12
|
+
return (isObj(v) &&
|
|
13
|
+
hasProp(v, '$type') &&
|
|
20
14
|
v.$type === 'com.clioplaylists.alpha.feed.defs#songView');
|
|
21
15
|
}
|
|
22
|
-
function validateSongView(v) {
|
|
23
|
-
return
|
|
16
|
+
export function validateSongView(v) {
|
|
17
|
+
return lexicons.validate('com.clioplaylists.alpha.feed.defs#songView', v);
|
|
24
18
|
}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,35 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports.validateMasterPlaylist = validateMasterPlaylist;
|
|
7
|
-
exports.isRecommendedPlaylist = isRecommendedPlaylist;
|
|
8
|
-
exports.validateRecommendedPlaylist = validateRecommendedPlaylist;
|
|
9
|
-
const lexicons_1 = require("../../../../../lexicons");
|
|
10
|
-
const util_1 = require("../../../../../util");
|
|
11
|
-
function isRecord(v) {
|
|
12
|
-
return ((0, util_1.isObj)(v) &&
|
|
13
|
-
(0, util_1.hasProp)(v, '$type') &&
|
|
1
|
+
import { lexicons } from '../../../../../lexicons';
|
|
2
|
+
import { hasProp, isObj } from '../../../../../util';
|
|
3
|
+
export function isRecord(v) {
|
|
4
|
+
return (isObj(v) &&
|
|
5
|
+
hasProp(v, '$type') &&
|
|
14
6
|
(v.$type === 'com.clioplaylists.alpha.feed.playlistIdea#main' ||
|
|
15
7
|
v.$type === 'com.clioplaylists.alpha.feed.playlistIdea'));
|
|
16
8
|
}
|
|
17
|
-
function validateRecord(v) {
|
|
18
|
-
return
|
|
9
|
+
export function validateRecord(v) {
|
|
10
|
+
return lexicons.validate('com.clioplaylists.alpha.feed.playlistIdea#main', v);
|
|
19
11
|
}
|
|
20
|
-
function isMasterPlaylist(v) {
|
|
21
|
-
return (
|
|
22
|
-
|
|
12
|
+
export function isMasterPlaylist(v) {
|
|
13
|
+
return (isObj(v) &&
|
|
14
|
+
hasProp(v, '$type') &&
|
|
23
15
|
v.$type === 'com.clioplaylists.alpha.feed.playlistIdea#masterPlaylist');
|
|
24
16
|
}
|
|
25
|
-
function validateMasterPlaylist(v) {
|
|
26
|
-
return
|
|
17
|
+
export function validateMasterPlaylist(v) {
|
|
18
|
+
return lexicons.validate('com.clioplaylists.alpha.feed.playlistIdea#masterPlaylist', v);
|
|
27
19
|
}
|
|
28
|
-
function isRecommendedPlaylist(v) {
|
|
29
|
-
return (
|
|
30
|
-
|
|
20
|
+
export function isRecommendedPlaylist(v) {
|
|
21
|
+
return (isObj(v) &&
|
|
22
|
+
hasProp(v, '$type') &&
|
|
31
23
|
v.$type === 'com.clioplaylists.alpha.feed.playlistIdea#recommendedPlaylist');
|
|
32
24
|
}
|
|
33
|
-
function validateRecommendedPlaylist(v) {
|
|
34
|
-
return
|
|
25
|
+
export function validateRecommendedPlaylist(v) {
|
|
26
|
+
return lexicons.validate('com.clioplaylists.alpha.feed.playlistIdea#recommendedPlaylist', v);
|
|
35
27
|
}
|
package/dist/lexicons/util.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isObj = isObj;
|
|
4
|
-
exports.hasProp = hasProp;
|
|
5
1
|
/**
|
|
6
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
7
3
|
*/
|
|
8
|
-
function isObj(v) {
|
|
4
|
+
export function isObj(v) {
|
|
9
5
|
return typeof v === 'object' && v !== null;
|
|
10
6
|
}
|
|
11
|
-
function hasProp(data, prop) {
|
|
7
|
+
export function hasProp(data, prop) {
|
|
12
8
|
return prop in data;
|
|
13
9
|
}
|
package/dist/logger.js
CHANGED
|
@@ -1,25 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
const pino_http_1 = __importDefault(require("pino-http"));
|
|
10
|
-
exports.dbLogger = (0, common_1.subsystemLogger)('clio:db');
|
|
11
|
-
exports.subLogger = (0, common_1.subsystemLogger)('clio:sub');
|
|
12
|
-
exports.httpLogger = (0, common_1.subsystemLogger)('clio');
|
|
13
|
-
exports.loggerMiddleware = (0, pino_http_1.default)({
|
|
14
|
-
logger: exports.httpLogger,
|
|
1
|
+
import { obfuscateHeaders, subsystemLogger } from '@atproto/common';
|
|
2
|
+
import { stdSerializers } from 'pino';
|
|
3
|
+
import pinoHttp from 'pino-http';
|
|
4
|
+
export const dbLogger = subsystemLogger('clio:db');
|
|
5
|
+
export const subLogger = subsystemLogger('clio:sub');
|
|
6
|
+
export const httpLogger = subsystemLogger('clio');
|
|
7
|
+
export const loggerMiddleware = pinoHttp({
|
|
8
|
+
logger: httpLogger,
|
|
15
9
|
serializers: {
|
|
16
10
|
err: (err) => ({
|
|
17
11
|
code: err?.['code'],
|
|
18
12
|
message: err?.['message'],
|
|
19
13
|
}),
|
|
20
14
|
req: (req) => {
|
|
21
|
-
const serialized =
|
|
22
|
-
const headers =
|
|
15
|
+
const serialized = stdSerializers.req(req);
|
|
16
|
+
const headers = obfuscateHeaders(serialized.headers);
|
|
23
17
|
return { ...serialized, headers };
|
|
24
18
|
},
|
|
25
19
|
},
|
package/dist/rpc/clio_connect.js
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// @generated by protoc-gen-connect-es v1.6.1 with parameter "target=ts,import_extension="
|
|
3
2
|
// @generated from file clio.proto (package clio, syntax proto3)
|
|
4
3
|
/* eslint-disable */
|
|
5
4
|
// @ts-nocheck
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const protobuf_1 = require("@bufbuild/protobuf");
|
|
9
|
-
const clio_pb_1 = require("./clio_pb");
|
|
5
|
+
import { MethodKind } from '@bufbuild/protobuf';
|
|
6
|
+
import { GetActorsRequest, GetActorsResponse, GetDidsByHandlesRequest, GetDidsByHandlesResponse, GetIdentityByDidRequest, GetIdentityByDidResponse, GetIdentityByHandleRequest, GetIdentityByHandleResponse, GetLatestRevRequest, GetLatestRevResponse, GetProfileRecordsRequest, GetProfileRecordsResponse, GetSongRecordsRequest, GetSongRecordsResponse, HealthCheckRequest, HealthCheckResponse, UpdateActorUpstreamStatusRequest, UpdateActorUpstreamStatusResponse, } from './clio_pb';
|
|
10
7
|
/**
|
|
11
8
|
* @generated from service clio.ClioService
|
|
12
9
|
*/
|
|
13
|
-
|
|
10
|
+
export const ClioService = {
|
|
14
11
|
typeName: 'clio.ClioService',
|
|
15
12
|
methods: {
|
|
16
13
|
/**
|
|
@@ -20,18 +17,18 @@ exports.ClioService = {
|
|
|
20
17
|
*/
|
|
21
18
|
getSongRecords: {
|
|
22
19
|
name: 'GetSongRecords',
|
|
23
|
-
I:
|
|
24
|
-
O:
|
|
25
|
-
kind:
|
|
20
|
+
I: GetSongRecordsRequest,
|
|
21
|
+
O: GetSongRecordsResponse,
|
|
22
|
+
kind: MethodKind.Unary,
|
|
26
23
|
},
|
|
27
24
|
/**
|
|
28
25
|
* @generated from rpc clio.ClioService.GetProfileRecords
|
|
29
26
|
*/
|
|
30
27
|
getProfileRecords: {
|
|
31
28
|
name: 'GetProfileRecords',
|
|
32
|
-
I:
|
|
33
|
-
O:
|
|
34
|
-
kind:
|
|
29
|
+
I: GetProfileRecordsRequest,
|
|
30
|
+
O: GetProfileRecordsResponse,
|
|
31
|
+
kind: MethodKind.Unary,
|
|
35
32
|
},
|
|
36
33
|
/**
|
|
37
34
|
* Profile
|
|
@@ -40,18 +37,18 @@ exports.ClioService = {
|
|
|
40
37
|
*/
|
|
41
38
|
getActors: {
|
|
42
39
|
name: 'GetActors',
|
|
43
|
-
I:
|
|
44
|
-
O:
|
|
45
|
-
kind:
|
|
40
|
+
I: GetActorsRequest,
|
|
41
|
+
O: GetActorsResponse,
|
|
42
|
+
kind: MethodKind.Unary,
|
|
46
43
|
},
|
|
47
44
|
/**
|
|
48
45
|
* @generated from rpc clio.ClioService.GetDidsByHandles
|
|
49
46
|
*/
|
|
50
47
|
getDidsByHandles: {
|
|
51
48
|
name: 'GetDidsByHandles',
|
|
52
|
-
I:
|
|
53
|
-
O:
|
|
54
|
-
kind:
|
|
49
|
+
I: GetDidsByHandlesRequest,
|
|
50
|
+
O: GetDidsByHandlesResponse,
|
|
51
|
+
kind: MethodKind.Unary,
|
|
55
52
|
},
|
|
56
53
|
/**
|
|
57
54
|
* Sync
|
|
@@ -60,9 +57,9 @@ exports.ClioService = {
|
|
|
60
57
|
*/
|
|
61
58
|
getLatestRev: {
|
|
62
59
|
name: 'GetLatestRev',
|
|
63
|
-
I:
|
|
64
|
-
O:
|
|
65
|
-
kind:
|
|
60
|
+
I: GetLatestRevRequest,
|
|
61
|
+
O: GetLatestRevResponse,
|
|
62
|
+
kind: MethodKind.Unary,
|
|
66
63
|
},
|
|
67
64
|
/**
|
|
68
65
|
* Identity
|
|
@@ -71,18 +68,18 @@ exports.ClioService = {
|
|
|
71
68
|
*/
|
|
72
69
|
getIdentityByDid: {
|
|
73
70
|
name: 'GetIdentityByDid',
|
|
74
|
-
I:
|
|
75
|
-
O:
|
|
76
|
-
kind:
|
|
71
|
+
I: GetIdentityByDidRequest,
|
|
72
|
+
O: GetIdentityByDidResponse,
|
|
73
|
+
kind: MethodKind.Unary,
|
|
77
74
|
},
|
|
78
75
|
/**
|
|
79
76
|
* @generated from rpc clio.ClioService.GetIdentityByHandle
|
|
80
77
|
*/
|
|
81
78
|
getIdentityByHandle: {
|
|
82
79
|
name: 'GetIdentityByHandle',
|
|
83
|
-
I:
|
|
84
|
-
O:
|
|
85
|
-
kind:
|
|
80
|
+
I: GetIdentityByHandleRequest,
|
|
81
|
+
O: GetIdentityByHandleResponse,
|
|
82
|
+
kind: MethodKind.Unary,
|
|
86
83
|
},
|
|
87
84
|
/**
|
|
88
85
|
* Moderation
|
|
@@ -91,9 +88,9 @@ exports.ClioService = {
|
|
|
91
88
|
*/
|
|
92
89
|
updateActorUpstreamStatus: {
|
|
93
90
|
name: 'UpdateActorUpstreamStatus',
|
|
94
|
-
I:
|
|
95
|
-
O:
|
|
96
|
-
kind:
|
|
91
|
+
I: UpdateActorUpstreamStatusRequest,
|
|
92
|
+
O: UpdateActorUpstreamStatusResponse,
|
|
93
|
+
kind: MethodKind.Unary,
|
|
97
94
|
},
|
|
98
95
|
/**
|
|
99
96
|
* Health Check
|
|
@@ -102,9 +99,9 @@ exports.ClioService = {
|
|
|
102
99
|
*/
|
|
103
100
|
healthCheck: {
|
|
104
101
|
name: 'HealthCheck',
|
|
105
|
-
I:
|
|
106
|
-
O:
|
|
107
|
-
kind:
|
|
102
|
+
I: HealthCheckRequest,
|
|
103
|
+
O: HealthCheckResponse,
|
|
104
|
+
kind: MethodKind.Unary,
|
|
108
105
|
},
|
|
109
106
|
},
|
|
110
107
|
};
|