MCPcopy
hub / github.com/npmx-dev/npmx.dev / getPDSConfig

Function getPDSConfig

modules/standard-site-sync.ts:106–128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

104
105// Get config from env vars
106function getPDSConfig():
107 | { pdsUrl: string; handle: AtIdentifierString; password: string }
108 | undefined {
109 const pdsUrl = process.env.NPMX_PDS_URL
110 if (!pdsUrl) {
111 console.warn('[standard-site-sync] NPMX_PDS_URL not set, skipping sync')
112 return
113 }
114
115 const handle = process.env.NPMX_IDENTIFIER
116 const password = process.env.NPMX_APP_PASSWORD
117
118 if (!handle || !password || !isAtIdentifierString(handle)) {
119 console.warn('[standard-site-sync] NPMX_IDENTIFIER or NPMX_APP_PASSWORD not set, skipping sync')
120 return
121 }
122
123 return {
124 pdsUrl,
125 handle,
126 password,
127 }
128}
129
130async function syncsiteStandardDocuments(client: Client, documentsToSync: DocumentToSync[]) {
131 let currentCommit = await client.xrpc(com.atproto.sync.getLatestCommit, {

Callers 1

setupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected