UNPKG

1.22 kBTypeScriptView Raw
1import { LegacyOperation } from './interfaces';
2import { ProcessorModule, APIModule, ReaderModule } from './operations';
3export interface LoaderOptions {
4 /** Path to teraslice lib directory */
5 terasliceOpPath?: string;
6 /** Path to where the assets are stored */
7 assetPath?: string;
8}
9export declare class OperationLoader {
10 private readonly options;
11 private readonly availableExtensions;
12 constructor(options?: LoaderOptions);
13 find(name: string, assetIds?: string[]): string | null;
14 /**
15 * Load any LegacyOperation
16 * DEPRECATED to accommadate for new Job APIs,
17 * use loadReader, or loadProcessor
18 */
19 load(name: string, assetIds?: string[]): LegacyOperation;
20 loadProcessor(name: string, assetIds?: string[]): ProcessorModule;
21 loadReader(name: string, assetIds?: string[]): ReaderModule;
22 loadAPI(name: string, assetIds?: string[]): APIModule;
23 private findOrThrow;
24 private isLegacyReader;
25 private shimLegacyReader;
26 private isLegacyProcessor;
27 private shimLegacyProcessor;
28 private fileExists;
29 private require;
30 private resolvePath;
31 private verifyOpName;
32 private findCode;
33 private isDir;
34 private getBuiltinDir;
35}