parseAuthoringReadContext
@gooi/language-server / contracts/read-context / parseAuthoringReadContext
Function: parseAuthoringReadContext()
parseAuthoringReadContext(
value):object
Defined in: authoring/authoring-diagnostics/src/contracts/read-context.ts:48
Parses snapshot-backed read context input.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | unknown | Untrusted context value. |
Returns
object
Parsed read context.
capabilityIndexSnapshot
capabilityIndexSnapshot:
object=capabilityIndexSnapshotSchema
Type Declaration
capabilityIndexSnapshot.artifactHash
artifactHash:
string
capabilityIndexSnapshot.artifactVersion
artifactVersion:
"1.0.0"=capabilityIndexArtifactVersionSchema
capabilityIndexSnapshot.capabilities
capabilities:
object[]
Type Declaration
capabilityIndexSnapshot.catalogIdentity
catalogIdentity:
object=catalogIdentitySchema
Type Declaration
capabilityIndexSnapshot.catalogIdentity.catalogHash
catalogHash:
string
capabilityIndexSnapshot.catalogIdentity.catalogSource
catalogSource:
string
capabilityIndexSnapshot.catalogIdentity.catalogVersion
catalogVersion:
string
capabilityIndexSnapshot.sourceHash
sourceHash:
string
compiledEntrypointBundleIdentity
compiledEntrypointBundleIdentity:
object=compiledEntrypointBundleIdentitySchema
Type Declaration
compiledEntrypointBundleIdentity.artifactHash
artifactHash:
string=artifactHashSchema
compiledEntrypointBundleIdentity.artifactId
artifactId:
"CompiledEntrypointBundle"
compiledEntrypointBundleIdentity.artifactVersion
artifactVersion:
string
documentPath
documentPath:
string
documentText
documentText:
string
documentUri
documentUri:
string
lockfile
lockfile:
object=authoringLockfileSchema
Type Declaration
lockfile.artifactHash
artifactHash:
string=artifactHashSchema
lockfile.artifactVersion
artifactVersion:
"1.0.0"=envelopeVersionSchema
lockfile.catalogSnapshot
catalogSnapshot:
object=catalogSnapshotSchema
Type Declaration
lockfile.catalogSnapshot.catalogHash
catalogHash:
string=artifactHashSchema
lockfile.catalogSnapshot.catalogSource
catalogSource:
string
lockfile.catalogSnapshot.catalogVersion
catalogVersion:
string
lockfile.envelopeVersions
envelopeVersions:
object=envelopeVersionSetSchema
Type Declaration
lockfile.envelopeVersions.authoringDiagnosticsEnvelope
authoringDiagnosticsEnvelope:
"1.0.0"=envelopeVersionSchema
lockfile.envelopeVersions.authoringErrorEnvelope
authoringErrorEnvelope:
"1.0.0"=envelopeVersionSchema
lockfile.envelopeVersions.authoringRequestEnvelope
authoringRequestEnvelope:
"1.0.0"=envelopeVersionSchema
lockfile.envelopeVersions.authoringResultEnvelope
authoringResultEnvelope:
"1.0.0"=envelopeVersionSchema
lockfile.remoteSource?
optionalremoteSource:object
Type Declaration
lockfile.remoteSource.fetchedAt
fetchedAt:
string
lockfile.remoteSource.id
id:
string
lockfile.remoteSource.url
url:
string
lockfile.requiredArtifacts
requiredArtifacts:
object=requiredArtifactsSchema
Type Declaration
lockfile.requiredArtifacts.capabilityIndexSnapshot
capabilityIndexSnapshot:
object=authoringArtifactIdentitySchema
Type Declaration
lockfile.requiredArtifacts.capabilityIndexSnapshot.artifactHash
artifactHash:
string=artifactHashSchema
lockfile.requiredArtifacts.capabilityIndexSnapshot.artifactId
artifactId:
string
lockfile.requiredArtifacts.capabilityIndexSnapshot.artifactVersion
artifactVersion:
string
lockfile.requiredArtifacts.compiledEntrypointBundle
compiledEntrypointBundle:
object=authoringArtifactIdentitySchema
Type Declaration
lockfile.requiredArtifacts.compiledEntrypointBundle.artifactHash
artifactHash:
string=artifactHashSchema
lockfile.requiredArtifacts.compiledEntrypointBundle.artifactId
artifactId:
string
lockfile.requiredArtifacts.compiledEntrypointBundle.artifactVersion
artifactVersion:
string
lockfile.requiredArtifacts.symbolGraphSnapshot
symbolGraphSnapshot:
object=authoringArtifactIdentitySchema
Type Declaration
lockfile.requiredArtifacts.symbolGraphSnapshot.artifactHash
artifactHash:
string=artifactHashSchema
lockfile.requiredArtifacts.symbolGraphSnapshot.artifactId
artifactId:
string
lockfile.requiredArtifacts.symbolGraphSnapshot.artifactVersion
artifactVersion:
string
lockfile.sourceHash
sourceHash:
string=artifactHashSchema
lockfile.sourceKind
sourceKind:
"workspace-local"
sourceSpec?
optionalsourceSpec:unknown
symbolGraphSnapshot
symbolGraphSnapshot:
object=symbolGraphSnapshotSchema
Type Declaration
symbolGraphSnapshot.artifactHash
artifactHash:
string
symbolGraphSnapshot.artifactVersion
artifactVersion:
"1.0.0"=symbolGraphArtifactVersionSchema
symbolGraphSnapshot.references
references:
object[]
Type Declaration
symbolGraphSnapshot.renameConstraints
renameConstraints:
object[]
Type Declaration
symbolGraphSnapshot.sourceHash
sourceHash:
string
symbolGraphSnapshot.symbols
symbols:
object[]
Type Declaration
Example
const context = parseAuthoringReadContext(rawContext);