-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
const pkg = require('../package') | ||
|
||
/** | ||
* A manifest describing the capabilites of a processor. | ||
*/ | ||
export interface Manifest { | ||
/** | ||
* A description of the Stencila package in which this | ||
* processor is implemented | ||
*/ | ||
stencila: {}, | ||
|
||
/** | ||
* Services that this processor implements | ||
*/ | ||
services: { | ||
/** | ||
* A list of MIME types that the processor is able to import | ||
*/ | ||
import: Array<string> | ||
|
||
/** | ||
* A list of MIME types that the processor is able to export | ||
*/ | ||
export: Array<string> | ||
|
||
/** | ||
* A list of types that this processor is able to compile | ||
*/ | ||
compile: Array<string> | ||
|
||
/** | ||
* A list of types that this processor is able to build | ||
*/ | ||
build: Array<string> | ||
|
||
/** | ||
* A list of types that this processor is able to execute | ||
*/ | ||
execute: Array<string> | ||
} | ||
} | ||
|
||
/** | ||
* Get the manifest for this processor | ||
*/ | ||
export default function manifest (): Manifest { | ||
return { | ||
stencila: { | ||
name: pkg.name, | ||
url: pkg.homepage, | ||
version: pkg.version | ||
}, | ||
services: { | ||
import: ['application/ld+json'], | ||
export: ['application/ld+json'], | ||
compile: [], | ||
build: [], | ||
execute: [] | ||
} | ||
} | ||
} |