1- const initVariables = global . initVariables || {
1+ import fs from 'fs' ;
2+ import path from 'path' ;
3+
4+ const initVariables = JSON . parse ( fs . readFileSync ( path . join ( process . cwd ( ) , '.replapirc.json' ) ) ) || {
25 username : undefined ,
36 captcha : {
47 token : undefined ,
@@ -24,7 +27,7 @@ export default {
2427 subscriptionAttributes : 'id, userId, customerId, planId, timeUpdated, timeCreated, timeDeleted' ,
2528 userAttributes : 'id, username, firstName, lastName, bio, isVerified, displayName, fullName, url, isLoggedIn, isSubscribed, timeCreated, isBannedFromBoards, karma, isHacker, image' ,
2629 boardAttributes : 'id, name, description, slug, cta, titleCta, bodyCta, template, buttonCta, color, replRequired, isLocked, isAnswerable, isPrivate, timeCreated, timeUpdated, url, canPost' ,
27- replAttributes : 'id, language, isProject, isPrivate, isStarred, title, slug, description, folderId, isRenamed, url, timeCreated, timeUpdated, isOwner, tags { id }, pinnedToProfile, files, hostedUrl, terminalUrl' ,
30+ replAttributes : 'id, language, isProject, isPrivate, isStarred, title, slug, description, folderId, isRenamed, url, timeCreated, timeUpdated, isOwner, tags { id }, pinnedToProfile, files, hostedUrl, terminalUrl, reactions { id, count } ' ,
2831 commentAttributes : `id, body, voteCount, timeCreated, timeUpdated, url, isAuthor, canEdit, canVote, canComment, hasVoted, canReport, hasReported, isAnswer, canSelectAsAnswer, canUnselectAsAnswer, preview(length: ${ initVariables . markdown . length || 150 } , removeMarkdown: ${ initVariables . markdown . removeMarkdown || true } )` ,
2932 postAttributes : `id, title, body, showHosted, voteCount, commentCount, isPinned, isLocked, timeCreated, timeUpdated, url, isAnnouncement, isAuthor, canEdit, canComment, canVote, canPin, canSetType, canChangeBoard, canLock, hasVoted, canReport, hasReported, isAnswerable, tutorialPages, preview(length: ${ initVariables . markdown . length || 150 } , removeMarkdown: ${ initVariables . markdown . removeMarkdown || true } )` ,
3033 graphql : `${ initVariables . endpoints . gql || 'https://staging.replit.com/graphql' } ` ,
0 commit comments