mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-29 09:32:43 +00:00
Re-add ohthetreesyoullgrow partner
This commit is contained in:
@@ -57,6 +57,14 @@ export async function fetchVanillaMcdoc() {
|
||||
}
|
||||
}
|
||||
|
||||
export async function fetchDependencyMcdoc(dependency: string) {
|
||||
try {
|
||||
return cachedFetch(`/mcdoc/${dependency}.mcdoc`, { decode: res => res.text(), refresh: true })
|
||||
} catch (e) {
|
||||
throw new Error(`Error occured while fetching ${dependency} mcdoc: ${message(e)}`)
|
||||
}
|
||||
}
|
||||
|
||||
export async function fetchRegistries(versionId: VersionId) {
|
||||
console.debug(`[fetchRegistries] ${versionId}`)
|
||||
const version = config.versions.find(v => v.id === versionId)!
|
||||
|
||||
@@ -86,8 +86,10 @@ export class SpyglassService {
|
||||
public async getFile(uri: string, emptyContent?: () => string) {
|
||||
let docAndNode = this.service.project.getClientManaged(uri)
|
||||
if (docAndNode === undefined) {
|
||||
const lang = core.fileUtil.extname(uri)?.slice(1) ?? 'txt'
|
||||
const content = await this.readFile(uri)
|
||||
const doc = TextDocument.create(uri, 'json', 1, content ?? (emptyContent ? emptyContent() : ''))
|
||||
this.service.project['bindUri'](uri)
|
||||
const doc = TextDocument.create(uri, lang, 1, content ?? (emptyContent ? emptyContent() : ''))
|
||||
await this.service.project.onDidOpen(doc.uri, doc.languageId, doc.version, doc.getText())
|
||||
docAndNode = await this.service.project.ensureClientManagedChecked(uri)
|
||||
}
|
||||
@@ -234,6 +236,10 @@ export class SpyglassService {
|
||||
models: {
|
||||
category: 'model',
|
||||
},
|
||||
// Partner resources
|
||||
'ohthetreesyoullgrow/configured_feature': {
|
||||
category: 'ohthetreesyoullgrow:configured_feature',
|
||||
},
|
||||
},
|
||||
},
|
||||
lint: {
|
||||
|
||||
Reference in New Issue
Block a user